使用tmux - pwd的“错误的文件描述符”不起作用

问题描述 投票:1回答:1

知道下面可能导致此错误的原因吗?

谷歌没有帮助。

如果我不在tmux,一切都很好。

Tmux版本是1.9a。

>pwd
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
-bash: 7: Bad file descriptor
>ls
-bash: 7: Bad file descriptor
>pwd
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
-bash: 7: Bad file descriptor
>cd
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
-bash: 7: Bad file descriptor
>pwd
/home/joco
-bash: 7: Bad file descriptor
>ls

我的tmux conf是:

>cat ~/.tmux.conf
set -g prefix C-b
set -sg escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind \ split-window -h
bind - split-window -v

bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

set-option -g repeat-time 400

set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on

set -g xterm-keys on
set -g default-terminal "xterm-256color"

bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1

set -g mode-mouse on

setw -g mode-keys vi

bind e display "#{pane_current_path}"
set -g display-panes-time 2000
set-option -g display-time 4000
#bind-key -tvi-copy y copy-pipe "~/bin/pbcopy"

#set -g default-terminal "screen-256color"
bind -t vi-copy y copy-pipe 'pbcopy-remote'
bind C-c run "tmux save-buffer - | pbcopy-remote"

#### COLOUR (Solarized 256)

# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default

# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim

set-window-option -g xterm-keys on

# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright

# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01

# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange

# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange

# clock
set-window-option -g clock-mode-colour colour64 #green

# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red

set-window-option -g xterm-keys on

set -g status-right "#(date)"

# List of plugins
#set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'


# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
set -g @plugin 'seebi/tmux-colors-solarized'

set -g @colors-solarized 'light'
#set -g @colors-solarized '256'
#set -g @colors-solarized 'dark'

编辑:

在开始一个新的tmux(由Robert推荐)之后,我得到:

.bash_profile is called
-bash: 7: Bad file descriptor
>pwd
/home/joco
-bash: 7: Bad file descriptor
>pwd
/home/joco
-bash: 7: Bad file descriptor
>cd
-bash: 7: Bad file descriptor
>
tmux file-descriptor
1个回答
0
投票

我遇到了与GNU screen相同的问题:-bash: 7: Bad file descriptor

问题是我从Midnight Commander的子壳开始屏幕。在开始使用午夜指挥官之前,screen修复了它。

© www.soinside.com 2019 - 2024. All rights reserved.