当我运行“subl”时。在我的终端上,我可以打开文件夹,但如果我运行tmux和“subl project-folder”,则文件夹不会打开。
➜ ~ whereis subl
/usr/bin/subl
➜ ~ which subl
/usr/local/bin/subl
➜ ~ subl -v
Sublime Text Build 3083
➜ ~ cat .bashrc
export PATH=~/bin:/Users/olleh/bin:/Users/olleh/bin:/Users/olleh/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜ ~ cat .bash_profile
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH=/usr/local/node/bin:$PATH
export MANPATH=/usr/local/node/share/man:$MANPATH
➜ ~ ls -l /usr/local/bin/subl
lrwxr-xr-x 1 root staff 62 Jul 13 09:51 /usr/local/bin/subl -> /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl
# Use vim keybindings in copy mode
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# Setup 'v' to begin selection as in Vim
# Update default binding of `Enter` to also use copy-pipe
PATH=$PATH:/usr/local/bin/; export PATH
答案 0 :(得分:12)
好吧我明白了。这是因为Tmux没有对文件系统的root访问权。
但是,您可以授予对Tmux https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard的访问权限。
以下是步骤。
安装此软件包。brew install reattach-to-user-namespace
将此添加到〜/ .tmux.conf set-option -g default-command "reattach-to-user-namespace -l zsh"
(根据您的shell更改zsh)
希望有所帮助。