Run new fish_indent on code

This commit is contained in:
Ilan Cosman 2021-03-02 09:46:40 -08:00
parent 2a888b96b4
commit 05af630a82
56 changed files with 194 additions and 195 deletions

View File

@ -1,9 +1,9 @@
complete -c tide --no-files
complete -c tide -x -n '__fish_use_subcommand' -a --help -d "Print help message"
complete -c tide -x -n '__fish_use_subcommand' -a --version -d "Print tide version"
complete -c tide -x -n '__fish_use_subcommand' -a bug-report -d "Print info for use in bug reports"
complete -c tide -x -n '__fish_use_subcommand' -a configure -d "Run the configuration wizard"
complete -c tide -x -n __fish_use_subcommand -a --help -d "Print help message"
complete -c tide -x -n __fish_use_subcommand -a --version -d "Print tide version"
complete -c tide -x -n __fish_use_subcommand -a bug-report -d "Print info for use in bug reports"
complete -c tide -x -n __fish_use_subcommand -a configure -d "Run the configuration wizard"
complete -c tide -x -n '__fish_seen_subcommand_from bug-report' -a --clean -d "Run clean Fish instance and install Tide"
complete -c tide -x -n '__fish_seen_subcommand_from bug-report' -a --verbose -d "Print full Tide configuration"

View File

@ -20,7 +20,7 @@ function _tide_init_install --on-event _tide_init_install
source $_tide_root/functions/tide/configure/choices/all/style.fish
source $_tide_root/functions/tide/configure/choices/all/finish.fish
_load_config 'lean'
_load_config lean
_tide_finish
set -a _tide_var_list (set --names | string match --regex "^tide.*")

View File

@ -5,7 +5,7 @@ function _tide_item_context
else if contains -- $USER root toor Administrator
set_color $tide_context_root_color
printf '%s' $USER'@'$hostname
else if test "$tide_context_always_display" = 'true'
else if test "$tide_context_always_display" = true
set_color $tide_context_default_color
printf '%s' $USER'@'$hostname
end

View File

@ -5,7 +5,7 @@ function _tide_item_prompt_char
set_color $tide_prompt_char_failure_color
end
if test "$fish_key_bindings" = 'fish_default_key_bindings'
if test "$fish_key_bindings" = fish_default_key_bindings
printf '%s' $tide_prompt_char_icon' '
else
switch $fish_bind_mode

View File

@ -43,7 +43,7 @@ function _tide_item_pwd
printf '%s' $colorDirs $tide_pwd_dir_icon' '
end
test "$splitPwd[1]" = '~' || printf '%s' '/'
test "$splitPwd[1]" = '~' || printf '%s' /
string join -- '/' $splitPwdForOutput
string join -- / $splitPwdForOutput
end

View File

@ -1,10 +1,10 @@
function _tide_item_status
if string match --quiet --invert '0' $_tide_last_pipestatus # If there is a failure anywhere in the pipestatus
if test "$_tide_last_pipestatus" = '1' # If simple failure
if test "$tide_status_always_display" = 'true'
if string match --quiet --invert 0 $_tide_last_pipestatus # If there is a failure anywhere in the pipestatus
if test "$_tide_last_pipestatus" = 1 # If simple failure
if test "$tide_status_always_display" = true
set -g tide_status_bg_color $tide_status_failure_bg_color
set_color $tide_status_failure_color
printf '%s' $tide_status_failure_icon' ' '1'
printf '%s' $tide_status_failure_icon' ' 1
end
else
if test $_tide_last_pipestatus[-1] -eq 0
@ -17,9 +17,9 @@ function _tide_item_status
printf '%s' $tide_status_failure_icon' '
end
__fish_pipestatus_with_signal $_tide_last_pipestatus | string replace 'SIG' '' | string join '|'
__fish_pipestatus_with_signal $_tide_last_pipestatus | string replace SIG '' | string join '|'
end
else if test "$tide_status_always_display" = 'true'
else if test "$tide_status_always_display" = true
set -g tide_status_bg_color $tide_status_success_bg_color
set_color $tide_status_success_color
printf '%s' $tide_status_success_icon

View File

