From 05af630a8237090e8ce1b7e17c5f719a4826d28d Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Tue, 2 Mar 2021 09:46:40 -0800 Subject: [PATCH] Run new fish_indent on code --- completions/tide.fish | 10 +++++----- conf.d/_tide_init.fish | 2 +- functions/_tide_cursor_right.fish | 2 +- functions/_tide_cursor_up.fish | 2 +- functions/_tide_decolor.fish | 2 +- functions/_tide_detect_os.fish | 6 +++--- functions/_tide_item_cmd_duration.fish | 2 +- functions/_tide_item_context.fish | 4 ++-- functions/_tide_item_git.fish | 2 +- functions/_tide_item_jobs.fish | 2 +- functions/_tide_item_nvm.fish | 2 +- functions/_tide_item_os.fish | 2 +- functions/_tide_item_php.fish | 2 +- functions/_tide_item_prompt_char.fish | 2 +- functions/_tide_item_pwd.fish | 12 ++++++------ functions/_tide_item_rust.fish | 2 +- functions/_tide_item_status.fish | 14 +++++++------- functions/_tide_item_time.fish | 2 +- functions/_tide_item_vi_mode.fish | 4 ++-- functions/_tide_item_virtual_env.fish | 2 +- functions/_tide_left_prompt.fish | 14 +++++++------- functions/_tide_prompt.fish | 2 +- functions/_tide_right_prompt.fish | 8 ++++---- functions/_tide_sub_bug-report.fish | 4 ++-- functions/_tide_sub_configure.fish | 4 ++-- functions/fish_mode_prompt.fish | 2 +- functions/fish_prompt.fish | 1 - functions/tide.fish | 4 ++-- .../tide/configure/choices/all/finish.fish | 10 +++++----- .../tide/configure/choices/all/icons.fish | 6 +++--- .../configure/choices/all/prompt_colors.fish | 8 ++++---- .../choices/all/prompt_connection.fish | 12 ++++++------ .../prompt_connection_andor_frame_color.fish | 18 +++++++++--------- .../configure/choices/all/prompt_spacing.fish | 8 ++++---- .../tide/configure/choices/all/show_time.fish | 6 +++--- .../tide/configure/choices/all/style.fish | 16 ++++++++-------- .../choices/classic/classic_prompt_color.fish | 12 ++++++------ .../classic/classic_prompt_separators.fish | 12 ++++++------ .../choices/lean/lean_prompt_height.fish | 16 ++++++++-------- .../powerline/powerline_prompt_frame.fish | 10 +++++----- .../powerline/powerline_prompt_heads.fish | 12 ++++++------ .../powerline/powerline_prompt_height.fish | 16 ++++++++-------- .../powerline/powerline_prompt_tails.fish | 14 +++++++------- .../rainbow/rainbow_prompt_separators.fish | 12 ++++++------ functions/tide/configure/configs/classic.fish | 12 ++++++------ functions/tide/configure/configs/lean.fish | 12 ++++++------ functions/tide/configure/configs/rainbow.fish | 12 ++++++------ .../functions/_fake_tide_left_prompt.fish | 14 +++++++------- .../functions/_fake_tide_right_prompt.fish | 8 ++++---- .../_fake_tide_item_cmd_duration.fish | 4 ++-- .../prompt_items/_fake_tide_item_git.fish | 4 ++-- .../prompt_items/_fake_tide_item_os.fish | 2 +- .../_fake_tide_item_prompt_char.fish | 2 +- .../prompt_items/_fake_tide_item_pwd.fish | 6 +++--- .../prompt_items/_fake_tide_item_time.fish | 2 +- tests/_tide_item_pwd.test.fish | 6 +++--- 56 files changed, 194 insertions(+), 195 deletions(-) diff --git a/completions/tide.fish b/completions/tide.fish index cbf6707..54ec611 100644 --- a/completions/tide.fish +++ b/completions/tide.fish @@ -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" \ No newline at end of file +complete -c tide -x -n '__fish_seen_subcommand_from bug-report' -a --verbose -d "Print full Tide configuration" diff --git a/conf.d/_tide_init.fish b/conf.d/_tide_init.fish index 286ee58..934c44e 100644 --- a/conf.d/_tide_init.fish +++ b/conf.d/_tide_init.fish @@ -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.*") diff --git a/functions/_tide_cursor_right.fish b/functions/_tide_cursor_right.fish index 24cd7c0..ffcc30d 100644 --- a/functions/_tide_cursor_right.fish +++ b/functions/_tide_cursor_right.fish @@ -1,3 +1,3 @@ function _tide_cursor_right -a number string repeat --count $number --no-newline \e\[1C -end \ No newline at end of file +end diff --git a/functions/_tide_cursor_up.fish b/functions/_tide_cursor_up.fish index 36686e8..8524bb1 100644 --- a/functions/_tide_cursor_up.fish +++ b/functions/_tide_cursor_up.fish @@ -1,3 +1,3 @@ function _tide_cursor_up -a number string repeat --count $number --no-newline \e\[1A -end \ No newline at end of file +end diff --git a/functions/_tide_decolor.fish b/functions/_tide_decolor.fish index ba03683..cf7390e 100644 --- a/functions/_tide_decolor.fish +++ b/functions/_tide_decolor.fish @@ -1,3 +1,3 @@ function _tide_decolor string replace --all --regex '\e(\[[\d;]*|\(B\e\[)m(\co)?' '' "$argv" -end \ No newline at end of file +end diff --git a/functions/_tide_detect_os.fish b/functions/_tide_detect_os.fish index dbb7c8a..5ce6179 100644 --- a/functions/_tide_detect_os.fish +++ b/functions/_tide_detect_os.fish @@ -6,9 +6,9 @@ function _tide_detect_os set -gx _tide_os_icon  case linux _tide_detect_os_linux_cases /etc/os-release ID || - _tide_detect_os_linux_cases /etc/os-release ID_LIKE || - _tide_detect_os_linux_cases /etc/lsb-release DISTRIB_ID || - set -gx _tide_os_icon  + _tide_detect_os_linux_cases /etc/os-release ID_LIKE || + _tide_detect_os_linux_cases /etc/lsb-release DISTRIB_ID || + set -gx _tide_os_icon  case '*' set -gx _tide_os_icon '?' end diff --git a/functions/_tide_item_cmd_duration.fish b/functions/_tide_item_cmd_duration.fish index 4e9f122..20d08a4 100644 --- a/functions/_tide_item_cmd_duration.fish +++ b/functions/_tide_item_cmd_duration.fish @@ -16,4 +16,4 @@ function _tide_item_cmd_duration printf '%s' $seconds's' end end -end \ No newline at end of file +end diff --git a/functions/_tide_item_context.fish b/functions/_tide_item_context.fish index 4da861a..afe40e5 100644 --- a/functions/_tide_item_context.fish +++ b/functions/_tide_item_context.fish @@ -5,8 +5,8 @@ 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 -end \ No newline at end of file +end diff --git a/functions/_tide_item_git.fish b/functions/_tide_item_git.fish index 2e6272c..e4f5fa1 100644 --- a/functions/_tide_item_git.fish +++ b/functions/_tide_item_git.fish @@ -51,7 +51,7 @@ function _tide_item_git # Upstream behind/ahead git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null | - read --local --delimiter=\t upstreamBehind upstreamAhead + read --local --delimiter=\t upstreamBehind upstreamAhead test "$upstreamBehind" = 0 && set -e upstreamBehind test "$upstreamAhead" = 0 && set -e upstreamAhead diff --git a/functions/_tide_item_jobs.fish b/functions/_tide_item_jobs.fish index 25b7fde..1b74b57 100644 --- a/functions/_tide_item_jobs.fish +++ b/functions/_tide_item_jobs.fish @@ -8,4 +8,4 @@ function _tide_item_jobs printf '%s' $tide_jobs_icon end end -end \ No newline at end of file +end diff --git a/functions/_tide_item_nvm.fish b/functions/_tide_item_nvm.fish index 3a7c290..8da1ab0 100644 --- a/functions/_tide_item_nvm.fish +++ b/functions/_tide_item_nvm.fish @@ -4,4 +4,4 @@ function _tide_item_nvm set_color $tide_nvm_color printf '%s' $tide_nvm_icon' ' $nvmCurrent end -end \ No newline at end of file +end diff --git a/functions/_tide_item_os.fish b/functions/_tide_item_os.fish index 5453632..40daf7a 100644 --- a/functions/_tide_item_os.fish +++ b/functions/_tide_item_os.fish @@ -1,4 +1,4 @@ function _tide_item_os set_color $tide_os_color printf '%s' $_tide_os_icon -end \ No newline at end of file +end diff --git a/functions/_tide_item_php.fish b/functions/_tide_item_php.fish index e8e2ca9..ee4f3ab 100644 --- a/functions/_tide_item_php.fish +++ b/functions/_tide_item_php.fish @@ -3,4 +3,4 @@ function _tide_item_php set_color $tide_php_color printf '%s' $tide_php_icon' ' (php --version | string match --regex 'PHP ([\d.]+)')[2] end -end \ No newline at end of file +end diff --git a/functions/_tide_item_prompt_char.fish b/functions/_tide_item_prompt_char.fish index a67fa84..808df62 100644 --- a/functions/_tide_item_prompt_char.fish +++ b/functions/_tide_item_prompt_char.fish @@ -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 diff --git a/functions/_tide_item_pwd.fish b/functions/_tide_item_pwd.fish index b592bba..d34eaa6 100644 --- a/functions/_tide_item_pwd.fish +++ b/functions/_tide_item_pwd.fish @@ -24,9 +24,9 @@ function _tide_item_pwd set splitPwdForOutput[$i] $colorAnchors$splitPwd[$i]$keepBackgroundColor$colorDirs else if test (string join -- '/' $splitPwdForLength | string length) -gt $pwdMaxLength while set -l truncationLength (math $truncationLength + 1) && - test $truncationLength -lt (string length -- $splitPwdForLength[$i]) && - set -l truncated (string sub --length $truncationLength -- $splitPwd[$i]) && - test (count $parentDir/$truncated*/) -gt 1 + test $truncationLength -lt (string length -- $splitPwdForLength[$i]) && + set -l truncated (string sub --length $truncationLength -- $splitPwd[$i]) && + test (count $parentDir/$truncated*/) -gt 1 end set splitPwdForLength[$i] $truncated @@ -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 -end \ No newline at end of file + string join -- / $splitPwdForOutput +end diff --git a/functions/_tide_item_rust.fish b/functions/_tide_item_rust.fish index a0ca13f..d2129cc 100644 --- a/functions/_tide_item_rust.fish +++ b/functions/_tide_item_rust.fish @@ -9,4 +9,4 @@ function _tide_item_rust printf '%s' $tide_rust_icon' ' (rustc --version | string split ' ')[2] end end -end \ No newline at end of file +end diff --git a/functions/_tide_item_status.fish b/functions/_tide_item_status.fish index 1e7234d..1f404da 100644 --- a/functions/_tide_item_status.fish +++ b/functions/_tide_item_status.fish @@ -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,11 +17,11 @@ 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 end -end \ No newline at end of file +end diff --git a/functions/_tide_item_time.fish b/functions/_tide_item_time.fish index 7824741..2ee93bf 100644 --- a/functions/_tide_item_time.fish +++ b/functions/_tide_item_time.fish @@ -1,4 +1,4 @@ function _tide_item_time set_color $tide_time_color date +$tide_time_format -end \ No newline at end of file +end diff --git a/functions/_tide_item_vi_mode.fish b/functions/_tide_item_vi_mode.fish index 4201822..6177ef9 100644 --- a/functions/_tide_item_vi_mode.fish +++ b/functions/_tide_item_vi_mode.fish @@ -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 @@ -17,4 +17,4 @@ function _tide_item_vi_mode set_color $tide_vi_mode_visual_color printf '%s' $tide_vi_mode_visual_icon end -end \ No newline at end of file +end diff --git a/functions/_tide_item_virtual_env.fish b/functions/_tide_item_virtual_env.fish index d373900..db813a7 100644 --- a/functions/_tide_item_virtual_env.fish +++ b/functions/_tide_item_virtual_env.fish @@ -8,4 +8,4 @@ function _tide_item_virtual_env printf '%s' $tide_virtual_env_icon' ' $splitVirtualEnv[-1] end end -end \ No newline at end of file +end diff --git a/functions/_tide_left_prompt.fish b/functions/_tide_left_prompt.fish index 0682f99..525b03f 100644 --- a/functions/_tide_left_prompt.fish +++ b/functions/_tide_left_prompt.fish @@ -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,16 +45,16 @@ 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 set_color $previousColor -b normal printf '%s' $tide_left_prompt_suffix end -end \ No newline at end of file +end diff --git a/functions/_tide_prompt.fish b/functions/_tide_prompt.fish index 86dc121..ad2d052 100644 --- a/functions/_tide_prompt.fish +++ b/functions/_tide_prompt.fish @@ -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 ' ' diff --git a/functions/_tide_right_prompt.fish b/functions/_tide_right_prompt.fish index 9f32fa1..7cec179 100644 --- a/functions/_tide_right_prompt.fish +++ b/functions/_tide_right_prompt.fish @@ -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" @@ -82,4 +82,4 @@ function _tide_print_at_end -a text _tide_cursor_right $startLocation printf '%s%b' $text '\v\r' # For some reason \n doesn't work but \v\r does -end \ No newline at end of file +end diff --git a/functions/_tide_sub_bug-report.fish b/functions/_tide_sub_bug-report.fish index 4a2bf2f..52ed3f2 100644 --- a/functions/_tide_sub_bug-report.fish +++ b/functions/_tide_sub_bug-report.fish @@ -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 \ @@ -12,4 +12,4 @@ function _tide_sub_bug-report tide --version printf '%s\n' $TERM end -end \ No newline at end of file +end diff --git a/functions/_tide_sub_configure.fish b/functions/_tide_sub_configure.fish index 400c4ac..cfc568b 100644 --- a/functions/_tide_sub_configure.fish +++ b/functions/_tide_sub_configure.fish @@ -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 diff --git a/functions/fish_mode_prompt.fish b/functions/fish_mode_prompt.fish index b24f6ec..0b69998 100644 --- a/functions/fish_mode_prompt.fish +++ b/functions/fish_mode_prompt.fish @@ -1 +1 @@ -# Disables default vi prompt \ No newline at end of file +# Disables default vi prompt diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 3975592..526b568 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -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 - diff --git a/functions/tide.fish b/functions/tide.fish index ca1a4d3..a0391d5 100644 --- a/functions/tide.fish +++ b/functions/tide.fish @@ -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" @@ -24,4 +24,4 @@ function _tide_help 'Subcommands:' \ ' configure run interactive configuration wizard' \ ' bug-report print info for use in bug reports' -end \ No newline at end of file +end diff --git a/functions/tide/configure/choices/all/finish.fish b/functions/tide/configure/choices/all/finish.fish index 1f51c31..36e670c 100644 --- a/functions/tide/configure/choices/all/finish.fish +++ b/functions/tide/configure/choices/all/finish.fish @@ -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 diff --git a/functions/tide/configure/choices/all/icons.fish b/functions/tide/configure/choices/all/icons.fish index 2f19d2b..3b56090 100644 --- a/functions/tide/configure/choices/all/icons.fish +++ b/functions/tide/configure/choices/all/icons.fish @@ -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 @@ -28,4 +28,4 @@ function _disable_icons set fake_tide_pwd_dir_icon set fake_tide_pwd_home_icon set fake_tide_cmd_duration_icon -end \ No newline at end of file +end diff --git a/functions/tide/configure/choices/all/prompt_colors.fish b/functions/tide/configure/choices/all/prompt_colors.fish index ff6ab1e..90b1a9d 100644 --- a/functions/tide/configure/choices/all/prompt_colors.fish +++ b/functions/tide/configure/choices/all/prompt_colors.fish @@ -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 \ No newline at end of file +end diff --git a/functions/tide/configure/choices/all/prompt_connection.fish b/functions/tide/configure/choices/all/prompt_connection.fish index 902ad36..1f32489 100644 --- a/functions/tide/configure/choices/all/prompt_connection.fish +++ b/functions/tide/configure/choices/all/prompt_connection.fish @@ -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 \ No newline at end of file +end diff --git a/functions/tide/configure/choices/all/prompt_connection_andor_frame_color.fish b/functions/tide/configure/choices/all/prompt_connection_andor_frame_color.fish index 35268ec..6ec6dfb 100644 --- a/functions/tide/configure/choices/all/prompt_connection_andor_frame_color.fish +++ b/functions/tide/configure/choices/all/prompt_connection_andor_frame_color.fish @@ -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,11 +47,11 @@ 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 set -g fake_tide_prompt_connection_color $color set -g fake_tide_left_prompt_frame_color $color set -g fake_tide_right_prompt_frame_color $color -end \ No newline at end of file +end diff --git a/functions/tide/configure/choices/all/prompt_spacing.fish b/functions/tide/configure/choices/all/prompt_spacing.fish index 43b4bbe..bb87b39 100644 --- a/functions/tide/configure/choices/all/prompt_spacing.fish +++ b/functions/tide/configure/choices/all/prompt_spacing.fish @@ -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' -end \ No newline at end of file + _next_choice all/icons +end diff --git a/functions/tide/configure/choices/all/show_time.fish b/functions/tide/configure/choices/all/show_time.fish index 554b07e..37c2e3d 100644 --- a/functions/tide/configure/choices/all/show_time.fish +++ b/functions/tide/configure/choices/all/show_time.fish @@ -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' @@ -28,4 +28,4 @@ function show_time case classic rainbow _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_separators end -end \ No newline at end of file +end diff --git a/functions/tide/configure/choices/all/style.fish b/functions/tide/configure/choices/all/style.fish index 2134ad6..08abc98 100644 --- a/functions/tide/configure/choices/all/style.fish +++ b/functions/tide/configure/choices/all/style.fish @@ -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,9 +25,9 @@ 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 printf '%s\n' "set -g fake_"(cat "$_tide_root/functions/tide/configure/configs/$name.fish") | source -end \ No newline at end of file +end diff --git a/functions/tide/configure/choices/classic/classic_prompt_color.fish b/functions/tide/configure/choices/classic/classic_prompt_color.fish index d2733b9..fa55b3f 100644 --- a/functions/tide/configure/choices/classic/classic_prompt_color.fish +++ b/functions/tide/configure/choices/classic/classic_prompt_color.fish @@ -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' -end \ No newline at end of file + _next_choice all/show_time +end diff --git a/functions/tide/configure/choices/classic/classic_prompt_separators.fish b/functions/tide/configure/choices/classic/classic_prompt_separators.fish index eaf8cf7..8a29069 100644 --- a/functions/tide/configure/choices/classic/classic_prompt_separators.fish +++ b/functions/tide/configure/choices/classic/classic_prompt_separators.fish @@ -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' -end \ No newline at end of file + _next_choice powerline/powerline_prompt_heads +end diff --git a/functions/tide/configure/choices/lean/lean_prompt_height.fish b/functions/tide/configure/choices/lean/lean_prompt_height.fish index df91856..34cbe75 100644 --- a/functions/tide/configure/choices/lean/lean_prompt_height.fish +++ b/functions/tide/configure/choices/lean/lean_prompt_height.fish @@ -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 \ No newline at end of file +end diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_frame.fish b/functions/tide/configure/choices/powerline/powerline_prompt_frame.fish index a01eafb..0df29ea 100644 --- a/functions/tide/configure/choices/powerline/powerline_prompt_frame.fish +++ b/functions/tide/configure/choices/powerline/powerline_prompt_frame.fish @@ -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' -end \ No newline at end of file + _next_choice all/prompt_connection_andor_frame_color +end diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_heads.fish b/functions/tide/configure/choices/powerline/powerline_prompt_heads.fish index 49d3d91..005ac20 100644 --- a/functions/tide/configure/choices/powerline/powerline_prompt_heads.fish +++ b/functions/tide/configure/choices/powerline/powerline_prompt_heads.fish @@ -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' -end \ No newline at end of file + _next_choice powerline/powerline_prompt_tails +end diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_height.fish b/functions/tide/configure/choices/powerline/powerline_prompt_height.fish index 779bc09..f459291 100644 --- a/functions/tide/configure/choices/powerline/powerline_prompt_height.fish +++ b/functions/tide/configure/choices/powerline/powerline_prompt_height.fish @@ -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 \ No newline at end of file +end diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish b/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish index 9bf5ba1..dcd03ec 100644 --- a/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish +++ b/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish @@ -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' -end \ No newline at end of file + _next_choice powerline/powerline_prompt_height +end diff --git a/functions/tide/configure/choices/rainbow/rainbow_prompt_separators.fish b/functions/tide/configure/choices/rainbow/rainbow_prompt_separators.fish index bf5396a..56801ed 100644 --- a/functions/tide/configure/choices/rainbow/rainbow_prompt_separators.fish +++ b/functions/tide/configure/choices/rainbow/rainbow_prompt_separators.fish @@ -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' -end \ No newline at end of file + _next_choice powerline/powerline_prompt_heads +end diff --git a/functions/tide/configure/configs/classic.fish b/functions/tide/configure/configs/classic.fish index 7b92069..01eca29 100644 --- a/functions/tide/configure/configs/classic.fish +++ b/functions/tide/configure/configs/classic.fish @@ -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 '' diff --git a/functions/tide/configure/configs/lean.fish b/functions/tide/configure/configs/lean.fish index e74b6e6..e2f5fff 100644 --- a/functions/tide/configure/configs/lean.fish +++ b/functions/tide/configure/configs/lean.fish @@ -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 '' diff --git a/functions/tide/configure/configs/rainbow.fish b/functions/tide/configure/configs/rainbow.fish index 731291f..004db69 100644 --- a/functions/tide/configure/configs/rainbow.fish +++ b/functions/tide/configure/configs/rainbow.fish @@ -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 '' diff --git a/functions/tide/configure/functions/_fake_tide_left_prompt.fish b/functions/tide/configure/functions/_fake_tide_left_prompt.fish index 1887321..72437ab 100644 --- a/functions/tide/configure/functions/_fake_tide_left_prompt.fish +++ b/functions/tide/configure/functions/_fake_tide_left_prompt.fish @@ -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,16 +48,16 @@ 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 set_color $previousColor -b normal printf '%s' $fake_tide_left_prompt_suffix end -end \ No newline at end of file +end diff --git a/functions/tide/configure/functions/_fake_tide_right_prompt.fish b/functions/tide/configure/functions/_fake_tide_right_prompt.fish index a86fa0b..0bdf82a 100644 --- a/functions/tide/configure/functions/_fake_tide_right_prompt.fish +++ b/functions/tide/configure/functions/_fake_tide_right_prompt.fish @@ -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" @@ -77,4 +77,4 @@ function _fake_tide_print_at_end -a text _tide_cursor_right $startLocation printf '%s%b' $text '\v\r' # For some reason \n doesn't work but \v\r does -end \ No newline at end of file +end diff --git a/functions/tide/configure/prompt_items/_fake_tide_item_cmd_duration.fish b/functions/tide/configure/prompt_items/_fake_tide_item_cmd_duration.fish index 252d46f..ed0fc9e 100644 --- a/functions/tide/configure/prompt_items/_fake_tide_item_cmd_duration.fish +++ b/functions/tide/configure/prompt_items/_fake_tide_item_cmd_duration.fish @@ -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' -end \ No newline at end of file + printf '%s' $fake_tide_cmd_duration_icon' ' 5s +end diff --git a/functions/tide/configure/prompt_items/_fake_tide_item_git.fish b/functions/tide/configure/prompt_items/_fake_tide_item_git.fish index 6f6e388..6e7ce74 100644 --- a/functions/tide/configure/prompt_items/_fake_tide_item_git.fish +++ b/functions/tide/configure/prompt_items/_fake_tide_item_git.fish @@ -1,4 +1,4 @@ function _fake_tide_item_git set_color $fake_tide_git_branch_color - printf '%s' 'main' -end \ No newline at end of file + printf '%s' main +end diff --git a/functions/tide/configure/prompt_items/_fake_tide_item_os.fish b/functions/tide/configure/prompt_items/_fake_tide_item_os.fish index 73303de..a8357a6 100644 --- a/functions/tide/configure/prompt_items/_fake_tide_item_os.fish +++ b/functions/tide/configure/prompt_items/_fake_tide_item_os.fish @@ -1,4 +1,4 @@ function _fake_tide_item_os set_color $fake_tide_os_color printf '%s' $_tide_os_icon -end \ No newline at end of file +end diff --git a/functions/tide/configure/prompt_items/_fake_tide_item_prompt_char.fish b/functions/tide/configure/prompt_items/_fake_tide_item_prompt_char.fish index a9a60ac..66ece33 100644 --- a/functions/tide/configure/prompt_items/_fake_tide_item_prompt_char.fish +++ b/functions/tide/configure/prompt_items/_fake_tide_item_prompt_char.fish @@ -1,4 +1,4 @@ function _fake_tide_item_prompt_char set_color $fake_tide_prompt_char_success_color printf '%s ' '❯' -end \ No newline at end of file +end diff --git a/functions/tide/configure/prompt_items/_fake_tide_item_pwd.fish b/functions/tide/configure/prompt_items/_fake_tide_item_pwd.fish index 08870b6..f477558 100644 --- a/functions/tide/configure/prompt_items/_fake_tide_item_pwd.fish +++ b/functions/tide/configure/prompt_items/_fake_tide_item_pwd.fish @@ -7,14 +7,14 @@ 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 printf '%s' '~/src' end -end \ No newline at end of file +end diff --git a/functions/tide/configure/prompt_items/_fake_tide_item_time.fish b/functions/tide/configure/prompt_items/_fake_tide_item_time.fish index 83eb865..3025134 100644 --- a/functions/tide/configure/prompt_items/_fake_tide_item_time.fish +++ b/functions/tide/configure/prompt_items/_fake_tide_item_time.fish @@ -1,4 +1,4 @@ function _fake_tide_item_time set_color $fake_tide_time_color printf '%s' (date +$fake_tide_time_format) -end \ No newline at end of file +end diff --git a/tests/_tide_item_pwd.test.fish b/tests/_tide_item_pwd.test.fish index aa9e843..8247137 100644 --- a/tests/_tide_item_pwd.test.fish +++ b/tests/_tide_item_pwd.test.fish @@ -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