summary refs log tree commit diff
path: root/Completion/Base/_default
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/_default')
-rw-r--r--Completion/Base/_default10
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/Base/_default b/Completion/Base/_default
index e5091a544..8176f392c 100644
--- a/Completion/Base/_default
+++ b/Completion/Base/_default
@@ -12,10 +12,16 @@ if { zstyle -s ":completion:${curcontext}:" use-compctl ctl ||
   compcall "$opt[@]" || return 0
 fi
 
-_files && return 0
+_files "$@" && return 0
 
 # magicequalsubst allows arguments like <any-old-stuff>=~/foo to do
 # file name expansion after the =.  In that case, it's natural to
 # allow completion to handle file names after any equals sign.
 
-[[ -o magicequalsubst ]] && compset -P 1 '*=' && _files
+if [[ -o magicequalsubst && "$PREFIX" = *\=* ]]; then
+  compstate[parameter]="${words[1]:t}-${PREFIX%%\=*}"
+  compset -P 1 '*='
+  _value "$@"
+else
+  return 1
+fi