mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 10:30:28 +08: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:
parent
8e87d595b7
commit
0745f7dbe7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user