I know this is old but for anyone stumbling across this and they are using zsh then what you really want is to use hash to modify the command hash table so that you can then get an even shorter syntax and not need the extra aliases. E.g. if you run this:
hash -d o=~/Downloads/
you can then do:
$ cd ~o
or even:
$ ~o
or even even:
$ o
to change directory. You can also then substitute in ~o anywhere where you would usually place a path such as ls ~0.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I know this is old but for anyone stumbling across this and they are using
zsh
then what you really want is to usehash
to modify the command hash table so that you can then get an even shorter syntax and not need the extra aliases. E.g. if you run this:you can then do:
or even:
or even even:
to change directory. You can also then substitute in
~o
anywhere where you would usually place a path such asls ~0
.