fancy-ctrl-z.plugin.zsh 196 B

123456789101112
  1. fancy-ctrl-z () {
  2. if [[ $#BUFFER -eq 0 ]]; then
  3. BUFFER="fg"
  4. zle accept-line -w
  5. else
  6. zle push-input -w
  7. zle clear-screen -w
  8. fi
  9. }
  10. zle -N fancy-ctrl-z
  11. bindkey '^Z' fancy-ctrl-z