mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-13 03:12:21 +01:00
Update sudo.plugin.zsh
Keep cursor position when prepending sudo
This commit is contained in:
parent
550ccca91c
commit
96fb63fdc1
1 changed files with 1 additions and 2 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…
Add table
Add a link
Reference in a new issue