Upload files to "windows"
Added Powershell profile
This commit is contained in:
parent
7887557dc3
commit
ef393be38d
14
windows/Microsoft.PowerShell_profile.ps1
Normal file
14
windows/Microsoft.PowerShell_profile.ps1
Normal file
@ -0,0 +1,14 @@
|
||||
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 touch($file) {
|
||||
"" | Out-File $file -Encoding ASCII
|
||||
}
|
9
windows/Microsoft.VSCode_profile.ps1
Normal file
9
windows/Microsoft.VSCode_profile.ps1
Normal 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', $_)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user