Change basename --suffix= to -s for macos compatability

This commit is contained in:
Ilan Cosman 2020-07-26 23:39:18 -07:00
parent 8624c35b3c
commit 60060acc79
3 changed files with 4 additions and 4 deletions

View File

@ -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])

View File

@ -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

View File

@ -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