From f154b8bf7e9c54e783c9700894db9e6a217d1cec Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 4 May 2016 09:48:24 +1200 Subject: Move PROMPT_RETURN declaration to top of func --- bash/bashrc.d/prompt.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bash/bashrc.d/prompt.bash') diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 4c82cec0..3eed8b24 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -12,8 +12,11 @@ prompt() { # Turn complex, colored PS1 and debugging PS4 prompts on on) + # Declare the PROMPT_RETURN variable as an integer + declare -i PROMPT_RETURN + # Set up pre-prompt command - PROMPT_COMMAND='declare -i PROMPT_RETURN=$? ; history -a' + PROMPT_COMMAND='PROMPT_RETURN=$? ; history -a' # Set up prompt, including optional PROMPT_PREFIX and PROMPT_SUFFIX # variables -- cgit v1.2.3