tundle
tundle copied to clipboard
/tmp/tundle-init-environment:17: usage: set-option
Using Tundle with my tmux (1.9) through zsh. When starting a tmux session, this is the message I get:
/tmp/tundle-init-environment:17: usage: set-option [-agosquw] [-t target-session|target-window] option [value]
I suspect the issue lies in here ~/.tmux/plugins/tundle/tundle with the following script
#source tmux variables so tundle can be located at any place in ~/.tmux.conf
_reload_tmux_environment(){
awk "/^[ \t]*set/" ~/.tmux.conf > /tmp/tundle-init-environment &&
tmux source-file /tmp/tundle-init-environment >/dev/null 2>&1
I'm not sure how to correct this myself, but I suspect I'm probably right on where the issue is.
Hello,
Thank you for reporting the issue, could you give me more details about your environment?, which distro do you use?, which version of zsh?, what steps do you follow to install tundle?, what is in your tmux.conf file? I will try to replicate the error and will go back to you as soon as I get a fix
macOS 10.12.6 zsh 5.0.7 (x86_64-unknown-freebsd10.1) This environment isn't running directly off the mac, it's a server I am SSH into.
How I installed git clone --depth=1 https://github.com/javier-lopez/tundle ~/.tmux/plugins/tundle
send-prefix I
Received no errors while installing it.
In my tmux.conf
#Plugin Manager run-shell "~/.tmux/plugins/tundle/tundle"
#let tmux manage tundle, required! set -g @bundle 'javier-lopez/tundle'
I also ran tmux source ~/.tmux.conf and found this
'~/.tmux/plugins/tundle/tundle' returned 127
Decided to try my hand at the section I thought was the issue in my tmux.conf. I don't get that message anymore AND my plugins are definitely working.
Before
#source tmux variables so tundle can be located at any place in ~/.tmux.conf
_reload_tmux_environment(){
awk "/^[ \t]*set/" ~/.tmux.conf > /tmp/tundle-init-environment &&
tmux source-file /tmp/tundle-init-environment >/dev/null 2>&1
After
#source tmux variables so tundle can be located at any place in ~/.tmux.conf
_reload_tmux_environment(){
awk "set -g @bundle 'javier-lopez/tundle'" ~/.tmux.conf > /tmp/tundle-init-environment &&
tmux source-file /tmp/tundle-init-environment >/dev/null 2>&1
There's probably a better way of doing this with less characters, but I'm not much of a programmer/scripter so I don't know yet without toying with it.
I'm still left with this though
'~/.tmux/plugins/tundle/tundle' returned 127
Hello @rewalker3 ,
Sorry for the late reply, unfortunately I was unable to replicate your issue on FreeBSD freebsd-10.1, could you add the following at the beginning of the ~/.tmux/plugins/tundle/tundle file?:
#!/bin/sh
set -x
logfile="tundle-$$.log"
exec > ~/$logfile 2>&1
And retry running: tmux source ~/.tmux.conf ?, the above will generate a tundle log on your home with debugging information, please share such file here.
Also, the 127 status code usually refer to a non found file, if you included tmux-plugins, such as:
setenv -g @bundle "tmux-plugins/tmux-resurrect"
Be aware that such plugins require bash/env, in such cases a 127 code could be generated if you don't have either /usr/bin/env or /usr/bin/bash , on FreeBSD I was able to replicate the 127 error when using tmux-plugins
Keep in mind that https://github.com/javier-lopez/tundle-plugins doesn't have such requirements and provide the same features.
For the first issue, could you revert your changes and send the generated /tmp/tundle-init-environment file?, it could be related to a specific awk limitation, however I was unable to replicate it on FreeBSD 10.1 =/
awk --version
awk version 20121220 (FreeBSD)
Here is how it looks on my local FreeBSD machine:
cat /tmp/tundle-init-environment
setenv -g @bundle "javier-lopez/tundle" #set -g can be used if tmux >= 1.8
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-sensible"
setenv -g @bundle "tmux-plugins/tmux-pain-control"
setenv -g @pane_resize "10"
setenv -g @PLUGIN "github:javier-lopez/tundle-plugins/tmux-copycat:master"
setenv -g @bundle "tmux-plugins/tmux-resurrect"
% awk --version awk version 20121220 (FreeBSD)
I reverted the change in the tundle file, removed all plugins and added them from the tundle plugins page, then did the logfile bit.
After running tmux source ~/.tmux.conf I get this
'~/.tmux/plugins/tundle/tundle' returned 1
Also, my original error message comes back when I quit and restarted tmux
/tmp/tundle-init-environment:16: usage: set-option [-agosquw] [-t target-session|target-window] option [value]
updated log file
+ cd /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle
+ pwd
+ CURRENT_DIR=/home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle
+ . /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/scripts/vars.sh
+ SUPPORTED_TMUX_VERSION=1.6
+ DEFAULT_TMUX_PLUGIN_MANAGER_PATH=/home/clmbs-dev1/a/rwalker/.tmux/plugins/
+ INSTALL_KEY_OPTION=@tundle-install
+ DEFAULT_INSTALL_KEY=I
+ UPDATE_KEY_OPTION=@tundle-update
+ DEFAULT_UPDATE_KEY=U
+ CLEAN_KEY_OPTION=@tundle-clean
+ DEFAULT_CLEAN_KEY=M-u
+ LIST_KEY_OPTION=@tundle-list
+ DEFAULT_LIST_KEY=M-l
+ . /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/scripts/helpers.sh
+ _supported_tmux_version_helper
+ _get_digits_from_string_helper 1.6
+ [ -n 1.6 ]
+ printf '%s\n' 1.6
+ tr -dC 0123456789
+ _stversion__supported=16
+ [ -z '' ]
+ tmux -V
+ _get_digits_from_string_helper 'tmux 1.9a'
+ [ -n 'tmux 1.9a' ]
+ printf '%s\n' 'tmux 1.9a'
+ tr -dC 0123456789
+ TMUX_VERSION=19
+ export TMUX_VERSION
+ tmux set-environment -g TMUX_VERSION 19
+ [ 19 -lt 16 ]
+ return 0
+ _reload_tmux_environment
+ awk '/^[ \t]*set/' /home/clmbs-dev1/a/rwalker/.tmux.conf
+ tmux source-file /tmp/tundle-init-environment
+ _set_default_key_bindings
+ _get_tmux_option_global_helper @tundle-install I
+ [ -z @tundle-install ]
+ _get_tmux_environment_helper @tundle-install
+ [ -z @tundle-install ]
+ tmux show-environment -g
+ awk -F= '/^@tundle-install=/ {print $2}'
+ _gtehelper__value=''
+ [ -z '' ]
+ [ -z '' ]
+ return 1
+ _gtoghelper__option=''
+ [ -z '' ]
+ _get_tmux_option_helper @tundle-install I
+ [ -z @tundle-install ]
+ [ 19 -ge 18 ]
+ tmux show-option -gqv @tundle-install
+ _gtohelper__value=''
+ [ -z '' ]
+ [ -z I ]
+ printf '%s\n' I
+ _sdkbindings__install_key=I
+ tmux bind-key I run-shell /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/scripts/install_plugins.sh
+ _get_tmux_option_global_helper @tundle-update U
+ [ -z @tundle-update ]
+ _get_tmux_environment_helper @tundle-update
+ [ -z @tundle-update ]
+ tmux show-environment -g
+ awk -F= '/^@tundle-update=/ {print $2}'
+ _gtehelper__value=''
+ [ -z '' ]
+ [ -z '' ]
+ return 1
+ _gtoghelper__option=''
+ [ -z '' ]
+ _get_tmux_option_helper @tundle-update U
+ [ -z @tundle-update ]
+ [ 19 -ge 18 ]
+ tmux show-option -gqv @tundle-update
+ _gtohelper__value=''
+ [ -z '' ]
+ [ -z U ]
+ printf '%s\n' U
+ _sdkbindings__update_key=U
+ tmux bind-key U run-shell /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/scripts/update_plugins_prompt.sh
+ _get_tmux_option_global_helper @tundle-clean M-u
+ [ -z @tundle-clean ]
+ _get_tmux_environment_helper @tundle-clean
+ [ -z @tundle-clean ]
+ tmux show-environment -g
+ awk -F= '/^@tundle-clean=/ {print $2}'
+ _gtehelper__value=''
+ [ -z '' ]
+ [ -z '' ]
+ return 1
+ _gtoghelper__option=''
+ [ -z '' ]
+ _get_tmux_option_helper @tundle-clean M-u
+ [ -z @tundle-clean ]
+ [ 19 -ge 18 ]
+ tmux show-option -gqv @tundle-clean
+ _gtohelper__value=''
+ [ -z '' ]
+ [ -z M-u ]
+ printf '%s\n' M-u
+ _sdkbindings__clean_key=M-u
+ tmux bind-key M-u run-shell /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/scripts/clean_plugins.sh
+ _get_tmux_option_global_helper @tundle-list M-l
+ [ -z @tundle-list ]
+ _get_tmux_environment_helper @tundle-list
+ [ -z @tundle-list ]
+ tmux show-environment -g
+ awk -F= '/^@tundle-list=/ {print $2}'
+ _gtehelper__value=''
+ [ -z '' ]
+ [ -z '' ]
+ return 1
+ _gtoghelper__option=''
+ [ -z '' ]
+ _get_tmux_option_helper @tundle-list M-l
+ [ -z @tundle-list ]
+ [ 19 -ge 18 ]
+ tmux show-option -gqv @tundle-list
+ _gtohelper__value=''
+ [ -z '' ]
+ [ -z M-l ]
+ printf '%s\n' M-l
+ _sdkbindings__list_key=M-l
+ tmux bind-key M-l run-shell /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/scripts/list_plugins.sh
+ _source_plugins
+ _set_default_vars_helper
+ [ -z '' ]
+ _get_tmux_environment_helper TMUX_PLUGIN_MANAGER_PATH
+ [ -z TMUX_PLUGIN_MANAGER_PATH ]
+ tmux show-environment -g
+ awk -F= '/^TMUX_PLUGIN_MANAGER_PATH=/ {print $2}'
+ _gtehelper__value=''
+ [ -z '' ]
+ [ -z '' ]
+ return 1
+ TMUX_PLUGIN_MANAGER_PATH=''
+ [ -z '' ]
+ tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH /home/clmbs-dev1/a/rwalker/.tmux/plugins
+ TMUX_PLUGIN_MANAGER_PATH=/home/clmbs-dev1/a/rwalker/.tmux/plugins/
+ printf '%s\n' /home/clmbs-dev1/a/rwalker/.tmux/plugins/
+ sed 's:$HOME:/home/clmbs-dev1/a/rwalker:g;s:~/:/home/clmbs-dev1/a/rwalker/:;s:"::g;s:\'\''::g;'
+ TMUX_PLUGIN_MANAGER_PATH=/home/clmbs-dev1/a/rwalker/.tmux/plugins/
+ TMUX_PLUGIN_MANAGER_PATH=/home/clmbs-dev1/a/rwalker/.tmux/plugins
+ export TMUX_PLUGIN_MANAGER_PATH
+ _get_plugins_list_helper
+ cat /etc/tmux.conf /home/clmbs-dev1/a/rwalker/.tmux.conf
+ awk '/(set|setenv|set-environment).*-g.*@([bB][uU][nN][dD][lL][eE]|[pP][lL][uU][gG][iI][nN])/{if($1!~"^#"){gsub(/'\''/,"");gsub(/"/,"");print $4}}'
+ _gplhelper__list='javier-lopez/tundle
javier-lopez/tundle-plugins/tmux-continuum
javier-lopez/tundle-plugins/tmux-copycat
javier-lopez/tundle-plugins/tmux-resurrect
javier-lopez/tundle-plugins/tmux-sessionist
javier-lopez/tundle-plugins/tmux-yank'
+ [ -z 'javier-lopez/tundle
javier-lopez/tundle-plugins/tmux-continuum
javier-lopez/tundle-plugins/tmux-copycat
javier-lopez/tundle-plugins/tmux-resurrect
javier-lopez/tundle-plugins/tmux-sessionist
javier-lopez/tundle-plugins/tmux-yank' ]
+ [ -z 'javier-lopez/tundle
javier-lopez/tundle-plugins/tmux-continuum
javier-lopez/tundle-plugins/tmux-copycat
javier-lopez/tundle-plugins/tmux-resurrect
javier-lopez/tundle-plugins/tmux-sessionist
javier-lopez/tundle-plugins/tmux-yank' ]
+ [ -z 'javier-lopez/tundle
javier-lopez/tundle-plugins/tmux-continuum
javier-lopez/tundle-plugins/tmux-copycat
javier-lopez/tundle-plugins/tmux-resurrect
javier-lopez/tundle-plugins/tmux-sessionist
javier-lopez/tundle-plugins/tmux-yank' ]
+ printf '%s\n' 'javier-lopez/tundle
javier-lopez/tundle-plugins/tmux-continuum
javier-lopez/tundle-plugins/tmux-copycat
javier-lopez/tundle-plugins/tmux-resurrect
javier-lopez/tundle-plugins/tmux-sessionist
javier-lopez/tundle-plugins/tmux-yank'
+ _get_plugin_name_helper javier-lopez/tundle
+ [ -z javier-lopez/tundle ]
+ _gpnhelper__basename=tundle
+ _gpnhelper__name=tundle
+ printf '%s\n' tundle
+ _splugins__plugin_name=tundle
+ [ -d /home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/tundle/ ]
+ [ -f '/home/clmbs-dev1/a/rwalker/.tmux/plugins/tundle/*.tmux' ]
+ continue
+ _get_plugin_name_helper javier-lopez/tundle-plugins/tmux-continuum
+ [ -z javier-lopez/tundle-plugins/tmux-continuum ]
+ _gpnhelper__basename=tmux-continuum
+ _gpnhelper__name=tmux-continuum
+ printf '%s\n' tmux-continuum
+ _splugins__plugin_name=tmux-continuum
+ [ -d /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-continuum/tmux-continuum/ ]
+ _splugins__plugin_name=tmux-continuum/tmux-continuum
+ [ -f /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-continuum/tmux-continuum/continuum.tmux ]
+ /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-continuum/tmux-continuum/continuum.tmux
+ _get_plugin_name_helper javier-lopez/tundle-plugins/tmux-copycat
+ [ -z javier-lopez/tundle-plugins/tmux-copycat ]
+ _gpnhelper__basename=tmux-copycat
+ _gpnhelper__name=tmux-copycat
+ printf '%s\n' tmux-copycat
+ _splugins__plugin_name=tmux-copycat
+ [ -d /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-copycat/tmux-copycat/ ]
+ _splugins__plugin_name=tmux-copycat/tmux-copycat
+ [ -f /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-copycat/tmux-copycat/copycat.tmux ]
+ /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-copycat/tmux-copycat/copycat.tmux
+ _get_plugin_name_helper javier-lopez/tundle-plugins/tmux-resurrect
+ [ -z javier-lopez/tundle-plugins/tmux-resurrect ]
+ _gpnhelper__basename=tmux-resurrect
+ _gpnhelper__name=tmux-resurrect
+ printf '%s\n' tmux-resurrect
+ _splugins__plugin_name=tmux-resurrect
+ [ -d /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-resurrect/tmux-resurrect/ ]
+ _splugins__plugin_name=tmux-resurrect/tmux-resurrect
+ [ -f /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-resurrect/tmux-resurrect/resurrect.tmux ]
+ /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-resurrect/tmux-resurrect/resurrect.tmux
+ _get_plugin_name_helper javier-lopez/tundle-plugins/tmux-sessionist
+ [ -z javier-lopez/tundle-plugins/tmux-sessionist ]
+ _gpnhelper__basename=tmux-sessionist
+ _gpnhelper__name=tmux-sessionist
+ printf '%s\n' tmux-sessionist
+ _splugins__plugin_name=tmux-sessionist
+ [ -d /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-sessionist/tmux-sessionist/ ]
+ _splugins__plugin_name=tmux-sessionist/tmux-sessionist
+ [ -f /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-sessionist/tmux-sessionist/sessionist.tmux ]
+ /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-sessionist/tmux-sessionist/sessionist.tmux
+ _get_plugin_name_helper javier-lopez/tundle-plugins/tmux-yank
+ [ -z javier-lopez/tundle-plugins/tmux-yank ]
+ _gpnhelper__basename=tmux-yank
+ _gpnhelper__name=tmux-yank
+ printf '%s\n' tmux-yank
+ _splugins__plugin_name=tmux-yank
+ [ -d /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-yank/tmux-yank/ ]
+ _splugins__plugin_name=tmux-yank/tmux-yank
+ [ -f /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-yank/tmux-yank/yank.tmux ]
+ /home/clmbs-dev1/a/rwalker/.tmux/plugins/tmux-yank/tmux-yank/yank.tmux
Hello,
Unfortunately I was still unable to replicate the issue, on FreeBSD 10.1-RELEASE #0 r274401 with the following ~/.tmux.conf file
run-shell "~/.tmux/plugins/tundle/tundle"
#let tundle manage tundle, required!
setenv -g @bundle "javier-lopez/tundle" #set -g can be used if tmux >= 1.8
#from GitHub, tundle-plugins
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-continuum"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-copycat"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-resurrect"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-sessionist"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-yank"
setenv -g @verbose 'y'
Tundle generates the following correct /tmp/tundle-init-environment output:
setenv -g @bundle "javier-lopez/tundle" #set -g can be used if tmux >= 1.8
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-continuum"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-copycat"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-resurrect"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-sessionist"
setenv -g @BUNDLE "gh:javier-lopez/tundle-plugins/tmux-yank"
setenv -g @verbose 'y'
With awk --version: awk version 20121220 (FreeBSD), also, it seems that FreeBSD 10.1-RELEASE #0 r274401 installs tmux -V: tmux 2.6 which is different from your reported version (1.9a).
I'm leaving this report open in case there exists additional information which allows me to replicate the problem.
Thanks for checking further into it. As far as I can tell, the change I made previously seems to fix my main issue. I've been using my tmux this way since I discovered it and haven't had any problems with tundle or the plugins.
Before #source tmux variables so tundle can be located at any place in ~/.tmux.conf _reload_tmux_environment(){ awk "/^[ \t]*set/" ~/.tmux.conf > /tmp/tundle-init-environment && tmux source-file /tmp/tundle-init-environment >/dev/null 2>&1
After #source tmux variables so tundle can be located at any place in ~/.tmux.conf _reload_tmux_environment(){ awk "set -g @bundle 'javier-lopez/tundle'" ~/.tmux.conf > /tmp/tundle-init-environment && tmux source-file /tmp/tundle-init-environment >/dev/null 2>&1
@rewalker3 Let's take a step back - post the content of your ~/.tmux.conf and use markdown, please :^)
I don't want to pursue this further. The issue isn't in my .tmux.conf, it was in the tundle file.