Commit 412a92e4 authored by Robby Russell's avatar Robby Russell
Browse files

Merge pull request #3141 from muggenhor/sudo-maintain-cursor-pos

sudo: maintain cursor position
parents ff823f81 1e7c6743
......@@ -13,9 +13,8 @@
# ------------------------------------------------------------------------------
sudo-command-line() {
[[ -z $BUFFER ]] && zle up-history
[[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER"
zle end-of-line
[[ -z $BUFFER ]] && zle up-history
[[ $BUFFER != sudo\ * ]] && LBUFFER="sudo $LBUFFER"
}
zle -N sudo-command-line
# Defined shortcut keys: [Esc] [Esc]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment