Skip to content
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

Please add line numbers. #17490

Open
RokeJulianLockhart opened this issue Jun 30, 2024 · 2 comments
Open

Please add line numbers. #17490

RokeJulianLockhart opened this issue Jun 30, 2024 · 2 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Attention The core contributors need to come back around and look at this ASAP. Product-Terminal The new Windows Terminal.
Milestone

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jun 30, 2024

Description of the new feature/enhancement

As https://bugs.kde.org/show_bug.cgi?id=485923#c0 describes:

STEPS TO REPRODUCE

Invoke Konsole, and use a command like cat or https://github.com/MicrosoftDocs/PowerShell-Docs/blob/04dac6ae6b2abcb91006b6a515cc26c72219ffd5/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md#example-2-limit-the-number-of-lines-get-content-returns to output the content of a file to the terminal.

OBSERVED RESULT

Without using cat's -b or -n flags, the content cannot be numbered. For others, like the aforecited Get-Content, it's impossible to output line numbers without writing code for every interaction to iterate over the lines.

Konsole has since gained the ability to display line numbers, as https://discuss.kde.org/t/how-to-enable-line-numbers-in-konsole/14435?u=rokejulianlockhart#always-3 depicts:

534f710eb7b924d4c1a4bf1975c79837bdde8379

It's been invaluable for me, when reading long logs via the terminal. Consequently, I propose the same for Windows Terminal.

Proposed technical implementation details (optional)

I'd rather that they be in a permanent separator following the text direction, or on the opposite of the text direction, still separated regardless (to prevent overlap). Specifically, as https://bugs.kde.org/show_bug.cgi?id=485970#c3 describes:

I want it to be like a Konsole/Dolphin panel, so that it can be moved to the left or right. However, I'd like it to work like a plasmoid on a PlasmaShell panel does - when a new session is invoked (like when a new tab or window is created) it should be static, and not overlay, like any other panel does. However, I should be able to set a toggle (like PlasmaShell's pin feature) and have it then able to temporarily resize over the session until I pin it again, where it returns to its original size. It should also have a horizontal scrollbar for when the user accidentally sets it shorter than they need at the start of a session.

Does that make sense?

I expected that this implementation wouldn't be possible due to wt's apparent lack of comparable "panel" support, but #997 (comment) demonstrates otherwise.


relevant notes:

@RokeJulianLockhart RokeJulianLockhart added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 30, 2024
@RokeJulianLockhart RokeJulianLockhart changed the title Please add line numbers to the terminal. Please add line numbers. Jun 30, 2024
@carlos-zamora carlos-zamora added this to the Icebox ❄ milestone Jul 17, 2024
@carlos-zamora carlos-zamora added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 17, 2024
@zadjii-msft
Copy link
Member

Why is less -N (or similar) insufficient for this/?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 17, 2024
@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Jul 17, 2024

#17490 (comment)

@zadjii-msft, because that's solely usable when piping command output. It doesn't operate retroactively. Additionally, if I run Get-ChildItem -LiteralPath "$HOME", I see coloured highlights for certain directories, whereas if I invoke Get-ChildItem -LiteralPath "$HOME" | less -N on Fedora 40, I don't (so it breaks command output).

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Attention The core contributors need to come back around and look at this ASAP. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants