You are not logged in.
Pages: 1
I'm trying to make bash redraw the prompt when using cd inside a command that is bound to a key.
For example, if I bind the command "cd .." to the keys C-x C-d:
bind -x '"\C-x\C-d": cd ..'
and press C-x C-d, it looks like nothing happened, but in fact the directory gets changed. You just don't see the change until you press return and the prompt is redrawn. This may cause bad mistakes when you think you're in the wrong directory.
Any ideas?
Last edited by hut (2010-09-03 20:35:57)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
have you tried with C-l? doesn't that refresh the prompt?
Offline
have you tried with C-l? doesn't that refresh the prompt?
Nope, in this case not even C-l helps.
Btw. It works with zsh with "zle -I". I thought there's got to be a bash equivalent.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
You could either just use a macro:
bind '"\C-x\C-d":"cd ..\C-m"'
or, if you really want to use bind -x:
bind -x '"\201": cd ..'
bind '"\C-x\C-d":"\201\C-m"'
Offline
You could either just use a macro:
bind '"\C-x\C-d":"cd ..\C-m"'
or, if you really want to use bind -x:
bind -x '"\201": cd ..' bind '"\C-x\C-d":"\201\C-m"'
Ah, great. Thanks. I'm glad it's possible.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Pages: 1