Added skeleton for prompt setup (and added keybinding for inactive prompt).

This commit is contained in:
Achim D. Brucker 2017-07-08 23:20:15 +01:00
parent 96b358d303
commit 92f022e970
1 changed files with 24 additions and 0 deletions

View File

@ -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 # Default configuration
SEGMENT_SEPARATOR=$PL_BRARROW SEGMENT_SEPARATOR=$PL_BRARROW
ISAVERSION=$ISAVERSIONDIR ISAVERSION=$ISAVERSIONDIR