This file contains 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 characters
$wingetCompleter = { | |
param($wordToComplete, $commandAst, $cursorPosition) | |
$tokens = $commandAst.Extent.Text.Trim() -split '\s+' | |
$completions = switch ($tokens[1]) { | |
'install' { "-q","-m","-v","-s","-e","-i","-h","-o","-l", | |
"--query","--manifest","--id","--name","--moniker","--version","--source","--exact","--interactive", | |
"--silent","--log","--override","--location","--help"; break } | |
'search' { "-q","-s","-n","-e","-?", | |
"--query","--id","--name","--moniker","--tag","--command","--source","--count","--exact","--help" |
This file contains 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 characters
// This file was initially generated by Windows Terminal 0.11.1121.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
This file contains 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 characters
DIR 34 | |
LINK 33 | |
*.exe 38;2;0;192;0 # Bold executables | |
*.ps1 92 # PowerShell scripts | |
*.psm1 92 # PowerShell module scripts |
This file contains 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 characters
# Import Posh-Git and configure Git prompt | |
Import-Module posh-git | |
#Import-Module ~\GitHub\dahlbyk\posh-git\src\posh-git.psd1 | |
#Import-Module ~\GitHub\dahlbyk\posh-git\out\posh-git\1.0.0\posh-git.psd1 | |
# Windows PowerShell doesn't parse `e or `u escape sequences in DQ strings. I added that support to the PS parser in 6.0 | |
if ($PSVersionTable.PSVersion.Major -lt 6) { | |
$global:GitPromptSettings.WindowTitle = { | |
param($GitStatus, [bool]$IsAdmin) |
This file contains 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 characters
// Place your settings in this file to overwrite the default settings | |
{ | |
"debug.toolBarLocation": "docked", | |
"diffEditor.ignoreTrimWhitespace": true, | |
"editor.codeLens": true, | |
"editor.detectIndentation": false, | |
"editor.dragAndDrop": false, | |
"editor.renderWhitespace": "none", |
This file contains 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 characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "alt+n", "command": "explorer.newFile" }, | |
{ "key": "alt+shift+s", "command": "PowerShell.InvokeRegisteredEditorCommand", | |
"args": { "commandName": "ConvertToSplatExpression" }, | |
"when": "editorLangId == 'powershell'" }, | |
{ "key": "ctrl+shift+q", "command": "workbench.action.toggleMaximizedPanel" }, | |
{ "key": "ctrl+shift+s", "command": "workbench.action.files.saveAll" }, | |
{ "key": "ctrl+shift+t", "command": "workbench.action.tasks.test" }, | |
{ "key": "ctrl+alt+t", "command": "workbench.action.tasks.runTask" }, |
This file contains 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 characters
# More gitconfig goodness here - https://gist.github.com/tdd/470582 | |
git config --global user.name "Keith Hill" | |
git config --global user.email <email here> | |
git config --global core.editor '\"C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd\" --new-window --wait' | |
git config --global core.autocrlf true | |
git config --global pull.ff only | |
git config --global pull.rebase true | |
git config --global rebase.autoStash true |
This file contains 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 characters
if (($PSVersionTable.PSVersion.Major -le 5) -or $IsWindows) { | |
Set-Alias nano 'C:\Program Files\Git\usr\bin\nano.exe' | |
Set-Alias vim 'C:\Program Files\Git\usr\bin\vim.exe' | |
} | |
# Edition/platform specific configuration | |
if ($IsWindows) { | |
$env:PAGER = 'less -Ps"Page %db?B of %D:.\. Press h for help or Q to quit\."' | |
if ($PSVersionTable.PSEdition -eq 'Desktop') { | |
$PSDefaultParameterValues['Get-Help:Full'] = $true |
This file contains 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 characters
<# | |
.SYNOPSIS | |
Sets the console settings to the specified values and color theme. | |
.DESCRIPTION | |
Sets the console settings to the specified values and color theme. | |
.EXAMPLE | |
C:\PS> Configure-ConsoleSettings -Theme ConEmu -WindowSize 120,50 ` | |
-FontFace Consolas -FontSize 12 | |
Sets the colors to those used in ConEmu and sets the font and window size. |
This file contains 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 characters
<# | |
.SYNOPSIS | |
Optimizes your PSReadline history save file. | |
.DESCRIPTION | |
Optimizes your PSReadline history save file by removing duplicate | |
entries and optionally removing commands that are not longer than | |
a minimum length | |
.EXAMPLE | |
C:\PS> Optimize-PSReadlineHistory | |
Removes all the duplicate commands. |
NewerOlder