posh-git v1.0.0-beta2 Release Notes

Release Date: 2018-05-13 // over 4 years ago
  • ๐Ÿš€ The 1.0.0 release is targeted specifically at Windows PowerShell 5.x and (cross-platform) PowerShell Core 6.x, both of ๐Ÿ‘ which support classes, enabling the enhanced structure of $GitPromptSettings, and writing prompt strings using [ANSI escape sequences][ansi-esc-code] / ๐Ÿ [Console Virtual Terminal Sequences][console-vt-seq] (supported since Windows 10 version 1511).

    ๐Ÿš€ Consequently, this release introduces BREAKING changes with 0.x. ๐Ÿ If you are still on Windows PowerShell 2.0, 3.0 or 4.0, please continue to use the 0.x version of posh-git.

    ๐Ÿ”„ Changed

    • ๐Ÿ“‡ Renamed $GitPromptSettings values
      • BeforeText to BeforeStatus
      • DelimText to DelimStatus
      • AfterText to AfterStatus
      • BeforeIndexText to BeforeIndex
      • BeforeStashText to BeforeStash
      • AfterStashText to AfterStash
    • 0๏ธโƒฃ Split $GirPromptSettings.DefaultPromptSuffix and $GitPromptSettings.DefaultPromptDebugSuffix into:
      1. DefaultPromptBeforeSuffix ('')
      2. DefaultPromptDebug (' [DBG]:'), which is rendered if a debugger is attached
      3. DefaultPromptSuffix ('$(">" * ($nestedPromptLevel + 1)) '), which is rendered last (or returned from prompt, for terminals that don't support escape sequences)
    • ๐Ÿ“‡ Renamed $GitPromptSettings.EnableWindowTitle to $GitPromptSettings.WindowTitle with significant improvements:
      • $Host.UI.RawUI.WindowTitle is now set on every prompt, not just when inside a Git repo.
      • To prevent setting WindowTitle, set $GitPromptSettigs.WindowTitle to $null.
      • The WindowTitle update has been moved from the Write-GitStatus command to the built-in prompt function.
      • $GitPromptSettings.WindowTitle is now fully customizable:
      • As a string, it will be processed with [ExpandString][invokecommand-expandstring].
      • As a ScriptBlock (default), it will be executed with two parameters: $GitStatus and $IsAdmin.
    • ๐Ÿ“œ When a color setting is specified by a string (color name), it is parsed as an HTML color (on platforms that support System.Drawing.ColorTranslator) before being parsed as a ConsoleColor. To force using ConsoleColors, use static member syntax (e.g. [ConsoleColor]::Cyan). (PR #536)
    • PoshGitVcsPrompt errors now show details if $GitPromptSettings.Debug (PR #560)

    โž• Added

    • ๐Ÿ†• New command Get-PromptPath which formats the path displayed in the prompt and window title. This command honors $GitPromptSettings.DefaultPromptAbbreviateHomeDirectory.
      • A path exactly matching $HOME is now shown in full, rather than abbreviated to ~ (PR #567)
    • ๐Ÿ†• New $GitPromptSettings values (default):
      • PathStatusSeparator ()
      • DefaultPromptPath ('$(Get-PromptPath)')
      • DefaultPromptWriteStatusFirst ($false)
      • DefaultPromptTimingFormat (' {0}ms')
    • RepoName property has been addded to the $global:GitStatus object returned by Get-GitStatus.
    • โž• Added $GitPromptSettings.UntrackedFilesMode; accepted values are $null (inherit status.showUntrackedFiles), "all", "no", and "normal" (#556) (PR #557) Thanks David Snedecor (@TheSned)
    • Exported Expand-GitCommand for use with custom tab expansion (#562) (PR #563)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed $GitPromptSettings.EnablePromptStatus should not affect Get-GitStatus by adding -Force parameter. (#475) (PR #535)
    • ๐Ÿ›  Fixed PowerShell Core bug where we were using Get-Content -Encoding Byte when processing profile scripts during Chocolatey install/uninstall. That encoding doesn't exist in PowerShell Core. Switched to Get-Content -AsByteStream on PowerShell Core. (PR #532)
    • ๐Ÿ›  Fixed ANSI rendering bug: when both ForegroundColor and BackgroundColor colors are $null (default), we were emitting an unnecessary terminating escape sequence "$([char]27)[0m". (PR #532)
    • ๐Ÿ›  Fixed issue where setting ForegroundColor or BackgroundColor to 0 (Black) rendered the default color instead.
    • โšก๏ธ Updated Git subcommand lists (#561) (PR #571)