This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/bin/tmux-lyte-session

7 lines
216 B
Fish
Executable file

#!/usr/bin/env fish
set session_name $argv[1]
set dir (set -q argv[2] && echo $argv[2] || pwd)
tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] || \
tmux attach-session -d -t "$session_name" -c "$dir"