From 46abf0472d1c411e09f0f62dad9bea71cdd33091 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Mon, 20 Jul 2020 14:11:59 -0700 Subject: [PATCH] Exchange short flags for long ones --- .github/workflows/CI.yaml | 8 ++++---- CONTRIBUTING.md | 9 +++------ completions/tide.fish | 8 ++++---- conf.d/_tide_Ω_init.fish | 2 ++ functions/_tide_count_left_prompt_height.fish | 4 ++-- functions/_tide_decolor.fish | 2 +- functions/_tide_git_prompt_set_vars.fish | 8 ++------ functions/_tide_item_jobs.fish | 2 +- functions/_tide_item_status.fish | 2 +- functions/_tide_pwd.fish | 2 +- functions/_tide_pwd_set_max_length.fish | 2 +- functions/_tide_pwd_var_change.fish | 2 +- functions/_tide_sub_configure.fish | 5 +++-- functions/_tide_sub_help.fish | 6 +++--- functions/_tide_sub_test.fish | 4 ++-- functions/_tide_sub_uninstall.fish | 4 ++-- functions/tide.fish | 2 +- tide_theme/configure/choices/all/finish.fish | 4 ++-- .../configure/choices/classic/classic_prompt_height.fish | 6 +++--- .../configure/choices/lean/lean_prompt_height.fish | 6 +++--- .../configure/choices/pure/pure_prompt_height.fish | 6 +++--- .../configure/choices/rainbow/rainbow_prompt_height.fish | 6 +++--- tide_theme/configure/configs/classic.fish | 3 ++- tide_theme/configure/configs/lean.fish | 3 ++- tide_theme/configure/configs/pure.fish | 3 ++- tide_theme/configure/configs/rainbow.fish | 3 ++- .../functions/fake_tide_count_left_prompt_height.fish | 2 +- tide_theme/tests/context.fish | 2 +- tide_theme/tests/pwd.fish | 6 +++--- tide_theme/tests/virtual_env.fish | 2 +- tools/_tide_actual_install.fish | 2 +- tools/tide_install.fish | 2 +- 32 files changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index b3f61c3..f8ff928 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -17,16 +17,16 @@ jobs: - name: Install dependencies shell: bash run: > - sudo apt-get install -y + sudo apt-get install --yes fish git curl python3 python3-venv - name: Install Tide unattended - run: source "$GITHUB_WORKSPACE/tools/tide_install.fish" && tide_install -lu "$GITHUB_WORKSPACE" + run: source "$GITHUB_WORKSPACE/tools/tide_install.fish" && tide_install --local --unattended "$GITHUB_WORKSPACE" - name: Install fisher and fishtape - run: tide test -i + run: tide test --install - name: Run all tests - run: tide test -a + run: tide test --all diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84a0c9d..7dbcf6a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,13 +23,10 @@ tide test -a ### Style Guide - `if` > `and` or `or` -- Long forms of flags > short forms - - Exception for `set`, please use short forms - `test` > `[...]` - -Prefer pipes over command substitution when convenient. - -Ex: +- Long forms of flags > short forms + - Exceptions: `set`, `set_color`, `function foo -a` option, "common knowledge" options for commands like `rm -r` +- Prefer pipes over command substitution when convenient (no extra commands) ### Naming Conventions diff --git a/completions/tide.fish b/completions/tide.fish index 7966ad1..7cbf4b1 100644 --- a/completions/tide.fish +++ b/completions/tide.fish @@ -1,9 +1,9 @@ -set -l subcommands (basename -s '.fish' $__fish_config_dir/functions/_tide_sub_* | string replace '_tide_sub_' '') -set -l uninstallIndex (contains -i uninstall $subcommands) +set -l subcommands (basename --suffix='.fish' $__fish_config_dir/functions/_tide_sub_* | string replace '_tide_sub_' '') +set -l uninstallIndex (contains --index uninstall $subcommands) set -l subcommandsWithoutUninstall (printf '%s ' $subcommands[1..(math $uninstallIndex-1)] $subcommands[(math $uninstallIndex+1)..-1]) # Disable file completions for the entire command -complete -c tide -f +complete --command tide --no-files # Offer subcommands (without uninstall) if no subcommand has been given so far -complete -c tide -n "not __fish_seen_subcommand_from $subcommands" -a $subcommandsWithoutUninstall \ No newline at end of file +complete --command tide --condition "not __fish_seen_subcommand_from $subcommands" --arguments=$subcommandsWithoutUninstall \ No newline at end of file diff --git a/conf.d/_tide_Ω_init.fish b/conf.d/_tide_Ω_init.fish index caee686..b721912 100644 --- a/conf.d/_tide_Ω_init.fish +++ b/conf.d/_tide_Ω_init.fish @@ -1,4 +1,6 @@ _tide_count_left_prompt_height + _tide_git_prompt_set_vars + _tide_pwd_set_max_length _tide_pwd_var_change \ No newline at end of file diff --git a/functions/_tide_count_left_prompt_height.fish b/functions/_tide_count_left_prompt_height.fish index 21e2ca3..c3fda05 100644 --- a/functions/_tide_count_left_prompt_height.fish +++ b/functions/_tide_count_left_prompt_height.fish @@ -1,4 +1,4 @@ -function _tide_count_left_prompt_height -v tide_left_prompt_items - set -l numberOfNewlines (count (string match -a 'newline' $tide_left_prompt_items)) +function _tide_count_left_prompt_height --on-variable tide_left_prompt_items + set -l numberOfNewlines (count (string match --all 'newline' $tide_left_prompt_items)) set -g _tide_left_prompt_height (math 1+$numberOfNewlines) end \ No newline at end of file diff --git a/functions/_tide_decolor.fish b/functions/_tide_decolor.fish index a7f20a4..eaabb34 100644 --- a/functions/_tide_decolor.fish +++ b/functions/_tide_decolor.fish @@ -1,3 +1,3 @@ function _tide_decolor -a text - string replace -a $_tide_color_normal '' "$text" | string replace -ar '\e\[[0-9;]*m' '' + string replace --all $_tide_color_normal '' "$text" | string replace --all --regex '\e\[[0-9;]*m' '' end \ No newline at end of file diff --git a/functions/_tide_git_prompt_set_vars.fish b/functions/_tide_git_prompt_set_vars.fish index 7c6a467..deb23ab 100644 --- a/functions/_tide_git_prompt_set_vars.fish +++ b/functions/_tide_git_prompt_set_vars.fish @@ -1,4 +1,4 @@ -function _tide_git_prompt_set_vars -v tide_git_prompt_bg_color +function _tide_git_prompt_set_vars --on-variable tide_git_prompt_bg_color switch $tide_git_prompt_bg_color case '' 'normal' set color '' @@ -6,11 +6,7 @@ function _tide_git_prompt_set_vars -v tide_git_prompt_bg_color set color (set_color -b $tide_git_prompt_bg_color) end - set -a vars __fish_git_prompt_char_{cleanstate, dirtystate, invalidstate, stagedstate, stashstate} - set -a vars __fish_git_prompt_char_{stateseparator, untrackedfiles} - set -a vars __fish_git_prompt_char_{upstream_ahead, upstream_behind, upstream_diverged, upstream_equal, upstream_prefix} - - for var in $vars + for var in (set --names | string match --regex "__fish_git_prompt_char_.*") set -g _$var $color$$var end end \ No newline at end of file diff --git a/functions/_tide_item_jobs.fish b/functions/_tide_item_jobs.fish index 38b5085..50809d1 100644 --- a/functions/_tide_item_jobs.fish +++ b/functions/_tide_item_jobs.fish @@ -1,5 +1,5 @@ function _tide_item_jobs - if jobs -q + if jobs --quiet set_color $tide_jobs_color printf '%s' $tide_jobs_icon end diff --git a/functions/_tide_item_status.fish b/functions/_tide_item_status.fish index d92e711..e265d2f 100644 --- a/functions/_tide_item_status.fish +++ b/functions/_tide_item_status.fish @@ -1,5 +1,5 @@ function _tide_item_status - if string match -q --invert '0' $_tide_last_pipestatus # If there is a failure anywhere in the pipestatus + 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 test "$tide_status_always_display_icon" = 'true' set -g tide_status_bg_color $tide_status_failure_bg_color diff --git a/functions/_tide_pwd.fish b/functions/_tide_pwd.fish index e1f6dfa..69b0dc5 100644 --- a/functions/_tide_pwd.fish +++ b/functions/_tide_pwd.fish @@ -27,5 +27,5 @@ function _tide_pwd end end - set _tide_pwd_output (string replace -a '/' $colorDirs'/' $_tide_pwd_output) + set _tide_pwd_output (string replace --all '/' $colorDirs'/' $_tide_pwd_output) end \ No newline at end of file diff --git a/functions/_tide_pwd_set_max_length.fish b/functions/_tide_pwd_set_max_length.fish index 1fc6d8f..c13c21a 100644 --- a/functions/_tide_pwd_set_max_length.fish +++ b/functions/_tide_pwd_set_max_length.fish @@ -1,4 +1,4 @@ -function _tide_pwd_set_max_length -v tide_pwd_truncate_margin -s WINCH +function _tide_pwd_set_max_length --on-variable tide_pwd_truncate_margin --on-signal WINCH set -g _tide_pwd_max_length (math $COLUMNS -$tide_pwd_truncate_margin) _tide_pwd diff --git a/functions/_tide_pwd_var_change.fish b/functions/_tide_pwd_var_change.fish index 0126710..1cb9cda 100644 --- a/functions/_tide_pwd_var_change.fish +++ b/functions/_tide_pwd_var_change.fish @@ -1,4 +1,4 @@ -function _tide_pwd_var_change -v PWD +function _tide_pwd_var_change --on-variable PWD set -l preDirNumberPwd (string replace $HOME '~' $PWD) set -l preDirNumberPwdSplit (string split '/' $preDirNumberPwd) diff --git a/functions/_tide_sub_configure.fish b/functions/_tide_sub_configure.fish index f67d9e3..865524e 100644 --- a/functions/_tide_sub_configure.fish +++ b/functions/_tide_sub_configure.fish @@ -48,9 +48,10 @@ function _tide_menu end function _tide_title -a text + set -l midCols (math --scale=0 $fake_columns/2) + set -l midTitle (math --scale=0 (string length $text)/2) + clear - set -l midCols (math -s0 $fake_columns/2) - set -l midTitle (math -s0 (string length $text)/2) _tide_cursor_right (math $midCols-$midTitle) set_color -o diff --git a/functions/_tide_sub_help.fish b/functions/_tide_sub_help.fish index 1c587fe..3c59fcb 100644 --- a/functions/_tide_sub_help.fish +++ b/functions/_tide_sub_help.fish @@ -15,7 +15,7 @@ function _tide_sub_help -a subcommand 'print this help message' if contains $subcommand $subcommandList - if functions -q _help_$subcommand + if functions --query _help_$subcommand _help_$subcommand else _tide_generic_help_sub $subcommand @@ -45,13 +45,13 @@ function _tide_sub_help -a subcommand end function _tide_get_description -a subcommand - set -l descriptionIndex (contains -i $subcommand $subcommandList) + set -l descriptionIndex (contains --index $subcommand $subcommandList) printf '%s\n' $descriptionList[$descriptionIndex] end function _tide_generic_help_sub -a subcommand set -l description (_tide_get_description $subcommand) - set -l descriptionFirstLetter (string sub -l 1 $description) + set -l descriptionFirstLetter (string sub --length 1 $description) set -l upperDescriptionFirstLetter (string upper $descriptionFirstLetter) printf '%s\n' 'Usage: '$g'tide '$n$b$subcommand$n diff --git a/functions/_tide_sub_test.fish b/functions/_tide_sub_test.fish index 04d2c79..5f11c51 100644 --- a/functions/_tide_sub_test.fish +++ b/functions/_tide_sub_test.fish @@ -32,7 +32,7 @@ function _tide_sub_test set -l returnStatement 0 if set -q _flag_all - set argv (basename -s '.fish' $testsDir/*) + set argv (basename --suffix='.fish' $testsDir/*) end for test in $argv @@ -93,7 +93,7 @@ function _tide_test_help printf '%s' ' -'$option printf '%b' '\r' _tide_cursor_right 20 - set -l descriptionIndex (contains -i $option $optionList) + set -l descriptionIndex (contains --index $option $optionList) printf '%s\n' $descriptionList[$descriptionIndex] end end \ No newline at end of file diff --git a/functions/_tide_sub_uninstall.fish b/functions/_tide_sub_uninstall.fish index c36cd2e..361a35a 100644 --- a/functions/_tide_sub_uninstall.fish +++ b/functions/_tide_sub_uninstall.fish @@ -5,7 +5,7 @@ function _tide_sub_uninstall end printf '%s\n' 'Uninstalling tide theme...' - set -l fishPrompt (functions -D fish_prompt) + set -l fishPrompt (functions --details fish_prompt) # ----------------------------------Remove Files---------------------------------- if test -e $_tide_dir @@ -17,7 +17,7 @@ function _tide_sub_uninstall source "$__fish_data_dir/functions/fish_prompt.fish" end - for func in (basename -s '.fish' $_tide_file_list) + for func in (basename --suffix='.fish' $_tide_file_list) functions -e $func end diff --git a/functions/tide.fish b/functions/tide.fish index 861a570..580b62b 100644 --- a/functions/tide.fish +++ b/functions/tide.fish @@ -7,7 +7,7 @@ function tide return 0 end - if functions -q _tide_sub_$subcommand + if functions --query _tide_sub_$subcommand _tide_sub_$subcommand $argv[2..-1] else tide help diff --git a/tide_theme/configure/choices/all/finish.fish b/tide_theme/configure/choices/all/finish.fish index 1f00a94..fe0d4d6 100644 --- a/tide_theme/configure/choices/all/finish.fish +++ b/tide_theme/configure/choices/all/finish.fish @@ -18,7 +18,7 @@ function finish end function _tide_finish - block -g # Event blocker prevents issues from arising while variables might be undefined etc. + block --global # Event blocker prevents issues from arising while variables might be undefined etc. if not contains 'prompt_char' $fake_tide_left_prompt_items # Without a prompt_char, the user won't know if a command failed/succeeded set fake_tide_status_always_display_icon true # Therefore, set the status to always display @@ -42,5 +42,5 @@ function _tide_finish source "$__fish_config_dir/conf.d/_tide_Ω_init.fish" # Reload important startup variables - block -e + block --erase end \ No newline at end of file diff --git a/tide_theme/configure/choices/classic/classic_prompt_height.fish b/tide_theme/configure/choices/classic/classic_prompt_height.fish index 10fd339..c0ed3ed 100644 --- a/tide_theme/configure/choices/classic/classic_prompt_height.fish +++ b/tide_theme/configure/choices/classic/classic_prompt_height.fish @@ -2,7 +2,7 @@ function classic_prompt_height _tide_title 'Prompt Height' _tide_option 1 'One line' - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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 @@ -17,13 +17,13 @@ function classic_prompt_height switch (_tide_menu) case 1 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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' case 2 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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 diff --git a/tide_theme/configure/choices/lean/lean_prompt_height.fish b/tide_theme/configure/choices/lean/lean_prompt_height.fish index b611a60..5be3764 100644 --- a/tide_theme/configure/choices/lean/lean_prompt_height.fish +++ b/tide_theme/configure/choices/lean/lean_prompt_height.fish @@ -2,7 +2,7 @@ function lean_prompt_height _tide_title 'Prompt Height' _tide_option 1 'One line' - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index 'newline' $fake_tide_left_prompt_items)] _tide_display_prompt _tide_option 2 'Two lines' @@ -13,10 +13,10 @@ function lean_prompt_height switch (_tide_menu) case 1 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index 'newline' $fake_tide_left_prompt_items)] _next_choice 'all/prompt_connection_andor_frame_color' case 2 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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 'lean/lean_prompt_connection' case r diff --git a/tide_theme/configure/choices/pure/pure_prompt_height.fish b/tide_theme/configure/choices/pure/pure_prompt_height.fish index d25cbb7..f167304 100644 --- a/tide_theme/configure/choices/pure/pure_prompt_height.fish +++ b/tide_theme/configure/choices/pure/pure_prompt_height.fish @@ -2,7 +2,7 @@ function pure_prompt_height _tide_title 'Prompt Height' _tide_option 1 'One line' - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index 'newline' $fake_tide_left_prompt_items)] _tide_display_prompt _tide_option 2 'Two lines' @@ -13,10 +13,10 @@ function pure_prompt_height switch (_tide_menu) case 1 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index 'newline' $fake_tide_left_prompt_items)] _next_choice 'all/prompt_connection_andor_frame_color' case 2 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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_andor_frame_color' case r diff --git a/tide_theme/configure/choices/rainbow/rainbow_prompt_height.fish b/tide_theme/configure/choices/rainbow/rainbow_prompt_height.fish index d24e20b..a050afe 100644 --- a/tide_theme/configure/choices/rainbow/rainbow_prompt_height.fish +++ b/tide_theme/configure/choices/rainbow/rainbow_prompt_height.fish @@ -2,7 +2,7 @@ function rainbow_prompt_height _tide_title 'Prompt Height' _tide_option 1 'One line' - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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 @@ -17,12 +17,12 @@ function rainbow_prompt_height switch (_tide_menu) case 1 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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' case 2 - set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)] + set -e fake_tide_left_prompt_items[(contains --index '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 diff --git a/tide_theme/configure/configs/classic.fish b/tide_theme/configure/configs/classic.fish index a4e07e5..2cc0809 100644 --- a/tide_theme/configure/configs/classic.fish +++ b/tide_theme/configure/configs/classic.fish @@ -12,7 +12,6 @@ _set fake_tide_left_prompt_item_separator_same_color '' _set fake_tide_left_prompt_item_separator_diff_color '' _set fake_tide_left_prompt_item_separator_same_color_color 949494 -_set fake_tide_right_prompt_item_separator_same_color_color 949494 _set fake_tide_left_prompt_prefix '' _set fake_tide_left_prompt_suffix '' @@ -26,6 +25,8 @@ _set fake_tide_right_prompt_pad_items true _set fake_tide_right_prompt_item_separator_same_color '' _set fake_tide_right_prompt_item_separator_diff_color '' +_set fake_tide_right_prompt_item_separator_same_color_color 949494 + _set fake_tide_right_prompt_prefix '' _set fake_tide_right_prompt_suffix '' diff --git a/tide_theme/configure/configs/lean.fish b/tide_theme/configure/configs/lean.fish index 347dc85..443b424 100644 --- a/tide_theme/configure/configs/lean.fish +++ b/tide_theme/configure/configs/lean.fish @@ -12,7 +12,6 @@ _set fake_tide_left_prompt_item_separator_same_color ' ' _set fake_tide_left_prompt_item_separator_diff_color ' ' _set fake_tide_left_prompt_item_separator_same_color_color 949494 -_set fake_tide_right_prompt_item_separator_same_color_color 949494 _set fake_tide_left_prompt_prefix '' _set fake_tide_left_prompt_suffix ' ' @@ -26,6 +25,8 @@ _set fake_tide_right_prompt_pad_items false _set fake_tide_right_prompt_item_separator_same_color ' ' _set fake_tide_right_prompt_item_separator_diff_color ' ' +_set fake_tide_right_prompt_item_separator_same_color_color 949494 + _set fake_tide_right_prompt_prefix ' ' _set fake_tide_right_prompt_suffix '' diff --git a/tide_theme/configure/configs/pure.fish b/tide_theme/configure/configs/pure.fish index 54385aa..fa55d83 100644 --- a/tide_theme/configure/configs/pure.fish +++ b/tide_theme/configure/configs/pure.fish @@ -12,7 +12,6 @@ _set fake_tide_left_prompt_item_separator_same_color ' ' _set fake_tide_left_prompt_item_separator_diff_color ' ' _set fake_tide_left_prompt_item_separator_same_color_color 949494 -_set fake_tide_right_prompt_item_separator_same_color_color 949494 _set fake_tide_left_prompt_prefix '' _set fake_tide_left_prompt_suffix ' ' @@ -26,6 +25,8 @@ _set fake_tide_right_prompt_pad_items false _set fake_tide_right_prompt_item_separator_same_color ' ' _set fake_tide_right_prompt_item_separator_diff_color ' ' +_set fake_tide_right_prompt_item_separator_same_color_color 949494 + _set fake_tide_right_prompt_prefix ' ' _set fake_tide_right_prompt_suffix '' diff --git a/tide_theme/configure/configs/rainbow.fish b/tide_theme/configure/configs/rainbow.fish index 9ebcc92..298cf5f 100644 --- a/tide_theme/configure/configs/rainbow.fish +++ b/tide_theme/configure/configs/rainbow.fish @@ -12,7 +12,6 @@ _set fake_tide_left_prompt_item_separator_same_color '' _set fake_tide_left_prompt_item_separator_diff_color '' _set fake_tide_left_prompt_item_separator_same_color_color 949494 -_set fake_tide_right_prompt_item_separator_same_color_color 949494 _set fake_tide_left_prompt_prefix '' _set fake_tide_left_prompt_suffix '' @@ -26,6 +25,8 @@ _set fake_tide_right_prompt_pad_items true _set fake_tide_right_prompt_item_separator_same_color '' _set fake_tide_right_prompt_item_separator_diff_color '' +_set fake_tide_right_prompt_item_separator_same_color_color 949494 + _set fake_tide_right_prompt_prefix '' _set fake_tide_right_prompt_suffix '' diff --git a/tide_theme/configure/functions/fake_tide_count_left_prompt_height.fish b/tide_theme/configure/functions/fake_tide_count_left_prompt_height.fish index ba4528b..a411024 100644 --- a/tide_theme/configure/functions/fake_tide_count_left_prompt_height.fish +++ b/tide_theme/configure/functions/fake_tide_count_left_prompt_height.fish @@ -1,4 +1,4 @@ function _fake_tide_count_left_prompt_height -v fake_tide_left_prompt_items - set -l numberOfNewlines (count (string match -a 'newline' $fake_tide_left_prompt_items)) + set -l numberOfNewlines (count (string match --all 'newline' $fake_tide_left_prompt_items)) set -g _fake_tide_left_prompt_height (math 1+$numberOfNewlines) end \ No newline at end of file diff --git a/tide_theme/tests/context.fish b/tide_theme/tests/context.fish index 9143fd3..d17be87 100644 --- a/tide_theme/tests/context.fish +++ b/tide_theme/tests/context.fish @@ -8,4 +8,4 @@ end @test 'None' (_context) -z @test 'SSH' (set -g SSH_TTY 'true'; _context) = $USER'@'$hostname -@test 'Root' (_tide_decolor (sudo fish -c "source $sourceFile;_tide_item_context")) = 'root@'$hostname \ No newline at end of file +@test 'Root' (_tide_decolor (sudo fish --command="source $sourceFile;_tide_item_context")) = 'root@'$hostname \ No newline at end of file diff --git a/tide_theme/tests/pwd.fish b/tide_theme/tests/pwd.fish index 1a5f838..ef9fec9 100644 --- a/tide_theme/tests/pwd.fish +++ b/tide_theme/tests/pwd.fish @@ -9,7 +9,7 @@ end # Unwritable directories -sudo mkdir -p ~/unwritable/dir # Uses sudo to make the dir unwritable +sudo mkdir --parents ~/unwritable/dir # Uses sudo to make the dir unwritable set -lx tide_pwd_unwritable_icon '' @@ -26,7 +26,7 @@ set -lx tide_pwd_unwritable_icon # Normal directories -mkdir -p ~/normal/dir +mkdir --parents ~/normal/dir @test '~' (_pwd ~) = '~' @test '~/normal' (_pwd ~/normal) = '~/normal' @@ -37,7 +37,7 @@ rm -rf ~/normal # Long directories set -l longDir ~/alfa/bravo/charlie/delta/echo/foxtrot/golf/hotel/inda/juliett/kilo/lima/mike/november/oscar/papa -mkdir -p $longDir +mkdir --parents $longDir @test 'Long dir' (_pwd "$longDir") = '~/a/b/c/d/e/f/g/hotel/inda/juliett/kilo/lima/mike/november/oscar/papa' diff --git a/tide_theme/tests/virtual_env.fish b/tide_theme/tests/virtual_env.fish index a840332..72b8a3c 100644 --- a/tide_theme/tests/virtual_env.fish +++ b/tide_theme/tests/virtual_env.fish @@ -6,7 +6,7 @@ end set -l dir ~/python_project -mkdir -p $dir +mkdir --parents $dir cd $dir @test 'nothing' (_virtual_env) -z diff --git a/tools/_tide_actual_install.fish b/tools/_tide_actual_install.fish index 56ff454..5dd5f79 100644 --- a/tools/_tide_actual_install.fish +++ b/tools/_tide_actual_install.fish @@ -20,7 +20,7 @@ function _tide_actual_install if set -q _flag_local cp -rf "$location" "$tempDir" else - git clone -q --depth 1 -b $location https://github.com/IlanCosman/tide.git $tempDir + git clone --quiet --depth 1 --branch $location https://github.com/IlanCosman/tide.git $tempDir end for dir in completions conf.d functions tide_theme diff --git a/tools/tide_install.fish b/tools/tide_install.fish index b377eb3..a2af278 100644 --- a/tools/tide_install.fish +++ b/tools/tide_install.fish @@ -17,7 +17,7 @@ function tide_install set -a flags '-l' else - curl -s "https://raw.githubusercontent.com/IlanCosman/tide/$location/tools/_tide_actual_install.fish" | source + curl --silent "https://raw.githubusercontent.com/IlanCosman/tide/$location/tools/_tide_actual_install.fish" | source end _tide_actual_install $flags $argv