microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.22k stars 8.16k forks source link

Terminal desperately needs a horizontal scrollbar (similar to Command Prompt) #1860

Open c0d3h4x0r opened 5 years ago

c0d3h4x0r commented 5 years ago

Note: đź“Ś Pinned comment: https://github.com/microsoft/terminal/issues/1860#issuecomment-1622136376


Summary of the new feature/enhancement

Windows Terminal needs to have a configurable horizontal scrollbar (similar to Command Prompt) so that lines longer than the window width are actually readable by scrolling to the right, rather than being a big indecipherable word-wrapped mess as is typically seen on UNIX-like systems.

Proposed technical implementation details (optional)

Make it so.

DHowett-MSFT commented 5 years ago

indecipherable word-wrapped mess

I mean, that seems a little strong. One of the biggest requests we had for Windows 10 was to add support for wrapping to the traditional/legacy console!

c0d3h4x0r commented 5 years ago

That's because I feel strongly about it :) I absolutely hate line-wrapped console output... always have.

caitlynrw commented 5 years ago

Maybe make it a config,

"text-wrap": false

when true does as it does now, false gives horizontal scrollbar.

Edit: I didn't read the original post correctly, so proposed config*

egmontkob commented 5 years ago

The traditional Unix terminal emulation (using ANSI escape sequences) is pretty much incompatible with this idea. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=769440.

zadjii-msft commented 5 years ago

Yea I don't think we're going to change this, for the exact reason mentioned by @egmontkob. What we're trying to build is a terminal, not a console. While the horizontal scrollbar made sense in the console, where the viewport could be smaller than the buffer in both the x and y directions, a terminal's viewport is fundamentally the same size as the buffer.

Even if we added this setting to the Terminal, it's still connected to conpty, which is acting like a terminal buffer itself, and it won't emit sequences that act like the old console did.

c0d3h4x0r commented 5 years ago

Then I guess I won't be adopting Windows Terminal after all, because that's a dealbreaker for me.

AlwaysHC commented 4 years ago

I need horizontal scrolling and wrapping disabled too

AlwaysHC commented 4 years ago

Cmd and ConsoleZ have this feature

zadjii-msft commented 4 years ago

@AlwaysHC Could you elaborate more on why you need this feature? I don't think I really understand the use case. Maybe there's some way to make your workflow work in the Windows Terminal without a horizontal scrollbar?

c0d3h4x0r commented 4 years ago

@zadjii-msft Because wrapped lines are obnoxiously more difficult to visually parse.

AlwaysHC commented 4 years ago

@AlwaysHC Could you elaborate more on why you need this feature? I don't think I really understand the use case. Maybe there's some way to make your workflow work in the Windows Terminal without a horizontal scrollbar?

tail -f /var/log/messages

matthewgdv commented 4 years ago

I'm in agreement that we need this feature. I use a lot of interactive workflows that display asciified tables in the terminal (which are often several screen-lengths long) and having them be wrapped is a dealbreaker since it turns them into illegible gibberish. Likewise with several other forms of console output where the formatting across lines is important. Please implement horizontal scrolling as an option because currently I think this terminal will be useless to a lot of users with similar requirements.

4nqyi commented 4 years ago

Would love to see a configurable horizontal size with horizontal scroll-bar. Something similar to cmd window would be great.

Until this feature is implemented, i'll be sticking with the default Ubuntu shell.

AlwaysHC commented 4 years ago

Both issues are closed now, however we don't have the possibility to disable the word wrap yet :(

marveloo commented 4 years ago

I am copying the question which I asked here: #6730

Why is Windows terminal unable to load a wide window (of fixed width) behind the scenes with only a part of the window visible to the user and a horizontal scrollbar to move that window from side to side? The shell itself may not even be aware of me staring at it throw a smaller size window. In other words all this thing could be implemented on the UI part only by letting the shell think that I am on a wider window than it actually is.

jschiold commented 3 years ago

I was happy with trying the new Windows Terminal, but when I needed to turn off word-wrapping (because I wanted to use Oracle SQL*Plus and make some queries, etc.), to my surprise, I realized that it was not actually possible. That seems really silly to me. I guess I'll have to go back to using the classic command prompt for the most part.

DHowett commented 3 years ago

If we make any changes here, they are going to be in line with other terminal emulators that have established precedent: the typical options are wrap or truncate. Would truncate be more to your liking?

c0d3h4x0r commented 3 years ago

The behavior ought to be exactly the same as Command Prompt has been for ages: word-wrap, but only beyond a buffer width that the user can configure to be much wider than the actual window width. For example, allow me to set the buffer width to 9999 characters, so that word wrapping does not occur until the 10000th character on each line (which should effectively never wrap).

j4james commented 3 years ago

