diff --git a/README.md b/README.md index a68b2ea..1c228a8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ Cicada is a simple Unix shell written in Rust. ## Try out cicada with Docker ``` -$ docker pull mitnk/cicada $ docker run --rm -it mitnk/cicada (in-cicada) $ cinfo ``` @@ -88,7 +87,6 @@ Read APIs here: [https://docs.rs/cicada/](https://docs.rs/cicada/). ## FAQs -- [Why another shell?](https://github.com/mitnk/cicada/blob/master/docs/faq.md#user-content-why-another-shell) - [Compare to bash/zsh/etc?](https://github.com/mitnk/cicada/blob/master/docs/faq.md#user-content-compare-to-other-shells) - [Is cicada POSIX-compatible?](https://github.com/mitnk/cicada/blob/master/docs/faq.md#user-content-is-cicada-posix-compatible) - [Will my bash/zsh scripts continue work in cicada?](https://github.com/mitnk/cicada/blob/master/docs/faq.md#user-content-will-my-bashzsh-scripts-continue-work-in-cicada) diff --git a/docs/README.md b/docs/README.md index 7a7e053..5c5e8fb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,7 +18,6 @@ Cicada is a simple bash-like Unix shell. ### Try out Cicada Shell with Docker ``` -$ docker pull mitnk/cicada $ docker run --rm -it mitnk/cicada (in-cicada) $ cinfo ``` diff --git a/docs/install.md b/docs/install.md index 8e3a6fb..9a99ba5 100644 --- a/docs/install.md +++ b/docs/install.md @@ -2,7 +2,45 @@ There are a few ways to install cicada into your system. -## 1) Install via Pre-built Binaries +## Install on Some Known Linux Distributions + +### Alpine Linux + +[https://pkgs.alpinelinux.org/package/edge/testing/x86_64/cicada](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/cicada) + +``` +$ apk add cicada -X https://dl-cdn.alpinelinux.org/alpine/edge/testing/ +``` + +### Arch Linux + +[cicada shell on AUR](https://aur.archlinux.org/packages/cicada-shell) + +> Note: `makepkg` will install [rust](https://www.rust-lang.org/) system and +> other packages. + +``` +$ git clone https://aur.archlinux.org/cicada-shell.git +$ cd cicada-shell/ +$ makepkg -si +``` + +## Generic Install Options + +### Option A: cargo + +If [rust](https://rustup.rs/) installed on your system, you can +install cicada with: +``` +$ cargo install -f cicada +``` + +Optionally, you can move the binary downloaded to a common place: +``` +$ cp ~/.cargo/bin/cicada /usr/local/bin/cicada +``` + +### Option B: via Pre-built Binaries First download the latest right binary for your system from [Release Page](https://github.com/mitnk/cicada/releases). @@ -17,15 +55,30 @@ $ mv cicada-mac-0.9.2 /usr/local/bin/cicada $ mv cicada-linux-0.9.2 /usr/local/bin/cicada $ chmod +x /usr/local/bin/cicada +``` + +> Due to too many existing CPU arch and different libc versions on same system, +> I tend to stop providing pre-built binaries. Please consider to use other +> options. + +### Option C: via Source -# try it -$ cicada -(in-cicada) $ cinfo +Note: [Rust environment](https://rustup.rs/) (Rust stable or above) is required. + +``` +$ git clone https://github.com/mitnk/cicada +$ cd cicada +# try cicada without installing +$ make +$ make install ``` -### Set cicada as your login shell +cicada will be installed under `/usr/local/bin` + +## Set cicada as your login shell -**WARNING**: Please test cicada on your system before set it as default shell. +**WARNING**: Please test cicada on your system before setting it as default +shell. In file `/etc/shells`, append the following line: @@ -41,33 +94,26 @@ $ chsh -s /usr/local/bin/cicada Next time you open a terminal window, cicada shell will be the default one. -## 2) Install via cargo crates +### default shell on GNOME Terminal -If you already have [Rust environment](https://rustup.rs/), you can install -cicada with `cargo`: +For GNOME Terminal on Ubuntu or other systems, you may need reboot after +running `chsh`. If failed, another way to config terminal to use cicada is +following: -``` -$ cargo install -f cicada -``` +Preferences --> Profiles (Unnamed) --> Tab Command: +- [checked] Run command as a login shell +- [checked] Run a custom command instead of my shell: + - Custom command: `cicada -l` -This will install cicada into `~/.cargo/bin/`. +## inputrc -``` -$ mv ~/.cargo/bin/cicada /usr/local/bin/ -$ cicada -``` - -## 3) Install via Source - -Note: [Rust environment](https://rustup.rs/) (Rust stable or above) is required. +For better terminal use experience, I have following in my `~/.inputrc` file: ``` -$ git clone https://github.com/mitnk/cicada -$ cd cicada -# try cicada without installing -$ make -# install cicada into /usr/local/bin/cicada -$ make install -$ cicada +"\e[1;3D": backward-word +"\e[1;3C": forward-word +"\e[1;9D": backward-word +"\e[1;9C": forward-word +"\e[A": history-search-backward +"\e[B": history-search-forward ``` -