How to create an bash alias for the command “cd ~1”
问题 In BASH, I use "pushd . " command to save the current directory on the stack. After issuing this command in couple of different directories, I have multiple directories saved on the stack which I am able to see by issuing command "dirs". For example, the output of "dirs" command in my current bash session is given below - 0 ~/eclipse/src 1 ~/eclipse 2 ~/parboil/src Now, to switch to 0th directory, I issue a command "cd ~0". I want to create a bash alias command or a function for this command.