From 92f022e970a60342389f2748de7dc515bd1e753f Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Sat, 8 Jul 2017 23:20:15 +0100 Subject: [PATCH] Added skeleton for prompt setup (and added keybinding for inactive prompt). --- themes/logicalhacking.zsh-theme | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/themes/logicalhacking.zsh-theme b/themes/logicalhacking.zsh-theme index a08b81f..a5ef085 100755 --- a/themes/logicalhacking.zsh-theme +++ b/themes/logicalhacking.zsh-theme @@ -100,6 +100,30 @@ prompt_isabellenv() { } +# Prompt Setup and key bindings +build_prompt() { + RETVAL=$? +} + +build_inactive_prompt() { + RETVAL=$? +} + +del-prompt-accept-line() { + OLD_PROMPT="$PROMPT" + PROMPT=$INACTIVEPROMPT + zle reset-prompt + PROMPT="$OLD_PROMPT" + zle accept-line +} + +zle -N del-prompt-accept-line +bindkey "^M" del-prompt-accept-line + +# Actual prompt definition +PROMPT='%{%f%b%k%}$(build_prompt) ' +INACTIVEPROMPT='%{%f%b%k%}$(build_inactive_prompt) ' + # Default configuration SEGMENT_SEPARATOR=$PL_BRARROW ISAVERSION=$ISAVERSIONDIR