about summary refs log tree commit diff
path: root/Completion/Core/_approximate
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-08 08:16:32 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-08 08:16:32 +0000
commit92637abbb870dc35e1af9150741f7b11587a3350 (patch)
tree0720a090889ec58db87992e6a4e9712a1c939739 /Completion/Core/_approximate
parentc15091b7d196c8fcc15bf8f13f8c7ccf62479b85 (diff)
downloadzsh-92637abbb870dc35e1af9150741f7b11587a3350.tar.gz
zsh-92637abbb870dc35e1af9150741f7b11587a3350.tar.xz
zsh-92637abbb870dc35e1af9150741f7b11587a3350.zip
misc. completion cleanups and changes (11242)
Diffstat (limited to 'Completion/Core/_approximate')
-rw-r--r--Completion/Core/_approximate9
1 files changed, 8 insertions, 1 deletions
diff --git a/Completion/Core/_approximate b/Completion/Core/_approximate
index 840c1729a..47fc9ce23 100644
--- a/Completion/Core/_approximate
+++ b/Completion/Core/_approximate
@@ -13,7 +13,14 @@
 local _comp_correct _correct_expl comax cfgacc redef
 local oldcontext="${curcontext}" opm="$compstate[pattern_match]"
 
-zstyle -s ":completion:${curcontext}:" max-errors cfgacc || cfgacc='2 numeric'
+if [[ "$1" = -a* ]]; then
+  cfgacc="${1[3,-1]}"
+elif [[ "$1" = -a ]]; then
+  cfgacc="$2"
+else
+  zstyle -s ":completion:${curcontext}:" max-errors cfgacc ||
+      cfgacc='2 numeric'
+fi
 
 # Get the number of errors to accept.