Switch pure strings to

This commit is contained in:
Ilan Cosman 2020-04-29 14:52:58 -07:00
parent e68ee51173
commit ebd830b6d7
17 changed files with 116 additions and 116 deletions

View File

@ -9,11 +9,11 @@ function fish_prompt --description 'Write out the prompt'
printf "%.s$lean_prompt_connection_icon" (seq $COLUMNS) printf "%.s$lean_prompt_connection_icon" (seq $COLUMNS)
set_color $fish_color_normal set_color $fish_color_normal
echo -ne "\r"(lean_pwd)(lean_git_prompt)" " echo -ne '\r'(lean_pwd)(lean_git_prompt)' '
lean_load_right_prompt_items lean_load_right_prompt_items
set -l leanRightPromptStartLocation (math $COLUMNS-(string length (_lean_right_prompt_nocolor))) set -l leanRightPromptStartLocation (math $COLUMNS-(string length (_lean_right_prompt_nocolor)))
printf "\r\033["$leanRightPromptStartLocation"C" printf '\r\033['$leanRightPromptStartLocation'C'
echo -e (lean_right_prompt) echo -e (lean_right_prompt)
# Prompt character # Prompt character
@ -22,17 +22,17 @@ function fish_prompt --description 'Write out the prompt'
else else
set_color $fish_color_error set_color $fish_color_error
end end
echo -n " " echo -n ' '
set_color $fish_color_normal set_color $fish_color_normal
end end
function _lean_right_prompt_nocolor function _lean_right_prompt_nocolor
echo -n " " echo -n ' '
for item in lean_{$lean_right_prompt_items} for item in lean_{$lean_right_prompt_items}
if test -n "$$item" if test -n "$$item"
echo -n "$$item" echo -n "$$item"
echo -n " " echo -n ' '
end end
end end
end end

View File

@ -1,8 +1,8 @@
function lean_git_prompt function lean_git_prompt
set -l gitPrompt (fish_git_prompt) set -l gitPrompt (fish_git_prompt)
set -l gitPrompt (string replace "(" "" $gitPrompt) set -l gitPrompt (string replace '(' '' $gitPrompt)
set -l gitPrompt (string replace ")" "" $gitPrompt) set -l gitPrompt (string replace ')' '' $gitPrompt)
echo $gitPrompt echo $gitPrompt
end end

View File

@ -1,29 +1,29 @@
function lean_load_right_prompt_items function lean_load_right_prompt_items
for item in lean_{$lean_right_prompt_items} for item in lean_{$lean_right_prompt_items}
set -g $item (eval "_$item") set -g $item (eval '_'$item)
end end
end end
function _lean_status function _lean_status
if string match -q --invert "0" $last_pipestatus if string match -q --invert '0' $last_pipestatus
set -l fishPipestatusWithSignal (__fish_pipestatus_with_signal $last_pipestatus) set -l fishPipestatusWithSignal (__fish_pipestatus_with_signal $last_pipestatus)
if test (count $last_pipestatus) -gt 1 || string match -qe "SIG" $fishPipestatusWithSignal if test (count $last_pipestatus) -gt 1 || string match -qe 'SIG' $fishPipestatusWithSignal
if test $last_status -eq 0 if test $last_status -eq 0
set -g lean_status_color $lean_status_success_color set -g lean_status_color $lean_status_success_color
echo -n "$lean_status_success_icon " echo -n {$lean_status_success_icon}' '
else else
set -g lean_status_color $lean_status_failure_color set -g lean_status_color $lean_status_failure_color
echo -n "$lean_status_failure_icon " echo -n {$lean_status_failure_icon}' '
end end
string join "|" (string replace "SIG" "" $fishPipestatusWithSignal) string join '|' (string replace 'SIG' '' $fishPipestatusWithSignal)
end end
end end
end end
function _lean_timer function _lean_timer
if test (math $CMD_DURATION/1000) -gt $lean_timer_duration if test (math $CMD_DURATION/1000) -gt $lean_timer_duration
echo -n (math --scale=$lean_timer_decimals $CMD_DURATION/1000)"s" echo -n (math --scale=$lean_timer_decimals $CMD_DURATION/1000)'s'
end end
end end
@ -31,7 +31,7 @@ function _lean_context
if set -q SSH_TTY if set -q SSH_TTY
set -g lean_context_color $lean_context_ssh_color set -g lean_context_color $lean_context_ssh_color
echo -n $USER'@'(prompt_hostname) echo -n $USER'@'(prompt_hostname)
else if test $USER = "root" else if test $USER = 'root'
set -g lean_context_color $lean_context_root_color set -g lean_context_color $lean_context_root_color
echo -n $USER'@'(prompt_hostname) echo -n $USER'@'(prompt_hostname)
end end

View File

@ -1,16 +1,16 @@
function lean_pwd function lean_pwd
set -l pwdSplit (string split --no-empty "/" (_shorten_pwd)) set -l pwdSplit (string split --no-empty '/' (_shorten_pwd))
set -l pwdSplitLength (count $pwdSplit) set -l pwdSplitLength (count $pwdSplit)
if not test -w $PWD if not test -w $PWD
set_color $lean_color_dark_blue set_color $lean_color_dark_blue
echo -n "$lean_pwd_unwritable_icon " echo -n $lean_pwd_unwritable_icon' '
set_color $fish_color_normal set_color $fish_color_normal
end end
if test "$pwdSplit[1]" != "~" if test "$pwdSplit[1]" != '~'
set_color $lean_color_dark_blue set_color $lean_color_dark_blue
echo -n "/" echo -n '/'
set_color $fish_color_normal set_color $fish_color_normal
end end
@ -20,14 +20,14 @@ function lean_pwd
if test $pwdSplitLength -gt 1 if test $pwdSplitLength -gt 1
set_color $lean_color_dark_blue set_color $lean_color_dark_blue
echo -n "/" echo -n '/'
set_color $fish_color_normal set_color $fish_color_normal
end end
if test $pwdSplitLength -gt 2 if test $pwdSplitLength -gt 2
set_color $lean_color_dark_blue set_color $lean_color_dark_blue
echo -n (string join "/" $pwdSplit[2..-2]) echo -n (string join '/' $pwdSplit[2..-2])
echo -n "/" echo -n '/'
set_color $fish_color_normal set_color $fish_color_normal
end end

View File

@ -1,16 +1,16 @@
function lean_right_prompt function lean_right_prompt
echo -n " " echo -n ' '
for item in lean_{$lean_right_prompt_items} for item in lean_{$lean_right_prompt_items}
if test -n "$$item" if test -n "$$item"
set -l colorName "$item""_color" set -l colorName $item'_color'
set -l colorNameBoldFlag "$colorName""_bold" set -l colorNameBoldFlag $colorName'_bold'
if test $colorNameBoldFlag = "true" if test $colorNameBoldFlag = 'true'
set_color -o set_color -o
end end
set_color "$$colorName" set_color "$$colorName"
echo -n "$$item"" " echo -n "$$item"' '
set_color normal set_color normal
end end
end end

View File

@ -1,14 +1,14 @@
function lean_uninstall function lean_uninstall
if _user_confirm_defaultNo "Unininstall lean theme?" if _user_confirm_defaultNo 'Unininstall lean theme?'
set -l fishPrompt "$__fish_config_dir/functions/fish_prompt.fish" set -l fishPrompt "$__fish_config_dir/functions/fish_prompt.fish"
echo "Uninstalling lean theme..." echo 'Uninstalling lean theme...'
# ------------------Remove Files------------------ # ------------------Remove Files------------------
rm -r "$__fish_config_dir/lean_theme" rm -r "$__fish_config_dir/lean_theme"
set -l fishPromptFirstLine (head -n 1 $fishPrompt) set -l fishPromptFirstLine (head -n 1 $fishPrompt)
if test "$fishPromptFirstLine" = "# Created by lean_wizard" if test "$fishPromptFirstLine" = '# Created by lean_wizard'
rm $fishPrompt rm $fishPrompt
source "$__fish_data_dir/functions/fish_prompt.fish" source "$__fish_data_dir/functions/fish_prompt.fish"
end end
@ -48,9 +48,9 @@ function lean_uninstall
set -e $var set -e $var
end end
echo "Lean theme uninstalled." echo 'Lean theme uninstalled.'
else else
echo "Aborted uninstall." echo 'Aborted uninstall.'
end end
end end

View File

