about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-05-31 13:36:40 +0300
committerDaniel Shahaf <d.s@daniel.shahaf.name>2020-06-01 08:21:39 +0000
commit56fffd548203c3257d9fe05d75e36d8002b48bcc (patch)
treedf28219be0ba38275b1b23649d3c5f7a3b6b2f83
parent94e38548e306e6dd6fe601378fea85903d060bf5 (diff)
downloadzsh-56fffd548203c3257d9fe05d75e36d8002b48bcc.tar.gz
zsh-56fffd548203c3257d9fe05d75e36d8002b48bcc.tar.xz
zsh-56fffd548203c3257d9fe05d75e36d8002b48bcc.zip
gitlab !14: modutils completion: Fix getting the value of kver from opt_args
To get the _value_ of either of the options -S, -k or --set-version,
the (i) subscript flag is not needed.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Linux/Command/_modutils2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 773e5b64d..b1d58021b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-01  Doron Behar  <doron.behar@gmail.com>
+
+	* gitlab !14: Completion/Linux/Command/_modutils: modutils
+	completion: Fix getting the value of kver from opt_args
+
 2020-05-30  Bart Schaefer  <schaefer@zsh.org>
 
 	* 45915: Src/utils.c: fix handling of hyphens in spckword()
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils
index ff6844f41..32cb49bd0 100644
--- a/Completion/Linux/Command/_modutils
+++ b/Completion/Linux/Command/_modutils
@@ -106,7 +106,7 @@ _modutils() {
     ;&
 
     all-modules)
-      local kver=${opt_args[(i)(-S|-k|--set-version)]:-$(uname -r)}
+      local kver=${opt_args[(-S|-k|--set-version)]:-$(uname -r)}
 
       if _cache_invalid modules-$kver || ! _retrieve_cache modules-$kver;
       then