diff --git a/powershell/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 b/powershell/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 0000000..8e11dc3 --- /dev/null +++ b/powershell/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,19 @@ +# Add a SSH key to SSH-Agent +function Add-Key { + if ($args.Count -gt 0) { + $filename = "$ENV:USERPROFILE/.ssh/id_ed25519_" + $args[0] + if (!(Test-Path $filename -PathType Leaf)) { + Write-Error "$filename does not exist." + } + else { + Invoke-Expression "ssh-add $filename" + } + } + else { + Invoke-Expression "ssh-add -L" + } +} + +Import-Module posh-git +Import-Module oh-my-posh +Set-Theme Paradox \ No newline at end of file