From 7df5ace73c4fb17b705b0fbfc3fbcb058d45ac23 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 29 Aug 2016 13:23:32 +1200 Subject: Add mapfile to completions (conditional on vers) --- bash/bashrc.d/completion.bash | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3