Skip to content

Commit

Permalink
Fix tmux entering on ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Sep 11, 2024
1 parent 9132f24 commit e73139c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ zshrc_enter_tmux() {
if [[ -n "$(command -v tmux)" ]]; then
local session_count=$(tmux ls 2>/dev/null | wc -l)
if type tmuxp > /dev/null 2>&1; then
if [[ "$session_count" -eq "0" ]]; then
# Load the tmuxp configuration for the current host, and attach
# if it already exists.
if [[ -z "$TMUX" ]]; then
# If we haven't entered tmux yet, then load the tmuxp
# configuration for the current host, and attach if it already
# exists.
local host_config="${HOME}/.tmuxp/$(hostname).yaml"
if [ -s "${host_config}" ]; then
tmuxp load -y "${host_config}"
Expand Down Expand Up @@ -351,6 +352,12 @@ zshrc_setup_completion() {
fi
fi

#if type pipx > /dev/null 2>&1; then
#if [ ! -s "${HOME}/.zsh_completions/_pipx" ]; then
#register-python-argcomplete pipx > "${HOME}/.zsh_completions/_pipx"
#fi
#fi

# Takes a lot of extra time ...
#if type molecule > /dev/null 2>&1; then
# Because it may be in a venv, we will have to do this on-demand.
Expand Down

0 comments on commit e73139c

Please sign in to comment.