diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 400a1726c..f75cb4427 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,10 @@ fish ?.?.? (released ???) ========================= +Deprecations and removed features +--------------------------------- +- `--command` and `--path` options in `complete` no longer unescape their value. + Interactive improvements ------------------------ - On the first run after upgrading from an older version, fish will try harder to check if the current theme matches a historical default, in which case fish won't create ``~/.config/fish/conf.d/fish_frozen_theme.fish``. diff --git a/src/builtins/complete.rs b/src/builtins/complete.rs index 32fcd1fd3..eb94c8f16 100644 --- a/src/builtins/complete.rs +++ b/src/builtins/complete.rs @@ -316,20 +316,11 @@ pub fn complete(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr] preserve_order = true; } 'p' | 'c' => { - if let Some(tmp) = unescape_string( - w.woptarg.unwrap(), - UnescapeStringStyle::Script(UnescapeFlags::SPECIAL), - ) { - if opt == 'p' { - path.push(tmp); - } else { - cmd_to_complete.push(tmp); - } + let v = w.woptarg.unwrap().to_owned(); + if opt == 'p' { + path.push(v); } else { - err_fmt!("Invalid token '%s'", w.woptarg.unwrap()) - .cmd(cmd) - .finish(streams); - return Err(STATUS_INVALID_ARGS); + cmd_to_complete.push(v); } } 'd' => { diff --git a/tests/checks/complete.fish b/tests/checks/complete.fish index 2624c4c27..f0c3371f5 100644 --- a/tests/checks/complete.fish +++ b/tests/checks/complete.fish @@ -716,9 +716,6 @@ begin # CHECK: -command-starting-with-dash{{\t}}command end -complete --command="foo\\" -# CHECKERR: complete: Invalid token 'foo\' - complete -c foo -a "foo\\" # CHECKERR: complete: foo\: contains a syntax error # CHECKERR: complete: Expected a string, but found an incomplete token