From: Silvio Rhatto Date: Fri, 2 Aug 2024 18:57:37 +0000 (-0300) Subject: Fix: positional argument handling X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=9039fd411934413a750ff77eab4d8c632b3e5741;p=termplex.git Fix: positional argument handling --- diff --git a/shell b/shell index df569e9..84e95d7 100755 --- a/shell +++ b/shell @@ -60,7 +60,11 @@ fi window_title $DEST # Shift args -shift 2 +if [ -z "$COMMAND" ]; then + shift +else + shift 2 +fi # Dispatcher if [ "$BASENAME" == "shells" ]; then diff --git a/wtmux b/wtmux index aa48386..b577fd8 100755 --- a/wtmux +++ b/wtmux @@ -43,7 +43,7 @@ if [ ! -z "${name}" ]; then fi fi - if [ -z "$state" ] || [ "$state" == "attached" ]; then + if [ "$state" != "detached" ]; then tmux attach -t ${name} fi else