From c92bb8b2923b4a567ac5660f2bc81a00b3675264 Mon Sep 17 00:00:00 2001 From: pvx- Date: Mon, 30 Aug 2021 22:27:47 +0200 Subject: [PATCH] Removed $TERM check from ewrap script example (only $TMUX left) --- Basic-use-cases.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Basic-use-cases.md b/Basic-use-cases.md index 0f078ce..a5f1c10 100644 --- a/Basic-use-cases.md +++ b/Basic-use-cases.md @@ -162,12 +162,12 @@ Set up a script (say `ewrap`) to open the editor in a new `tmux` split-pane or a ```sh #!/usr/bin/env sh -if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then - # Remove option --tab for new window - xfce4-terminal --tab -e "vim \"$*\"" -else +if [ -n "$TMUX" ] ; then # tmux session running tmux split-window -h "vim \"$*\"" +else + # Remove option --tab for new window + xfce4-terminal --tab -e "vim \"$*\"" fi ```