Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] zed fails with setopt nounset unless option -x is given



% zsh-5.9 -f
% autoload zed
% setopt nounset
% zed a.txt
zed:21: opts[-x]: parameter not set
%
--- Functions/Misc/zed.orig	2022-05-20 16:45:13.709144850 +0300
+++ Functions/Misc/zed	2022-05-20 16:45:56.313326625 +0300
@@ -18,7 +18,7 @@
 fun=$+opts[-f]
 hist=$+opts[-h]
 bind=$+opts[-b]
-if [[ $opts[-x] == <-> ]]; then
+if [[ ${opts[-x]-} == <-> ]]; then
   expand=(-x $opts[-x])
 elif (( $+opts[-x] )); then
   print -r "Integer expected after -x: $opts[-x]" >&2


Messages sorted by: Reverse Date, Date, Thread, Author