1.2.3 • Published 4 years ago
alium v1.2.3
alium 🍝
Save CLI commands as aliases on a directory basis!
Requires node >= 10.x
Installation
npm install alium -goryarn global add aliumor similar.put this in your
~/.bashrcor somewhere suitable:ali () { ali-cleanup () { sleep 1 && test -f ~/.alium/cmd && rm -f ~/.alium/cmd; } alium-bin $@; if [ $? -eq 23 ]; then ali-cleanup & test -f ~/.alium/cmd && source ~/.alium/cmd fi }source ~/.bashrcbefore you try to useali- That's it 🎉
Usage
Quickstart
Options:
-v, --version output the version number
-l, --list List aliases in this directory
-p, --pick Pick from aliases for this directory
-s, --save [alias] Save an alias for this directory
-r, --remove [alias] remove alias from this directory
-h, --help output usage informationTo add a new command to the current directory: ali -s "my-command"
Note: env variables have to be escaped: ali -s "echo \$SHELL"
ali will then ask you what to name the new alias.
List all available aliases: ali -l or just ali.
Remove alias: ali -r foobar
Typical usage
# After you have run
$ some-long-winded-command --with parameters --you can --never ./remember
# You can now do
$ ali -s "!!"
# To save a new alias for the aforementioned command
$ ali -s "some-long-winded-command --with parameters --you can --never ./remember"Licence
MIT