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

Re: Avoid duplication of code



From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Subject: Re: Avoid duplication of code
Date: Thu, 28 May 2020 08:53:18 +0000

>> ----------------------------------------------------------------------
>> 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,

Thank you for pointing out. I added 'local newvalue varname' at the
top of function definition.

---
Yasuhiro KIMURA


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