This tool suggests aliases based on non-aliased frequently used commands, and provides a painless way to apply them.
- Run:
$ ./gradlew fatJar
- Create a home directory for the application
- Into the home directory, copy the files install.sh, build/libs/bag-1.0-SNAPSHOT.jar and build/resources/main/alias.sh
- From the home directory, run:
$ source install.sh
-OR- Download from here and install:
- Unzip
- From the unzipped directory, run:
$ source install.sh
bag [-c <index> [-a <alternative alias name>]]
-a,--alternative <alias name> create an alias with an alternative name
-c,--create <index> create an alias with the suggested name
-h,--help print usage
-l,--print-all print a list of all suggested aliases
-p print a list of suggested aliases
The new aliases become available after restarting the shell.
- Printing a list of suggested aliases
$ bag -p
SUGGESTED COMMAND TIMES USED
(1) fab foo -a -b -c 42
(2) bde bar -d -e -f 5
- Creating a suggested alias
$ bag -c 1
New alias was created: alias fab='foo -a -b -c'
- Creating a suggested alias with an alternative name
$ bag -c 2 -a bam
New alias was created: alias bam='bar -d -e -f'