I was wondering if anyone already had completion files for samba utils like 'net' wbinfo...etc... I can never remember all the params, I keep wanting to hit <tab> to autocomplete for options like I can on many other sys utils. So I started looking at examples of existing completion files and started cobbling one together... if no one else has some (which would be great!), I'll probably continue work on this in a spare cycle every once in a while, or if anyone wants to add to it, I'd appreciate additions... Other utils do host and user name lookup when the param or field being auto-completed needs such -- similar features would be nice in this one, but it's my first attempt at writing autocompletion for anything, To use it, just 'source it' (i.e.: ". <filename>" or "source <filename>"). It just has 1st level and a few 2nd level cmds at this point, so it's pretty basic, but it's already helpful, so I thought I toss it out for others to use/enhance/abuse.. etc. I'm working w/samba 3.5.11 and bash 4.1, so it's may have some specifics to those versions. It doesn't have any of the ads sub commands in it, as my current version doesn't have ads compiled in. I don't know if alphabetizing the compgen lists is needed (would certainly allow search optimizations optimization if so), but am trying for alphabetizing the response lists...(but it may be unnecessary). --- -linda -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: netcmp.sh URL: <http://lists.samba.org/pipermail/samba/attachments/20110910/dfbcfc94/attachment.ksh>
Robert Freeman-Day
2011-Sep-11 13:37 UTC
[Samba] Bash completion file(s) for samba utils...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Though this is a pretty nifty start ease things regarding the "net" commands, I think the man pages need to have all the commands documented in it first. I know that even with the completion files, I would still need to refer to the man pages or the googles for specific syntax. I know some functions I would like to see documented more are things like keytab management. Robert On 09/10/2011 07:56 PM, Linda Walsh wrote:> > > I was wondering if anyone already had completion files for samba utils like > 'net' wbinfo...etc... I can never remember all the params, I keep wanting > to hit <tab> to autocomplete for options like I can on many other sys > utils. > > So I started looking at examples of existing completion files and started > cobbling one together... if no one else has some (which would be great!), > I'll probably continue work on this in a spare cycle every once in a while, > or if anyone wants to add to it, I'd appreciate additions... > > Other utils do host and user name lookup when the param or field being > auto-completed needs such -- similar features would be nice in this one, > but it's my first attempt at writing autocompletion for anything, > > To use it, just 'source it' (i.e.: ". <filename>" or "source <filename>"). > > It just has 1st level and a few 2nd level cmds at this point, so it's > pretty basic, but it's already helpful, so I thought I toss it out for > others to use/enhance/abuse.. etc. > > I'm working w/samba 3.5.11 and bash 4.1, so it's may have some specifics to > those versions. It doesn't have any of the ads sub commands in it, as my > current version doesn't have ads compiled in. I don't know if > alphabetizing the compgen lists is needed (would certainly allow search > optimizations optimization if so), but am trying for alphabetizing the > response lists...(but it may be unnecessary). > > --- > -linda > > > > > >- -- ________ Robert Freeman-Day https://launchpad.net/~presgas GPG Public Key: http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0xBA9DF9ED3E4C7D36 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5suaYACgkQup357T5MfTbjPwCgi7XDeh+BS77K1hZ0bucWzr98 OnkAnjysXRNjug0QEMoSjxjN09eM65Sl =Yq8A -----END PGP SIGNATURE-----
Apparently Analagous Threads
- [PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
- [PATCH] tools: implement --short-options
- [PATCH 5/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
- [PATCH] bash: Add a bash completion script for virt-v2v-copy-to-local (RHBZ#1367738).
- [PATCH] bash: Implement tab completion for virt-win-reg (RHBZ#1367738).