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

Re: Avoid duplication of code



Yasuhiro KIMURA wrote on Thu, 28 May 2020 17:05 +0900:
> ----------------------------------------------------------------------
> update_tmux_ssh_agent_environments () {
>     if [ -z "${TMUX}" ]
>     then
>         echo "This function must be called inside tmux session."
>         return -1
>     fi

You might want to add «local varname» here.

>     for varname in SSH_AGENT_PID SSH_AUTH_SOCK
> }  
> ----------------------------------------------------------------------

Cheers,

Daniel



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