-
Notifications
You must be signed in to change notification settings - Fork 23
go execute
go-execute, or rather gx
, is a tool that borrows from the ideas of the go script to allow "bookmarking" of commands rather than directories.
In general one may find that there are different categories of commands depending on the complexity and how they are used. More complicated commands are better put in an executable shell script that is placed in your PATH, while other simpler commands may end up as aliases.
Then there are other commands that are not used that often that are not so complicated that they need to be stored in shell scripts, and they also do not need to be readily available as an alias.
gx
allows for such commands to be stored with a memorable key and to execute the command using gx <key>
. It also allows for some control over where the arguments, if any, are placed.
Additionally there is a command line argument --setup_aliases
that allows for all the stored commands to be set up as aliases; effectively making gx
a glorified alias manager.
This is by no means a must have, but I tend to find this easier to use than aliases and just wanted to give a shout that this exists.
Dependencies:
-
bash
orzsh
To set this up you will need:
- go-execute (follow installation instructions on the project page)
Back to Other scripts and life hacks.
Concepts | Configuration | Features | Flags | Functionality | Functions