aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
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
parent5476954937e798c05fa63f5571f9b5f54c29f999 (diff)
downloaddotfiles-ad156076b1cb2f93680eae210cb2d1ba98fb4f19.tar.gz
dotfiles-ad156076b1cb2f93680eae210cb2d1ba98fb4f19.zip
Flesh out builtin completions a little
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/completion.bash15
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