Tmux displays “” in the status bar
I'm using iTerm 2 nightly and I have the following tmux config setting for the left status bar:
set -g status-left "#[fg=green]#h @ #[fg=cyan]#(extip | awk '{print "ip " $1}') #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print "en0 " $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print "vpn " $2}'"
Which is supposed to print my external IP, en0 and, if connected, my vpn connection. extip is my own tool that I wrote myself, but haven't touched in quite some time, and it works great from the command line (and I can see that it gets invoked and returns correctly when attaching a debugger to it). It all worked great until a couple of weeks ago, and since then it just displays <'extip | awk '{print "ip " $1}'' not ready> instead of my external IP address. The rest is still working perfectly without any issues. At first I thought it was just iTerm nightly being unstable, but a couple of updates have passed and it still doesn't work, so I'm feeling that maybe it wasn't supposed at all ever and just did by some kind of fluke? Can anyone give me some pointers with regards to why it may have stopped working and how I can get it to work again?
shell-script tmux iterm
add a comment |
I'm using iTerm 2 nightly and I have the following tmux config setting for the left status bar:
set -g status-left "#[fg=green]#h @ #[fg=cyan]#(extip | awk '{print "ip " $1}') #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print "en0 " $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print "vpn " $2}'"
Which is supposed to print my external IP, en0 and, if connected, my vpn connection. extip is my own tool that I wrote myself, but haven't touched in quite some time, and it works great from the command line (and I can see that it gets invoked and returns correctly when attaching a debugger to it). It all worked great until a couple of weeks ago, and since then it just displays <'extip | awk '{print "ip " $1}'' not ready> instead of my external IP address. The rest is still working perfectly without any issues. At first I thought it was just iTerm nightly being unstable, but a couple of updates have passed and it still doesn't work, so I'm feeling that maybe it wasn't supposed at all ever and just did by some kind of fluke? Can anyone give me some pointers with regards to why it may have stopped working and how I can get it to work again?
shell-script tmux iterm
I don't use any of that software, but my first guess would be that iTerm can't findextipin its PATH.
– Jeff Schaller
Jan 5 '16 at 2:19
@JeffSchaller it executes fine in iTerm2
– JustSid
Jan 5 '16 at 9:43
The few examples I've googled had absolute paths to the scripts. Does anything change if you do that?
– Jeff Schaller
Jan 5 '16 at 10:40
@JeffSchaller Doesn't change a thing, message is the same.
– JustSid
Jan 5 '16 at 14:05
ever figure this out @JustSid I'm seeing the same thing on ubuntu.
– thatmiddleway
Feb 6 '17 at 4:24
add a comment |
I'm using iTerm 2 nightly and I have the following tmux config setting for the left status bar:
set -g status-left "#[fg=green]#h @ #[fg=cyan]#(extip | awk '{print "ip " $1}') #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print "en0 " $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print "vpn " $2}'"
Which is supposed to print my external IP, en0 and, if connected, my vpn connection. extip is my own tool that I wrote myself, but haven't touched in quite some time, and it works great from the command line (and I can see that it gets invoked and returns correctly when attaching a debugger to it). It all worked great until a couple of weeks ago, and since then it just displays <'extip | awk '{print "ip " $1}'' not ready> instead of my external IP address. The rest is still working perfectly without any issues. At first I thought it was just iTerm nightly being unstable, but a couple of updates have passed and it still doesn't work, so I'm feeling that maybe it wasn't supposed at all ever and just did by some kind of fluke? Can anyone give me some pointers with regards to why it may have stopped working and how I can get it to work again?
shell-script tmux iterm
I'm using iTerm 2 nightly and I have the following tmux config setting for the left status bar:
set -g status-left "#[fg=green]#h @ #[fg=cyan]#(extip | awk '{print "ip " $1}') #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print "en0 " $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print "vpn " $2}'"
Which is supposed to print my external IP, en0 and, if connected, my vpn connection. extip is my own tool that I wrote myself, but haven't touched in quite some time, and it works great from the command line (and I can see that it gets invoked and returns correctly when attaching a debugger to it). It all worked great until a couple of weeks ago, and since then it just displays <'extip | awk '{print "ip " $1}'' not ready> instead of my external IP address. The rest is still working perfectly without any issues. At first I thought it was just iTerm nightly being unstable, but a couple of updates have passed and it still doesn't work, so I'm feeling that maybe it wasn't supposed at all ever and just did by some kind of fluke? Can anyone give me some pointers with regards to why it may have stopped working and how I can get it to work again?
shell-script tmux iterm
shell-script tmux iterm
edited Jan 4 '16 at 22:42
Thomas Dickey
52.5k596167
52.5k596167
asked Jan 4 '16 at 22:27
JustSidJustSid
1113
1113
I don't use any of that software, but my first guess would be that iTerm can't findextipin its PATH.
– Jeff Schaller
Jan 5 '16 at 2:19
@JeffSchaller it executes fine in iTerm2
– JustSid
Jan 5 '16 at 9:43
The few examples I've googled had absolute paths to the scripts. Does anything change if you do that?
– Jeff Schaller
Jan 5 '16 at 10:40
@JeffSchaller Doesn't change a thing, message is the same.
– JustSid
Jan 5 '16 at 14:05
ever figure this out @JustSid I'm seeing the same thing on ubuntu.
– thatmiddleway
Feb 6 '17 at 4:24
add a comment |
I don't use any of that software, but my first guess would be that iTerm can't findextipin its PATH.
– Jeff Schaller
Jan 5 '16 at 2:19
@JeffSchaller it executes fine in iTerm2
– JustSid
Jan 5 '16 at 9:43
The few examples I've googled had absolute paths to the scripts. Does anything change if you do that?
– Jeff Schaller
Jan 5 '16 at 10:40
@JeffSchaller Doesn't change a thing, message is the same.
– JustSid
Jan 5 '16 at 14:05
ever figure this out @JustSid I'm seeing the same thing on ubuntu.
– thatmiddleway
Feb 6 '17 at 4:24
I don't use any of that software, but my first guess would be that iTerm can't find
extip in its PATH.– Jeff Schaller
Jan 5 '16 at 2:19
I don't use any of that software, but my first guess would be that iTerm can't find
extip in its PATH.– Jeff Schaller
Jan 5 '16 at 2:19
@JeffSchaller it executes fine in iTerm2
– JustSid
Jan 5 '16 at 9:43
@JeffSchaller it executes fine in iTerm2
– JustSid
Jan 5 '16 at 9:43
The few examples I've googled had absolute paths to the scripts. Does anything change if you do that?
– Jeff Schaller
Jan 5 '16 at 10:40
The few examples I've googled had absolute paths to the scripts. Does anything change if you do that?
– Jeff Schaller
Jan 5 '16 at 10:40
@JeffSchaller Doesn't change a thing, message is the same.
– JustSid
Jan 5 '16 at 14:05
@JeffSchaller Doesn't change a thing, message is the same.
– JustSid
Jan 5 '16 at 14:05
ever figure this out @JustSid I'm seeing the same thing on ubuntu.
– thatmiddleway
Feb 6 '17 at 4:24
ever figure this out @JustSid I'm seeing the same thing on ubuntu.
– thatmiddleway
Feb 6 '17 at 4:24
add a comment |
2 Answers
2
active
oldest
votes
https://github.com/tmux/tmux/issues/733#issuecomment-277230881 mentions that
the not ready message is normal, tmux is telling you the command has
not finished running yet, it will display the output as soon as the
command finishes
I've been seeing this after upgrading from Ubuntu 16.04 to 16.10 with my script that shows the ssh server in window-status-format – it flashes by while connecting. In fact, I can reproduce it by just doing
tmux setw -g window-status-current-format '#(echo `tmux display-message -p "#W #{pane_pid}"`)'
and then ssh aslkfdsdkljfslkdsajf, it'll flash by while trying to connect.
I'm guessing extip takes a while to return a result; what happens if you replace it with a shell script that just does echo 1 or sleep 1; echo 1?
(Note also that tmux should cache any commands once they're executed at least once in that window/pane, but if the command itself changes – as in my example above – it won't use the cache. I've submitted a bug report about silencing the "not ready" command in such cases.)
add a comment |
I've tricked this in the past, by instantiating tmux with a rudimentary display-message command (e.g. "Welcome, $USER..."), which seems to gives it a second or so to run the external app for the first time.
Depends on your needs, of course. I start tmux in my profile script but, if you run tmux on demand, you may get away with an alias...
# /usr/bin/tmux -V
tumx 2.4
# /usr/bin/tmux new-session ; display-message "Welcome, $USER..."
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f253267%2ftmux-displays-xzy-not-ready-in-the-status-bar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
https://github.com/tmux/tmux/issues/733#issuecomment-277230881 mentions that
the not ready message is normal, tmux is telling you the command has
not finished running yet, it will display the output as soon as the
command finishes
I've been seeing this after upgrading from Ubuntu 16.04 to 16.10 with my script that shows the ssh server in window-status-format – it flashes by while connecting. In fact, I can reproduce it by just doing
tmux setw -g window-status-current-format '#(echo `tmux display-message -p "#W #{pane_pid}"`)'
and then ssh aslkfdsdkljfslkdsajf, it'll flash by while trying to connect.
I'm guessing extip takes a while to return a result; what happens if you replace it with a shell script that just does echo 1 or sleep 1; echo 1?
(Note also that tmux should cache any commands once they're executed at least once in that window/pane, but if the command itself changes – as in my example above – it won't use the cache. I've submitted a bug report about silencing the "not ready" command in such cases.)
add a comment |
https://github.com/tmux/tmux/issues/733#issuecomment-277230881 mentions that
the not ready message is normal, tmux is telling you the command has
not finished running yet, it will display the output as soon as the
command finishes
I've been seeing this after upgrading from Ubuntu 16.04 to 16.10 with my script that shows the ssh server in window-status-format – it flashes by while connecting. In fact, I can reproduce it by just doing
tmux setw -g window-status-current-format '#(echo `tmux display-message -p "#W #{pane_pid}"`)'
and then ssh aslkfdsdkljfslkdsajf, it'll flash by while trying to connect.
I'm guessing extip takes a while to return a result; what happens if you replace it with a shell script that just does echo 1 or sleep 1; echo 1?
(Note also that tmux should cache any commands once they're executed at least once in that window/pane, but if the command itself changes – as in my example above – it won't use the cache. I've submitted a bug report about silencing the "not ready" command in such cases.)
add a comment |
https://github.com/tmux/tmux/issues/733#issuecomment-277230881 mentions that
the not ready message is normal, tmux is telling you the command has
not finished running yet, it will display the output as soon as the
command finishes
I've been seeing this after upgrading from Ubuntu 16.04 to 16.10 with my script that shows the ssh server in window-status-format – it flashes by while connecting. In fact, I can reproduce it by just doing
tmux setw -g window-status-current-format '#(echo `tmux display-message -p "#W #{pane_pid}"`)'
and then ssh aslkfdsdkljfslkdsajf, it'll flash by while trying to connect.
I'm guessing extip takes a while to return a result; what happens if you replace it with a shell script that just does echo 1 or sleep 1; echo 1?
(Note also that tmux should cache any commands once they're executed at least once in that window/pane, but if the command itself changes – as in my example above – it won't use the cache. I've submitted a bug report about silencing the "not ready" command in such cases.)
https://github.com/tmux/tmux/issues/733#issuecomment-277230881 mentions that
the not ready message is normal, tmux is telling you the command has
not finished running yet, it will display the output as soon as the
command finishes
I've been seeing this after upgrading from Ubuntu 16.04 to 16.10 with my script that shows the ssh server in window-status-format – it flashes by while connecting. In fact, I can reproduce it by just doing
tmux setw -g window-status-current-format '#(echo `tmux display-message -p "#W #{pane_pid}"`)'
and then ssh aslkfdsdkljfslkdsajf, it'll flash by while trying to connect.
I'm guessing extip takes a while to return a result; what happens if you replace it with a shell script that just does echo 1 or sleep 1; echo 1?
(Note also that tmux should cache any commands once they're executed at least once in that window/pane, but if the command itself changes – as in my example above – it won't use the cache. I've submitted a bug report about silencing the "not ready" command in such cases.)
edited Feb 17 '17 at 10:13
answered Feb 17 '17 at 10:00
unhammerunhammer
17011
17011
add a comment |
add a comment |
I've tricked this in the past, by instantiating tmux with a rudimentary display-message command (e.g. "Welcome, $USER..."), which seems to gives it a second or so to run the external app for the first time.
Depends on your needs, of course. I start tmux in my profile script but, if you run tmux on demand, you may get away with an alias...
# /usr/bin/tmux -V
tumx 2.4
# /usr/bin/tmux new-session ; display-message "Welcome, $USER..."
add a comment |
I've tricked this in the past, by instantiating tmux with a rudimentary display-message command (e.g. "Welcome, $USER..."), which seems to gives it a second or so to run the external app for the first time.
Depends on your needs, of course. I start tmux in my profile script but, if you run tmux on demand, you may get away with an alias...
# /usr/bin/tmux -V
tumx 2.4
# /usr/bin/tmux new-session ; display-message "Welcome, $USER..."
add a comment |
I've tricked this in the past, by instantiating tmux with a rudimentary display-message command (e.g. "Welcome, $USER..."), which seems to gives it a second or so to run the external app for the first time.
Depends on your needs, of course. I start tmux in my profile script but, if you run tmux on demand, you may get away with an alias...
# /usr/bin/tmux -V
tumx 2.4
# /usr/bin/tmux new-session ; display-message "Welcome, $USER..."
I've tricked this in the past, by instantiating tmux with a rudimentary display-message command (e.g. "Welcome, $USER..."), which seems to gives it a second or so to run the external app for the first time.
Depends on your needs, of course. I start tmux in my profile script but, if you run tmux on demand, you may get away with an alias...
# /usr/bin/tmux -V
tumx 2.4
# /usr/bin/tmux new-session ; display-message "Welcome, $USER..."
answered 5 hours ago
jimbobmcgeejimbobmcgee
2271411
2271411
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f253267%2ftmux-displays-xzy-not-ready-in-the-status-bar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't use any of that software, but my first guess would be that iTerm can't find
extipin its PATH.– Jeff Schaller
Jan 5 '16 at 2:19
@JeffSchaller it executes fine in iTerm2
– JustSid
Jan 5 '16 at 9:43
The few examples I've googled had absolute paths to the scripts. Does anything change if you do that?
– Jeff Schaller
Jan 5 '16 at 10:40
@JeffSchaller Doesn't change a thing, message is the same.
– JustSid
Jan 5 '16 at 14:05
ever figure this out @JustSid I'm seeing the same thing on ubuntu.
– thatmiddleway
Feb 6 '17 at 4:24