path: root/bash/bashrc.d
diff options
authorTom Ryder <tom@sanctum.geek.nz>2016-09-05 12:06:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-09-05 12:06:06 +1200
commitad156076b1cb2f93680eae210cb2d1ba98fb4f19 (patch)
tree8e28d5f87e4f457b704aa1e3c1179706ee766801 /bash/bashrc.d
parentAdd an idea (diff)
Flesh out builtin completions a little
Diffstat (limited to 'bash/bashrc.d')
1 files changed, 8 insertions, 7 deletions
diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash
index 0ddb1b55..9c20d482 100644
--- a/bash/bashrc.d/completion.bash
+++ b/bash/bashrc.d/completion.bash
@@ -8,24 +8,28 @@
# Bash builtins
complete -A builtin builtin
+complete -A enabled disable
+complete -A disabled enable
# Bash options
complete -A setopt set
# Commands
-complete -A command command complete coproc exec hash type
+complete -A command command complete compopt coproc exec if hash time type until while
# Directories
complete -A directory cd pushd mkdir rmdir
-# Functions
+# Functions and variables
complete -A function function
+complete -A function -A variable declare export local readonly typeset unset
+complete -A variable for getopts let read select
# Help topics
complete -A helptopic help
# Jobspecs
-complete -A job disown fg jobs
+complete -A job disown fg jobs kill
complete -A stopped bg
# Readline bindings
@@ -37,11 +41,8 @@ complete -A shopt shopt
# Signal names
complete -A signal trap
-# Both functions and variables
-complete -A function -A variable declare export readonly typeset unset
# The `mapfile` builtin in Bash >= 4.0
-((BASH_VERSINFO[0] >= 4)) && complete -A arrayvar mapfile
+((BASH_VERSINFO[0] >= 4)) && complete -A arrayvar mapfile readarray
# If we have dynamic completion loading (Bash>=4.0), use it
if ((BASH_VERSINFO[0] >= 4)) ; then