@ -1,5 +1,5 @@
function _tide_item_vi_mode
test "$fish_key_bindings" != 'fish_default_key_bindings' && switch $fish_bind_mode
test "$fish_key_bindings" != fish_default_key_bindings && switch $fish_bind_mode
case default
set -g tide_vi_mode_bg_color $tide_vi_mode_default_bg_color
set_color $tide_vi_mode_default_color

View File

@ -2,7 +2,7 @@ function _tide_left_prompt
set lastItemWasNewline
for item in $tide_left_prompt_items
if test "$item" = 'newline'
if test "$item" = newline
set_color $previousColor -b normal
printf '%s' $tide_left_prompt_suffix\n
set lastItemWasNewline
@ -14,7 +14,7 @@ function _tide_left_prompt
set -l color $$colorName
if set -e lastItemWasNewline
if test "$tide_left_prompt_frame_enabled" = 'true'
if test "$tide_left_prompt_frame_enabled" = true
set_color $tide_left_prompt_frame_color -b normal
if set -q alreadyOneNewline
printf '%s' '╰─'
@ -23,7 +23,7 @@ function _tide_left_prompt
end
end
if test "$item" != 'prompt_char'
if test "$item" != prompt_char
set_color $color -b normal
printf '%s' $tide_left_prompt_prefix
end
@ -37,7 +37,7 @@ function _tide_left_prompt
set_color -b $color
if test "$tide_left_prompt_pad_items" = 'true' -a "$item" != 'prompt_char'
if test "$tide_left_prompt_pad_items" = true -a "$item" != prompt_char
printf '%s' " $output "
else
printf '%s' "$output"
@ -45,12 +45,12 @@ function _tide_left_prompt
set previousColor $color
test "$item" = 'prompt_char' && set lastItemWasPromptChar
test "$item" = prompt_char && set lastItemWasPromptChar
end
end
end
if set -q lastItemWasNewline && test "$tide_left_prompt_frame_enabled" = 'true'
if set -q lastItemWasNewline && test "$tide_left_prompt_frame_enabled" = true
set_color $tide_left_prompt_frame_color -b normal
printf '%s' '╰─'
else if not set -q lastItemWasPromptChar

View File

@ -2,7 +2,7 @@ function _tide_prompt
# Variables are exported as strings, convert _tide_last_pipestatus back into a list
set -g _tide_last_pipestatus (string split ' ' $_tide_last_pipestatus)
test "$tide_print_newline_before_prompt" = 'true' && printf '%b' '\n'
test "$tide_print_newline_before_prompt" = true && printf '%b' '\n'
set_color $tide_prompt_connection_color
test -n "$tide_prompt_connection_icon" || set -l tide_prompt_connection_icon ' '

View File

@ -3,7 +3,7 @@ function _tide_right_prompt
set -l rightPromptHeight (count $splitText)
set -l leftPromptHeight (math 1+(string match --all 'newline' $tide_left_prompt_items | count))
if test "$tide_right_prompt_frame_enabled" = 'true'
if test "$tide_right_prompt_frame_enabled" = true
set -l frameColor (set_color $tide_right_prompt_frame_color -b normal || echo)
set splitText[1] $splitText[1]$frameColor'─╮'
@ -37,7 +37,7 @@ function _tide_fetch_right_prompt_items
set_color normal
for item in $tide_right_prompt_items
if test "$item" = 'newline'
if test "$item" = newline
set_color $previousColor -b normal
printf '%s' $tide_right_prompt_suffix\n
set lastItemWasNewline
@ -60,7 +60,7 @@ function _tide_fetch_right_prompt_items
set_color -b $color
if test "$tide_right_prompt_pad_items" = 'true'
if test "$tide_right_prompt_pad_items" = true
printf '%s' " $output "
else
printf '%s' "$output"

View File

@ -1,5 +1,5 @@
function _tide_sub_bug-report
argparse 'c/clean' 'v/verbose' -- $argv
argparse c/clean v/verbose -- $argv
if set -q _flag_clean
HOME=(mktemp -d) fish --init-command "curl --silent \

View File

@ -19,7 +19,7 @@ function _tide_sub_configure
set -g fake_lines $LINES
set -g _tide_selected_option
_next_choice 'all/style'
_next_choice all/style
end
function _next_choice -a nextChoice
@ -60,7 +60,7 @@ function _tide_menu
switch $input
case r
set -e _tide_option_list
_next_choice 'all/style'
_next_choice all/style
break
case q
set -e _tide_selected_option # Skip through all the _next_choices

