chore: bumps min fish version to 3, remove use of IFS (#952)
Some checks failed
Build / build (3, ubuntu-20.04) (push) Has been cancelled
Build / build (3, ubuntu-22.04) (push) Has been cancelled
Build / build (3, ubuntu-latest) (push) Has been cancelled
Build / build (4, ubuntu-22.04) (push) Has been cancelled
Build / build (brew, macos-13) (push) Has been cancelled
Build / build (brew, macos-14) (push) Has been cancelled
Build / build (brew, macos-latest) (push) Has been cancelled
Build / build (brew, ubuntu-20.04) (push) Has been cancelled
Build / build (brew, ubuntu-22.04) (push) Has been cancelled
Build / build (brew, ubuntu-latest) (push) Has been cancelled
Build / build (stock, ubuntu-20.04) (push) Has been cancelled
Build / build (stock, ubuntu-22.04) (push) Has been cancelled
Build / build (stock, ubuntu-latest) (push) Has been cancelled

This removes the use of IFS which has been deprecated and will be removed in future versions of Fish as per [this comment](https://github.com/oh-my-fish/oh-my-fish/issues/947#issuecomment-2483386219). I replaced the few uses of it by `read --delimiter`. This also bumps the minimum Fish version to 3.0.0.
This commit is contained in:
Derek Stavis 2025-01-23 18:15:50 -08:00 committed by GitHub
parent 49a313a4ff
commit ce2fa98290
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 10 additions and 18 deletions

View File

@ -474,7 +474,7 @@ function sane_environment_check
abort (which awk)" does not look like an AWK interpreter."
end
assert_fish_version_compatible 2.2.0
assert_fish_version_compatible 3.0.0
assert_git_version_compatible 1.9.5
debug "Verifying Git implementation is not buggy Git for Windows"

View File

@ -1 +1 @@
429a76e5b5e692c921aa03456a41258b614374426f959535167222a28b676201 install
ca00e1e7fb3c251d55917d1f0a0f31c3816b9771c3e5e16acdbde80f4f81a997 install

View File

@ -18,8 +18,7 @@ function __autoload_insert
set -l complete_path
for path in $argv
not test -d "$path"; and continue
set -l IFS '/'
echo $path | read -la components
echo $path | read --delimiter '/' -la components
if test "x$components[-1]" = xcompletions
contains -- $path $fish_complete_path
or set complete_path $complete_path $path
@ -38,8 +37,7 @@ function __autoload_erase
set -l function_indexes
set -l complete_indexes
for path in $argv
set -l IFS '/'
echo $path | read -la components
echo $path | read --delimiter '/' -la components
test "x$components[-1]" = xcompletions
and set complete_indexes $complete_indexes (contains -i $path $fish_complete_path)
or set function_indexes $function_indexes (contains -i $path $fish_function_path)

View File

@ -47,8 +47,7 @@ function require
for init in $init_path
emit perf:timer:start $init
set -l IFS '/'
echo $init | read -la components
echo $init | read --delimiter '/' -la components
set path (printf '/%s' $components[1..-2])
@ -62,8 +61,7 @@ function require
set dependencies
if test -f $bundle
set -l IFS ' '
while read -l type dependency
while read --delimiter ' ' -l type dependency
test "$type" != package
and continue
require "$dependency"

View File

@ -1,5 +1,4 @@
function omf.cli.help
set -l IFS ''
set -l doc_root $OMF_PATH/docs/cli
set -l doc $doc_root/omf.adoc

View File

@ -13,11 +13,10 @@ function __omf.doctor.theme
end
function __omf.doctor.fish_version
set -l min_version 2.2.0
set -l min_version 3.0.0
set -l current_version
begin
set -l IFS '-'
echo $FISH_VERSION | read -la version_parts
echo $FISH_VERSION | read -la --delimiter - version_parts
set current_version "$version_parts[1]"
end

View File

@ -13,11 +13,9 @@ function omf.index.query -d 'Query packages in the index'
case '--type=theme'
set q_type theme
case '--name=*'
set -l IFS '='
echo "$arg" | read dummy q_name
echo "$arg" | read --delimiter = dummy q_name
case '--text=*'
set -l IFS '='
echo "$arg" | read dummy q_text
echo "$arg" | read --delimiter = dummy q_text
case '*'
echo "Invalid search term: '$arg'" >&2
return 1