Hi,
Well, I couldn't do a run-shell because that always seemed to spawn from
tmux server.
But I could run-shell a cmd and pass in #{pane_pid} as an arg and get the
env from that and do what I needed.
So cool.
thx,
-m
On Tuesday, September 22, 2020 at 3:24:42 PM UTC-4 M Kelly wrote:
> Hi,
>
> ok, great.
> Easier than I thought!
>
> take care,
> -m
>
> On Tuesday, September 22, 2020 at 3:00:26 PM UTC-4 [email protected]
> wrote:
>
>> If you run a command without -t it will work out the best pane which if
>> it is run from a key binding will be the active pane in the current window
>> in the attached session, so you should be able to do for example:
>>
>> bind c send abcdef \; new-window -c "#{pane_current_path}"
>>
>>
>>
>> On Tue, 22 Sep 2020 at 19:51, M Kelly <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I have this binding -
>>> bind-key -T prefix c new-window -c "#{pane_current_path}"
>>>
>>> Is there a way to know what pane this was typed from ?
>>> And then can I execute a cmd "in that pane" before starting a new window
>>> ?
>>> I want to get the env and history from the pane/shell the prefix-c was
>>> typed from and set something as part of the new window/shell.
>>>
>>> thx for awesome tmux,
>>> -mark
>>>
>>> --
>>> 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 view this discussion on the web, visit
>>> https://groups.google.com/d/msgid/tmux-users/f38a41ad-becb-4821-823f-a03b98116faan%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/tmux-users/f38a41ad-becb-4821-823f-a03b98116faan%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
--
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 view this discussion on the web, visit
https://groups.google.com/d/msgid/tmux-users/f41dbb0b-f42e-4986-b037-62f179c9c2e2n%40googlegroups.com.