Skip to content
المشاريع

حول

Crush هي صدفة لسطر الأوامر، وهي أيضًا لغة برمجة حديثة وقوية.

لغات البرمجة وبيئات التشغيل

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
+٣
خلال شهر
+٢

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

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!

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…