#!/bin/sh #This is a wrapper script for editing files from nnn. It checks if it nnn is running in tmux then calls the appropriate editor. if ! { [ "$TERM" = "tmux-256color" ] && [ -n "$TMUX" ]; } then # Remove option --tab for new window st -e vim "$@" else # tmux session running # tmux -u split-window vim "$@" # wait $! vim "$@" fi