.tmux: `cut -c3- ~/.tmux.conf | sh -s _apply_configuration` returned X

Created on 26 Aug 2019  Â·  8Comments  Â·  Source: gpakosz/.tmux

In relation to #149, #201, #238 and #256, and due to this happening for both me and a colleague, running .tmux.conf failed for the following line:

cut -c3- ~/.tmux.conf | sh -s _apply_configuration

I think it's related to what default shell is set - mine was set to bash, and it was stubborn even after a reboot (even after chsh - go figure!). Changing the line to the following worked for me (note sh changed to zsh) (EDIT: don't do this, read @gpakosz's commentary below re branch gh-254):

cut -c3- ~/.tmux.conf | zsh -s _apply_configuration

Would this be worth a pull request? Or does this change have some side effects? There are other | sh -c lines that might also benefit from being changed to | zsh -c, although I haven't tested.

bug duplicate

Most helpful comment

Alright, please try out the gh-254 branch that solves #254.

I'll do my best to merge what's currently in flight soon.

All 8 comments

Hello 👋

No, cut -c3- ~/.tmux.conf | zsh -s _apply_configuration would make this configuration depend on zsh which is not needed and likely not the proper way to solve whatever is happening.

Can you please run

$ cut -c3- ~/.tmux.conf | sh -sx _apply_configuration > /tmp/log.txt 2>&1

And upload the result?

@gpakosz You are right, of course zsh would be an extra dep - my bad!

Here's some visuals too, the before (including a manually run cut -c3- ~/.tmux.conf | sh -s _apply_configuration command):

sh-apply-config-before

and after running the zsh-ified command (cut -c3- ~/.tmux.conf | zsh -s _apply_configuration):

sh-apply-config-after

Forgot to also include the /tmp/log.txt, from running cut -c3- ~/.tmux.conf | sh -sx _apply_configuration > /tmp/log.txt 2>&1

Alright, please try out the gh-254 branch that solves #254.

I'll do my best to merge what's currently in flight soon.

Thank you! Consider this issue solved for me when using branch gh-254 - thanks for the incredibly fast responses too, you are a true open source hero :)

@gpakosz has the gh-254 branch been deleted? I still have this issue

@nivv The gh-254 branch has been merged. Just use most recent master branch

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bubble-joe picture bubble-joe  Â·  4Comments

sixtyfive picture sixtyfive  Â·  3Comments

fwarmuth picture fwarmuth  Â·  5Comments

MadaraUchiha picture MadaraUchiha  Â·  6Comments

haggen picture haggen  Â·  6Comments