auto-bg/fg with C-z
This commit is contained in:
parent
3b118afb92
commit
047c71f8b5
|
@ -55,6 +55,19 @@ bindkey -M vicmd 'Y' vi-yank-eol
|
|||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
# C-z to background *and* foreground processes
|
||||
fancy-ctrl-z () {
|
||||
if [[ $#BUFFER -eq 0 ]]; then
|
||||
BUFFER="fg"
|
||||
zle accept-line
|
||||
else
|
||||
zle push-input
|
||||
zle clear-screen
|
||||
fi
|
||||
}
|
||||
zle -N fancy-ctrl-z
|
||||
bindkey '^Z' fancy-ctrl-z
|
||||
|
||||
# Completion
|
||||
bindkey -M viins '^x^f' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
|
||||
bindkey -M viins '^x^d' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)
|
||||
|
|
Loading…
Reference in a new issue