View File

@ -44,4 +44,3 @@ function __tide_on_fish_exit --on-event fish_exit
set -e _tide_left_prompt_display_$fish_pid
set -e _tide_right_prompt_display_$fish_pid
end

View File

@ -1,5 +1,5 @@
function tide
argparse --stop-nonopt 'v/version' 'h/help' -- $argv
argparse --stop-nonopt v/version h/help -- $argv
if set -q _flag_version
printf '%s\n' "tide, version 4.1.1"

View File

@ -3,7 +3,7 @@ function finish
_tide_title 'Overwrite tide config?'
set_color normal
_tide_option y 'Yes'
_tide_option y Yes
printf '%b' '\n'
_tide_menu
@ -40,17 +40,17 @@ function _tide_finish
end
# Deal with prompt char/vi mode
if contains 'prompt_char' $fake_tide_left_prompt_items
if contains prompt_char $fake_tide_left_prompt_items
_find_and_remove vi_mode fake_tide_right_prompt_items
else
set fake_tide_status_always_display true # Without a prompt_char, the user won't know if a command failed/succeeded
# If no prompt_char, insert vi_mode
_find_and_remove vi_mode fake_tide_right_prompt_items
if contains 'time' $fake_tide_right_prompt_items
set fake_tide_right_prompt_items $fake_tide_right_prompt_items[1..-2] 'vi_mode' $fake_tide_right_prompt_items[-1]
if contains time $fake_tide_right_prompt_items
set fake_tide_right_prompt_items $fake_tide_right_prompt_items[1..-2] vi_mode $fake_tide_right_prompt_items[-1]
else
set -a fake_tide_right_prompt_items 'vi_mode'
set -a fake_tide_right_prompt_items vi_mode
end
end

View File

@ -1,5 +1,5 @@
function icons
_tide_title 'Icons'
_tide_title Icons
_tide_option 1 'Few icons'
_tide_display_prompt
@ -13,7 +13,7 @@ function icons
case 1
_disable_icons
end
_next_choice 'all/finish'
_next_choice all/finish
end
function _enable_icons

View File

@ -16,11 +16,11 @@ function prompt_colors
set -e _tide_16color
switch $_tide_configure_style
case lean rainbow
_next_choice 'all/show_time'
_next_choice all/show_time
case classic
_next_choice 'classic/classic_prompt_color'
_next_choice classic/classic_prompt_color
end
case 2
_next_choice 'all/show_time'
_next_choice all/show_time
end
end

View File

@ -1,13 +1,13 @@
function prompt_connection
_tide_title 'Prompt Connection'
_tide_option 1 'Disconnected'
_tide_option 1 Disconnected
_tide_display_prompt fake_tide_prompt_connection_icon ''
_tide_option 2 'Dotted'
_tide_option 2 Dotted
_tide_display_prompt fake_tide_prompt_connection_icon '·'
_tide_option 3 'Solid'
_tide_option 3 Solid
_tide_display_prompt fake_tide_prompt_connection_icon '─'
_tide_menu
@ -21,8 +21,8 @@ function prompt_connection
end
switch $_tide_configure_style
case lean
_next_choice 'all/prompt_connection_andor_frame_color'
_next_choice all/prompt_connection_andor_frame_color
case classic rainbow
_next_choice 'powerline/powerline_prompt_frame'
_next_choice powerline/powerline_prompt_frame
end
end

View File

@ -1,11 +1,11 @@
function prompt_connection_andor_frame_color
if test "$_tide_16color" = true
_next_choice 'all/prompt_spacing'
_next_choice all/prompt_spacing
return 0
end
test -n "$fake_tide_prompt_connection_icon" && set promptConnectionExists
test "$fake_tide_left_prompt_frame_enabled" = 'true' -o "$fake_tide_right_prompt_frame_enabled" = 'true' && set frameExists
test "$fake_tide_left_prompt_frame_enabled" = true -o "$fake_tide_right_prompt_frame_enabled" = true && set frameExists
if set -q promptConnectionExists && set -q frameExists
set title "Connection & Frame Color"
@ -14,25 +14,25 @@ function prompt_connection_andor_frame_color
else if set -q frameExists
set title "Frame Color"
else
_next_choice 'all/prompt_spacing'
_next_choice all/prompt_spacing
return 0
end
_tide_title $title
_tide_option 1 'Lightest'
_tide_option 1 Lightest
_set_prompt_connection_and_frame_color 808080
_tide_display_prompt
_tide_option 2 'Light'
_tide_option 2 Light
_set_prompt_connection_and_frame_color 6C6C6C
_tide_display_prompt
_tide_option 3 'Dark'
_tide_option 3 Dark
_set_prompt_connection_and_frame_color 585858
_tide_display_prompt
_tide_option 4 'Darkest'
_tide_option 4 Darkest
_set_prompt_connection_and_frame_color 444444
_tide_display_prompt
@ -47,7 +47,7 @@ function prompt_connection_andor_frame_color
case 4
_set_prompt_connection_and_frame_color 444444
end
_next_choice 'all/prompt_spacing'
_next_choice all/prompt_spacing
end
function _set_prompt_connection_and_frame_color -a color

View File

@ -1,12 +1,12 @@
function prompt_spacing
_tide_title 'Prompt Spacing'
_tide_option 1 'Compact'
_tide_option 1 Compact
_tide_display_prompt
_tide_cursor_up 1
_tide_display_prompt
_tide_option 2 'Sparse'
_tide_option 2 Sparse
_tide_display_prompt
_tide_display_prompt
@ -17,5 +17,5 @@ function prompt_spacing
case 2
set -g fake_tide_print_newline_before_prompt true
end
_next_choice 'all/icons'
_next_choice all/icons
end

View File

@ -1,10 +1,10 @@
function show_time
_tide_title 'Show current time?'
_tide_option 1 'No'
_tide_option 1 No
_tide_display_prompt
set -a fake_tide_right_prompt_items 'time'
set -a fake_tide_right_prompt_items time
_tide_option 2 '24-hour format'
_tide_display_prompt fake_tide_time_format '%T'

View File

@ -1,16 +1,16 @@
function style
_tide_title 'Prompt Style'
_tide_option 1 'Lean'
_load_config 'lean'
_tide_option 1 Lean
_load_config lean
_tide_display_prompt
_tide_option 2 'Classic'
_load_config 'classic'
_tide_option 2 Classic
_load_config classic
_tide_display_prompt
_tide_option 3 'Rainbow'
_load_config 'rainbow'
_tide_option 3 Rainbow
_load_config rainbow
_tide_display_prompt
_tide_menu
@ -25,7 +25,7 @@ function style
_load_config rainbow
set -g _tide_configure_style rainbow
end
_next_choice 'all/prompt_colors'
_next_choice all/prompt_colors
end
function _load_config -a name

View File

@ -1,19 +1,19 @@
function classic_prompt_color
_tide_title 'Prompt Color'
_tide_option 1 'Lightest'
_tide_option 1 Lightest
_set_all_items_bg_color 585858
_tide_display_prompt
_tide_option 2 'Light'
_tide_option 2 Light
_set_all_items_bg_color 444444
_tide_display_prompt
_tide_option 3 'Dark'
_tide_option 3 Dark
_set_all_items_bg_color 303030
_tide_display_prompt
_tide_option 4 'Darkest'
_tide_option 4 Darkest
_set_all_items_bg_color 1C1C1C
_tide_display_prompt
@ -28,5 +28,5 @@ function classic_prompt_color
case 4
_set_all_items_bg_color 1C1C1C
end
_next_choice 'all/show_time'
_next_choice all/show_time
end

View File

@ -1,22 +1,22 @@
function classic_prompt_separators
_tide_title 'Prompt Separators'
_tide_option 1 'Angled'
_tide_option 1 Angled
set -g fake_tide_left_prompt_item_separator_same_color ''
set -g fake_tide_right_prompt_item_separator_same_color ''
_tide_display_prompt
_tide_option 2 'Vertical'
_tide_option 2 Vertical
set -g fake_tide_left_prompt_item_separator_same_color '│'
set -g fake_tide_right_prompt_item_separator_same_color '│'
_tide_display_prompt
_tide_option 3 'Slanted'
_tide_option 3 Slanted
set -g fake_tide_left_prompt_item_separator_same_color ''
set -g fake_tide_right_prompt_item_separator_same_color ''
_tide_display_prompt
_tide_option 4 'Round'
_tide_option 4 Round
set -g fake_tide_left_prompt_item_separator_same_color ''
set -g fake_tide_right_prompt_item_separator_same_color ''
_tide_display_prompt
@ -36,5 +36,5 @@ function classic_prompt_separators
set -g fake_tide_left_prompt_item_separator_same_color ''
set -g fake_tide_right_prompt_item_separator_same_color ''
end
_next_choice 'powerline/powerline_prompt_heads'
_next_choice powerline/powerline_prompt_heads
end

