-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca0c529
commit fb861c1
Showing
5 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Check if tmux is running AND active | ||
# (ie: we are inside a tmux session) | ||
function __tsm::utils::inside_tmux() { | ||
{ __tsm::utils::tmux_running && [[ -n "$TMUX" ]] } || return 1 | ||
function __tsm::helpers::inside_tmux() { | ||
{ __tsm::helpers::tmux_running && [[ -n "$TMUX" ]] } || return 1 | ||
local -a tmux_info ; tmux_info=("${(s:,:)TMUX}") | ||
[[ -S "${tmux_info[1]}" ]] && builtin kill -s 0 "${tmux_info[2]}" &>/dev/null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Check if a tmux session exists. | ||
function __tsm::utils::session_exists() { | ||
function __tsm::helpers::session_exists() { | ||
command tmux has-session -t "$1" 2>/dev/null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters