mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 07:21:14 -03:00
remove some uses of $IFS
This is a step towards resolving issue #4156. It replaces uses of `$IFS` with other solutions.
This commit is contained in:
@@ -29,13 +29,13 @@ function _echo_var --no-scope-shadowing -d '_echo_var varname [guardval]'
|
||||
case 0
|
||||
echo "\$$var has no value"
|
||||
case 1
|
||||
set -l IFS ''
|
||||
echo "\$$var:" (_quote $$var)
|
||||
_quote $$var | read -l x
|
||||
echo "\$$var: $x"
|
||||
case \*
|
||||
echo "\$$var:"
|
||||
for i in (seq (count $$var))
|
||||
set -l IFS ''
|
||||
echo "$i:" (_quote $$var[1][$i])
|
||||
_quote $$var[1][$i] | read -l x
|
||||
echo "$i: $x"
|
||||
end
|
||||
end
|
||||
if set -q argv[2]; echo "@/GUARD:$argv[2]@"; end
|
||||
|
||||
@@ -35,8 +35,9 @@ if not set -q __fish_is_running_tests
|
||||
end
|
||||
|
||||
begin
|
||||
set -l IFS # clear IFS so cmd substitution doesn't split
|
||||
cd (dirname $script); or die
|
||||
dirname $script | read -l dir
|
||||
cd $dir
|
||||
or die
|
||||
end
|
||||
|
||||
set -lx XDG_DATA_HOME ../test/data
|
||||
|
||||
Reference in New Issue
Block a user