From d45d5d5effd9d2b133b8759ecd63318fae45673e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 Oct 2014 13:59:10 +1300 Subject: Define PS{2..4}, including a nice PS4 for set -x --- bash/bashrc.d/prompt.bash | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bash/bashrc.d/prompt.bash') diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index b4f0e735..9a96ed33 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -10,7 +10,7 @@ prompt() { # What's done next depends on the first argument to the function case $1 in - # Turn complex, colored prompt on + # Turn complex, colored PS1 and debugging PS4 prompts on on) # Set up pre-prompt command and prompt format PROMPT_COMMAND='declare -i PROMPT_RETURN=$? ; history -a' @@ -53,12 +53,18 @@ prompt() { # String it all together PS1='\['"$format"'\]'"$PS1"'\['"$reset"'\] ' + PS2='> ' + PS3='? ' + PS4='+<$?> ${BASH_SOURCE:-$BASH}:$FUNCNAME:$LINENO:' ;; - # Revert to simple inexpensive prompt + # Revert to simple inexpensive prompts off) unset -v PROMPT_COMMAND PROMPT_DIRTRIM PROMPT_RETURN PS1='\$ ' + PS2='> ' + PS3='? ' + PS4='+ ' ;; git) -- cgit v1.2.3