Subject: Re: CVS commit: src/etc
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <email@example.com>
Date: 12/04/2006 16:57:41
On Sun, 03 Dec 2006, Hubert Feyrer wrote:
> On Sun, 8 Oct 2006, Alan Barrett wrote:
> >I went with (set -o tabcomplete 2>/dev/null) && set -o tabcomplete
> You could also check $KSH_VERSION ...
I have a strong preference for teating whether functionality is
available, rather than testing version numbers or strings. 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.
--apb (Alan Barrett)