mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -03:00
change env_var_t to a vector of strings
Internally fish should store vars as a vector of elements. The current flat string representation is a holdover from when the code was written in C. Fixes #4200
This commit is contained in:
@@ -91,8 +91,6 @@ echo '' | read -la ary
|
||||
print_vars ary
|
||||
set -le IFS
|
||||
|
||||
# read -n tests
|
||||
|
||||
logmsg read -n tests
|
||||
echo 'testing' | read -n 3 foo
|
||||
echo $foo
|
||||
@@ -106,8 +104,6 @@ echo $bar
|
||||
echo 'test' | read -n 1 foo
|
||||
echo $foo
|
||||
|
||||
# read -0 tests
|
||||
|
||||
logmsg read -z tests
|
||||
echo -n 'testing' | read -lz foo
|
||||
echo $foo
|
||||
|
||||
@@ -301,7 +301,8 @@ env DISPLAY="localhost:0.0" ../test/root/bin/fish -c 'echo Elements in DISPLAY:
|
||||
# We can't use PATH for this because the global configuration will modify PATH
|
||||
# based on /etc/paths and /etc/paths.d.
|
||||
# Exported arrays should use record separator, with a few exceptions. So we can use an arbitrary variable for this.
|
||||
env FOO=one\x1etwo\x1ethree\x1efour ../test/root/bin/fish -c 'echo Elements in FOO: (count $FOO)'
|
||||
set -gx FOO one two three four
|
||||
../test/root/bin/fish -c 'echo Elements in FOO: (count $FOO)'
|
||||
# some must use colon separators!
|
||||
set -lx MANPATH man1 man2 man3 ; env | grep '^MANPATH='
|
||||
|
||||
|
||||
Reference in New Issue
Block a user