Created
May 4, 2026 11:58
-
-
Save byStrange/3cee0450453a211478a971f4415e4c53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Defined in /home/ron/.config/fish/functions/gtm.fish @ line 1 function gtm set -l target (locate -r '/\.git$' | rev | cut -d/ -f2- | rev | fzf) if test -n "$target" set -l name (string replace -r '\.' '_' (basename "$target")) if not tmux has-session -t "$name" 2>/dev/null tmux new-session -d -c "$target" -s "$name" end if test -n "$TMUX" tmux switch-client -t "$name" else tmux attach-session -t "$name" end end end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment