summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-09-23 23:16:38 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-09-23 23:16:38 -0700
commit8d5c0c77609d814de7c0749602a595236f76b487 (patch)
treeb84130a16cb3bed3710daaa748d915b09c55695b
parent1b5987cdb11253e2f399bfff72016af22bad9240 (diff)
downloadzsh-8d5c0c77609d814de7c0749602a595236f76b487.tar.gz
zsh-8d5c0c77609d814de7c0749602a595236f76b487.tar.xz
zsh-8d5c0c77609d814de7c0749602a595236f76b487.zip
36604: fix getopts+shift calculation
-rw-r--r--ChangeLog4
-rw-r--r--Functions/Misc/zrecompile2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b92432044..e5044931f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-23  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 36604: Functions/Misc/zrecompile: fix getopts+shift calculation
+
 2015-09-23  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* unposted: Src/Zle/compmatch.c: Followup to 36586: Change C99
diff --git a/Functions/Misc/zrecompile b/Functions/Misc/zrecompile
index 8fe990086..d9fc55020 100644
--- a/Functions/Misc/zrecompile
+++ b/Functions/Misc/zrecompile
@@ -52,7 +52,7 @@ while getopts ":tqp" opt; do
     fi
   esac
 done
-shift OPTIND-${#tmp:-1}
+shift OPTIND-${#tmp}-1
 
 if [[ -n $check ]]; then
   ret=1