sh 修复tmux-1.9默认路径

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 修复tmux-1.9默认路径相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# Source: https://bugs.launchpad.net/byobu/+bug/1393793

# Step 1: Create ~/.byobu/f-keys.tmux
cat > ~/.byobu/f-keys.tmux <<"EOM"
bind-key -n F2 new-window -c "#{pane_current_path}" \; rename-window "-"
bind-key -n C-F2 display-panes \; split-window -h -c "#{pane_current_path}"
bind-key -n S-F2 display-panes \; split-window -v -c "#{pane_current_path}"

# This seems to open a new session in / instead of the current directory; may want to keep it commented out for now
#bind-key -n C-S-F2 new-session -c "#{pane_current_path}"
bind-key -n M-S-F8 new-window -c "#{pane_current_path}" -k "byobu-layout restore; clear; $SHELL"
bind-key -n S-F12 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux.disable \; source $BYOBU_CONFIG_DIR/f-keys.tmux.disable \; display-message "Byobu F-keys: DISABLED"
EOM

# Step 2: Create ~/.byobu/f-keys.tmux.disable
cat > ~/.byobu/f-keys.tmux.disable <<"EOM"
bind-key -n S-F12 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux \; source $BYOBU_CONFIG_DIR/f-keys.tmux \; display-message "Byobu F-keys: ENABLED"
EOM

# Step 3: Add to ~/.byobu/.tmux.conf
cat > ~/.byobu/.tmux.conf <<"EOM"
source-file $BYOBU_CONFIG_DIR/f-keys.tmux
EOM

# Step 4: Add to ~/.byobu/keybindings.tmux
cat > ~/.byobu/keybindings.tmux <<"EOM"
# screen ^C c
unbind ^C
bind ^C new-window -c "#{pane_current_path}"
unbind c
bind c new-window -c "#{pane_current_path}"

# split -v |
unbind |
bind | split-window -c "#{pane_current_path}"
EOM

以上是关于sh 修复tmux-1.9默认路径的主要内容,如果未能解决你的问题,请参考以下文章

sh 修复oh-my-zsh默认主题的“➜”和“✗”,使某些终端下的光标位置错误(例如Mosh Chrome App,Termius [Chrome App]

sge的简单的应用

如何修复docker文件中的“sh:0:无法打开start.sh”?

Redis 主从 keepalived高可用 实现 VIP 自动漂移

Rsync未授权访问漏洞的修复

sh 修复ceph pg repair都无法修复的pg不连续