From 93539024ca7e986534c520b5949eb81ec4606fc5 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Fri, 30 May 2014 07:52:54 +0000 Subject: [PATCH] fancy ctrl-z --- zsh-files/zshrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zsh-files/zshrc b/zsh-files/zshrc index cf8999b..390129f 100644 --- a/zsh-files/zshrc +++ b/zsh-files/zshrc @@ -65,6 +65,17 @@ function branch_prompt { fi } +fancy-ctrl-z () { + if [[ $#BUFFER -eq 0 ]]; then + bg + zle redisplay + else + zle push-input + fi +} +zle -N fancy-ctrl-z +bindkey '^Z' fancy-ctrl-z + ZSH_THEME_GIT_PROMPT_AHEAD=" %{$YELLOW%}⇈%{$RESET_COLOR%}" ZSH_THEME_GIT_PROMPT_BEHIND=" %{$YELLOW%}⇊%{$RESET_COLOR%}" ZSH_THEME_GIT_PROMPT_DIVERGED=" %{$YELLOW%}⇅%{$RESET_COLOR%}"