mirror of
https://github.com/gaschz/dotfiles.git
synced 2025-03-01 14:22:33 +01:00
fix: tmux script printing extraneous output
This commit is contained in:
parent
cd847c6312
commit
822f11875b
@ -79,13 +79,13 @@ main(){
|
|||||||
else
|
else
|
||||||
|
|
||||||
## Outside of tmux.
|
## Outside of tmux.
|
||||||
if test -n "$ta_session" && ! tmux list-session 2>/dev/null; then
|
if test -n "$ta_session" && ! tmux list-sessions >/dev/null 2>&1; then
|
||||||
## Session name was specified but server is not running.
|
## Session name was specified but server is not running.
|
||||||
tmux new-session -s "$ta_session"
|
tmux new-session -s "$ta_session"
|
||||||
tmux display-message "Created session $ta_session"
|
tmux display-message "Created session $ta_session"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
elif ! tmux list-session 2>/dev/null; then
|
elif ! tmux list-sessions >/dev/null 2>&1; then
|
||||||
## Server is not running.
|
## Server is not running.
|
||||||
ta_new || return 1
|
ta_new || return 1
|
||||||
tmux new-session -s "$ta_name"
|
tmux new-session -s "$ta_name"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user