mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 17:23:35 +01:00
08b04f5df2
This allows other plugins that hook e.g. accept-line to identify the fancy-ctrl-z widget as the caller and take appropriate steps when necessary. See https://github.com/tarruda/zsh-autosuggestions/issues/82#issuecomment-181133379
13 lines
196 B
Bash
13 lines
196 B
Bash
fancy-ctrl-z () {
|
|
if [[ $#BUFFER -eq 0 ]]; then
|
|
BUFFER="fg"
|
|
zle accept-line -w
|
|
else
|
|
zle push-input -w
|
|
zle clear-screen -w
|
|
fi
|
|
}
|
|
zle -N fancy-ctrl-z
|
|
bindkey '^Z' fancy-ctrl-z
|
|
|