Code for automatic name completion in a tcsh(1) environment.

PR:		docs/44435
Submitted by:	Slaven Rezic slaven dot rezic at berlin dot de
This commit is contained in:
Hiten Pandya 2004-12-05 23:44:52 +00:00
parent 9f3a2adc36
commit ec3724d9d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138421

View File

@ -93,6 +93,13 @@ use the following code:
listsysctls () { set -A reply $(sysctl -AN ${1%.*}) }
compctl -K listsysctls sysctl
.Ed
.Pp
To enable completion of variable names in
.Xr tcsh 1 ,
use:
.Bd -literal -offset indent
complete sysctl 'n/*/`sysctl -Na`/'
.Ed
.It Fl n
Show only variable values, not their names.
This option is useful for setting shell variables.