Working to unbranch due to not working as expected

This commit is contained in:
TheFlyingFool 2024-06-10 19:05:15 -05:00
parent 32c67d6fee
commit e45f0b64bf
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,15 @@
Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
[Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new()
$Local:word = $wordToComplete.Replace('"', '""')
$Local:ast = $commandAst.ToString().Replace('"', '""')
winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}
function dot { & git --git-dir="$HOME/.dot/" --work-tree="$HOME" @args }
# Source the aliases.ps1 file
. "$PSScriptRoot/aliases.ps1"

View File

@ -0,0 +1,9 @@
Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
[Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new()
$Local:word = $wordToComplete.Replace('"', '""')
$Local:ast = $commandAst.ToString().Replace('"', '""')
winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}

7
windows/aliases.ps1 Normal file
View File

@ -0,0 +1,7 @@
function Upgrade-All { winget upgrade --all }
Set-Alias -Name Syu -Value Upgrade-All
function touch($file) {
"" | Out-File $file -Encoding ASCII
}