zsh: add keybind ^Z for quick fg
This commit is contained in:
parent
62ab793ac0
commit
69a37997cb
1 changed files with 12 additions and 0 deletions
12
zsh/.config/zsh/config.d/10_keybinds.zsh
Normal file
12
zsh/.config/zsh/config.d/10_keybinds.zsh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Bind ^Z on an empty line to resume the last suspended job
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue