[pass] Possible improvements

Dashamir Hoxha dashohoxha at gmail.com
Tue Jan 26 11:08:45 CET 2016


https://github.com/dashohoxha/password-store/commit/324c6702584e08021c21e03d490a320c8de94460

Replaced aliases with functions and it still works!

On Tue, Jan 26, 2016 at 10:16 AM, Dashamir Hoxha <dashohoxha at gmail.com>
wrote:

>
>
> On Tue, Jan 26, 2016 at 10:05 AM, Lucas Hoffmann <l-m-h at web.de> wrote:
>
>> Quoting Dashamir Hoxha (2016-01-26 08:11:44)
>> >    But, from the man page:
>> >    "PASSWORD_STORE_GPG_OPTS: Additional options to be passed to all
>> >    invocations of GPG."
>> >    It does not say that it is an array. And if it is a string, then
>> there are
>> >    no problems
>> >    inside the script.
>>
>> Environment variables are always strings.  There is no other
>> possibility.  Non the less arrays are the best choice for use *inside*
>> one script.
>>
>> I would not advise the use of aliases inside scripts.  Functions are
>> more powerful and less error prone (less quoting issues).  From the bash
>>
>
> OK, Lucas. I will try using functions.
> But first let's make it work, and then let's make it better.
> Agree?
>
>
>> man page:
>>
>> > The rules concerning the definition and use of aliases are somewhat
>> > confusing. Bash always reads at least one complete line of input
>> > before executing any of the commands on that line.  Aliases are
>> > expanded when a command is read, not when it is executed.  Therefore,
>> > an alias definition appearing on the same line as another command does
>> > not take effect until the next line of input is       read.  The
>> > commands following the alias definition on that line are not affected
>> > by the new alias.
>>
>> (The fish shell for example does not imlement aliases at all, only
>> functions.)
>>
>> Lucas
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160126/51a25ac8/attachment.html>


More information about the Password-Store mailing list