aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-05-04 09:48:24 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-05-04 09:48:24 +1200
commitf154b8bf7e9c54e783c9700894db9e6a217d1cec (patch)
tree7e393b6c1eb184c030e9cffb0f507b1353cefa60 /bash/bashrc.d/prompt.bash
parentUpdate submodules (diff)
downloaddotfiles-f154b8bf7e9c54e783c9700894db9e6a217d1cec.tar.gz
dotfiles-f154b8bf7e9c54e783c9700894db9e6a217d1cec.zip
Move PROMPT_RETURN declaration to top of func
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash5
1 files changed, 4 insertions, 1 deletions
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