mirror of
https://gitlab.com/dabruh/dotfiles.git
synced 2024-12-25 19:44:17 +01:00
Add comments
This commit is contained in:
parent
cc02c966cb
commit
00fe271f34
1 changed files with 11 additions and 3 deletions
14
.local/bin/t
14
.local/bin/t
|
@ -1,6 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TITLE : t
|
||||
# DESCRIPTION : Creates and re-opens tmux sessions
|
||||
# AUTHOR : edabrows
|
||||
# DATE : 20230828
|
||||
# VERSION : 0.1.0
|
||||
# USAGE : t <session-name>
|
||||
# BASH_VERSION : 5.1.16(1)-release
|
||||
|
||||
EXISTS=false
|
||||
tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true
|
||||
$EXISTS && tmux a -t "$1"
|
||||
$EXISTS || tmux new -s "$1"
|
||||
tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true # Get open sessions
|
||||
$EXISTS && tmux a -t "$1" # Attatch to existing session
|
||||
$EXISTS || tmux new -s "$1" # Create a new session
|
||||
|
|
Loading…
Reference in a new issue