Add Completion.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 18 Jul 2011 12:32:02 +0300
changeset 150 18b75d04721b
parent 149 d0e746f2c693
child 151 03f294e76a50
Add Completion.
.bashrc
--- a/.bashrc	Mon Jul 18 10:37:16 2011 +0300
+++ b/.bashrc	Mon Jul 18 12:32:02 2011 +0300
@@ -133,3 +133,39 @@
   export INFOPATH=$INFOPATH:~/usr/share/info:
 fi
 
+################################################################
+# Completion.
+
+# user commands see only users
+complete -u su passwd write chfn groups slay w sux
+
+# bg completes with stopped jobs
+complete -A stopped -P '"%' -S '"' bg
+
+# other job commands
+complete -j -P '"%' -S '"' fg jobs disown
+
+# readonly and unset complete with shell variables
+complete -v readonly unset
+
+# set completes with set options
+complete -A setopt set
+
+# shopt completes with shopt options
+complete -A shopt shopt
+
+# helptopics
+complete -A helptopic help
+
+# unalias completes with aliases
+complete -a unalias
+
+# bind completes with readline bindings (make this more intelligent)
+complete -A binding bind
+
+# type and which complete on commands
+complete -c command type which
+
+# builtin completes on builtins
+complete -b builtin
+