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

wrapping "local" (was: Re: [PATCH 10/18] Add helper script to check state of _tmux completion)



Hi!

Could it be, that I can't write a wrapper around "local" anymore? In
this script:

Frank Terbeck wrote:
[...]
> +function _arguments () { }
> +function _describe () { }
> +function local () { }
> +
> +typeset -A rev
> +
> +source $func
> +__tmux-server-options
> +__tmux-session-options
> +__tmux-window-options

...I am using a trick: The __tmux-*-options() functions define variables
"$tmux_session_options" for example in local scope. I was injecting a
function called "local" so that the functions wouldn't put their
variables into local scope anymore. That way I could inspect these
variables later on in the script.

After pushing these changes, I also updated zsh on my system. Turns out
that with an updated zsh binary, the trick doesn't work anymore and I
end up with nothing.

Was this intended? Is it a bug? If not, is there a way to make the trick
work?


Regards, Frank



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