.tmux: hostname_ssh not displaying in status bar

Hello I’m trying to get the hostname_ssh variable to work. I’m assuming this means if I have my local system, called localsystem and I ssh into a remote system of jumpbox, it would display jumpbox in the bottom right hand corner when i’m ssh’d in, but localsystem when I am not.

I currently can get localsystem to display. However, when I ssh into the jumpbox, the display remains blank. I’ve tried this with both #{hostname_ssh} variables by itself, as well as the conditional variable I have set below.

Apologies if this is a rudimentary question, but it’s been something I’ve tried digging into for a few hours but can’t find clear guidance.

I’m also using zsh and oh-my-zsh.

tmux_conf_theme_status_right="#{prefix}#{pairing}#{synchronized} ,tun0:#(ip addr show dev tun0 | grep 'inet[^6]' | awk '{print $2}' | cut -d/ -f1),eth:#(ip addr show dev enx24f5a28cd271 | grep 'inet[^6]' | awk '{print $2}' | cut -d/ -f1), %b %d,%R | #{?my_hostname,#{hostname_ssh},#{hostname}}"

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (13 by maintainers)

Commits related to this issue

Most upvoted comments

That being said, your ssh invocation should likely be -I /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so with an upper case letter and not -i

Alright, we can see that the ssh process was found:

pane_info=2069450:zentester:ssh -p 222 zentester@jumpbox -i /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so

But the regex that tries to isolate the args fails

$ printf '%s' 'ssh -p 222 zentester@jumpbox -i /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so' | perl -n -e 'print if s/.*?\bssh[\w]*\s*((?:\s+-\w+)*)(\s+\w+)(\s\w+)?/\1\2/'
 -p 222@jumpbox -i /usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so

Let me debug that