Get the last entered command in a tmux pane

23 views
Skip to first unread message

Robin Stern

unread,
Aug 2, 2021, 6:08:05 PM8/2/21
to tmux-users
Hi,

Is there a way to get the intact string of last command I entered in a tmux pane.

For instance after I type:

>> echo "Hello world from pane-1"

and run a script with some command like "tmux_get_command pane1", it should echo

echo "Hello world from pane-1"

Thanks,

Robin

Nicholas Marriott

unread,
Aug 3, 2021, 4:45:11 AM8/3/21
to Robin Stern, tmux-users
Hi

This would be a shell feature rather than a tmux feature.


--
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 tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/b2929f96-fe92-4724-a6b5-37676672e0b9n%40googlegroups.com.

M Kelly

unread,
Aug 3, 2021, 12:08:01 PM8/3/21
to tmux-users
Hi,

Perhaps you could use capture-pane and some script logic to grab the last line from a pane ?

thx,
-m
Reply all
Reply to author
Forward
0 new messages