How can I alias ...
to ../..
in Bash?
I am aware that other answers allow alias '...'='cd ../..'
but I’d like to be able to address the directory two levels up with other commands, allowing for:
cd ...
ls ...
realpath ...
I have tried alias '...'='../..'
but when trying to use this I get the following:
$ alias '...'='../..'
$ type ...
... is aliased to '../..'
$ cd ...
bash: cd: ...: No such file or directory
I’m aware aliases are intended for use with commands. Is there a way to achieve the same functionality for a path in this case?