aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-23 14:11:08 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-23 14:11:08 +1300
commitc1deb4789769d9166774247498112c35972b3759 (patch)
treef6ecca1ab19a55c42ebab9689fbbe1e4d33fa513 /bash/bashrc.d/prompt.bash
parentUpdate unimpaired plugin (diff)
downloaddotfiles-c1deb4789769d9166774247498112c35972b3759.tar.gz
dotfiles-c1deb4789769d9166774247498112c35972b3759.zip
Error out on bad prompt calls
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 9a96ed33..b9a834b8 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -243,6 +243,10 @@ prompt() {
printf '{%d}' "$jobc"
fi
;;
+ # Print error
+ *)
+ printf '%s: Unknown command %s\n' "$FUNCNAME" "$1" >&2
+ return 1
esac
}