Segment to display current ssh host name #448
-
|
The Do we have a segment to display the ssh host's name? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @davidshen84, you're right, We don't have a segment right now for what you want to achieve, but i guess we could try create one. As a first collection of ideas:
To get the |
Beta Was this translation helpful? Give feedback.
Hi @davidshen84,
you're right,
hostnamesegment is just for displaying the hostname of the system the tmux session is running on.E.g. if you have multiple tmux sessions, running on different systems, you can quickly differentiate between them by the hostname.
We don't have a segment right now for what you want to achieve, but i guess we could try create one. As a first collection of ideas:
tmux display -p -F "#{pane_current_command}"and check forsshsshcommand, we get thepidof the pane withtmux display -p -F "#{pane_pid}"pidwe get all the child PIDs likeps --no-headers --ppid=PANE_PID -o pid,command parse out the ssh PID