Let's squash your commands.
Squash converts your shell commands to a named commands and you can run the command using the name given to it using squash.
Give us a ⭐ if you like our work ❤️
Please consider donating, if you like my work
$ npm i -g ak-squash
-
Export the squash path, to make the commands executable.
export PATH=$PATH:/usr/local/.squash
To make this export permanent read here
-
Now try running
squash --help
. This should display details on using squash -
This completes your setup
Once you are done with the setup. You can start giving names to your commands.
Syntax for using squash is
squash {{COMMAND}} --alias={{NAME_FOR_COMMAND}}
- COMMAND: This is your full command which needs to be given a name
- NAME_FOR_COMMAND: This is the name which you want to assign to the command
Note: You can wrap the command between "COMMAND"
if the command contains any types of quotes or spaces
$ squash ls /home/squash --alias=list_squash
Now for using above created command just run
$ list_squash
- --alias: to give name to a command
- --help: to get help for squash
- --list: to list all the created commands
- --system_alias: to list all the system reserved aliases
- It does not work in windows.
- It does not supports
cd
command - Manually exporting the path
/usr/local/.squash
is very important.
We are constantly working on improving squash and we need all the help we can get. You can contribute to this project by giving suggestions, fixing open issues or by implementing a new feature. Read our contibution guide here