mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-20 16:11:14 -03:00
Before798527d79a(completions: fix double evaluation of tokenized commandline, 2024-01-06) git-foo completions did something like set -l subcommand_args (commandline -opc) complete -C "git-foo $subcommand_args " As mentioned in368017905e(builtin commandline: -x for expanded tokens, supplanting -o, 2024-01-06), the "-o" option is bad because it produces a weird intermediate, half-expanded state. The immediate goal of798527d79awas to make sure we do not do any more expansion on top of this. To that end, it changed the above to "\$subcommand_args". The meaning is more or less the same[^*] but crucially, the recursive completion invocation does not see through the variable, which breaks some completions. Fix this with the same approach as in6b5ad163d3(Fix double expansion of tokenized command line, 2025-01-19). [^*]: It wasn't semantically correct before or after -- this was later corrected by29f35d6cdf(completion: adopt commandline -x replacing deprecated -o, 2024-01-22)). Closes #11205 (cherry picked from commit50e595503e)