New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard shortcut to scroll to where last command started output (feature request) #787

Closed
jasir opened this Issue Jul 19, 2016 · 20 comments

Comments

Projects
None yet
3 participants
@jasir

jasir commented Jul 19, 2016

Hello,

I will try explain by use case:

When I run ie. cat longfile.txt, and many lines are outputed, when shortcut (ie. PgUp + Ctrl + Alt) is pressed, console scrolls to place, where I have written cat longfile.txt.

It can save lot of time, as I am often found myself pressing Ctrl + PgUp repeatedly and doing eye-scan looking for where output started.

Thanks for considering!

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog Jul 22, 2016

Use less instead of cat.
But your request can be reformulated to more useful: Add escape-sequence to bookmark places to scroll to. You can add this sequence to $PS1 and use as requested.

pyhedgehog commented Jul 22, 2016

Use less instead of cat.
But your request can be reformulated to more useful: Add escape-sequence to bookmark places to scroll to. You can add this sequence to $PS1 and use as requested.

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Jul 23, 2016

cat was just an example. Your idea about bookmark is interesting, maybe implementation of this could be easier.

jasir commented Jul 23, 2016

cat was just an example. Your idea about bookmark is interesting, maybe implementation of this could be easier.

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog Feb 25, 2017

Already implemented in mintty: mintty/mintty#569 (comment)

pyhedgehog commented Feb 25, 2017

Already implemented in mintty: mintty/mintty#569 (comment)

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Mar 2, 2017

Hmm, I should try mintty... Thans

jasir commented Mar 2, 2017

Hmm, I should try mintty... Thans

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Mar 2, 2017

Owner

I don't like the idea: ChildGui

Owner

Maximus5 commented Mar 2, 2017

I don't like the idea: ChildGui

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Mar 3, 2017

Sorry, I do not understand. Is it a typo, you wanted to say "I don't like the idea?"

jasir commented Mar 3, 2017

Sorry, I do not understand. Is it a typo, you wanted to say "I don't like the idea?"

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Mar 3, 2017

Owner

Sure, smartphone...

Owner

Maximus5 commented Mar 3, 2017

Sure, smartphone...

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Mar 3, 2017

