Hacker News new | past | comments | ask | show | jobs | submit login

Put this in your zshrc, and Ctrl-Z will also resume the most recently suspended process. Really handy to just Ctrl-Z in and out of Vim.

  # Make Ctrl-z also resume background process
  fancy-ctrl-z () {
      if [[ $#BUFFER -eq 0 ]]; then
          BUFFER="fg"
          zle accept-line
      else
          zleush-input
          zle clear-screen
      fi
  }
  zle -N fancy-ctrl-z
  bindkey '^Z' fancy-ctrl-z



I don't really know zsh, but that looks like it should be

  zle flush-input




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: