繁体   English   中英

tmux 中的 zsh 配置

[英]zsh configuration in tmux

我正在使用tmuxzsh

当我在tmux之外时,根据.zshrc使用一些 Manjaro 设置自定义zsh

# Use powerline
USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi

# Use ssh-agent
if [[ -e /home/marcosh/ssh-agent.zsh ]]; then
  source /home/marcosh/ssh-agent.zsh
fi

source /usr/share/nvm/init-nvm.sh

但是,当我在tmux中时,即使使用的是zsh ,也缺少自定义项。 这是我的.tmux.conf

set-option -g history-limit 50000

# sane scrolling
set-option -g mouse on
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'

# new pane on same folder
bind '"' split-window    -c "#{pane_current_path}"
bind %   split-window -h -c "#{pane_current_path}"

# use zsh instead of bash
set -g default-command /usr/bin/zsh

tmux内部和外部时,我应该怎么做才能获得相同的zsh配置?

问题是 tmux 没有正确渲染 manjaro 配置中的 UTF-8 字符。

要解决此使用:

tmux -u

从 tmux 手册页:

-u            Write UTF-8 output to the terminal even if the first 
              environment variable of LC_ALL, LC_CTYPE, or LANG that
              is set does not contain "UTF-8" or "UTF8".  This is
              equivalent to -T UTF-8.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM