summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/Utility/_arguments6
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index dacc19890..d1aafd79a 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -217,7 +217,11 @@ if (( long )); then
 	  else
 	    odescr=
 	  fi
-	  opt2=${${opt%%\[\=*}//[^a-zA-Z0-9-]}=${dir}${odescr}
+	  if [[ $opt = (#b)(*)\[\=* ]]; then
+	    opt2=${${match[1]}//[^a-zA-Z0-9-]}=-${dir}${odescr}
+	  else
+	    opt2=${${opt}//[^a-zA-Z0-9-]}=${dir}${odescr}
+	  fi
 	  if [[ "$descr" = :\=* ]]; then
 	    cache+=( "${opt2}::${(L)${opt%\]}#*\=}: " )
 	  elif [[ "$descr" = ::* ]]; then