Skip to content

Add trailing line number to filename for ConciseView - #11391

Merged
Andrew (anmenaga) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-linenumber
Dec 18, 2019
Merged

Add trailing line number to filename for ConciseView#11391
Andrew (anmenaga) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-linenumber

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Dec 18, 2019

Copy link
Copy Markdown
Member

PR Summary

Some terminals can turn the script:line into a hyperlink, so adding the line number right after the filename allows it to be clickable and takes you to the line of the error instead of just the file. This does make the line number information redundant, but is not a big issue. Since this is similar to what users already saw in NormalView, they should understand what that number represents.

However, if we are running in vscode, it also understands script:line:col making the link click to the location of the error so we add column information only for vscode terminal.

Get-ChildItem: /Users/steve/test/multierror.ps1:3
Line |
   3 | Get-Childitem -Path .\nothere
     | ^ Cannot find path '/Users/steve/repos/PowerShell/nothere' because it does not exist.

PR Context

Fix #10877

PR Checklist

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Dec 18, 2019
@ghost

Copy link
Copy Markdown

🎉v7.0.0-rc.2 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some concerns about error formatting with ErrorView = ConciseView

6 participants