mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 22:00:08 +00:00
Merge pull request #3141 from muggenhor/sudo-maintain-cursor-pos
sudo: maintain cursor position
This commit is contained in:
commit
412a92e45e
1 changed files with 2 additions and 3 deletions
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
sudo-command-line() {
|
sudo-command-line() {
|
||||||
[[ -z $BUFFER ]] && zle up-history
|
[[ -z $BUFFER ]] && zle up-history
|
||||||
[[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER"
|
[[ $BUFFER != sudo\ * ]] && LBUFFER="sudo $LBUFFER"
|
||||||
zle end-of-line
|
|
||||||
}
|
}
|
||||||
zle -N sudo-command-line
|
zle -N sudo-command-line
|
||||||
# Defined shortcut keys: [Esc] [Esc]
|
# Defined shortcut keys: [Esc] [Esc]
|
||||||
|
|
Loading…
Reference in a new issue