mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +00:00
preview-tabbed: fixed not removing tab after leaving PICTURES folder
This commit is contained in:
parent
0c28e160b8
commit
ac6b31ad0e
|
@ -181,10 +181,14 @@ previewer_loop () {
|
|||
;;
|
||||
inode/directory)
|
||||
if [[ -n $PICTURES_DIR && "$FILE" == *"$PICTURES_DIR"* ]] ; then
|
||||
if type sxiv >/dev/null 2>&1 ; then
|
||||
( sxiv -te "$XID" "$FILE" 2>/dev/null || $TERMINAL "$XID" -e nnn "$FILE" ) &
|
||||
elif type nsxiv >/dev/null 2>&1 ; then
|
||||
( nsxiv -te "$XID" "$FILE" 2>/dev/null || $TERMINAL "$XID" -e nnn "$FILE" ) &
|
||||
if find "$FILE" -maxdepth 1 | file -bLf- --mime-type | grep -q image ; then
|
||||
if type sxiv >/dev/null 2>&1 ; then
|
||||
sxiv -te "$XID" "$FILE" &
|
||||
elif type nsxiv >/dev/null 2>&1 ; then
|
||||
nsxiv -te "$XID" "$FILE" &
|
||||
else
|
||||
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||
fi
|
||||
else
|
||||
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue