Discussion:
Quick way to scroll up in the pane to the previous occurrence of prompt
Kaushal
2015-01-20 20:26:11 UTC
Permalink
Hi,

I can probably do a reverse search of a constant string in my prompt to
reach the previous occurrence of prompt, the place in pane history where I
last typed anything at command line.

But the constant string in my prompt is just 2 characters.

Is there a better way to do this? Can a "line number" variable be added (or
does something similar already exist?) that updates each time user enters
something at command line.

This would be useful to me because for my application, I run some
executable and then I see thousands of lines at stdout. It would be great
to simply jump up to the point in pane history where I entered that last
command.

--
Kaushal Modi
Nicholas Marriott
2015-01-21 09:04:43 UTC
Permalink
How would tmux know you were entering something at a command prompt?
Post by Kaushal
Hi,
I can probably do a reverse search of a constant string in my prompt to
reach the previous occurrence of prompt, the place in pane history where I
last typed anything at command line.
But the constant string in my prompt is just 2 characters.
Is there a better way to do this? Can a "line number" variable be added
(or does something similar already exist?) that updates each time user
enters something at command line.
This would be useful to me because for my application, I run some
executable and then I see thousands of lines at stdout. It would be great
to simply jump up to the point in pane history where I entered that last
command.
--
Kaushal Modi
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Kaushal
2015-01-21 12:24:22 UTC
Permalink
That was my question. I wasn't sure if there's an internal way to send a
signal to tmux when a command prompt appeared on the shell.

Thanks.
--
Kaushal Modi
Post by Nicholas Marriott
How would tmux know you were entering something at a command prompt?
Post by Kaushal
Hi,
I can probably do a reverse search of a constant string in my prompt
to
Post by Kaushal
reach the previous occurrence of prompt, the place in pane history
where I
Post by Kaushal
last typed anything at command line.
But the constant string in my prompt is just 2 characters.
Is there a better way to do this? Can a "line number" variable be
added
Post by Kaushal
(or does something similar already exist?) that updates each time user
enters something at command line.
This would be useful to me because for my application, I run some
executable and then I see thousands of lines at stdout. It would be
great
Post by Kaushal
to simply jump up to the point in pane history where I entered that
last
Post by Kaushal
command.
--
Kaushal Modi
------------------------------------------------------------------------------
Post by Kaushal
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Nicholas Marriott
2015-01-21 12:42:08 UTC
Permalink
Well you could run a tmux command in your PS1 or output some escape sequence tmux recognises. But currently there isn't one that will mark a position in the history. Although it's quite a nice idea.

-------- Original message --------
From: Kaushal <***@gmail.com>
Date:21/01/2015 12:24 (GMT+00:00)
To: Nicholas Marriott <***@gmail.com>
Cc: tmux-users <tmux-***@lists.sourceforge.net>
Subject: Re: Quick way to scroll up in the pane to the previous occurrence of prompt

That was my question. I wasn't sure if there's an internal way to send a signal to tmux when a command prompt appeared on the shell.

Thanks.
--
Kaushal Modi

On Jan 21, 2015 4:04 AM, "Nicholas Marriott" <***@gmail.com> wrote:
How would tmux know you were entering something at a command prompt?
    Hi,
    I can probably do a reverse search of a constant string in my prompt to
    reach the previous occurrence of prompt, the place in pane history where I
    last typed anything at command line.
    But the constant string in my prompt is just 2 characters.
    Is there a better way to do this? Can a "line number" variable be added
    (or does something similar already exist?) that updates each time user
    enters something at command line.
    This would be useful to me because for my application, I run some
    executable and then I see thousands of lines at stdout. It would be great
    to simply jump up to the point in pane history where I entered that last
    command.
    --
    Kaushal Modi
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...