From 1c6e451de2956d231563777ade549502bbda270a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 14 Sep 2013 19:50:50 +1200 Subject: Print Bash version in color at prompt on --- bash/bash_profile | 3 --- bash/bashrc.d/prompt.bash | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'bash') diff --git a/bash/bash_profile b/bash/bash_profile index 526e7f3b..e23ec458 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -13,6 +13,3 @@ if [[ -r $HOME/.bashrc ]]; then source "$HOME"/.bashrc fi -# Print Bash version -printf 'bash: %s\n' "$BASH_VERSION" - diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index c4293aae..0e96a82f 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -35,6 +35,9 @@ prompt() { # String it all together PS1='\['"$format"'\]'"$PS1"'\['"$reset"'\] ' + + # Print the Bash version number to the terminal + printf '%sbash:%s%s\n' "$format" "$BASH_VERSION" "$reset" ;; # Revert to simple inexpensive prompt -- cgit v1.2.3