diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-04 00:48:24 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-04 00:48:24 +1300 |
commit | 5a1bf0fbb3006c15f971bd91e56a113a157f336a (patch) | |
tree | 4c5345799dfcef73a470e2363a539ba13f6d6c21 /bash | |
parent | Restructure tmux argument determination (diff) | |
download | dotfiles-5a1bf0fbb3006c15f971bd91e56a113a157f336a.tar.gz dotfiles-5a1bf0fbb3006c15f971bd91e56a113a157f336a.zip |
No args to prompt prints prompt strings
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 2c5034f2..e9ed5d31 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -1,6 +1,12 @@ # Frontend to controlling prompt prompt() { + # If no arguments, print the prompt strings as they are + if [[ ! $1 ]] ; then + declare -p PS1 PS2 PS3 PS4 + return + fi + # What's done next depends on the first argument to the function case $1 in |