From 5a1bf0fbb3006c15f971bd91e56a113a157f336a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 4 Oct 2014 00:48:24 +1300 Subject: No args to prompt prints prompt strings --- bash/bashrc.d/prompt.bash | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bash') 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 -- cgit v1.2.3