From 18e35afc882d2628b599b2778d9fb4a0a0569f13 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Jun 2017 11:38:20 -0400 Subject: zsh and fish completions optparse-applicative-0.14.0.0 adds support for these, so have the Makefile install their scripts when built with it. CmdLine/GitAnnex/Options.hs now uses action "file" in cmdParams, which affects the bash and zsh completions, letting them complete filenames for subcommands that use that. This is not needed for bash, since bash-completion.bash enables -o bashdefault, which lets it complete filenames too. But it does not seem to break the bash completions. It is needed for zsh; the zsh completion otherwise does not complete filenames. The fish completion will always complete filenames no matter what. Messy. This commit was sponsored by Denis Dzyubenko on Patreon. --- CmdLine/GitAnnex/Options.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'CmdLine') diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs index aad0536d8..04f24367c 100644 --- a/CmdLine/GitAnnex/Options.hs +++ b/CmdLine/GitAnnex/Options.hs @@ -97,6 +97,7 @@ gitAnnexGlobalOptions = commonGlobalOptions ++ cmdParams :: CmdParamsDesc -> Parser CmdParams cmdParams paramdesc = many $ argument str ( metavar paramdesc + <> action "file" ) parseAutoOption :: Parser Bool -- cgit v1.2.3