1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-17 23:57:52 +08:00

Compare commits

..

No commits in common. "cd17aed9e109692273b5c251414ee733cba704f2" and "03b6a72576cb0f0b53abde25d409e8026d5c4ee9" have entirely different histories.

2 changed files with 1 additions and 12 deletions

View File

@ -273,7 +273,7 @@ DISABLE_AUTO_UPDATE=true
If you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?) you just need to run:
```shell
omz update
upgrade_oh_my_zsh
```
Magic! 🎉

View File

@ -14,14 +14,6 @@
sudo-command-line() {
[[ -z $BUFFER ]] && LBUFFER="$(fc -ln -1)"
# Save beginning space
local WHITESPACE=""
if [[ ${LBUFFER:0:1} == " " ]] ; then
WHITESPACE=" "
LBUFFER="${LBUFFER:1}"
fi
if [[ -n $EDITOR && $BUFFER == $EDITOR\ * ]]; then
if [[ ${#LBUFFER} -le ${#EDITOR} ]]; then
RBUFFER=" ${BUFFER#$EDITOR }"
@ -46,9 +38,6 @@ sudo-command-line() {
else
LBUFFER="sudo $LBUFFER"
fi
# Preserve beginning space
LBUFFER="${WHITESPACE}${LBUFFER}"
}
zle -N sudo-command-line
# Defined shortcut keys: [Esc] [Esc]