This should give more appropriate results when completing multi-level
commands. It's a bit of a hack but should be good enough most of the times.
I.e., currently:
$ darcs show repo <TAB>
--help contents files patch-index repo
authors dependencies index pristine tags
with this completion:
$ darcs show repo <TAB>
--debug --no-posthook --run-posthook
--debug-http --no-prehook --run-prehook
--disable --posthook --standard-verbosity
--files --prehook --timings
--help --prompt-posthook --verbose
--list-options --prompt-prehook --xml-output
--no-cache --quiet
--no-files --repodir
Also supports 'help' and 'setpref' once (if) issue2525 is solved.
1 patch for repository valentina:var/repos/darcs/screened:
patch dd660f6b34d4e4775db2984c55f1a5568a482adc
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date: Thu Mar 9 12:04:53 CET 2017
* bash_completion: better support for multi-level commands
* [Wed, Mar 15, 2017 at 04:55:53PM +0000] Ben Franksen:
>Thanks, applied (just to screened, for the moment, as I am not good at
>reading much less understanding bash completion...).
Oops, was going to send an amended patch that copied the approach used
by the zsh completion as it is much cleaner. Attaching a new patch that
cleanly apply to current screened, instead.
Best,
Gian Piero.