mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Isolate hack for skipping internal separator
stage_wildcards has no need for INTERNAL_SEPARATOR. Remove it already
at this stage, to avoid the need to have the workaround in the generic
decoding routine.
Unfortunately we still can't add assert!(!fish_reserved_codepoint(c));
to wcs2bytes_callback, since builtin printf still passes arbitrary
characters. We should fix that later.
Test that printf now behaves correctly for INTERNAL_SEPARATOR.
Also add a regression test for 0c9b73e317.
This commit is contained in:
@@ -630,6 +630,9 @@ $fish -c 'echo \ufdd2"fart"'
|
||||
echo (printf '\ufdd2foo') | string escape
|
||||
# CHECK: \Xef\Xb7\X92foo
|
||||
|
||||
echo (printf '\ufdd8foo') | string escape
|
||||
# CHECK: \Xef\Xb7\X98foo
|
||||
|
||||
printf '%s\n' "#!/bin/sh" 'echo $0' > $tmpdir/argv0.sh
|
||||
chmod +x $tmpdir/argv0.sh
|
||||
cd $tmpdir
|
||||
|
||||
@@ -350,3 +350,17 @@ echo {asdf,~}
|
||||
# CHECK: asdf /{{.*}}
|
||||
echo {~}
|
||||
# CHECK: {~}
|
||||
|
||||
function compare
|
||||
test $argv[1] = $argv[2]
|
||||
or begin
|
||||
echo unexpected expansion result:
|
||||
echo expected: $argv[1]
|
||||
echo actual: $argv[2]
|
||||
end
|
||||
end
|
||||
if string match -rq -- '^[\w.-]+$' $USER
|
||||
set -l user_home "$(eval "echo ~$USER")"
|
||||
compare $user_home "$(echo ~$USER)"
|
||||
compare $user_home "$(echo ~(printf %s $USER))"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user