diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-29 13:23:32 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-29 13:23:32 +1200 |
commit | 7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23 (patch) | |
tree | ba5c508a54dde7f39979a61f867b6155f453c407 /bash | |
parent | Move COMP_WORDBREAKS tweaks to completion subfile (diff) | |
download | dotfiles-7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23.tar.gz dotfiles-7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23.zip |
Add mapfile to completions (conditional on vers)
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/completion.bash | 3 |
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 |