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

Add New-GitPromptSettings to make it easier to create this type #659

Merged
merged 3 commits into from
Feb 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,56 @@
# posh-git Release History

## 1.0.0-beta3 - June 14, 2018
## 1.0.0-beta3 - March 1, 2019

- Moved SSH agent functionality to <https://github.com/dahlbyk/posh-sshell>.
### Removed

- SSH agent functionality has been removed from `posh-git` and put into another module focused solely on
Git SSH support. See [posh-sshell](https://github.com/dahlbyk/posh-sshell).

### Added

- Add support for vsts-cli Git integration.
([#549](https://github.com/dahlbyk/posh-git/issues/549))
([PR #581](https://github.com/dahlbyk/posh-git/pull/581))
Thanks David Gardiner (@flcdrg)
- Enhance prompt function to show username/hostname in SSH connection. Adds Get-PromptConnectionInfo command.
([#591](https://github.com/dahlbyk/posh-git/issues/591))
([PR #595](https://github.com/dahlbyk/posh-git/pull/595))
- Show Rebase Progress (plus |REVERTING).
([#102](https://github.com/dahlbyk/posh-git/issues/102))
([PR #599](https://github.com/dahlbyk/posh-git/pull/599))
- Set `$Env:COLUMNS` on prompt if necessary.
([PR #607](https://github.com/dahlbyk/posh-git/pull/607))
- Tab-completion for `git log --stat`, `git log --patch` and `git diff --staged`.
([PR #620](https://github.com/dahlbyk/posh-git/pull/620))
Thanks Vasily Korytov (@chillum)
- Tab-completion for `git update-git-for-windows` on Windows Git >= 2.16.2.
- New-GitPromptSettings to provide an easy way to create a PoshGitPromptSettings object which can be used to
reset to the default settings.

### Changed

- Eliminate traiing `=` on the tab-completion of `--force-with-lease=`.
([PR #622](https://github.com/dahlbyk/posh-git/pull/622))
Thanks Chuck Lu (@chucklu)
- Expand `PathStatusSeparator` string when composing prompt. This allows you to use string interpolation in the
`$GitPromptSettings.PathStatusSeparator.Text` setting.
([PR #630](https://github.com/dahlbyk/posh-git/pull/630))
Thanks Jason Shirk (@lzybkr)

### Fixed

- WindowTitle set by user overwritten by module. No longer updates Window title if WindowTitle setting set to $null.
([#594](https://github.com/dahlbyk/posh-git/issues/594))
([PR #597](https://github.com/dahlbyk/posh-git/pull/597))
- `Write-VcsStatus` behaving differently. When AnsiConsole -eq $false, Write-VcsStatus must not emit any strings.
([#612](https://github.com/dahlbyk/posh-git/issues/612))
([PR #617](https://github.com/dahlbyk/posh-git/pull/617))
- Skip the ConsoleMode hack for new Windows versions. On Windows PowerShell, defer `Add-Type` until
Set-ConsoleMode executed. On PowerShell Core, do not change console mode at all since PowerShell does this
automatically. This improves module load time.
([#637](https://github.com/dahlbyk/posh-git/issues/637))
([PR #638](https://github.com/dahlbyk/posh-git/pull/638))

## 1.0.0-beta2 - May 13, 2018

Expand Down
18 changes: 18 additions & 0 deletions src/GitPrompt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ if ($Host.UI.RawUI.BackgroundColor -eq [ConsoleColor]::DarkMagenta) {
$s.WorkingColor.ForegroundColor = 'Red'
}

<#
.SYNOPSIS
Creates a new instance of a PoshGitPromptSettings object that can be assigned to $GitPromptSettings.
.DESCRIPTION
Creates a new instance of a PoshGitPromptSettings object that can be used to reset the
$GitPromptSettings back to its default.
.INPUTS
None
.OUTPUTS
PoshGitPromptSettings
.EXAMPLE
PS> $GitPromptSettings = New-GitPromptSettings
This will reset the current $GitPromptSettings back to its default.
#>
function New-GitPromptSettings {
[PoshGitPromptSettings]::new()
}

<#
.SYNOPSIS
Writes the object to the display or renders it as a string using ANSI/VT sequences.
Expand Down
1 change: 1 addition & 0 deletions src/posh-git.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ FunctionsToExport = @(
'Get-GitDirectory',
'Get-PromptConnectionInfo',
'Get-PromptPath',
'New-GitPromptSettings',
'Update-AllBranches',
'Write-GitStatus',
'Write-GitBranchName',
Expand Down
1 change: 1 addition & 0 deletions src/posh-git.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ $exportModuleMemberParams = @{
'Get-GitStatus',
'Get-PromptConnectionInfo',
'Get-PromptPath',
'New-GitPromptSettings',
'Update-AllBranches',
'Write-GitStatus',
'Write-GitBranchName',
Expand Down