@ -1,6 +1,6 @@
function lean_wizard function lean_wizard
if test $COLUMNS -lt 55 || test $LINES -lt 21 if test $COLUMNS -lt 55 || test $LINES -lt 21
echo "Terminal size too small; must be at least 55 x 21" echo 'Terminal size too small; must be at least 55 x 21'
return 1 return 1
end end
@ -27,22 +27,22 @@ function _setDefaults
else else
set -g newline false set -g newline false
end end
set -g fake_lean_prompt_connection " " set -g fake_lean_prompt_connection ' '
set -g fake_lean_prompt_connection_color 6C6C6C set -g fake_lean_prompt_connection_color 6C6C6C
end end
function _promptHeight function _promptHeight
_title "Prompt Height" _title 'Prompt Height'
_option 1 "One line" _option 1 'One line'
_displayPrompt prompt_height 1 _displayPrompt prompt_height 1
_option 2 "Two lines" _option 2 'Two lines'
_displayPrompt prompt_height 2 _displayPrompt prompt_height 2
_displayRestartAndQuit _displayRestartAndQuit
switch (_menu "Choice" 1/2/r/q) switch (_menu 'Choice' 1/2/r/q)
case 1 case 1
set -g prompt_height 1 set -g prompt_height 1
_promptSpacing _promptSpacing
@ -57,28 +57,28 @@ function _promptHeight
end end
function _promptConnection function _promptConnection
_title "Prompt Connection" _title 'Prompt Connection'
_option 1 "Disconnected" _option 1 'Disconnected'
_displayPrompt fake_lean_prompt_connection " " _displayPrompt fake_lean_prompt_connection ' '
_option 2 "Dotted" _option 2 'Dotted'
_displayPrompt fake_lean_prompt_connection "·" _displayPrompt fake_lean_prompt_connection '·'
_option 3 "Solid" _option 3 'Solid'
_displayPrompt fake_lean_prompt_connection "─" _displayPrompt fake_lean_prompt_connection '─'
_displayRestartAndQuit _displayRestartAndQuit
switch (_menu "Choice" 1/2/3/r/q) switch (_menu 'Choice' 1/2/3/r/q)
case 1 case 1
set -g fake_lean_prompt_connection " " set -g fake_lean_prompt_connection ' '
_promptSpacing _promptSpacing
case 2 case 2
set -g fake_lean_prompt_connection "·" set -g fake_lean_prompt_connection '·'
_promptConnectionColor _promptConnectionColor
case 3 case 3
set -g fake_lean_prompt_connection "─" set -g fake_lean_prompt_connection '─'
_promptConnectionColor _promptConnectionColor
case r case r
_begin _begin
@ -88,23 +88,23 @@ function _promptConnection
end end
function _promptConnectionColor function _promptConnectionColor
_title "Connection Color" _title 'Connection Color'
_option 1 "Lightest" _option 1 'Lightest'
_displayPrompt fake_lean_prompt_connection_color 808080 _displayPrompt fake_lean_prompt_connection_color 808080
_option 2 "Light" _option 2 'Light'
_displayPrompt fake_lean_prompt_connection_color 6C6C6C _displayPrompt fake_lean_prompt_connection_color 6C6C6C
_option 3 "Dark" _option 3 'Dark'
_displayPrompt fake_lean_prompt_connection_color 585858 _displayPrompt fake_lean_prompt_connection_color 585858
_option 4 "Darkest" _option 4 'Darkest'
_displayPrompt fake_lean_prompt_connection_color 444444 _displayPrompt fake_lean_prompt_connection_color 444444
_displayRestartAndQuit _displayRestartAndQuit
switch (_menu "Choice" 1/2/3/4/r/q) switch (_menu 'Choice' 1/2/3/4/r/q)
case 1 case 1
set -g fake_lean_prompt_connection_color 808080 set -g fake_lean_prompt_connection_color 808080
_promptSpacing _promptSpacing
@ -125,21 +125,21 @@ function _promptConnectionColor
end end
function _promptSpacing function _promptSpacing
_title "Prompt Spacing" _title 'Prompt Spacing'
_option 1 "Compact" _option 1 'Compact'
_displayPrompt newline true _displayPrompt newline true
echo -ne "\r\033[1A" echo -ne '\r\033[1A'
_displayPrompt newline false _displayPrompt newline false
_option 2 "Sparse" _option 2 'Sparse'
_displayPrompt newline true _displayPrompt newline true
echo -ne "\r\033[1A" echo -ne '\r\033[1A'
_displayPrompt newline true _displayPrompt newline true
_displayRestartAndQuit _displayRestartAndQuit
switch (_menu "Choice" 1/2/r/q) switch (_menu 'Choice' 1/2/r/q)
case 1 case 1
set -g newline false set -g newline false
_finish _finish
@ -156,7 +156,7 @@ end
function _assemblePrompt -a whichPrompt function _assemblePrompt -a whichPrompt
set -g moduleDir "$__fish_config_dir/lean_theme/prompt_modules/$whichPrompt""_prompt" set -g moduleDir "$__fish_config_dir/lean_theme/prompt_modules/$whichPrompt""_prompt"
if test "$whichPrompt" = "fish" if test "$whichPrompt" = 'fish'
set -g promptDir $fishPrompt set -g promptDir $fishPrompt
else else
set -g promptDir $fakePrompt set -g promptDir $fakePrompt
@ -165,10 +165,10 @@ function _assemblePrompt -a whichPrompt
echo -n >$promptDir echo -n >$promptDir
_addMod 1_initial _addMod 1_initial
if test "$newline" = "true" if test "$newline" = 'true'
_addMod 2_newline _addMod 2_newline
end end
_addMod "3_"$prompt_height"Line" _addMod '3_'$prompt_height'Line'
_addMod 4_final _addMod 4_final
if test $prompt_height -eq 1 if test $prompt_height -eq 1
_addMod 5_rightPrompt _addMod 5_rightPrompt
@ -179,7 +179,7 @@ end
function _addMod -a file function _addMod -a file
cat "$moduleDir/$file.fish" >>$promptDir cat "$moduleDir/$file.fish" >>$promptDir
printf "\n\n" >>$promptDir printf '\n\n' >>$promptDir
end end
function _title -a title function _title -a title
@ -188,7 +188,7 @@ function _title -a title
set -l midTitle (math (string length $title)/2) set -l midTitle (math (string length $title)/2)
for i in (seq (math $midCols-$midTitle)) for i in (seq (math $midCols-$midTitle))
echo -n " " echo -n ' '
end end
set_color -o set_color -o
echo $title echo $title
@ -208,12 +208,12 @@ function _displayPrompt -a var_name var_value
source $promptDir source $promptDir
fake_prompt fake_prompt
printf "\n\n" printf '\n\n'
end end
function _displayRestartAndQuit function _displayRestartAndQuit
echo -e "(r) Restart from the beginning\n" echo -e '(r) Restart from the beginning\n'
echo -e "(q) Quit and do nothing\n" echo -e '(q) Quit and do nothing\n'
end end
function _quit function _quit
@ -223,15 +223,15 @@ function _quit
end end
function _finish function _finish
_title "Overwrite fish_prompt?" _title 'Overwrite fish_prompt?'
_option y "Yes" _option y 'Yes'
printf "\n\n" printf '\n\n'
_option n "No" _option n 'No'
printf "\n\n" printf '\n\n'
switch (_menu "Choice" y/n) switch (_menu 'Choice' y/n)
case y case y
_assemblePrompt fish _assemblePrompt fish
set -U lean_prompt_connection_icon $fake_lean_prompt_connection set -U lean_prompt_connection_icon $fake_lean_prompt_connection
@ -243,7 +243,7 @@ function _finish
end end
function _menu -a question options function _menu -a question options
set -l optionList (string split "/" $options) set -l optionList (string split '/' $options)
set -l bold (set_color -o) set -l bold (set_color -o)
set -l norm (set_color normal) set -l norm (set_color normal)

View File

@ -1,8 +1,8 @@
function lean_install function lean_install
echo "Installing lean theme..." echo 'Installing lean theme...'
# -----------------Download Functions----------------- # -----------------Download Functions-----------------
set -l tempDir "/tmp/lean_theme" set -l tempDir '/tmp/lean_theme'
# Clone repository into $tempDir # Clone repository into $tempDir
if test -e $tempDir if test -e $tempDir
@ -28,19 +28,19 @@ function lean_install
set -U lean_color_gold D7AF00 set -U lean_color_gold D7AF00
# ---------------Pwd--------------- # ---------------Pwd---------------
set -U lean_pwd_shorten_margin 5 set -U lean_pwd_shorten_margin 5
set -U lean_pwd_unwritable_icon "" # Lock set -U lean_pwd_unwritable_icon '' # Lock
# ------------Git prompt------------ # ------------Git prompt------------
set -U __fish_git_prompt_show_informative_status true set -U __fish_git_prompt_show_informative_status true
set -U __fish_git_prompt_showstashstate true set -U __fish_git_prompt_showstashstate true
# -------Symbols------- # -------Symbols-------
set -U __fish_git_prompt_char_stateseparator "" set -U __fish_git_prompt_char_stateseparator ''
set -U __fish_git_prompt_char_cleanstate "" set -U __fish_git_prompt_char_cleanstate ''
set -U __fish_git_prompt_char_upstream_ahead " ⇡" set -U __fish_git_prompt_char_upstream_ahead ' ⇡'
set -U __fish_git_prompt_char_upstream_behind " ⇣" set -U __fish_git_prompt_char_upstream_behind ' ⇣'
set -U __fish_git_prompt_char_stagedstate " +" set -U __fish_git_prompt_char_stagedstate ' +'
set -U __fish_git_prompt_char_dirtystate " !" set -U __fish_git_prompt_char_dirtystate ' !'
set -U __fish_git_prompt_char_untrackedfiles " ?" set -U __fish_git_prompt_char_untrackedfiles ' ?'
set -U __fish_git_prompt_char_stashstate " *" set -U __fish_git_prompt_char_stashstate ' *'
# --------Colors-------- # --------Colors--------
set -U __fish_git_prompt_color_branch $lean_color_green set -U __fish_git_prompt_color_branch $lean_color_green
set -U __fish_git_prompt_color_upstream $lean_color_green set -U __fish_git_prompt_color_upstream $lean_color_green
@ -50,11 +50,11 @@ function lean_install
set -U __fish_git_prompt_color_stashstate $lean_color_green set -U __fish_git_prompt_color_stashstate $lean_color_green
# ----------------Right Prompt Items---------------- # ----------------Right Prompt Items----------------
set -U lean_right_prompt_items "status" "timer" "context" "jobs" set -U lean_right_prompt_items 'status' 'timer' 'context' 'jobs'
# --------------Status-------------- # --------------Status--------------
set -U lean_status_success_icon "✔" set -U lean_status_success_icon '✔'
set -U lean_status_success_color 5FAF00 set -U lean_status_success_color 5FAF00
set -U lean_status_failure_icon "✘" set -U lean_status_failure_icon '✘'
set -U lean_status_failure_color D70000 set -U lean_status_failure_color D70000
# --------------Timer-------------- # --------------Timer--------------
set -U lean_timer_color 87875F set -U lean_timer_color 87875F
@ -64,20 +64,20 @@ function lean_install
set -U lean_context_ssh_color D7AF87 set -U lean_context_ssh_color D7AF87
set -U lean_context_root_color D7AF00 set -U lean_context_root_color D7AF00
# ---------------Jobs--------------- # ---------------Jobs---------------
set -U lean_jobs_icon "" # Gear set -U lean_jobs_icon '' # Gear
set -U lean_jobs_color 5FAF00 set -U lean_jobs_color 5FAF00
# -----------------------Finish----------------------- # -----------------------Finish-----------------------
source "$__fish_config_dir/functions/fish_prompt.fish" source "$__fish_config_dir/functions/fish_prompt.fish"
set_color $lean_color_green set_color $lean_color_green
echo "Lean theme installed!" echo 'Lean theme installed!'
set_color $fish_color_normal set_color $fish_color_normal
if _user_confirm_defaultYes "Configure lean prompt?" if _user_confirm_defaultYes 'Configure lean prompt?'
lean_wizard lean_wizard
else else
echo -e "\n""Run lean_wizard to configure your prompt." echo -e '\n''Run lean_wizard to configure your prompt.'
end end
end end
@ -90,7 +90,7 @@ function _user_confirm_defaultYes -a question
return 0 return 0
case n N no No case n N no No
return 1 return 1
case "" case ''
return 0 return 0
end end
end end

View File

@ -1,19 +1,19 @@
printf "%.s " (seq $columns) printf '%.s ' (seq $columns)
set -l timerOutput " 5s " set -l timerOutput ' 5s '
set -l timerStartLocation (math $columns-(string length $timerOutput)) set -l timerStartLocation (math $columns-(string length $timerOutput))
printf "\r\033["$timerStartLocation"C" printf '\r\033['$timerStartLocation'C'
set_color $lean_timer_color set_color $lean_timer_color
echo -n $timerOutput echo -n $timerOutput
set_color $fish_color_normal set_color $fish_color_normal
echo -ne "\r" echo -ne '\r'
set -l Lblue (set_color -o $lean_color_light_blue) set -l Lblue (set_color -o $lean_color_light_blue)
set -l Dblue (set_color $lean_color_dark_blue) set -l Dblue (set_color $lean_color_dark_blue)
set -l n (set_color $fish_color_normal) set -l n (set_color $fish_color_normal)
echo -n $Lblue"~"$n$Dblue"/"$n$Lblue"src "$n echo -n $Lblue'~'$n$Dblue'/'$n$Lblue'src '$n
set_color $lean_color_green set_color $lean_color_green
echo -n "master " echo -n 'master '
set_color $fish_color_normal set_color $fish_color_normal

View File

@ -2,20 +2,20 @@
printf "%.s$fake_lean_prompt_connection" (seq $columns) printf "%.s$fake_lean_prompt_connection" (seq $columns)
set_color $fish_color_normal set_color $fish_color_normal
set -l timerOutput " 5s " set -l timerOutput ' 5s '
set -l timerStartLocation (math $columns-(string length $timerOutput)) set -l timerStartLocation (math $columns-(string length $timerOutput))
printf "\r\033["$timerStartLocation"C" printf '\r\033['$timerStartLocation'C'
set_color $lean_timer_color set_color $lean_timer_color
echo -n $timerOutput echo -n $timerOutput
set_color $fish_color_normal set_color $fish_color_normal
echo -ne "\r" echo -ne '\r'
set -l Lblue (set_color -o $lean_color_light_blue) set -l Lblue (set_color -o $lean_color_light_blue)
set -l Dblue (set_color $lean_color_dark_blue) set -l Dblue (set_color $lean_color_dark_blue)
set -l n (set_color $fish_color_normal) set -l n (set_color $fish_color_normal)
echo -n $Lblue"~"$n$Dblue"/"$n$Lblue"src "$n echo -n $Lblue'~'$n$Dblue'/'$n$Lblue'src '$n
set_color $lean_color_green set_color $lean_color_green
echo "master " echo 'master '
set_color $fish_color_normal set_color $fish_color_normal

View File

@ -4,6 +4,6 @@
else else
set_color $fish_color_error set_color $fish_color_error
end end
echo -n " " echo -n ' '
set_color $fish_color_normal set_color $fish_color_normal
end end

View File

@ -1,7 +1,7 @@
function _lean_right_prompt_nocolor function _lean_right_prompt_nocolor
echo -n " " echo -n ' '
if test -n "$leanTimer" if test -n "$leanTimer"
echo -n $leanTimer echo -n $leanTimer
echo -n " " echo -n ' '
end end
end end

View File

@ -1,5 +1,5 @@
function fish_right_prompt function fish_right_prompt
set_color $lean_timer_color set_color $lean_timer_color
echo " 5s " echo ' 5s '
set_color $fish_color_normal set_color $fish_color_normal
end end

View File

@ -1 +1 @@
echo -n (lean_pwd)(lean_git_prompt)" " echo -n (lean_pwd)(lean_git_prompt)' '

View File

@ -2,9 +2,9 @@
printf "%.s$lean_prompt_connection_icon" (seq $COLUMNS) printf "%.s$lean_prompt_connection_icon" (seq $COLUMNS)
set_color $fish_color_normal set_color $fish_color_normal
echo -ne "\r"(lean_pwd)(lean_git_prompt)" " echo -ne '\r'(lean_pwd)(lean_git_prompt)' '
lean_load_right_prompt_items lean_load_right_prompt_items
set -l leanRightPromptStartLocation (math $COLUMNS-(string length (_lean_right_prompt_nocolor))) set -l leanRightPromptStartLocation (math $COLUMNS-(string length (_lean_right_prompt_nocolor)))
printf "\r\033["$leanRightPromptStartLocation"C" printf '\r\033['$leanRightPromptStartLocation'C'
echo -e (lean_right_prompt) echo -e (lean_right_prompt)

View File

@ -4,6 +4,6 @@
else else
set_color $fish_color_error set_color $fish_color_error
end end
echo -n " " echo -n ' '
set_color $fish_color_normal set_color $fish_color_normal
end end

View File

@ -1,10 +1,10 @@
function _lean_right_prompt_nocolor function _lean_right_prompt_nocolor
echo -n " " echo -n ' '
for item in lean_{$lean_right_prompt_items} for item in lean_{$lean_right_prompt_items}
if test -n "$$item" if test -n "$$item"
echo -n "$$item" echo -n "$$item"
echo -n " " echo -n ' '
end end
end end
end end