From 50f6fa048e850163083e2b392eb6f0408c4a468d Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 20 Feb 2019 22:28:55 +0100 Subject: [PATCH] completions/sudo: Quote `?` This was treated as a glob where it was still enabled, most likely removing the "-E" option from argparse, which caused `sudo -E` to not be parsed correctly, breaking completion. (There was no error because the glob was used with `set`) Fixes #5675. [ci skip] --- share/completions/sudo.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/sudo.fish b/share/completions/sudo.fish index 3e5bf8b8d..710d557e2 100644 --- a/share/completions/sudo.fish +++ b/share/completions/sudo.fish @@ -7,7 +7,7 @@ function __fish_sudo_print_remaining_args set -e tokens[1] # These are all the options mentioned in the man page for Todd Miller's "sudo.ws" sudo (in that order). # If any other implementation has different options, this should be harmless, since they shouldn't be used anyway. - set -l opts A/askpass b/background C/close-from= E/preserve-env=? + set -l opts A/askpass b/background C/close-from= E/preserve-env='?' # Note that "-h" is both "--host" (which takes an option) and "--help" (which doesn't). # But `-h` as `--help` only counts when it's the only argument (`sudo -h`), # so any argument completion after that should take it as "--host".