In an admin shell
Install-Module -Name PowerShellGet -Force
Install-Module PSReadLine -Force
# add to profile as above
| # Place this in `echo $profile.CurrentUserAllHosts` - e.g. | |
| # C:\Users\woelt\Documents\WindowsPowerShell\profile.ps1 | |
| # and set Policy in an admin shell: `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned` | |
| # PSReadLine | |
| # https://github.com/PowerShell/PSReadLine | |
| if ($host.Name -eq 'ConsoleHost') | |
| { | |
| Import-Module PSReadLine | |
| } | |
| function setupsshkey([string]$hostAndIP) | |
| { | |
| Get-Content ~/.ssh/id_ed25519.pub | ssh "$hostAndIP" 'cat >> .ssh/authorized_keys' | |
| Write-Host "Successfully copied ssh key to $hostAndIP" -ForegroundColor Green | |
| } | |
| function cmakewithvcpkg { cmake -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake $args } | |
| Set-Alias cmakevcpkg cmakewithvcpkg | |
| # Install oh-my-posh from microsoft store (SLOW!) | |
| # oh-my-posh font install -> select Meslo | |
| # oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/capr4n.omp.json" | Invoke-Expression | |
In an admin shell
Install-Module -Name PowerShellGet -Force
Install-Module PSReadLine -Force
# add to profile as above