diff --git a/functions/lean_pwd.fish b/functions/lean_pwd.fish index 60d598a..06246da 100644 --- a/functions/lean_pwd.fish +++ b/functions/lean_pwd.fish @@ -2,7 +2,7 @@ function lean_pwd set -l pwdSplit (string split --no-empty "/" (_shorten_pwd)) set -l pwdSplitLength (count $pwdSplit) - if test $pwdSplit[1] != "~" + if test "$pwdSplit[1]" != "~" set_color $lean_color_dark_blue echo -n "/" set_color $fish_color_normal diff --git a/functions/lean_uninstall.fish b/functions/lean_uninstall.fish index 5e40d5b..c2d272e 100644 --- a/functions/lean_uninstall.fish +++ b/functions/lean_uninstall.fish @@ -6,7 +6,7 @@ function lean_uninstall rm -r "$__fish_config_dir/lean_theme" set -l fishPromptFirstLine (head -n 1 "$__fish_config_dir/functions/fish_prompt.fish") - if test $fishPromptFirstLine = "# Created by lean_wizard" + if test "$fishPromptFirstLine" = "# Created by lean_wizard" rm "$__fish_config_dir/functions/fish_prompt.fish" end diff --git a/functions/lean_wizard.fish b/functions/lean_wizard.fish index a4b34a1..ba6f668 100644 --- a/functions/lean_wizard.fish +++ b/functions/lean_wizard.fish @@ -5,7 +5,7 @@ function lean_wizard end set -g fishPrompt "$__fish_config_dir/functions/fish_prompt.fish" - set -g tempPrompt "$__fish_config_dir/lean_theme/temp_prompt.fish" + set -g fakePrompt "$__fish_config_dir/lean_theme/fake_prompt.fish" set -g columns $COLUMNS set -g lines $LINES @@ -156,16 +156,16 @@ end function _assemblePrompt -a whichPrompt set -g moduleDir "$__fish_config_dir/lean_theme/prompt_modules/$whichPrompt""_prompt" - if test $whichPrompt = "fish" - set -g promptDir "$__fish_config_dir/functions/fish_prompt.fish" + if test "$whichPrompt" = "fish" + set -g promptDir $fishPrompt else - set -g promptDir "$__fish_config_dir/lean_theme/temp_prompt.fish" + set -g promptDir $fakePrompt end echo -n >$promptDir _addMod 1_initial - if test $newline = "true" + if test "$newline" = "true" _addMod 2_newline end _addMod "3_"$prompt_height"Line"