Advertisement
voyeg3r

Fancy Ctrl-z

Feb 2nd, 2022
1,061
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. # Add these lines into your zshrc to solve your Ctrl-z problems
  2. fancy-ctrl-z () {
  3.   if [[ $#BUFFER -eq 0 ]]; then
  4.     BUFFER="fg"
  5.     zle accept-line
  6.   else
  7.     zle push-input
  8.     zle clear-screen
  9.   fi
  10. }
  11. zle -N fancy-ctrl-z
  12. bindkey '^Z' fancy-ctrl-z
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement