summaryrefslogtreecommitdiff
path: root/mac/.local
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.local')
-rwxr-xr-xmac/.local/bin/fzffiles2
-rwxr-xr-xmac/.local/bin/opensessions5
2 files changed, 5 insertions, 2 deletions
diff --git a/mac/.local/bin/fzffiles b/mac/.local/bin/fzffiles
index 454bf79..6c0bcfd 100755
--- a/mac/.local/bin/fzffiles
+++ b/mac/.local/bin/fzffiles
@@ -35,7 +35,7 @@ files=$(fzf-tmux \
fi
fi
if [ -d \"\$target\" ]; then
- exa --color=always --long --all --header --icons --git \"\$target\"
+ eza --color=always --long --all --header --icons --git \"\$target\"
elif [ -f \"\$target\" ]; then
bat --color=always --style=header,grid --line-range=:500 \"\$target\"
else
diff --git a/mac/.local/bin/opensessions b/mac/.local/bin/opensessions
index 6f9f236..d16f42f 100755
--- a/mac/.local/bin/opensessions
+++ b/mac/.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