From 1007c3e42028c06845d328e1cffde7a7c10ddf07 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 14 Jul 2020 17:35:55 +0100 Subject: [PATCH] Move powershell to posh --- .../Microsoft.PowerShell_profile.ps1 | 6 +++++- posh/bootstrap.ps1 | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) rename {powershell/Documents/WindowsPowerShell => posh}/Microsoft.PowerShell_profile.ps1 (69%) create mode 100644 posh/bootstrap.ps1 diff --git a/powershell/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 b/posh/Microsoft.PowerShell_profile.ps1 similarity index 69% rename from powershell/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 rename to posh/Microsoft.PowerShell_profile.ps1 index 8e11dc3..a5d478b 100644 --- a/powershell/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 +++ b/posh/Microsoft.PowerShell_profile.ps1 @@ -1,7 +1,7 @@ # Add a SSH key to SSH-Agent function Add-Key { if ($args.Count -gt 0) { - $filename = "$ENV:USERPROFILE/.ssh/id_ed25519_" + $args[0] + $filename = "$ENV:USERPROFILE\.ssh\id_ed25519_" + $args[0] if (!(Test-Path $filename -PathType Leaf)) { Write-Error "$filename does not exist." } @@ -14,6 +14,10 @@ function Add-Key { } } +$DotFilesPath = Join-Path $HOME '.dotfiles' +$DotFilesAutodetect = $true +$DotFilesAllowNestedSymlinks = $true + Import-Module posh-git Import-Module oh-my-posh Set-Theme Paradox \ No newline at end of file diff --git a/posh/bootstrap.ps1 b/posh/bootstrap.ps1 new file mode 100644 index 0000000..acf7171 --- /dev/null +++ b/posh/bootstrap.ps1 @@ -0,0 +1,4 @@ + +Install-Module posh-git -Scope CurrentUser +Install-Module oh-my-posh -Scope CurrentUser +Install-Module -Name PSDotFiles -Scope CurrentUser \ No newline at end of file