mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-30 05:40:58 +01:00
50286: avoid zed error if nounset is in effect
This commit is contained in:
parent
dd2c882ae1
commit
92da264eea
2 changed files with 12 additions and 6 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2022-05-26 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
|
* 50286: Functions/Misc/zed: avoid error if nounset is in effect.
|
||||||
|
|
||||||
2022-05-25 Norbert Lange <nolange79@gmail.com>
|
2022-05-25 Norbert Lange <nolange79@gmail.com>
|
||||||
|
|
||||||
* github #94: Completion/Linux/Command/_modutils: Support .zst
|
* github #94: Completion/Linux/Command/_modutils: Support .zst
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,17 @@ local var opts zed_file_name
|
||||||
integer TMOUT=0 okargs=1 fun hist bind
|
integer TMOUT=0 okargs=1 fun hist bind
|
||||||
local -a expand
|
local -a expand
|
||||||
|
|
||||||
zparseopts -D -A opts f h b x:
|
zparseopts -D -A opts f h b x: || return 1
|
||||||
fun=$+opts[-f]
|
fun=$+opts[-f]
|
||||||
hist=$+opts[-h]
|
hist=$+opts[-h]
|
||||||
bind=$+opts[-b]
|
bind=$+opts[-b]
|
||||||
if [[ $opts[-x] == <-> ]]; then
|
if (( $+opts[-x] )); then
|
||||||
expand=(-x $opts[-x])
|
if [[ $opts[-x] == <-> ]]; then
|
||||||
elif (( $+opts[-x] )); then
|
expand=(-x $opts[-x])
|
||||||
print -r "Integer expected after -x: $opts[-x]" >&2
|
else
|
||||||
return 1
|
print -r "Integer expected after -x: $opts[-x]" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $0 = fned ]] && fun=1
|
[[ $0 = fned ]] && fun=1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue