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

Set $Env:COLUMNS on prompt if necessary #607

Merged
merged 2 commits into from
Aug 18, 2018
Merged

Set $Env:COLUMNS on prompt if necessary #607

merged 2 commits into from
Aug 18, 2018

Conversation

dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Aug 18, 2018

Git uses COLUMNS, which is not set by PowerShell, for formatting output (e.g. git log --stat). To account for resized windows, we'll set COLUMNS to WindowSize.Width on every prompt.

Setting COLUMNS is currently disabled if it's already set when posh-git loads, or by setting $GitPromptSettings.SetEnvColumns = $false.

Git uses COLUMNS, which is not set by PowerShell, for formatting output.
To account for resized windows, we'll set COLUMNS to WindowSize.Width on
every prompt.

Setting COLUMNS will be disabled if it's already set when posh-git
loads, or by setting $GitPromptSettings.SetEnvColumns = $false.
@dahlbyk
Copy link
Owner Author

dahlbyk commented Aug 18, 2018

Setting COLUMNS is currently disabled if it's already set when posh-git loads

I'm tempted to just default this to $true. As-is, resizing a nested PowerShell console won't pick up changes in WindowSize.

@rkeithhill
Copy link
Collaborator

Seems reasonable to me.

Copy link
Collaborator

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dahlbyk dahlbyk merged commit e188bbc into master Aug 18, 2018
@dahlbyk dahlbyk deleted the set-columns branch August 18, 2018 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants