Some wonderful person (I can't believe it was me) made me a .initrc file for my work home directory. It contained one line:
set mark-directories off
I wouldn't press you to go out and copy me, for its effect is to stop tab-completion from putting the trailing / onto a completed directory name, so you have to do cd
One of my colleagues found this config item and thus fixed this terrible problem I'd been having.
However, this led me to reading more about bash and its interaction with readline. It turns out that you can bind commands to a bash key combination. This has the effect of running the command at that point, regardless of whether or not you're in the middle of editing another command.
I bound M-'-' to pushd ..' and M-'=' to 'popd'. This lets you zoom up the filesystem tree, then zoom back in once you're finished with it. Very handy:
bind -x '"\M--": pushd ..'
bind -x '"\M-=": popd'
I'd be interested to hear what bindings you come up with.
Clever. Here’s a quick "port" to zsh:
function up-one-dir { set -E; pushd ..; set +E; zle redisplay; zle -M `pwd` }
function back-one-dir { set -E; popd; set +E; zle redisplay; zle -M `pwd` }
zle -N up-one-dir
zle -N back-one-dir
bindkey "^[-" up-one-dir
bindkey "^[=" back-one-dir