Commit graph

4 commits

Author SHA1 Message Date
Joey Hess
5ce078da92
bash completion fix
Fix bash completion of "git annex" to propertly handle files with spaces
and other problem characters. (Completion of "git-annex" already did.)

This commit was sponsored by Jake Vosloo on Patreon.
2018-11-12 13:23:05 -04:00
Joey Hess
c6f087829e
update from optparse-applicative output
Fix local to use right case, and merge in IFS setting from a more recent
version of optparse-applicative.
2017-06-09 11:30:24 -04:00
Joey Hess
07c108e70e fix bash completion of filenames containing spaces
Work around https://github.com/pcapriotti/optparse-applicative/issues/146
by not using action "file" and instead passing -o bashdefault -o default
to complete. This way, when optparse fails to complete a filename, bash
will fall back to regular filename completion.

Unfortunately, optparse-applicative does not provide a way to control the
options passed to complete, so I had to modify its generated completion script.

Note that for "git annex" command completion, git's completion script already
used -o bashdefault -o default, so that works too.
2015-07-20 11:17:35 -04:00
Joey Hess
386b8c394e got bash completion working for "git annex" not just "git-annex"
This needs a patch to git to cause the git-annex completion to be
auto-loaded when completing "git annex <tab>". Otherwise, it will only
load when "git-annex" is tab completed. Once loaded, it works for both
uses. I've submitted the git patch to the git mailing list.
2015-07-16 13:32:23 -04:00