diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-01-09 19:00:21 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-01-09 19:00:21 +0900 |
| commit | 21fce318909ec86d458e3c1b5726bbf7b4dfe540 (patch) | |
| tree | 6b80e68a8badd7d2c3f21bcc9cf691dbfd99df47 /ar/.local | |
| parent | ebe4eb5d2696e3734c302a9da53f61038ff6c274 (diff) | |
modified zsh/scripts.zsh, modified bin/opensessions, modified zsh/scripts.zsh, modified bin/opensessions
Diffstat (limited to 'ar/.local')
| -rwxr-xr-x | ar/.local/bin/opensessions | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ar/.local/bin/opensessions b/ar/.local/bin/opensessions index 6f9f236..d16f42f 100755 --- a/ar/.local/bin/opensessions +++ b/ar/.local/bin/opensessions @@ -18,7 +18,10 @@ set -- $dirs for dir in $dirs; do if [ -d "$dir" ]; then session_name=$(get_session_name "$dir") - if ! tmux has-session -t "$session_name" 2>/dev/null; then + if tmux has-session -t "$session_name" 2>/dev/null; then + session_path=$(tmux display-message -t "$session_name" -p '#{session_path}') + tmux send-keys -t "$session_name" "cd \"$session_path\"" C-m + else tmux new-session -d -s "$session_name" -c "$dir" if git -C "$dir" rev-parse --is-inside-work-tree >/dev/null 2>&1 && [ -n "$(git -C "$dir" status --porcelain)" ]; then tmux send-keys -t "$session_name" "git status --porcelain" C-m |