I think the confusion here stems from the fact that some people were expecting a kind of "infinite" width, that would expand as more content was written out. I don't think that is feasible for a terminal. However, a wide (but fixed size) buffer within a smaller viewport is a different matter. As had been mentioned, we already support that in the conhost console. And it's worth mentioning that some of the DEC terminals supported a similar concept, so it's not without precedent.

That said, for many of the use cases mentioned, you can probably get by with piping your output through less -S. That should give you an unwrapped view of the content that can be scrolled horizontally.

matthewgdv commented 3 years ago

I totally agree with @c0d3h4x0r. As long as it can at the very least do exactly what CMD already does regarding large buffer sizes, I'll be happy. Currently I can't use this new terminal for any form of interesting ASCII-fied output, such as a database table returned by a SQL query.

rossmassey commented 3 years ago

if you are using psql, try this when running it:

PAGER="less -S" psql ...

it will let you scroll horizontally like @j4james mentioned

Alois-xx commented 3 years ago

I also like to disable word wrapping for wide output which may be truncated at e.g. 500 char width but until then I do not want to see parts of it on the next line. One extreme example is e..g C>wmic process which needs ca. a width of 2000 to become readable. Tabular data is not uncommon. I can zoom out on my 4K monitor to some extent but this is still an big issue to become a console I would like to use always over the "old" one.

newtoniumx3 commented 3 years ago

Ya this feature is a must or simply can't use this terminal for developing with docker, the output especially for stat commands is super wide and with line wrap its unreadable

cmario92 commented 3 years ago

so it this feature request dropped? or are we expecting to have it at some point?

zadjii-msft commented 3 years ago

The official plan is no, we're not planning on supporting this. I'd be shocked to find another terminal emulator that's not conhost that supports this. If an application is emitting output that's too wide for the buffer, then that sounds like the app has a bad UX, not the Terminal, since all terminal emulators will have that bad UX (IMO).

\

We could add an experimental.minimumBufferWidth setting. When we do resizes, we make sure the conpty buffer is always at least that big, regardless of the terminal viewport width. I'm sure there would be weird edge cases. We'd need to make sure that the handling of cursor positioning in the Terminal buffer isn't too reliant on the terminal viewport, but instead the underlying buffer.

I really have no idea how bad the UX would be. But it would be a place to start.

I'd absolutely stick this as an experimental. setting, because I want to make sure it's clear that it's an unsupported scenario.

\</bottle-feeding thought>

c0d3h4x0r commented 3 years ago

"We're not going to do what users are begging for, because we are more interested in finding excuses to be lazy and weasel our way out of it."

Typical Microsoft, not listening to your users.

pc223 commented 3 years ago

Can't we just lie to the terminal, say, real width is 500, but only show 80 to user, and a horizontal scroll?

This issue is a deal breaker for me, because I use horizontal scroll a lot on cmd and powershell to observe log. And logs are not always design for 80x24, sometimes it's really really long.

With horizontal scroll, 1 line of log, most of the time, means 1 thing happened, 3 lines?, 3 things, simple. With current line-wrapping, 1 line of log == multiple lines of logs -> consume all the terminal space.

jschiold commented 3 years ago

The regular Windows Command Prompt solves this in a simple and elegant way. image I will have to continue using that instead.

dje-dev commented 3 years ago

Please count me as another user who thinks Windows Terminal is great, but force word wrapping makes this product unusable - the output becomes unreadable in many situations where it exceeds the current horizontal size.

kzhangkzhang commented 3 years ago

same for me: I am running Oracle's sqlplus and many output line width >200 characters. need Windows terminal provide horizontal screen bar feature. I am so excited to use new Windows terminal until I see this issue and I am very regret to stop using this product. I will switch back in future once this feature is available.

iuricarraro commented 3 years ago

Fiquei feliz em experimentar o novo Terminal do Windows, mas quando precisei desligar a quebra automática de linha (porque queria usar o Oracle SQL * Plus e fazer algumas consultas, etc.), para minha surpresa, percebi que não era realmente possível. Isso parece muito bobo para mim. Acho que terei que voltar a usar o prompt de comando clássico na maior parte do tempo.

I was happy with trying the new Windows Terminal, but when I needed to turn off word-wrapping (because I wanted to use Oracle SQL*Plus and make some queries, etc.), to my surprise, I realized that it was not actually possible. That seems really silly to me. I guess I'll have to go back to using the classic command prompt for the most part.

I totally agree. It is a very important resource for executing SQLs and analyzing logs.

Windows Terminal is an excellent tool and you need to allow this configuration as soon as possible. Buffer size width already exists on the PowerShell console and CMD. If Windows Terminal wants to do a complete integration, it must provide this feature.

oldtimerza commented 3 years ago

Is this feature in the works or has it been shelved?

It's a feature that I would also greatly benfit from, especially when reading docker container logs.

zadjii-msft commented 3 years ago

