Removed some comments
This commit is contained in:
parent
b9ec0eb3ba
commit
37b10d439c
18
setup.ps1
18
setup.ps1
@ -63,27 +63,11 @@ function Update-Profile {
|
|||||||
$URL="https://git.theflyingfool.com/theflyingfool/Win_Setup/raw/branch/main/CopyFromFile.txt"
|
$URL="https://git.theflyingfool.com/theflyingfool/Win_Setup/raw/branch/main/CopyFromFile.txt"
|
||||||
$PATH="$PWD\CopyFromFile.txt"
|
$PATH="$PWD\CopyFromFile.txt"
|
||||||
if (-not (Test-Path ./CopyFromFile.txt)) { (New-Object System.Net.WebClient).DownloadFile($URL, $PATH) }
|
if (-not (Test-Path ./CopyFromFile.txt)) { (New-Object System.Net.WebClient).DownloadFile($URL, $PATH) }
|
||||||
# Get-Content -Path $PROFILE
|
|
||||||
$CheckString = Get-Content -Path .\CopyFromFile.txt
|
$CheckString = Get-Content -Path .\CopyFromFile.txt
|
||||||
if (-not(Select-String -Quiet -Path $PROFILE -Pattern $CheckString)) {Get-Content -Path .\CopyFromFile.txt | Add-Content -Path $PROFILE}
|
if (-not(Select-String -Quiet -Path $PROFILE -Pattern $CheckString)) {Get-Content -Path .\CopyFromFile.txt | Add-Content -Path $PROFILE}
|
||||||
# Get-Content -Path $PROFILE
|
|
||||||
|
|
||||||
#>
|
|
||||||
<#
|
|
||||||
Write-Output '
|
|
||||||
|
|
||||||
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', $_)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}' >> $PROFILE
|
|
||||||
|
|
||||||
#>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user