a unix shell written in rust
- has .rc file (in
~/.rstshrc
) - has syntax highlighting
- fish-like autosuggestion
- emacs editing mode ,like what
bash
has (using rustyline)
- has
source
builtin, so you can run a file for set of commands. - support
export
andalias
- even with spaces (alias ls = ls --color=auto
orexport PATH =$PATH:$HOME/.cargo/bin/
), see more examples in the examples folder
- support pipelines (with space on both sides) (like
cat file | grep finder
) - support bash comments
- support PS1 variable - with escapes and even with some commands : for example, you can use the starship prompt with
export PS1="$(starship prompt --status=$exit_status)"
- to make that the default, write it to~/.rstshrc
- every time command exit with no-success, the
>
at the end of the prompt will be red in the default prompt, instead of green (the color present in the$PS1
as$red_or_green
, and the last exit status present as$exit_status
) - live pwd in prompt (like, when using
cd folder
, the prompt will be updated to~/folder
).
download the executable from github-releases (created by the github action automatically ), then run it through the command line, (for linux, you need to chmod +x
it first)
- install
rustup
andcargo
- Clone this repo (
git clone https://github.com/matan-h/rust-shell.git
) - run it with
cargo run