From 0189b377a9e75a7415137d17d03a380bcaa097c9 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Thu, 20 Aug 2015 05:22:49 +0200 Subject: [PATCH] better handle root variable --- rofi-pass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rofi-pass b/rofi-pass index 25c636d..49d0e66 100755 --- a/rofi-pass +++ b/rofi-pass @@ -29,7 +29,11 @@ fi if [[ -n "$2" && "$1" == "--root" ]]; then root="${2}" else - root="${root}" + if [[ -n $root ]]; then + root="${basedir}" + else + root="$HOME/.password-store" + fi fi # get all password files and create an array