Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error (harmless) when creating new panes. #47

Closed
amosbird opened this issue Jan 3, 2017 · 16 comments
Closed

Error (harmless) when creating new panes. #47

amosbird opened this issue Jan 3, 2017 · 16 comments

Comments

@amosbird
Copy link

amosbird commented Jan 3, 2017

The behavior (blinking) is shown in https://ptpb.pw/YSSL.webm

Error msg is

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

Yes this is a minor tmux annoyance imho. When a command is not ready, tmux displays a <'cmd' not ready> placeholder string.

This is going to be mitigated in tmux 2.4.

This is the first time I see it happening to systematically though. What's your value for status-interval?

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

status-interval = 1
Well, I'm using tmux 2.4

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

Does setting a higher status-interval mitigate the problem?

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

no, it has no effect on this issue.

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

I kinda expected this answer.

In fact, can you please try the gh-47 branch I just pushed?

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

I did. It doesn't work though.

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

What gh-47 does is removing leftover debug code that slowdowns the _username() function hence increasing the chances tmux reporting the command is not ready.

I'll try to find a way to factor out the ps calls inside _username() in hope I can optimize it.

In the meantime, can you please tell me more about your setup?

  • OS
  • shell
  • ~/.ssh/config peculiarities (like are you using multiplexing, etc...)
  • whatever you might find relevant

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

CentOS 6.8
Fish 2.4

No fancy stuff in other configurations.

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

And I forgot, what additions/customizations did you make to my conf?

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

modified   .tmux.conf
@@ -146,6 +146,14 @@ if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
 
 run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
 
+if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
+
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+set -g @continuum-restore 'on'
+
+run '~/.tmux/plugins/tpm/tpm'
 
 # ►_◄
 #

and here is my local conf

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

First remark: I believe you can put the tpm bits at the end of your ~/.tmux.conf.local copy. This way it's easier to keep up with upstream when I push changes to .tmux.conf

Then, you do

set -g status-interval 1     # redraw status line every 10 seconds

This refreshes status line every 1 second, not 10.

While harmless,

set -g default-command /usr/bin/fish
set -g default-shell /usr/bin/fish

look superfluous to me.

Anyways, I'll try to reproduce your problem in a Virtualbox VM. In the meantime, can you please give me the output of

$ tmux show -g status-left
$ tmux show -g status-right

I'm curious to see how tpm plugins changed it if they changed it.

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

let me quote what nicm (tmux maintainer) suggest,

20:36:42        nicm | it isn't an error, you have some huge big command in status-left or status-right and tmux is telling you it hasn't finished running yet so there is no output
20:37:17        nicm | you can either run master, where we use the command before substitution so lookup the output so it probably won't happen
20:37:43        nicm | or you can put your commands in a script so the actual command doesn't change when you switch pane

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

❯ tmux show -g status-left
status-left "#[fg=#000000,bg=#ffff00,bold] ❐ #S #[fg=#ffff00,bg=#5f5fff,none]#[fg=#e4e4e4,bg=#5f5fff,none] ↑#{?@uptime_d, #{@uptime_d}d,}#{?@uptime_h, #{@uptime_h}h,}#{?@uptime_m, #{@uptime_m}m,} #[fg=#5f5fff,bg=default,none] "

/
❯ tmux show -g status-right
status-right "#(/home/amos/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh)#(cut -c3- ~/.tmux.conf | sh -s _uptime)#(cut -c3- ~/.tmux.conf | sh -s _battery)#[fg=#080808,bg=default,none]#[fg=#8a8a8a,bg=#080808,bold]#{?pane_synchronized, SYNC,} #[fg=#8a8a8a,bg=#080808,bold]| #[fg=none]#[bg=none]#[none]#{?client_prefix,⌨,}#[fg=none]#[bg=none]#[none]#{?session_many_attached,👓,}#{?@battery_status, #{@battery_status},}#{?@battery_bar, #{@battery_bar},}#{?@battery_percentage, #{@battery_percentage},} #[fg=#8a8a8a,bg=#080808,bold]| %R #[fg=#8a8a8a,bg=#080808,bold]| %d %b #[fg=#d70000,bg=#080808,none]#[fg=#e4e4e4,bg=#d70000,none] #(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)#[fg=none]#[bg=none]#[bold,blink]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} #D)#[default]#[fg=#e4e4e4,bg=#d70000,none] #[fg=#e4e4e4,bg=#d70000,none]#[fg=#000000,bg=#e4e4e4,none] #(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D) "

@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

I already discussed this annoyance with him. And upcoming tmux 2.4 should mitigate it. This has been applied in commit tmux/tmux@3cf19d6

@amosbird
Copy link
Author

amosbird commented Jan 3, 2017

@gpakosz ah, after upgrading to the newest commit, this issue is gone. Thanks!

@amosbird amosbird closed this as completed Jan 3, 2017
@gpakosz
Copy link
Owner

gpakosz commented Jan 3, 2017

Good to know!

I'll merge gh-47 into master nonetheless. Happy tmuxing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants