[Samba] Bash completion file(s) for samba utils...

Linda Walsh samba at tlinx.org
Sat Sep 10 17:56:21 MDT 2011



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>


More information about the samba mailing list