[Bash-completion-devel] [james.hunt at canonical.com: new completion for "upstart" for review]
Ville Skyttä
ville.skytta at iki.fi
Sat Dec 4 15:15:34 UTC 2010
On Wednesday 01 December 2010, James Hunt wrote:
> An updated completion is attached which handles the "no wait" options
> for start(8) and stop(8) correctly.
Quick review:
initctl is installed in /sbin (at least on my Fedora system) which may not be
in non-root $PATH, so it would be better to invoke it like 'PATH="$PATH:/sbin"
initctl ...'.
Indentation does not follow bash-completion style, see existing completions
for examples (and the *Emacs, vi and friends settings block at the bottom) and
doc/styleguide.txt in git.
--dest should be handled with _split_longopt (assuming it can be invoked like
"--dest foo" in addition to "--dest=foo"), see existing completions for
examples.
Short options for which equivalent long ones exist should not be suggested,
for example drop -q because --quiet exists, ditto -v versus --verbose etc.
Instead of hardcoding option lists, parsing them with _longopt would probably
work fine for these executables.
At least some if not all COMPREPLY=() lines in --help|--version cases seem
superfluous as COMPREPLY is already () at those points.
More information about the Bash-completion-devel
mailing list