From 8f9a2ff959fd4e1cf63e13cfd9bb293314873371 Mon Sep 17 00:00:00 2001 From: hmp Date: Sun, 5 Dec 2004 23:44:52 +0000 Subject: Code for automatic name completion in a tcsh(1) environment. PR: docs/44435 Submitted by: Slaven Rezic slaven dot rezic at berlin dot de --- sbin/sysctl/sysctl.8 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sbin/sysctl/sysctl.8') diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 4462fe3..66e7bad 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -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. -- cgit v1.1