Last active
December 12, 2019 02:06
-
-
Save gregmac/81a6c853d3992cdf95fca47bb1bb0b63 to your computer and use it in GitHub Desktop.
Revisions
-
gregmac revised this gist
Jul 3, 2019 . 1 changed file with 16 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,25 @@ # Import posh-git (if installed via scoop) $poshGitModule = "$HOME\scoop\apps\posh-git\current\posh-git.psd1"; if (Test-Path $poshGitModule) { Import-Module $poshGitModule } # msbuild convenience alias Set-Alias MSBuild 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe' # bash-style completion Set-PSReadlineKeyHandler -Key Tab -Function Complete #Set-PSReadlineOption -ShowToolTips # set powershell window title function Set-WindowTitle { $global:WindowTitleOverride = [string]::Join(" ",$args) } Set-Alias -name "title" -value Set-WindowTitle # override promt: set window title to current directory, # unless Set-WindowTitle was used to override, # or posh-git is installed and we're in a git directory. function Prompt { # Set WindowTitle to current directory name, unless overridden with Set-WindowTitle $host.ui.RawUI.WindowTitle = if ($global:WindowTitleOverride) { $global:WindowTitleOverride } else { get-location }; if ($GitPromptScriptBlock) { & $GitPromptScriptBlock } # posh-git compatibility else { 'PS ' + $pwd + '> ' } } -
gregmac renamed this gist
May 17, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,5 @@ function Prompt # Set WindowTitle to current directory name, unless overridden with Set-WindowTitle $host.ui.RawUI.WindowTitle = if ($global:WindowTitleOverride) { $global:WindowTitleOverride } else { get-location }; if ($GitPromptScriptBlock) { & $GitPromptScriptBlock } # posh-git compatibility else { 'PS ' + $pwd + '> ' } # default. TODO: is it possible to chain and call the previous `Prompt` command? } -
gregmac created this gist
May 16, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ function Set-WindowTitle { $global:WindowTitleOverride = [string]::Join(" ",$args) } Set-Alias -name "title" -value Set-WindowTitle function Prompt { # Set WindowTitle to current directory name, unless overridden with Set-WindowTitle $host.ui.RawUI.WindowTitle = if ($global:WindowTitleOverride) { $global:WindowTitleOverride } else { get-location }; if ($GitPromptScriptBlock) { & $GitPromptScriptBlock } # posh-git compatibility }