View File

@ -2,21 +2,21 @@ function lean_prompt_height
_tide_title 'Prompt Height'
_tide_option 1 'One line'
_find_and_remove 'newline' fake_tide_left_prompt_items
_find_and_remove newline fake_tide_left_prompt_items
_tide_display_prompt
_tide_option 2 'Two lines'
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] 'newline' $fake_tide_left_prompt_items[-1]
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1]
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_find_and_remove 'newline' fake_tide_left_prompt_items
_next_choice 'all/prompt_connection_andor_frame_color'
_find_and_remove newline fake_tide_left_prompt_items
_next_choice all/prompt_connection_andor_frame_color
case 2
_find_and_remove 'newline' fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] 'newline' $fake_tide_left_prompt_items[-1]
_next_choice 'all/prompt_connection'
_find_and_remove newline fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1]
_next_choice all/prompt_connection
end
end

View File

@ -8,19 +8,19 @@ function powerline_prompt_frame
_tide_display_prompt
set -e fake_tide_left_prompt_items[-1]
_tide_option 2 'Left'
_tide_option 2 Left
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 3 'Right'
_tide_option 3 Right
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled true
set -a fake_tide_left_prompt_items prompt_char
_tide_display_prompt
set -e fake_tide_left_prompt_items[-1]
_tide_option 4 'Full'
_tide_option 4 Full
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
@ -42,5 +42,5 @@ function powerline_prompt_frame
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
end
_next_choice 'all/prompt_connection_andor_frame_color'
_next_choice all/prompt_connection_andor_frame_color
end

View File

@ -1,22 +1,22 @@
function powerline_prompt_heads
_tide_title 'Prompt Heads'
_tide_option 1 'Sharp'
_tide_option 1 Sharp
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_option 2 'Blurred'
_tide_option 2 Blurred
set -g fake_tide_left_prompt_suffix '▓▒░'
set -g fake_tide_right_prompt_prefix '░▒▓'
_tide_display_prompt
_tide_option 3 'Slanted'
_tide_option 3 Slanted
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_option 4 'Round'
_tide_option 4 Round
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
@ -36,5 +36,5 @@ function powerline_prompt_heads
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
end
_next_choice 'powerline/powerline_prompt_tails'
_next_choice powerline/powerline_prompt_tails
end

View File

@ -2,13 +2,13 @@ function powerline_prompt_height
_tide_title 'Prompt Height'
_tide_option 1 'One line'
_find_and_remove 'newline' fake_tide_left_prompt_items
_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 2 'Two lines'
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items 'newline'
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items newline
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
@ -16,15 +16,15 @@ function powerline_prompt_height
_tide_menu
switch $_tide_selected_option
case 1
_find_and_remove 'newline' fake_tide_left_prompt_items
_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_next_choice 'all/prompt_connection_andor_frame_color'
_next_choice all/prompt_connection_andor_frame_color
case 2
_find_and_remove 'newline' fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items 'newline'
_find_and_remove newline fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items newline
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_next_choice 'all/prompt_connection'
_next_choice all/prompt_connection
end
end

View File

@ -1,27 +1,27 @@
function powerline_prompt_tails
_tide_title 'Prompt Tails'
_tide_option 1 'Flat'
_tide_option 1 Flat
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 2 'Blurred'
_tide_option 2 Blurred
set -g fake_tide_left_prompt_prefix '░▒▓'
set -g fake_tide_right_prompt_suffix '▓▒░'
_tide_display_prompt
_tide_option 3 'Sharp'
_tide_option 3 Sharp
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 4 'Slanted'
_tide_option 4 Slanted
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 5 'Round'
_tide_option 5 Round
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
@ -44,5 +44,5 @@ function powerline_prompt_tails
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
end
_next_choice 'powerline/powerline_prompt_height'
_next_choice powerline/powerline_prompt_height
end

