Kevin may have forgotten a reply all, but he proposed a POSIX compatible fix, rather than relying on undocumented behavior.
– Kyle Marek-Spartz On May 5, 2014, 5:00:31 PM, Kevin Cox <[email protected]> wrote: On 05/05/14 16:21, Kyle Marek-Spartz wrote: > Hello, > > A recent change in pass.zsh-completion broke autocompletion when using > BSD sed. I’ve made the relevant sed expression compatible with GNU and > BSD sed. > > Previous change with regression: > http://lists.zx2c4.com/pipermail/password-store/2014-April/000773.html > > http://git.zx2c4.com/password-store/commit/src/completion/pass.zsh-completion?id=f82e9d6cf3bc3a12bdfce89bf319d76f79e66efc > I tested out this fix and it works on GNU sed. The -E option is not documented in GNU sed but it is an alias of the -r extended regular expressions option. It may be slightly better to use the -r option instead as it is documented in both implementations (the BSD man page says it is an alias of -E). So while this fix works it might be worthwhile to stick posix basic (as that is what is used throughout pass and since extended is not part of posix sed (AFAIK). To continue with posix basic the `\?` can be replaced with `\{0,1\}` which should work on all compliant seds. Cheers, Kevin - signature.asc, 303 bytes
0-0001-regression-in-zsh-completion-when-using-BSD-sed.-Mad.patch
Description: Binary data
1-signature.asc
Description: Binary data
_______________________________________________ Password-Store mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/password-store
