From 6f14273bdbec1e5c5bb6ec5465ce3d85fc5229f9 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Tue, 6 Jun 2017 12:06:20 +0200 Subject: bugfixes --- prompt_adam3_setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'prompt_adam3_setup') diff --git a/prompt_adam3_setup b/prompt_adam3_setup index 60a9dc6..33c6d81 100644 --- a/prompt_adam3_setup +++ b/prompt_adam3_setup @@ -24,7 +24,7 @@ prompt_adam3_setup () { prompt_adam3_PS1="%K{${prompt_adam3_color2}}%n@%k" # Change color of host, based on hostname - if [[ $prompt_adam3_color1 == 'multi' ]]; then + if [[ "${prompt_adam3_color1}" == 'multi' ]]; then local hostname_color=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 1 + (total % 24)}') local hostname_bold=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 1 + (total % 2)}') @@ -43,7 +43,7 @@ prompt_adam3_setup () { else # If one wants a specific color, just set ut, plain and simple - local hostname_prompt="%K{$prompt_adam3_color1}%m%k" + local hostname_prompt="%K{${prompt_adam3_color1}}%m%k" fi prompt_adam3_PS1+="${hostname_prompt} " @@ -92,4 +92,4 @@ prompt_adam3_precmd () { PS3="${PS1}?# %b%f%k" } -prompt_adam3_setup "$@" +prompt_adam3_setup "${@}" -- cgit v1.2.3