Skip to content
Snippets Groups Projects
Verified Commit e2a63dd7 authored by Baptiste Girard-Carrabin's avatar Baptiste Girard-Carrabin :speech_balloon:
Browse files

remove useless parts

parent c1d1089b
Branches
No related tags found
No related merge requests found
...@@ -14,20 +14,6 @@ ...@@ -14,20 +14,6 @@
watch-command-line() { watch-command-line() {
[[ -z $BUFFER ]] && LBUFFER="$(fc -ln -1)" [[ -z $BUFFER ]] && LBUFFER="$(fc -ln -1)"
# if [[ -n $EDITOR && $BUFFER == $EDITOR\ * ]]; then
# if [[ ${#LBUFFER} -le ${#EDITOR} ]]; then
# RBUFFER=" ${BUFFER#$EDITOR }"
# LBUFFER="sudoedit"
# else
# LBUFFER="sudoedit ${LBUFFER#$EDITOR }"
# fi
# elif [[ $BUFFER == sudoedit\ * ]]; then
# if [[ ${#LBUFFER} -le 8 ]]; then
# RBUFFER=" ${BUFFER#sudoedit }"
# LBUFFER="$EDITOR"
# else
# LBUFFER="$EDITOR ${LBUFFER#sudoedit }"
# fi
if [[ $BUFFER == watch\ * ]]; then if [[ $BUFFER == watch\ * ]]; then
if [[ ${#LBUFFER} -le 4 ]]; then if [[ ${#LBUFFER} -le 4 ]]; then
RBUFFER="${BUFFER#watch }" RBUFFER="${BUFFER#watch }"
...@@ -39,8 +25,9 @@ watch-command-line() { ...@@ -39,8 +25,9 @@ watch-command-line() {
LBUFFER="watch $LBUFFER" LBUFFER="watch $LBUFFER"
fi fi
} }
zle -N watch-command-line zle -N watch-command-line
# Defined shortcut keys: [Alt] [Esc] # Defined shortcut keys: [Alt] [Esc]
bindkey -M emacs '^\e' watch-command-line bindkey '^\e' watch-command-line
bindkey -M vicmd '^\e' watch-command-line
bindkey -M viins '^\e' watch-command-line
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment