mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge 791a926bc5 into 1c958e02a5
This commit is contained in:
commit
0357020d49
1 changed files with 10 additions and 0 deletions
|
|
@ -91,3 +91,13 @@ bindkey "^[m" copy-prev-shell-word
|
|||
## Fix weird sequence that rxvt produces
|
||||
#bindkey -s '^[[Z' '\t'
|
||||
#
|
||||
|
||||
# [ESC ESC] - insert sudo in the Begining of line
|
||||
sudo-command-line() {
|
||||
[[ -z $BUFFER ]] && zle up-history
|
||||
[[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER"
|
||||
zle end-of-line
|
||||
}
|
||||
zle -N sudo-command-line
|
||||
bindkey "\e\e" sudo-command-line
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue