mirror of https://github.com/jarun/nnn.git
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)
|
inode/directory)
|
||||||
if [[ -n $PICTURES_DIR && "$FILE" == *"$PICTURES_DIR"* ]] ; then
|
if [[ -n $PICTURES_DIR && "$FILE" == *"$PICTURES_DIR"* ]] ; then
|
||||||
if type sxiv >/dev/null 2>&1 ; then
|
if find "$FILE" -maxdepth 1 | file -bLf- --mime-type | grep -q image ; then
|
||||||
( sxiv -te "$XID" "$FILE" 2>/dev/null || $TERMINAL "$XID" -e nnn "$FILE" ) &
|
if type sxiv >/dev/null 2>&1 ; then
|
||||||
elif type nsxiv >/dev/null 2>&1 ; then
|
sxiv -te "$XID" "$FILE" &
|
||||||
( nsxiv -te "$XID" "$FILE" 2>/dev/null || $TERMINAL "$XID" -e nnn "$FILE" ) &
|
elif type nsxiv >/dev/null 2>&1 ; then
|
||||||
|
nsxiv -te "$XID" "$FILE" &
|
||||||
|
else
|
||||||
|
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
$TERMINAL "$XID" -e nnn "$FILE" &
|
$TERMINAL "$XID" -e nnn "$FILE" &
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue