about summary refs log tree commit diff
path: root/Completion/Core/_approximate
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_approximate')
-rw-r--r--Completion/Core/_approximate4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Core/_approximate b/Completion/Core/_approximate
index c63416901..61f21c5b9 100644
--- a/Completion/Core/_approximate
+++ b/Completion/Core/_approximate
@@ -89,14 +89,14 @@ fi
 
 # Get the number of errors to accept.
 
-if [[ "$cfgacc" = *[nN]* && NUMERIC -ne 1 ]]; then
+if [[ "$cfgacc" = *[nN]* && ${NUMERIC:-1} -ne 1 ]]; then
   # Stop if we also have a `!'.
 
   [[ "$cfgacc" = *\!* ]] && return 1
 
   # Prefer the numeric argument if that has a sensible value.
 
-  comax="$NUMERIC"
+  comax="${NUMERIC:-1}"
 else
   comax="${cfgacc//[^0-9]}"
 fi