posh-git v1.0.0-beta2 Release Notes
Release Date: 2018-05-13 // almost 6 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
valuesBeforeText
toBeforeStatus
DelimText
toDelimStatus
AfterText
toAfterStatus
BeforeIndexText
toBeforeIndex
BeforeStashText
toBeforeStash
AfterStashText
toAfterStash
- 0๏ธโฃ Split
$GirPromptSettings.DefaultPromptSuffix
and$GitPromptSettings.DefaultPromptDebugSuffix
into:DefaultPromptBeforeSuffix
(''
)DefaultPromptDebug
(' [DBG]:'
), which is rendered if a debugger is attachedDefaultPromptSuffix
('$(">" * ($nestedPromptLevel + 1)) '
), which is rendered last (or returned fromprompt
, 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 everyprompt
, not just when inside a Git repo.- To prevent setting
WindowTitle
, set$GitPromptSettigs.WindowTitle
to$null
. - The
WindowTitle
update has been moved from theWrite-GitStatus
command to the built-inprompt
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 supportSystem.Drawing.ColorTranslator
) before being parsed as aConsoleColor
. To force usingConsoleColors
, 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)
- A path exactly matching
- ๐ New
$GitPromptSettings
values (default):PathStatusSeparator
()
DefaultPromptPath
('$(Get-PromptPath)'
)DefaultPromptWriteStatusFirst
($false
)DefaultPromptTimingFormat
(' {0}ms'
)
RepoName
property has been addded to the$global:GitStatus
object returned byGet-GitStatus
.- โ Added
$GitPromptSettings.UntrackedFilesMode
; accepted values are$null
(inheritstatus.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 affectGet-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 toGet-Content -AsByteStream
on PowerShell Core. (PR #532) - ๐ Fixed ANSI rendering bug: when both
ForegroundColor
andBackgroundColor
colors are$null
(default), we were emitting an unnecessary terminating escape sequence"$([char]27)[0m"
. (PR #532) - ๐ Fixed issue where setting
ForegroundColor
orBackgroundColor
to 0 (Black) rendered the default color instead. - โก๏ธ Updated Git subcommand lists (#561) (PR #571)
- ๐ Renamed