In the tcsh shell, the elements of the directory stack can be access on the command line using =<#>, e,g, =0 =1 .... and a sampled command like: cp Something =1/ would copy file Something to the directory pointed to by the 2nd element of the directory stack (DIRSTACK).
Is there a similar mechanism for the bash shell?
dirsbuiltin. You could build on that.<n>doesn't work for me. The angle brackets cause an error. Did you mean~nfor values ofnstarting from zero (for example~1)?