From f39ee39a36c00c9edfc90368891f056a10a0bf8a Mon Sep 17 00:00:00 2001 From: Max Schillinger Date: Sun, 26 Sep 2021 21:54:01 +0200 Subject: [PATCH 1/2] autojump plugin: Support jethrokuan/z (port of z for fish) --- plugins/autojump | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/autojump b/plugins/autojump index 197f8c135..50e2a81c2 100755 --- a/plugins/autojump +++ b/plugins/autojump @@ -7,6 +7,7 @@ # - OR autojump - https://github.com/wting/autojump # - OR zoxide - https://github.com/ajeetdsouza/zoxide # - OR z - https://github.com/rupa/z (z requires fzf) +# - OR z (fish) - https://github.com/jethrokuan/z (z requires fzf) # # Note: The dependencies STORE NAVIGATION PATTERNS # @@ -41,7 +42,9 @@ elif type zoxide >/dev/null 2>&1; then printf "%s" "0c$odir" > "$NNN_PIPE" fi else - datafile="${_Z_DATA:-$HOME/.z}" + # rupa/z uses $_Z_DATA, jethrokuan/z (=port of z for fish) uses $Z_DATA + datafile="${_Z_DATA:-$Z_DATA}" + datafile="${datafile:-$HOME/.z}" if type fzf >/dev/null 2>&1 && [ -f "$datafile" ]; then # Read the data from z's file instead of calling # z so the data doesn't need to be processed twice From 1c9ecd781c9df42fd51dada39a3311d09794ec8c Mon Sep 17 00:00:00 2001 From: Max Schillinger Date: Sun, 26 Sep 2021 23:17:51 +0200 Subject: [PATCH 2/2] Combine assignment of $_Z_DATA, $Z_DATA or $HOME/.z Co-authored-by: luukvbaal <31730729+luukvbaal@users.noreply.github.com> --- plugins/autojump | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/autojump b/plugins/autojump index 50e2a81c2..21a28ea8d 100755 --- a/plugins/autojump +++ b/plugins/autojump @@ -43,8 +43,7 @@ elif type zoxide >/dev/null 2>&1; then fi else # rupa/z uses $_Z_DATA, jethrokuan/z (=port of z for fish) uses $Z_DATA - datafile="${_Z_DATA:-$Z_DATA}" - datafile="${datafile:-$HOME/.z}" + datafile="${_Z_DATA:-${Z_DATA:-$HOME/.z}}" if type fzf >/dev/null 2>&1 && [ -f "$datafile" ]; then # Read the data from z's file instead of calling # z so the data doesn't need to be processed twice