summary refs log tree commit diff
path: root/Completion/Base/_default
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-17 08:22:44 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-17 08:22:44 +0000
commit1fb481b8c28f555c4f9b787cc92498a3821541ec (patch)
tree49e3978fdb7a2b1d65f3ce13d1faa82305d09bc9 /Completion/Base/_default
parentcd45aa331dc206b1b40c5be5e222d46148bf42ac (diff)
downloadzsh-1fb481b8c28f555c4f9b787cc92498a3821541ec.tar.gz
zsh-1fb481b8c28f555c4f9b787cc92498a3821541ec.tar.xz
zsh-1fb481b8c28f555c4f9b787cc92498a3821541ec.zip
better completion after `=', everywhere (10780)
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