Switch rust alternative CLI and traditional CLI in one command.
Recently, modern rust CLI tools alternative to traditional CLI like grep
, ls
are emerging.
For example,
ripgrep is faster than grep
in many cases,
exa is more features and better defaults than ls
.
I want to use rust tools, but I unintentionally use traditional command often.
rustivate
in bash, you can set aliases.
alias grep='ripgrep'
alias ls='exa'
alias du='dust'
alias cat='bat'
alias find='fd'
These alias enable us to use alternative CLI without extra our memory.
Sometimes you need traditional tools, you can release all aliases by derustivate
.
And If you want to use rust alternative CLI again, rustivate
in shell.
- exa: Modern replacement for
ls
- ripgrep: Fast line-oriented search tool alternative to
grep
- fd: Simple, fast and user-friendly alternative to
find
- bat:
cat
clone with syntax highlighting and Git integration. - dust: Like
du
but more intuitive - bottom: graphical process/system monitor
Currently, rustivate
supports Linux and bash only.
cargo is needed.
git clone https://github.com/fukatani/rustivate.git
cd rustivate
cargo run # Install rust CLIs
echo "source ~/.rustivate/aliases.sh" >> ~/.bashrc
source ~/.bashrc
If you want to use rust alternative as default,
echo "rustivate" >> ~/.bashrc
(but I don't recommend it.)
In bash,
rustivate
: set alternative tools enable.
derustivate
: set alternative tools disable.
Edit ~/.rustivate/user_settings.json
please.
This is example for to use ripgrep
with grep
command.
[
{"name": "grep", "value": "ripgrep"}
]
Default settings is here.
All alternative CLT listed in above is enabled in default.
- Remove description about rustivate in
~/.bashrc
- Remove cloned git repository by
rm -rf rustivate