Skip to content

Commit c3fc52d

Browse files
authored
Update default-command for macOS clipboard support
1 parent 48322e2 commit c3fc52d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dot_tmux.conf.local.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ set -g @continuum-restore 'on' # 启用 tmux-continuum 自动
179179
# ------------------------------------------------------------------------------
180180
set -g focus-events on # 面板获得焦点时通知 tmux
181181
set -s focus-events on # 服务器级别同样开启焦点事件
182-
set-option -g default-command "reattach-to-user-namespace -l $SHELL" # 在 macOS 中保持系统剪贴板可用
182+
if-shell 'command -v reattach-to-user-namespace >/dev/null 2>&1' 'set-option -g default-command "reattach-to-user-namespace -l $SHELL"' # 在 macOS 中保持系统剪贴板可用
183183
set-option -g status-interval 5 # 每 5 秒刷新一次状态栏
184184
set-option -g automatic-rename on # 自动根据活跃面板的路径重命名窗口
185185
set-option -g automatic-rename-format '#{b:pane_current_path}' # 使用当前面板路径的目录名作为窗口名

0 commit comments

Comments
 (0)