[pass] [PATCH] Allow user to choose tree command.

Stephen Blott smblott at gmail.com
Thu Apr 17 15:38:58 CEST 2014


From: Stephen Blott <smblott+github at gmail.com>

---
 src/password-store.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/password-store.sh b/src/password-store.sh
index 5b2293a..2f30da1 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -14,6 +14,7 @@ which gpg2 &>/dev/null && GPG="gpg2"
 PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
 X_SELECTION="${PASSWORD_STORE_X_SELECTION:-clipboard}"
 CLIP_TIME="${PASSWORD_STORE_CLIP_TIME:-45}"
+TREE_COMMAND="${PASSWORD_STORE_TREE_COMMAND:-tree}"
 
 export GIT_DIR="${PASSWORD_STORE_GIT:-$PREFIX}/.git"
 export GIT_WORK_TREE="${PASSWORD_STORE_GIT:-$PREFIX}"
@@ -285,7 +286,7 @@ cmd_show() {
 		else
 			echo "${path%\/}"
 		fi
-		tree -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//'
+		$TREE_COMMAND -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//'
 	else
 		echo "$path is not in the password store."
 		exit 1
-- 
1.7.10.4



More information about the Password-Store mailing list