Merge pull request #931 from luukvbaal/preview-tui

.iconlookup: shebang to env sh
This commit is contained in:
Mischievous Meerkat 2021-03-30 21:24:47 +05:30 committed by GitHub
commit da734c50da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/sh
#!/usr/bin/env sh
# Description: Print icons in front of list of directories/files

View file

@ -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;