It's in the icebox, so it's not something we're ever planning on getting to ourselves, but it's a neat idea that could be brought out of the icebox if there's enough community demand.

My only plan for ever enabling this is under an "experimental" flag (as described above). It's very likely that this would break more scenarios than it would fix, so I'd want users to know that before they enable it.

especially when reading docker container logs.

less -S may be your friend here. The right and left arrow keys can navigate left and right in the file - it's not quite like a horizontal scrollbar, but has always worked for me.

rajatsharmasubedi commented 2 years ago

I use SnowSQL via PowerShell at work, so obviously we are talking really wide outputs. I was so excited about Windows Terminal Preview that I spent hours customizing it to my liking only to find out I'll have to stick to the good old command prompt because of this one missing feature. What a waste--because everything else was so on point with this app.

yhh2021 commented 2 years ago

Haha, this post is very interesting to me since I have learnt to use computers on Windows then now work in *nix.

This feature is included in the Windows cmd, and everyone is used to it. However, in *nix world, to my humble knowledge more than 99% of the *nix terminals running now has no horizontal scrollbars, and more than 99% users haven't came with this idea even once, including me.

Hence, this is a really difficult choice for ms-terminal developers, since this product is trying to absorb from both Windows cmd and *nix terminals.

But why don't *nix users need this feature? I think that's because many of the *nix users need to work in a whole-console environment like DOS - in *nix systems GUI is usually a normal software, unlike in Windows it is packed in the operating system. *nix terminal software then were built under the assumption that they may be used without a GUI, and of course without scroll bars, therefore when they need to print really long lines like logs, like suggested in previous replies, they tend to dump it into files instead of printing them out directly to the screen. Then we have no problems.

c0d3h4x0r commented 2 years ago

if there's enough community demand. Has the entire discussion herein not already proven to you that there's plenty of community demand?

This is why expert users hate Microsoft, because you all never listen to your most important customers.

