Parcourir la source

Simplify preview-tui

master
Arun Prakash Jana il y a 4 ans
Parent
révision
9fddd416ca
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: A75979F35C080412
1 fichiers modifiés avec 6 ajouts et 8 suppressions
  1. +6
    -8
      plugins/preview-tui

+ 6
- 8
plugins/preview-tui Voir le fichier

@@ -85,17 +85,15 @@ fi
if [ -e "${TMUX%%,*}" ] && [ "$(tmux -V | cut -c6)" -eq 3 ] ; then
if [ -z "$SPLIT" ]; then
if [ "$(( lines * 2 ))" -gt "$cols" ]; then
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dv "$0" "$1"
SPLIT='v'
else
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dh "$0" "$1"
SPLIT='h'
fi
elif [ "$SPLIT" = "h" ]; then
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dh "$0" "$1"
elif [ "$SPLIT" = "v" ]; then
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dv "$0" "$1"
else
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dh "$0" "$1"
elif [ "$SPLIT" != "h" ] && [ "$SPLIT" != "v" ] ; then
SPLIT='h'
fi

tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -d"$SPLIT" "$0" "$1"
else
PREVIEW_MODE=1 $TERMINAL -e "$0" "$1" &
fi

Chargement…
Annuler
Enregistrer