View File

@ -1,22 +1,22 @@
function rainbow_prompt_separators
_tide_title 'Prompt Separators'
_tide_option 1 'Angled'
_tide_option 1 Angled
set -g fake_tide_left_prompt_item_separator_diff_color ''
set -g fake_tide_right_prompt_item_separator_diff_color ''
_tide_display_prompt
_tide_option 2 'Vertical'
_tide_option 2 Vertical
set -g fake_tide_left_prompt_item_separator_diff_color ''
set -g fake_tide_right_prompt_item_separator_diff_color ''
_tide_display_prompt
_tide_option 3 'Slanted'
_tide_option 3 Slanted
set -g fake_tide_left_prompt_item_separator_diff_color ''
set -g fake_tide_right_prompt_item_separator_diff_color ''
_tide_display_prompt
_tide_option 4 'Round'
_tide_option 4 Round
set -g fake_tide_left_prompt_item_separator_diff_color ''
set -g fake_tide_right_prompt_item_separator_diff_color ''
_tide_display_prompt
@ -36,5 +36,5 @@ function rainbow_prompt_separators
set -g fake_tide_left_prompt_item_separator_diff_color ''
set -g fake_tide_right_prompt_item_separator_diff_color ''
end
_next_choice 'powerline/powerline_prompt_heads'
_next_choice powerline/powerline_prompt_heads
end

View File

@ -25,7 +25,7 @@ tide_left_prompt_frame_enabled true
tide_left_prompt_item_separator_diff_color ''
tide_left_prompt_item_separator_same_color ''
tide_left_prompt_item_separator_same_color_color 949494
tide_left_prompt_items 'pwd' 'git' 'newline'
tide_left_prompt_items pwd git newline
tide_left_prompt_pad_items true
tide_left_prompt_prefix ''
tide_left_prompt_suffix ''
@ -38,7 +38,7 @@ tide_os_color EEEEEE
tide_php_bg_color 444444
tide_php_color 875FFF
tide_php_icon ''
tide_print_newline_before_prompt 'true'
tide_print_newline_before_prompt true
tide_prompt_char_bg_color normal
tide_prompt_char_failure_color FF0000
tide_prompt_char_icon ''
@ -46,10 +46,10 @@ tide_prompt_char_success_color $_tide_color_green
tide_prompt_char_vi_default_icon ''
tide_prompt_char_vi_insert_icon ''
tide_prompt_char_vi_replace_icon '▶'
tide_prompt_char_vi_visual_icon 'V'
tide_prompt_char_vi_visual_icon V
tide_prompt_connection_color 6C6C6C
tide_prompt_connection_icon ''
tide_pwd_anchors 'first' 'last'
tide_pwd_anchors first last
tide_pwd_bg_color 444444
tide_pwd_color_anchors $_tide_color_light_blue
tide_pwd_color_dirs $_tide_color_dark_blue
@ -64,7 +64,7 @@ tide_right_prompt_frame_enabled true
tide_right_prompt_item_separator_diff_color ''
tide_right_prompt_item_separator_same_color ''
tide_right_prompt_item_separator_same_color_color 949494
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'vi_mode' 'chruby'
tide_right_prompt_items status cmd_duration context jobs nvm virtual_env rust php vi_mode chruby
tide_right_prompt_pad_items true
tide_right_prompt_prefix ''
tide_right_prompt_suffix ''
@ -99,5 +99,5 @@ tide_vi_mode_visual_color 5f87d7
tide_vi_mode_visual_icon VISUAL
tide_virtual_env_bg_color 444444
tide_virtual_env_color 00AFAF
tide_virtual_env_display_mode 'projectName'
tide_virtual_env_display_mode projectName
tide_virtual_env_icon ''

View File

@ -25,7 +25,7 @@ tide_left_prompt_frame_enabled false
tide_left_prompt_item_separator_diff_color ' '
tide_left_prompt_item_separator_same_color ' '
tide_left_prompt_item_separator_same_color_color 949494
tide_left_prompt_items 'pwd' 'git' 'newline' 'prompt_char'
tide_left_prompt_items pwd git newline prompt_char
tide_left_prompt_pad_items false
tide_left_prompt_prefix ''
tide_left_prompt_suffix ' '
@ -38,7 +38,7 @@ tide_os_color normal
tide_php_bg_color normal
tide_php_color 875FFF
tide_php_icon ''
tide_print_newline_before_prompt 'true'
tide_print_newline_before_prompt true
tide_prompt_char_bg_color normal
tide_prompt_char_failure_color FF0000
tide_prompt_char_icon ''
@ -46,10 +46,10 @@ tide_prompt_char_success_color $_tide_color_green
tide_prompt_char_vi_default_icon ''
tide_prompt_char_vi_insert_icon ''
tide_prompt_char_vi_replace_icon '▶'
tide_prompt_char_vi_visual_icon 'V'
tide_prompt_char_vi_visual_icon V
tide_prompt_connection_color 6C6C6C
tide_prompt_connection_icon ''
tide_pwd_anchors 'first' 'last'
tide_pwd_anchors first last
tide_pwd_bg_color normal
tide_pwd_color_anchors $_tide_color_light_blue
tide_pwd_color_dirs $_tide_color_dark_blue
@ -64,7 +64,7 @@ tide_right_prompt_frame_enabled false
tide_right_prompt_item_separator_diff_color ' '
tide_right_prompt_item_separator_same_color ' '
tide_right_prompt_item_separator_same_color_color 949494
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'chruby'
tide_right_prompt_items status cmd_duration context jobs nvm virtual_env rust php chruby
tide_right_prompt_pad_items false
tide_right_prompt_prefix ' '
tide_right_prompt_suffix ''
@ -99,5 +99,5 @@ tide_vi_mode_visual_color
tide_vi_mode_visual_icon
tide_virtual_env_bg_color normal
tide_virtual_env_color 00AFAF
tide_virtual_env_display_mode 'projectName'
tide_virtual_env_display_mode projectName
tide_virtual_env_icon ''

View File

@ -25,7 +25,7 @@ tide_left_prompt_frame_enabled true
tide_left_prompt_item_separator_diff_color ''
tide_left_prompt_item_separator_same_color ''
tide_left_prompt_item_separator_same_color_color 949494
tide_left_prompt_items 'pwd' 'git' 'newline'
tide_left_prompt_items pwd git newline
tide_left_prompt_pad_items true
tide_left_prompt_prefix ''
tide_left_prompt_suffix ''
@ -38,7 +38,7 @@ tide_os_color 080808
tide_php_bg_color 75507B
tide_php_color 000000
tide_php_icon ''
tide_print_newline_before_prompt 'true'
tide_print_newline_before_prompt true
tide_prompt_char_bg_color normal
tide_prompt_char_failure_color FF0000
tide_prompt_char_icon ''
@ -46,10 +46,10 @@ tide_prompt_char_success_color $_tide_color_green
tide_prompt_char_vi_default_icon ''
tide_prompt_char_vi_insert_icon ''
tide_prompt_char_vi_replace_icon '▶'
tide_prompt_char_vi_visual_icon 'V'
tide_prompt_char_vi_visual_icon V
tide_prompt_connection_color 6C6C6C
tide_prompt_connection_icon ''
tide_pwd_anchors 'first' 'last'
tide_pwd_anchors first last
tide_pwd_bg_color 3465A4
tide_pwd_color_anchors E4E4E4
tide_pwd_color_dirs E4E4E4
@ -64,7 +64,7 @@ tide_right_prompt_frame_enabled true
tide_right_prompt_item_separator_diff_color ''
tide_right_prompt_item_separator_same_color ''
tide_right_prompt_item_separator_same_color_color 949494
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'vi_mode' 'chruby'
tide_right_prompt_items status cmd_duration context jobs nvm virtual_env rust php vi_mode chruby
tide_right_prompt_pad_items true
tide_right_prompt_prefix ''
tide_right_prompt_suffix ''
@ -99,5 +99,5 @@ tide_vi_mode_visual_color 000000
tide_vi_mode_visual_icon VISUAL
tide_virtual_env_bg_color 444444
tide_virtual_env_color 00AFAF
tide_virtual_env_display_mode 'projectName'
tide_virtual_env_display_mode projectName
tide_virtual_env_icon ''

View File

