Nicholas Marriott <[email protected]> wrote:
 |On 8 January 2018 at 16:36, Steffen Nurpmeso <[1][email protected][/1]> \
 |wrote:
 ||I am using per shell instance history files per default, à la
 |
 ||  i=`tty`
 ||  x=`basename "${i}"`
 ||  HISTFILE="${HOME}/traffic/.sh_hist_${x}"
 |
 ||and such; i thought i use tmux display-message -p to get
 ||completely reproducable behaviour inside of tmux, i.e., by doing
 ...
 ||This works perfectly fine when creating windows via
 |
 ||  bind-key '#' new-window -t MAUI -c~
 |
 ||but it does not work from within this .tmux.conf
 ...
 |There is a race between you creating the windows and your shell running \
 |the profile, since you are creating the windows in such quick succession \
 |in the 
 |config file it is almost always hit.
 |
 |The easiest thing to do is to use $TMUX_PANE for the target (-t) to \
 |display-message in the shell profile.

Yes, that does it indeed!

         i=tmux_`tmux display-message -t "${TMUX_PANE}" \
               -p '#{session_name}_#{window_index}'`

Thank you!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to