mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 08:58:01 +00:00
Don't chomp foo=
when completing foo=br
`complete_param_expand` knows how to handle cases like `foo=br` so we don't need to bother sending just the `br` part. Furthermore, sending just `br` is incorrect because we will end up replacing the entirety of `foo=br` with the result of the completion. That is, `foo=br` will be replaced with `bar` instead of being completed to `foo=bar`.
This commit is contained in:
parent
13459d4d3a
commit
da0acb28ba
1 changed files with 1 additions and 1 deletions
|
@ -1622,7 +1622,7 @@ void completer_t::perform_for_commandline(wcstring cmdline) {
|
|||
if (cmd_tok.location_in_or_at_end_of_source_range(cursor_pos)) {
|
||||
maybe_t<size_t> equal_sign_pos = variable_assignment_equals_pos(current_token);
|
||||
if (equal_sign_pos) {
|
||||
complete_param_expand(current_token.substr(*equal_sign_pos + 1), true /* do_file */);
|
||||
complete_param_expand(current_token, true /* do_file */);
|
||||
return;
|
||||
}
|
||||
// Complete command filename.
|
||||
|
|
Loading…
Reference in a new issue