From ed53c54ba2788b17d9c02a398a1b34ab1f4dd1a5 Mon Sep 17 00:00:00 2001
From: Placido Fernandez <9625282+fdplacido@users.noreply.github.com>
Date: Tue, 13 Oct 2020 12:20:28 +0000
Subject: [PATCH] fix fzf bookmarks plugin environment variable (#756)

* fix fzf bookmarks plugin environment variable

* fix for POSIX
---
 plugins/bookmarks | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/bookmarks b/plugins/bookmarks
index 614b20f..65670cd 100755
--- a/plugins/bookmarks
+++ b/plugins/bookmarks
@@ -25,7 +25,9 @@
 # Shell: POSIX compliant
 # Author: Todd Yamakawa
 
-BOOKMARKS_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nnn/bookmarks"
+if [ -z "$BOOKMARKS_DIR" ]; then
+  BOOKMARKS_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nnn/bookmarks"
+fi
 
 # Check if NNN_PIPE is set
 if [ -z "$NNN_PIPE" ]; then