]> Sergey Matveev's repositories - nnn.git/commitdiff
.iconlookup: shebang to env sh
authorLuuk van Baal <luukvbaal@gmail.com>
Tue, 30 Mar 2021 15:49:31 +0000 (17:49 +0200)
committerLuuk van Baal <luukvbaal@gmail.com>
Tue, 30 Mar 2021 15:49:31 +0000 (17:49 +0200)
plugins/.iconlookup
plugins/preview-tui-ext

index 2be70e60289d1883129fbdabfa4238a9cb09a0e1..c2d9846859de0fc2b00f6a061b3eef1b4f19a945 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/usr/bin/env sh
 
 # Description: Print icons in front of list of directories/files
 
index b54f784b91c2ccc3d6d8597b38dc11314caffe86..e86af860ef18ad5a4bce3329c323168afee2e3de 100755 (executable)
@@ -169,8 +169,7 @@ preview_file() {
         cd "$1" || return
         if exists tree; then
             if [ "$ICONLOOKUP" -ne 0 ]; then
-                tree -L 1 --dirsfirst -F --noreport -i | head -n "$((lines - 3))" | \
-                "${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/.iconlookup" -l "$cols" -b "\n"
+                tree -L 1 --dirsfirst -F --noreport -i | head -n "$((lines - 3))" | "$(dirname "$0")"/.iconlookup -l "$cols" -b "\n"
             else
                 fifo_pager tree -L 1 --dirsfirst -C -F --noreport -i
             fi;