How to create an alias for goto itself?
shoda-tibco opened this issue ยท 3 comments
goto
is an awesome tool and I use it heavily. However I would like to alias goto
itself to something shorter, perhaps g
or gt
. However if I do a simple alias g=goto
, bash completions do not work for the aliased version.
It would be nice if there was an option to install goto
with an aliased name, or some instructions in the README on how to set up an alias such that completions still work, e.g. by registering the same completion functions for the alias as for goto
.
By looking at the code, you should be able to get autocompletion working by just renaming the goto
executable itself.
Edit:
I just installed goto
and ran alias g='goto'
and it worked out of the box for ZSH. Bash seems to need some extra work.
Hi @shoda-tibco and thank you ๐
I just pushed a new version (1.2.4) and I believe it resolves your issue.
Can you please check it out and let me know if it works on your system? I tested it in Ubuntu under Bash and it works as expected.
@spezifanta Thanks for the info ๐ The new version affects ZSH as well, hope it works there too ๐ค