[buildd-tools-devel] Bug#519745: Bug#519745: [Buildd-tools-devel] Bug#519745: schroot: Add bash completion script
Roger Leigh
rleigh at codelibre.net
Sat Mar 28 19:02:28 UTC 2009
On Sat, Mar 28, 2009 at 02:32:13PM -0400, Tim Abbott wrote:
> On Sat, 21 Mar 2009, Roger Leigh wrote:
>
> > > By the way, it currently is the case that when new options are added to
> > > schroot, they need to be added to the list of options in the completion
> > > script for them to complete; I just wanted to make sure you were aware of
> > > this.
> >
> > OK. It's exactly the same for zsh completions as well.
> >
> > BTW, you can always get a complete list of options from
> > schroot --help | grep '[[:space:]]*-'
> > which might make it more flexible. The --help output is dynamically
> > generated, so is always comprehensive. A little sed/echo trickery will
> > get you a space separated list of options.
>
> Yeah, okay, one can do this by piping schroot --help into
>
> sed 's/\(^\|[[:space:]]\)[^[:space:]-][^[:space:]]*//g
>
> (basically, remove every token that doesn't start with a dash).
>
> > Also, if you wanted to be *really* clever, and if bash allows this,
> > you could also complete the usernames and session names in addition
> > to the chroot names.
>
> I'm not aware of a nice bash mechanism for completing usernames.
>
> > Does this work for just -c or --chroot as well?
>
> Hmm, it only did -c. I've fixed this (and made it parse --help) in the
> attached version.
Super, thanks!
I'll hopefully make an initial 1.3.0 release once the remainder of the
fs-union bits are merged.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20090328/6f383904/attachment.pgp
More information about the Buildd-tools-devel
mailing list