Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Apr 2012 00:12:18 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234159 - head/share/examples/csh
Message-ID:  <201204120012.q3C0CIJ9001893@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Thu Apr 12 00:12:17 2012
New Revision: 234159
URL: http://svn.freebsd.org/changeset/base/234159

Log:
  Sort completions
  Add a new one for sysctl
  
  Submitted by:	rm (the new completion)
  Approved by:	cperciva (implicit)
  MFC after:	3 days

Modified:
  head/share/examples/csh/dot.cshrc

Modified: head/share/examples/csh/dot.cshrc
==============================================================================
--- head/share/examples/csh/dot.cshrc	Wed Apr 11 23:01:11 2012	(r234158)
+++ head/share/examples/csh/dot.cshrc	Thu Apr 12 00:12:17 2012	(r234159)
@@ -21,20 +21,20 @@ bindkey "^[[3~" delete-char-or-list-or-e
 # Make the Ins key work
 bindkey "\e[2~" overwrite-mode 
 
+# Aliases used for completions
+alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-name -r | cut -d . -f 1'
+alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-`uname -r | cut -d . -f 1`&& pkg_info -E \*'
+
 # Some common completions
 complete chown          'p/1/u/'
-complete man            'C/*/c/'
-complete service        'n/*/`service -l`/'
-complete service  	'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar onestart onestop)/'
+complete dd		'c/[io]f=/f/ n/*/"(if of ibs obs bs skip seek count)"/='
+complete kill		'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/'
+complete killall	'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $5}'"'"'`/'
 complete kldunload	'n@*@`kldstat | awk \{sub\(\/\.ko\/,\"\",\$NF\)\;print\ \$NF\} | grep -v Name` @'
 complete make           'n@*@`make -pn | sed -n -E "/^[#_.\/[:blank:]]+/d; /=/d; s/[[:blank:]]*:.*//gp;"`@'
+complete man            'C/*/c/'
 complete pkg_delete     'c/-/(i v D n p d f G x X r)/' 'n@*@`ls /var/db/pkg`@'
 complete pkg_info       'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O x X e E l t V P)/' 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@'
-complete kill		'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $1}'"'"'`/'
-complete killall	'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '"'"'{print $5}'"'"'`/'
-complete dd		'c/[io]f=/f/ n/*/"(if of ibs obs bs skip seek count)"/='
-alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-name -r | cut -d . -f 1'
-alias _PKGS_PkGs_PoRtS_ 'awk -F\| \{sub\(\"\/usr\/ports\/\"\,\"\"\,\$2\)\;print\ \$2\} /usr/ports/INDEX-`uname -r | cut -d . -f 1`&& pkg_info -E \*'
 complete portmaster   'c/--/(always-fetch check-depends check-port-dbdir clean-distfiles \
     clean-packages delete-build-only delete-packages force-config help \
     index index-first index-only list-origins local-packagedir no-confirm \
@@ -42,6 +42,8 @@ complete portmaster   'c/--/(always-fetc
     packages-local packages-only show-work update-if-newer version)/' \
     'c/-/(a b B C d D e f F g G h H i l L m n o p r R s t u v w x)/' \
     'n@*@`_PKGS_PkGs_PoRtS_`@'
+complete service  	'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar onestart onestop)/'
+complete sysctl 'n/*/`sysctl -Na`/'
 
 # Alternate prompts
 set prompt = '#'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204120012.q3C0CIJ9001893>