Montag, 4. August 2008

Using ‘+’ and ‘-’ for Shell Aliases

The directory stack of Unix shells is a useful feature to set temporary “bookmarks” to directories, but I find pushd and popd long and cumbersome to type. I can recommend to alias them to ‘+’ and ‘-’, which are easy to remember and fast to type:

alias +='pushd .'
alias -- -='popd'

... comment