From 60060acc798cfafcf1ae7cd0cd189c208875f343 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Sun, 26 Jul 2020 23:39:18 -0700 Subject: [PATCH] Change basename --suffix= to -s for macos compatability --- completions/tide.fish | 2 +- functions/_tide_sub_test.fish | 4 ++-- functions/_tide_sub_uninstall.fish | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/completions/tide.fish b/completions/tide.fish index 7cbf4b1..5970c5f 100644 --- a/completions/tide.fish +++ b/completions/tide.fish @@ -1,4 +1,4 @@ -set -l subcommands (basename --suffix='.fish' $__fish_config_dir/functions/_tide_sub_* | string replace '_tide_sub_' '') +set -l subcommands (basename -s '.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]) diff --git a/functions/_tide_sub_test.fish b/functions/_tide_sub_test.fish index 31ca8d3..f794191 100644 --- a/functions/_tide_sub_test.fish +++ b/functions/_tide_sub_test.fish @@ -14,7 +14,7 @@ function _tide_sub_test return end - if not functions -q fishtape + if not functions -cd .cq fishtape set -l b (set_color -o) set -l n (set_color normal) printf '%s\n' $b'fishtape'$n' must be installed to to run Tide\'s test suite. You can install it with'$b' tide test -i'$n @@ -32,7 +32,7 @@ function _tide_sub_test set -l returnStatement 0 if set -q _flag_all - set argv (basename --suffix='.fish' $testsDir/*) + set argv (basename -s '.fish' $testsDir/*) end if test (count $argv) -lt 1 diff --git a/functions/_tide_sub_uninstall.fish b/functions/_tide_sub_uninstall.fish index 361a35a..efd5297 100644 --- a/functions/_tide_sub_uninstall.fish +++ b/functions/_tide_sub_uninstall.fish @@ -17,7 +17,7 @@ function _tide_sub_uninstall source "$__fish_data_dir/functions/fish_prompt.fish" end - for func in (basename --suffix='.fish' $_tide_file_list) + for func in (basename -s '.fish' $_tide_file_list) functions -e $func end