> I have a strong preference for teating whether functionality is
> available, rather than testing version numbers or strings.
Agreed.
> Not all shells that support "set -o tabcomplete" will set
> $KSH_VERSION, whereas code that says "if 'set -o tabcomplete' works
> then do 'set -o tabcomplete'" will always do the right thing.
Yes...until someone implements a "set -o tabcomplete" that does
something other than what you expect. (In the case of tabcomplete,
that's relatively unlikely; this is really a more general comment.) In
some cases, you can test whether the syntax you're interested in
actually does what you expect, but for a user-interface thing like tab
completion, that's approximately impossible.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B