:( Ok. Please reconsider, it would be great for powerusers. Otherwise, I will close this, do not want to keep another zombie issue in Conemu.

jasir commented Mar 3, 2017

:( Ok. Please reconsider, it would be great for powerusers. Otherwise, I will close this, do not want to keep another zombie issue in Conemu.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Mar 3, 2017

Owner

I didn't say "it bad feature". I'm going to implement it in ConEmu.

Owner

Maximus5 commented Mar 3, 2017

I didn't say "it bad feature". I'm going to implement it in ConEmu.

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Mar 3, 2017

Oh. Then this was my epic misunderstanding... Thank you very very much!

jasir commented Mar 3, 2017

Oh. Then this was my epic misunderstanding... Thank you very very much!

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog Mar 4, 2017

@Maximus5, could you please explain — what do you dislike?

  1. Implementing new (non-standard) escape sequence? There are plenty of them...
  2. Copying solution from mintty?
  3. Implementing escape-sequence (i.e. remote-controlled) for bookmarks?
  4. Such solution for original request (bookmarks on shell prompts/user entry "fields" — inexistant in console)?

pyhedgehog commented Mar 4, 2017

@Maximus5, could you please explain — what do you dislike?

  1. Implementing new (non-standard) escape sequence? There are plenty of them...
  2. Copying solution from mintty?
  3. Implementing escape-sequence (i.e. remote-controlled) for bookmarks?
  4. Such solution for original request (bookmarks on shell prompts/user entry "fields" — inexistant in console)?
@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Mar 4, 2017

Owner

@pyhedgehog I dislike mintty started in ConEmu.

As for your points

The escape sequence already exists: ConEmu specific OSC.
Copying solution from mintty is impossible. mintty doesn't work with real console as ConEmu does. So mintty doesn't face the hell of synchronization between its internal buffers and real console ones.

As I said, scrolling shortcuts will be implemented.

Owner

Maximus5 commented Mar 4, 2017

@pyhedgehog I dislike mintty started in ConEmu.

As for your points

The escape sequence already exists: ConEmu specific OSC.
Copying solution from mintty is impossible. mintty doesn't work with real console as ConEmu does. So mintty doesn't face the hell of synchronization between its internal buffers and real console ones.

As I said, scrolling shortcuts will be implemented.

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog Mar 4, 2017

There was misunderstanding also. I've mentioned only copying solution — not implementation. I.e. I want to be sure that escape sequences for same features existing in mintty and conemu will be same.

pyhedgehog commented Mar 4, 2017

There was misunderstanding also. I've mentioned only copying solution — not implementation. I.e. I want to be sure that escape sequences for same features existing in mintty and conemu will be same.

Maximus5 added a commit that referenced this issue Mar 6, 2017

gh-787: Keyboard shortcut to scroll by prompts.
  Ctrl+Alt+PgUp/PgDn will jump between commands entered in the shell prompt.
  Take into account that prompt must pass to ConEmu the code
  `ESC]9;12ESC\` (ConEmu default) or `ESC[?7711h` (mintty implementation).
@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Jun 5, 2017

I would love to test this functionality, but I cannot make it work. I have tried many times, but i am lost.
I am using bash

PS1 = ${PS1}\e[?7711h"

...and many other variants, still no success...

Thanks a lot for help

jasir commented Jun 5, 2017

I would love to test this functionality, but I cannot make it work. I have tried many times, but i am lost.
I am using bash

PS1 = ${PS1}\e[?7711h"

...and many other variants, still no success...

Thanks a lot for help

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 5, 2017

Owner

@jasir What exact bash of dozens of its implementations you are trying?
Hint: http://conemu.github.io/en/CygwinAnsi.html

Owner

Maximus5 commented Jun 5, 2017

@jasir What exact bash of dozens of its implementations you are trying?
Hint: http://conemu.github.io/en/CygwinAnsi.html

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Jun 5, 2017

I am using bash comming from git for windows distrubution.

jasir commented Jun 5, 2017

I am using bash comming from git for windows distrubution.

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Jun 5, 2017

Ok, this is a subset of my prompt:

ESC=$(printf '\033')
MARKER="${ESC}[?7711h"

PS1="${MARKER}\n→ \[\e[01;32m\]\t$( a=$?; if [ $a = 0 ]; then echo " "; else echo "\[\e[31m\] [$a] "; fi )\[\e[01;33m\]"

jasir commented Jun 5, 2017

Ok, this is a subset of my prompt:

ESC=$(printf '\033')
MARKER="${ESC}[?7711h"

PS1="${MARKER}\n→ \[\e[01;32m\]\t$( a=$?; if [ $a = 0 ]; then echo " "; else echo "\[\e[31m\] [$a] "; fi )\[\e[01;33m\]"
@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Jun 5, 2017

Ok, it seems that when I use msys connector, it uses. Thanks. Should I close this task?

jasir commented Jun 5, 2017

Ok, it seems that when I use msys connector, it uses. Thanks. Should I close this task?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 5, 2017

Owner
Owner

Maximus5 commented Jun 5, 2017

@jasir

This comment has been minimized.

Show comment
Hide comment
@jasir

jasir Jun 6, 2017

I am closing issue, as this is working. Unfortunately, there are more issues with msys connector, so I won't use this 👎. Thanks anyway, I believe this is great feature and should be more promoted.

jasir commented Jun 6, 2017

I am closing issue, as this is working. Unfortunately, there are more issues with msys connector, so I won't use this 👎. Thanks anyway, I believe this is great feature and should be more promoted.

@jasir jasir closed this Jun 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment