Skip to content
Jirido edited this page Nov 2, 2016 · 4 revisions

Welcome to the ali wiki!

Ali is very simple program. when you have a command you want to have an alias for you just write it or roll it up on the commandline and put an "ali" first on the line like this ali mycomand -option /string/etc ali will then ask you what alias you want for this command. Alernativly you write the alias together with the command separated with a = like this ali C=mycommand -anyoptions /evetuall/string Then ali will ask you if you want to add alias C='mycommand -anyoptions /eventuall/string' to your aliases file .bash_aliases. After you accept it will inform you if it succeded. source .bashrc to update and exit. Also you can start ali without arguments and be quized about command and then alias for that command.

The command alis will list your aliases and can be given a limiting regular expression searsh terms that search both aliases and commands. with oprands -a or -c it can match only aliases or commands. Default behaviour can be set tru match=a or match=c in the settings. Results of alis will be dumped to screen trough less if useless=1 is set in the config part of the ali script or the operand -l is used. The operand -# can be passed to also list the commented aliases. alid followed of an alias will delete that alias. With the operand -# alid will only comment it out. To uncomment an alias, use.. alid -## alias. Again The operand -# can be passed to alis to also list the commented aliases.

The text strings used for the Quis and comfirmations can easyli be translated and are located in the beginning of the ali script close to the settings.

ali can also set the use of aliases to paste the actuall command to the comandline before execution if the showcommand=1 is set in the settings. This can be good for the posibility to change the commands string or for educational purposes.

There is also possible to make a list of aliases to be shown like this by adding the operand -sh when adding the alias with ali. This behaviour will be reversed if showcommand=1 is set. The status of an alias in regard to this list can be changed by passing the operands -sh and -shx to alid together with the alias or a matching regular expression with the operand -r. Like this.. alid -sh myalias or alid -shx myalias or alid -sh -r regexp or with a regexpression for the commands with the operand -rc. So.. alid -shx -rc -r myregxpress All operands are easy to change in the source.

Instalation is easy just put .ali in your home folders root and source it in .bashrc with a.. include ~/.ali ali will use an existing .bash_aliases if it exists els make one. Thats it.

Clone this wiki locally