tmux-plugins / tpm

Tmux Plugin Manager
MIT License
12.21k stars 429 forks source link

tpm script completely stopped working #95

Closed nwaywood closed 7 years ago

nwaywood commented 7 years ago

When I run tmux source ~/.tmux.conf I get the following output:

'~/.tmux/plugins/tpm/tpm' terminated by signal 5

I have rm -rf ~/.tmux and set up tpm from scratch and I still have the same issue.

Here is my tmux conf:

# General
# =======

set -g default-command "reattach-to-user-namespace -l zsh"

# tmux display things in 256 colors
set -g default-terminal "screen-256color"

# automatically renumber tmux windows
set -g renumber-windows on

# remap prefix to control - a
unbind C-b
set -g prefix C-a
bind C-a send-prefix

# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on

# use vim shortcuts
setw -g mode-keys vi
set-option -g status-keys vi

# Index start for panes and windows
set -g base-index 1
set -g pane-base-index 1

# Mouse support for pane/window switching
# NOTE: This breaks selectiong/copying text on OSX
# To select text as expected, hold Option to disable it (iTerm2)
setw -g mouse on

# Keybinds
# ========

# Reload config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"

# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

# vim style pane movements
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

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

# disable close window/pane confirmations
bind-key & kill-window
bind-key x kill-pane

# Fix window names 
# http://stackoverflow.com/questions/6041178/keep-the-windows-name-fixed-in-tmux
set-option -g allow-rename off

# Send the same command to all panes/windows/sessions
# http://kaushalmodi.github.io/2014/03/06/send-a-command-to-every-pane-slash-window-slash-session-in-tmux/
# run 'source ~/.zshrc' to apply shell changes to all tmux sessions/windows/panes
bind E command-prompt -p "Command:" \
          "run \"tmux list-sessions                  -F '##{session_name}'        | xargs -I SESS \
                 tmux list-windows  -t SESS          -F 'SESS:##{window_index}'   | xargs -I SESS_WIN \
                 tmux list-panes    -t SESS_WIN      -F 'SESS_WIN.##{pane_index}' | xargs -I SESS_WIN_PANE \
                 tmux send-keys     -t SESS_WIN_PANE '%1' Enter\""

### Theme
# =======

source ~/.dotfiles/tmux/theme.sh

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

#set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @resurrect-capture-pane-contents 'on'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
nwaywood commented 7 years ago

Update: I just updated to MacOS Sierra and now I get the following output

'~/.tmux/plugins/tpm/tpm' terminated by signal 6

It's terminated by signal 6 now instead of signal 5

Graham42 commented 7 years ago

This is working for me. I tried your config except for a couple lines, I don't have zsh installed, so I commented out

set -g default-command "reattach-to-user-namespace -l zsh"

and because I don't have your theme, I commented out

source ~/.dotfiles/tmux/theme.sh

Can you try an older version of tpm to try and narrow down what change causes this?

martinbeentjes commented 7 years ago

Reading online shows me that signal 5 possibly is a trace/breakpoint trap. Signal 6 should be an abort signal. Just as @Graham42 said, try to narrow down the change which causes this issue.

Maybe, check if combinations of zsh (or maybe even your OS) together with your tmux version + configuration causes this issue.

nwaywood commented 7 years ago

Ok thanks for the feedback, I'll try reverting to older versions of tpm until it starts working again. I'm going on holiday tomorrow though so it will be a while until I will have time to do this

wongjustin99 commented 7 years ago

I'm also having this same issue with a similar config file. I'm on El Capitan, and get signal 5. I also have a similar line: #set-option -g default-command "* > /dev/null 2>&1; reattach-to-user-namespace -l zsh".

Changing it to set -g default-command "reattach-to-user-namespace -l zsh" and outright removing it didn't help.

Using tmux 2.1, and I think it broke on an upgrade.

Edit: running ./tpm from zsh gets me this error:

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/bash Reason: image not found

Edit2: Turns out bash was not updated after a brew update. Running brew upgrade bash fixed my issue.

cweill commented 7 years ago

Upgrading bash fixed the '~/.tmux/plugins/tpm/tpm' terminated by signal 6 error for me even though I use zsh: https://github.com/Homebrew/homebrew-core/issues/5799

nwaywood commented 7 years ago

Updating bash fixed the issue for me to 👍