From b92abfbd67cbb65a2d5a1962903c9bd196fe6afc Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Fri, 17 Sep 2021 10:08:19 -0400 Subject: [PATCH] [+] Create prompt-update command --- scripts/includes/prompt.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) mode change 100644 => 100755 scripts/includes/prompt.sh diff --git a/scripts/includes/prompt.sh b/scripts/includes/prompt.sh old mode 100644 new mode 100755 index 98fa95f..a8b7477 --- a/scripts/includes/prompt.sh +++ b/scripts/includes/prompt.sh @@ -4,11 +4,14 @@ PS1='\n\[\e[m\][\[\e[35m\]\D{%y-%m-%d} \t\[\e[m\]] [\[\e[34m\]\h\[\e[m\]] [\[\e[ # Prompt helper alias prompt="$SCR/helpers/prompt.py" PROMPT_RAW="" +prompt-show() { + prompt "$PROMPT_RAW" show +} prompt-set() { PROMPT_RAW=$(prompt "$PROMPT_RAW" set $1 $2) } -prompt-show() { - prompt "$PROMPT_RAW" show +prompt-update() { + PROMPT=$(prompt-show) } ########### Build a zsh prompt @@ -25,7 +28,7 @@ prompt-set 30 "&e%n&r " prompt-set 40 "&r%~ " # New line after the prompt header prompt-set 1000 "&n" -# Before input +# Prompt before input prompt-set 1100 "> " # Create prompt -PROMPT=$(prompt-show) +prompt-update