Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] zed fails with setopt nounset unless option -x is given
- X-seq: zsh-workers 50262
- From: Risto Laitinen <risto.laitinen@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] zed fails with setopt nounset unless option -x is given
- Date: Fri, 20 May 2022 17:06:35 +0300
- Archived-at: <https://zsh.org/workers/50262>
- List-id: <zsh-workers.zsh.org>
% 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