aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/completion.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-29 13:23:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-29 13:23:32 +1200
commit7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23 (patch)
treeba5c508a54dde7f39979a61f867b6155f453c407 /bash/bashrc.d/completion.bash
parentMove COMP_WORDBREAKS tweaks to completion subfile (diff)
downloaddotfiles-7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23.tar.gz
dotfiles-7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23.zip
Add mapfile to completions (conditional on vers)
Diffstat (limited to 'bash/bashrc.d/completion.bash')
-rw-r--r--bash/bashrc.d/completion.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash
index d3fb246c..ecdffab8 100644
--- a/bash/bashrc.d/completion.bash
+++ b/bash/bashrc.d/completion.bash
@@ -43,6 +43,9 @@ complete -A variable declare export readonly typeset
# Both functions and variables
complete -A function -A variable unset
+# The `mapfile` builtin in Bash >= 4.0
+((BASH_VERSINFO[0] >= 4)) && complete -A arrayvar mapfile
+
# If we have dynamic completion loading (Bash>=4.0), use it
if ((BASH_VERSINFO[0] >= 4)) ; then