mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
completion: fix file completion of redirection targets
This fixes a regression introduced in
6fb7f9b6b - Fix completion for builtins with subcommands
This commit is contained in:
@@ -1542,6 +1542,7 @@ void completer_t::perform() {
|
||||
tok_t prev_tok = tokens.at(tokens.size() - 2);
|
||||
if (prev_tok.type == token_type_t::string)
|
||||
previous_argument = prev_tok.get_source(cmd);
|
||||
in_redirection = prev_tok.type == token_type_t::redirect;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -150,3 +150,6 @@ complete -C'for _ in ' | string collect >&- && echo completed some files
|
||||
# function; #5415
|
||||
complete -C'function : --arg'
|
||||
# CHECK: --argument-names {{.*}}
|
||||
|
||||
complete -C'echo > /' | string length -q && echo ok
|
||||
# CHECK: ok
|
||||
|
||||
Reference in New Issue
Block a user