From: Mike Griese @.> Sent: Friday, May 7, 2021 8:49 AM To: microsoft/terminal @.> Cc: Keith F. Kelly @.>; Mention @.> Subject: Re: [microsoft/terminal] Terminal desperately needs a horizontal scrollbar (similar to Command Prompt) (#1860)

It's in the icebox, so it's not something we're ever planning on getting to ourselves, but it's a neat idea that could be brought out of the icebox if there's enough community demand.

My only plan for ever enabling this is under an "experimental" flag (as described above). It's very likely that this would break more scenarios than it would fix, so I'd want users to know that before they enable it.

especially when reading docker container logs.

less -S may be your friend here. The right and left arrow keys can navigate left and right in the file - it's not quite like a horizontal scrollbar, but has always worked for me.

- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fterminal%2Fissues%2F1860%23issuecomment-834554710&data=04%7C01%7C%7C2cdf5511aa20459a83db08d9116f9ace%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559993293564162%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a%2BIM3hEJzyYl4TUvSU6P3730Abjaqy%2Fnw7mMXaILY0A%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF2EYJHABAEWJDQ2UFU4OHLTMQDWBANCNFSM4H6W2CBQ&data=04%7C01%7C%7C2cdf5511aa20459a83db08d9116f9ace%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559993293574116%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kq3EIUEe%2BG0eNNKLLzZhAibGe%2BhiFEmStVUV9NPDI9I%3D&reserved=0.

zadjii-msft commented 2 years ago

you all never listen to your most important customers.

I literally re-opened this, because I am listening to folks who want this. Simple fact of the matter is that this is an engineering project, and we've only got so many development resources, so we can't just snap our fingers and do everything we want instantly. We've got to prioritize all community asks, and the best way we can do that is with đź‘Ť's on issues. As of right now, this issue isn't even on the first 3 pages of https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc. So pardon me if it takes a little while for us to get back to this one. Of course, this is an open-source project, so we'd be happy to accept a community contribution if anyone's got a clever idea how to implement this. I laid out a crazy idea on how we could up here: https://github.com/microsoft/terminal/issues/1860#issuecomment-738814484.

kwame-codes commented 2 years ago

I understand that it may be a difficult feat of engineering, to reverse the windows console view-port functionality back into the already built terminal, but please can you consider that for many the ability to configure the console was a stand-out feature we took for granted. We are not afraid of horizontal scrolling! I myself automatically I've set every console to have a horizontal buffer of 1000 horizontally and 8000 height. I don't want any kind of wrapping, ever. Please consider adding horizontal scrolling back to your new windows consoles/terminal. Regards

sourcenouveau commented 2 years ago

I want to use Windows Terminal as my general purpose console on Windows.

I monitor logs on a daily basis via tail -F over SSH. I periodically glance at my console to see which messages have been logged recently. It is faster and easier to scan through them when each log message is a single line (no wrapping).

When I see a message of interest, I want to quickly view the entire message. I want to avoid something like tail -F /var/log/syslog | cut -c -200 because then I'd need to run additional commands to find and view the entire message. Also, I do not want to interrupt my active command, which is continuing to display new messages.

I imagine that an option to manually override the terminal buffer dimensions, independent of the viewport size, would satisfy my use case while still being compatible with the nature of a terminal. The viewport would allow me to scroll horizontally and quickly check lines of interest, without affecting the active command.

Fetrovsky commented 2 years ago

I used to use the Terminator terminal emulator, which has a horizontal scroll bar. It's an option every terminal should have.

mcdonamw commented 2 years ago

So I guess I do not understand the purpose of this Windows Terminal. The only reason I'm even using it is for the tabbed interface and ability to combine my cmd prompt and Powershell windows into a single pane, but without the option to change my buffer/scrolling/wrapping options, this terminal is useless to me.

I'm dealing with Powershell output e.g. Write-Host that is absolutely terrible to read due to the wrapping. Am I supposed to somehow figure out my own formatting and take into consideration the unlimited window sizes people might be using, and somehow dynamically? Is that even possible?

Can someone explain to me wth the purpose of this thing is to be? Someone earlier said "this is not to be a console, but a terminal". What does that even mean?

FWIW I know I can simply resize the window to make it larger but that is not an option for me as I use FancyZones and I have my "terminal/console" window in a small subsection of my 4k monitor. Thus wrapping is even worse for me.

Fetrovsky commented 2 years ago

It's a ridiculous response. It means it's supposed to emulate a monitor and a keyboard, and monitors have no scrollbars. But it's a useless answer because you don't have to wrap the output just because you have a terminal. Just like you can emulate a very large screen with a vertical scrollbar, nothing impedes you from having a horizontal scrollbar and voiding the need for line wrap. To make it simpler, just like you can, say, enable scrolling (scroll lock or whatever) and scroll up and down, you can use it to scroll left and right as well.

mcdonamw commented 2 years ago

That's silly. I mean actual terminals/monitors don't have "windows" either. If that's what they are going for, then Terminal should be 100% fullscreen at all times with no ability to resize them.

c0d3h4x0r commented 2 years ago

BD8DD555-439B-482E-91D2-4CB490C849E2

Irony at its finest :-D

robertcatgithub commented 2 years ago

[c0d3h4x0r] Irony at its finest :-D

what's the irony ?

theking2 commented 1 year ago

For me a simple use case is following of log files with

powershell Get-Content c:/wamp/logs/php_error.log -Wait

In this case wrapping is obstructing ![Uploading Screenshot 2022-08-30 093703.png…]()

ghost commented 1 year ago

I work with spring boot, and spring product long lines of the log, for example in simple groovy web application I face with this, of course this is very bare bone appliances in serious work it gets worse

image

another example would be cloudflared tunnel -h

image

with several zoom-out key presses finally some clarity!

image

travisterrell commented 1 year ago

Throwing my my 2 cents, since it's been a couple of weeks. It's clear that the powers-that-be are strongly opposed to adding scrolling, but man it would be so helpful for some use cases.

The most recent case that's caused me to crave this feature is working with the Azure CLI (surely a proper use for Terminal). A ton of the output is in the form of tables and other types of formatting that span a very wide width. Tables wrap horribly, leaving half-lines all over the place that are impossible to reconcile with the columns. I work around it by maximizing my window, but even so, the largest tables still wrap. (And using the old-school command prompt is obviously a poor experience in a dozen other ways, so terminal is key!)

I think some are really stuck on this idea of emulating the behavior of other terminals. That is an important goal, as I utilize WSL and also SSH into Linux boxes, and I want content to display as designed. However, just because one provides full support for those standards, it doesn't mean that one can't also provide features that build on top of that! Compatibility is easily maintained with an off-by-default configurable nature. Given virtually every other detail of the terminal window so configurable, having a default disabled option doesn't really seem that problematic, and if this and a handful of closed issues are any evidence, there's a reasonably strong demand.

o-sdn-o commented 1 year ago

You can extend the Windows Terminal functionality with a small portable opensource tool that adds horizontal scrolling to the terminal. It almost completely supports win32 console api as well as wsl.

vtm -r powershell

https://user-images.githubusercontent.com/11535558/194391026-0921d52e-80f6-4e40-9265-fdb1bf82ec30.mp4

Note, powershell and cmd.exe do not know that lines can be unwrapped, so unwrap mode is best applied to already displayed lines using text selection by mouse + Wrap menu button.

jonas-metzum commented 1 year ago

OK this is constructive at least, but I'm not sure I'd use the Terminal with an add-on like this one over, e.g. the old cmd window. It just seems a bit cumbersome. But if this can be done in an add-on, maybe something like it could be implemented in the Terminal is self?