分享 tmux 快捷方式
在 .bashrc 添加了下面的快捷方式,用不着每次都输入 tmux ...aa() {
if tmux has-session -t aa 2>/dev/null; then
tmux attach -t aa
else
tmux new -s aa
fi
}
rr() {
if tmux has-session -t rr 2>/dev/null; then
tmux attach -t rr
else
tmux new -s rr
fi
} 我还是每次都输一下吧。反正也是难得。 马上抄一个,谢谢! oh-my-zsh 有 tmux 插件,启用后 `to ` tmux new-session -A -s main ➜.config grep -rI "new-session" .
./alacritty/alacritty.toml:args = ["new-session", "-A", "-s", "minipc"]
./ghostty/config:command = tmux new-session -A -s minipc
我是这样配置的,终端默认自动启动。每次看到有人往.bashrc 塞东西,都很难受😅
页:
[1]