On Wed, Mar 19, 2014 at 4:36 PM, Josh Cartwright <[email protected]> wrote:
>
>
> I don't think any of this realpath nonsense is necessary at all.  Instead
> of
> tacking '/..' to the end of current, just use a parameter expansion to
> strip
> off '/*'.  Since you know that 'current' will always have "$PREFIX" as a
> prefix, you're guaranteed to terminate.


Good thinking! I've replaced it with below and resubmitted a v2 to the list.

+ local current="$PREFIX/$1"
+ while [[ $current != "$PREFIX" && ! -f $current/.gpg-id ]]; do
+ current="${current%/*}"
+ done
+ current="$current/.gpg-id"
_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to