1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-26 16:40:29 +01:00

43084: Variable warning suppression enhancements.

Add vared -g option along the lines of typeset -g.

Set reply safely in zsh_directory_name_cdr.
This commit is contained in:
Peter Stephenson 2018-06-25 09:31:40 +01:00
parent 3c57f71668
commit 0a6cb5078d
4 changed files with 17 additions and 8 deletions

View file

@ -1,14 +1,13 @@
if [[ $1 = n ]]; then
if [[ $2 = <-> ]]; then
# Recent directory
typeset -ga reply
autoload -Uz cdr
cdr -r
if [[ -n ${reply[$2]} ]]; then
reply=(${reply[$2]})
typeset -ga reply=(${reply[$2]})
return 0
else
reply=()
typeset -ga reply=()
return 1
fi
fi