mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Revert "Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh into patch-1"
This reverts commit56e0ab6a30, reversing changes made to87f7098dd4.
This commit is contained in:
parent
56e0ab6a30
commit
186dd035ae
4 changed files with 13 additions and 71 deletions
22
plugins/sudo/sudo.zsh
Normal file
22
plugins/sudo/sudo.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# sudo will be inserted before the command
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Dongweiming <ciici123@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
sudo-command-line() {
|
||||
[[ -z $BUFFER ]] && zle up-history
|
||||
[[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER"
|
||||
zle end-of-line
|
||||
}
|
||||
zle -N sudo-command-line
|
||||
# Defined shortcut keys: [Esc] [Esc]
|
||||
bindkey "\e\e" sudo-command-line
|
||||
Loading…
Add table
Add a link
Reference in a new issue