Skip to content
Projets

À propos

Crush est un shell en ligne de commande qui est également un langage de programmation moderne et puissant.

Langages et environnements d’exécution

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
+3
in 1 month
+2

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Crush

Crush is an attempt to make a traditional command line shell that is also a modern programming language. It has the features one would expect from a modern programming language like a type system, closures and lexical scoping, but with a syntax geared toward both batch and interactive shell usage.

Building and installing Crush

OS X dependencies

  • Install Brew.
  • Install openssl brew install openssl
  • Install protobuf brew install protobuf
  • Install git xcode-select --install

Ubuntu dependencies

  • Update apt index sudo apt update
  • Install dependencies sudo apt install build-essential git curl pkg-config libssl-dev libdbus-1-dev libsystemd-dev protobuf-compiler-grpc

Install Rust

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

The installer adds ~/.cargo/bin to your path in new shells. To use it in the shell you installed it from, run

. "$HOME/.cargo/env"

Compile and install crush

clone this repository,

git clone https://github.com/liljencrantz/crush.git

and run

cd crush && cargo install --path .

and you should have a working binary to try out in ~/.cargo/bin. That directory should already be in your path, so just write crush to run the shell.

Overriding the system config directory

Crush looks for a system-wide config file (config.crush) and a system-wide modules directory (see docs/config.md) under /etc by default. A packager building for a different prefix can override this at build time by setting the CRUSH_SYSCONFDIR environment variable, the same way ./configure --sysconfdir=... would for an autoconf-based project:

CRUSH_SYSCONFDIR=/usr/local/etc cargo install --path .

This is baked into the resulting binary at compile time, not read from the environment at runtime -- rebuilding (even just touch build.rs && cargo build) is required to pick up a changed value.

Have fun!

Explorer des projets similaires

Chargement…