summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/bashcompinit8
1 files changed, 7 insertions, 1 deletions
diff --git a/Completion/bashcompinit b/Completion/bashcompinit
index 2ccc94de9..63101a9c8 100644
--- a/Completion/bashcompinit
+++ b/Completion/bashcompinit
@@ -127,7 +127,13 @@ compgen() {
       ;;
       F)
         COMPREPLY=()
-	$OPTARG "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}"
+        (){
+          set -- "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}"
+          # There may be more things we need to add to this typeset to
+          # protect bash functions from compsys special variable names
+          typeset -h words
+          $OPTARG "$@"
+        }
 	results+=( "${COMPREPLY[@]}" )
       ;;
       G)