[pass] [PATCH] oneline option

Matthew Cengia mattcen at gmail.com
Thu Feb 27 00:53:00 CET 2014

On 2014-02-26 13:56, Nico Schottelius wrote:
> I have seen a lot of bashism in password-store and was wondering if
> you'd accept cleanups that would make it work with posix shell?

For my part, I personally decided a few years ago that I consider it
acceptable to rely on Bash 3+ as a lowest common denominator. The effort
required to conform to POSIX, when there are still non-POSIX shells (and
therefore you scripts *still* aren't guaranteed to be portable) is far
too high for the minimal benefit I think it affords. If you need to run
the script on a system without Bash, compile Bash for the system.

There are several bashisms without which shell programming is
exceptionally painful. Examples:

* Arrays. Sure, you can use set -- a b c; but that's rather more

* Process substitution, particularly with regard to loops when you can't
  afford a subshell because you lose variable scope.

I haven't reviewed password-store's code to determine exactly how many
bashisms are in use, but I don't think removing is worth the effort,
especially given the shebang explicitly demands bash.

Matthew Cengia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: Digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140227/e2ab77a5/attachment.asc>

More information about the Password-Store mailing list