Den 14. april 2017 23:04, skreiv John Gliksberg:
> Subject: [PATCH 3/3] [passmenu] Remove bashisms
> 
> None of this is a big deal, and bash is used throughout pass,
> but this script can be easily debashified.

> -prefix=${PASSWORD_STORE_DIR-~/.password-store}
> -password_files=( "$prefix"/**/*.gpg )
> -password_files=( "${password_files[@]#"$prefix"/}" )
> -password_files=( "${password_files[@]%.gpg}" )
> +prefix="${PASSWORD_STORE_DIR:-"$HOME/.password-store"}"
>  
> -password=$(printf '%s\n' "${password_files[@]}" | dmenu)
> +password=$(find "$prefix" -type f -name '*.gpg' -printf '%P\n' \
> +           | sed 's/\.gpg$//' | dmenu)

replacing bashisms with an (undocumented) reliance on GNU find (-printf)
isn't a good idea IMHO.


-- 
Kjetil T. Homme
Redpill Linpro - Changing the game

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Password-Store mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to