On Sun, Apr 06, 2014 at 10:34:27AM +0200, vlamy wrote:
>Hi !
>
>I may missunderstood your needs, but what about using the "list-panes"
>command to get the current session name ?
>
>> tmux list-panes -F '#{session_name}'
>
>By instance :
>
>~/.zshrc :
>
>> zshexit()
Hi !
I may missunderstood your needs, but what about using the "list-panes"
command to get the current session name ?
> tmux list-panes -F '#{session_name}'
By instance :
~/.zshrc :
> zshexit() {
> var=`tmux list-panes -F '#{session_name}'`
> echo "zsh exit from $var" > ~/tmux_exit
>}
wo
Well we don't have a client_pid format but perhaps you can get the tty with ps
then do eg tmux lsc -F "#{client_tty} #{session_id}"|grep whatevertty
If you always detach with key bindings could also consider this instead:
set -g destroy-unattached on
bind d set destroy-unattached off\; detach
-