update
This commit is contained in:
parent
3f062ff27c
commit
71ccafd565
3 changed files with 68 additions and 12 deletions
14
.zshrc
14
.zshrc
|
|
@ -36,7 +36,7 @@ eval "$(oh-my-posh init zsh --config ~/.config/ohmyposh/config.toml)"
|
|||
|
||||
if command -v tmux &> /dev/null && [[ "$TERMINAL_EMULATOR" == "JetBrains-JediTerm" ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
cwd=$(pwd)
|
||||
session_name="$JetBrainsEditor-$(basename "$cwd" | tr -d '.')"
|
||||
session_name="JediTerm-$(basename "$cwd" | tr -d '.')"
|
||||
|
||||
if tmux has-session -t $session_name; then
|
||||
tmux attach -t $session_name
|
||||
|
|
@ -45,9 +45,15 @@ if command -v tmux &> /dev/null && [[ "$TERMINAL_EMULATOR" == "JetBrains-JediTer
|
|||
fi
|
||||
fi
|
||||
|
||||
#if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
# exec tmux attach
|
||||
#fi
|
||||
if command -v tmux &> /dev/null && [[ ! "$TERMINAL_EMULATOR" == "JetBrains-JediTerm" ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
session_name="general"
|
||||
|
||||
if tmux has-session -t $session_name; then
|
||||
tmux attach -t $session_name
|
||||
else
|
||||
tmux new -s $session_name
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "/opt/homebrew/bin/brew" ]] then
|
||||
# If you're using macOS, you'll want this enabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue