mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 01:52:49 +08:00
83893558f9
Since the fix for #3892, this escaping style escapes \n to \\n as well as \\ to \\\\ \' to \\' I believe these two are the only printable characters that are escaped with ESCAPE_NO_PRINTABLES. The rationale is probably to keep the encoding unambiguous and reversible. However that doesn't justify escaping the single quote. Probably this was an accident, so let's revert that part. This has the nice effect that single quotes will no longer be escaped when rendered in the completion pager (which is consistent with other special characters). Try it: complete : -a "aaa\'\; aaaa\'\;" -f Also this makes the error output of builtin bind consistent: $ bind -e --preset \; $ bind -e --preset \' $ bind \; bind: No binding found for sequence “;” $ bind \' bind: No binding found for sequence “'” the last line is clearly better than the old version: bind: No binding found for sequence “\'” In general, the fact that ESCAPE_NO_PRINTABLES escapes the (printable) backslash is weird but I guess it's fine because it looks more consistent to users, even though the result is an undocumented subset of the fish language. |
||
---|---|---|
.. | ||
checks | ||
pexpects | ||
test_functions | ||
.gitignore | ||
history_sample_bash | ||
history_sample_corrupt1 | ||
history_sample_fish_1_x | ||
history_sample_fish_2_0 | ||
interactive.config | ||
interactive.fish | ||
test_driver.sh | ||
test_env.sh | ||
test_util.fish | ||
test.fish |