.tmux: Error applying plugins

Getting this error when trying to start a session:

'cut -c3- ~/.tmux.conf | sh -s __apply_plugins "" "true" "true" "true"' returned 1

OS: centos-release-7-9.2009.1.el7.centos.x86_64 tmux version: tmux 3.2a (installed from source)

.tmux.conf.local

# in copy mode, copying selection also copies to the OS clipboard
#   - true
#   - false (default)
# on macOS, this requires installing reattach-to-user-namespace, see README.md
# on Linux, this requires xsel or xclip
tmux_conf_copy_to_os_clipboard=true


# -- user customizations -------------------------------------------------------
# this is the place to override or undo settings

# increase history size
set -g history-limit 20000

# start with mouse mode enabled
set -g mouse on

# force Vi mode
#   really you should export VISUAL or EDITOR environment variable, see manual
#set -g status-keys vi
#set -g mode-keys vi

# replace C-b by C-a instead of using both prefixes
# set -gu prefix2
# unbind C-a
# unbind C-b
# set -g prefix C-a
# bind C-a send-prefix

# move status line to bottom
set -g status-position bottom

# set status interval
set -g status-interval 5
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
set -g @scroll-without-changing-pane "on"
set -g @scroll-speed-num-lines-per-scroll "1"
set -g @plugin 'tmux-plugins/tmux-sensible'

# install plugins
#set -g @plugin 'MunifTanjim/tmux-suspend'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
set -g @plugin 'tmux-plugins/tmux-online-status'

# online and offline icon for tmux-online-status
set -g @online_icon "#[fg=#5fff00]●#[default]"
set -g @offline_icon "#[fg=#d70000]●#[default]"

# custom sysstats
#set -g @sysstat_cpu_view_tmpl '#[fg=#{cpu.color3}]CPU:#[default] #[fg=#{cpu.color},bg=#{cpu.color2}]#{cpu.pused}#[default]'
#set -g @sysstat_mem_view_tmpl '#[fg=#{mem.color3},bg=#{mem.color2}]Mem Used #[fg=#{mem.color}]#{mem.used}#[default] out of #{mem.total}'
#set -g @sysstat_swap_view_tmpl 'SWP Used #[fg=#{swap.color}]#{swap.used}#[default] out of #{swap.total}'

#set -g @sysstat_cpu_color_low "$color_level_ok default default"
#set -g @sysstat_cpu_color_medium "$color_level_warn default default"
#set -g @sysstat_cpu_color_stress "white,bold $color_level_stress $color_level_stress"
#set -g @sysstat_mem_color_low "$color_level_ok default default"
#set -g @sysstat_mem_color_medium "$color_level_warn default default"
#set -g @sysstat_mem_color_stress "white,bold $color_level_stress $color_level_stress"

# Configure view templates for tmux-plugin-sysstat "MEM" and "CPU" widget
set -g @sysstat_mem_view_tmpl '#[default]MEM:#[fg=#{mem.color}]#{mem.pused}#[default] #[fg=#{mem.color}]#{mem.used}#[default] out of #{mem.total}'
set -g @sysstat_swap_view_tmpl '#[default]SWP:#[fg=#{swap.color}]#{swap.pused}#[default] #[fg=#{swap.color}]#{swap.used}#[default] out of #{swap.total}'

# Configure colors for tmux-plugin-sysstat "MEM" and "CPU" widget
set -g @sysstat_cpu_color_low "$color_level_ok"
set -g @sysstat_cpu_color_medium "$color_level_warn"
set -g @sysstat_cpu_color_stress "$color_level_stress"

set -g @sysstat_mem_color_low "$color_level_ok"
set -g @sysstat_mem_color_medium "$color_level_warn"
set -g @sysstat_mem_color_stress "$color_level_stress"

set -g @sysstat_swap_color_low "$color_level_ok"
set -g @sysstat_swap_color_medium "$color_level_warn"
set -g @sysstat_swap_color_stress "$color_level_stress"

#wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]"
#set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host"

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Yes on CentOS 7 the version of Git must be too old

I found the problem.

I patch tpm itself by replacing some of the git commands it launches.

In .tmux.conf, please change

#       if [ x"$install_tpm" = x"true" ] || [ x"$update_tpm" = x"true" ]; then
#         perl -0777 -p -i -e 's/git clone/git clone --depth 1 --shallow-submodules/g
#                             ;s/(install_plugin "\$plugin")\n(\s+)done/\1&\n\2done\n\2wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh"&
#         perl -p -i -e 's/git submodule update --init --recursive/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh"&
#         wait
#         tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH"
#       fi

to

#       if [ x"$install_tpm" = x"true" ] || [ x"$update_tpm" = x"true" ]; then
#         perl -0777 -p -i -e 's/git clone/git clone --depth 1 /g
#                             ;s/(install_plugin "\$plugin")\n(\s+)done/\1&\n\2done\n\2wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh"&
#         perl -p -i -e 's/git submodule update --init --recursive/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh"&
#         wait
#         tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH"
#       fi

to remove the --shallow-submodules addition until I provide a proper fix