# HG changeset patch # User Oleksandr Gavenko # Date 1310981522 -10800 # Node ID 18b75d04721bc42ad212e35a709aa17ff41f5a14 # Parent d0e746f2c693d185d8d1ea4b722747f262974180 Add Completion. diff -r d0e746f2c693 -r 18b75d04721b .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 +