]> Sergey Matveev's repositories - nnn.git/commitdiff
autojump plugin: Support jethrokuan/z (port of z for fish)
authorMax Schillinger <maxschillinger@web.de>
Sun, 26 Sep 2021 19:54:01 +0000 (21:54 +0200)
committerMax Schillinger <maxschillinger@web.de>
Sun, 26 Sep 2021 19:54:01 +0000 (21:54 +0200)
plugins/autojump

index 197f8c13512b5d63253bba552baaab9668a50d7d..50e2a81c2f1560b358d1cca20e13fbd2dfd55a7a 100755 (executable)
@@ -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