aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-04 00:48:24 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-04 00:48:24 +1300
commit5a1bf0fbb3006c15f971bd91e56a113a157f336a (patch)
tree4c5345799dfcef73a470e2363a539ba13f6d6c21 /bash
parentRestructure tmux argument determination (diff)
downloaddotfiles-5a1bf0fbb3006c15f971bd91e56a113a157f336a.tar.gz
dotfiles-5a1bf0fbb3006c15f971bd91e56a113a157f336a.zip
No args to prompt prints prompt strings
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/prompt.bash6
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