@ -2,7 +2,7 @@ function _fake_tide_left_prompt
set lastItemWasNewline
for item in $fake_tide_left_prompt_items
if test "$item" = 'newline'
if test "$item" = newline
set_color $previousColor -b normal
printf '%s' $fake_tide_left_prompt_suffix\n
set lastItemWasNewline
@ -15,7 +15,7 @@ function _fake_tide_left_prompt
test -n "$color" || set color normal
if set -e lastItemWasNewline
if test "$fake_tide_left_prompt_frame_enabled" = 'true'
if test "$fake_tide_left_prompt_frame_enabled" = true
set_color $fake_tide_left_prompt_frame_color -b normal
if set -q alreadyOneNewline
printf '%s' '╰─'
@ -24,7 +24,7 @@ function _fake_tide_left_prompt
end
end
if test "$item" != 'prompt_char'
if test "$item" != prompt_char
set_color $color -b normal
printf '%s' $fake_tide_left_prompt_prefix
end
@ -40,7 +40,7 @@ function _fake_tide_left_prompt
set_color -b $color
if test "$fake_tide_left_prompt_pad_items" = 'true' -a "$item" != 'prompt_char'
if test "$fake_tide_left_prompt_pad_items" = true -a "$item" != prompt_char
printf '%s' " $output "
else
printf '%s' "$output"
@ -48,12 +48,12 @@ function _fake_tide_left_prompt
set previousColor $color
test "$item" = 'prompt_char' && set lastItemWasPromptChar
test "$item" = prompt_char && set lastItemWasPromptChar
end
end
end
if set -q lastItemWasNewline && test "$fake_tide_left_prompt_frame_enabled" = 'true'
if set -q lastItemWasNewline && test "$fake_tide_left_prompt_frame_enabled" = true
set_color $fake_tide_left_prompt_frame_color -b normal
printf '%s' '╰─'
else if not set -q lastItemWasPromptChar

View File

@ -3,7 +3,7 @@ function _fake_tide_right_prompt
set -l rightPromptHeight (count $splitText)
set -l leftPromptHeight (math 1+(string match --all 'newline' $fake_tide_left_prompt_items | count))
if test "$fake_tide_right_prompt_frame_enabled" = 'true'
if test "$fake_tide_right_prompt_frame_enabled" = true
set -l frameColor (set_color $fake_tide_right_prompt_frame_color -b normal || echo)
set splitText[1] $splitText[1]$frameColor'─╮'
@ -29,7 +29,7 @@ function _fake_tide_fetch_right_prompt_items
set_color normal
for item in $fake_tide_right_prompt_items
if test "$item" = 'newline'
if test "$item" = newline
set_color $previousColor -b normal
printf '%s' $fake_tide_right_prompt_suffix\n
set lastItemWasNewline
@ -55,7 +55,7 @@ function _fake_tide_fetch_right_prompt_items
set_color -b $color
if test "$fake_tide_right_prompt_pad_items" = 'true'
if test "$fake_tide_right_prompt_pad_items" = true
printf '%s' " $output "
else
printf '%s' "$output"

View File

@ -1,4 +1,4 @@
function _fake_tide_item_cmd_duration
set_color $fake_tide_cmd_duration_color
printf '%s' $fake_tide_cmd_duration_icon' ' '5s'
printf '%s' $fake_tide_cmd_duration_icon' ' 5s
end

View File

@ -1,4 +1,4 @@
function _fake_tide_item_git
set_color $fake_tide_git_branch_color
printf '%s' 'main'
printf '%s' main
end

View File

@ -7,11 +7,11 @@ function _fake_tide_item_pwd
set_color normal -b $fake_tide_pwd_bg_color
set_color $fake_tide_pwd_color_dirs
printf '%s' '/'
printf '%s' /
set_color normal -b $fake_tide_pwd_bg_color
set_color -o $fake_tide_pwd_color_anchors
printf '%s' 'src'
printf '%s' src
set_color normal -b $fake_tide_pwd_bg_color
else
set_color $fake_tide_pwd_color_dirs

View File

@ -20,9 +20,9 @@ _pwd ~/unwritable/dir # CHECK:  ~/unwritable/dir
set -lx tide_pwd_unwritable_icon
_pwd '/' # CHECK: /
_pwd '/usr' # CHECK: /usr
_pwd '/usr/share' # CHECK: /usr/share
_pwd / # CHECK: /
_pwd /usr # CHECK: /usr
_pwd /usr/share # CHECK: /usr/share
# Normal directories