Skip to content

Commit f87de50

Browse files
committed
✨ feat: added dotu - update windots function
1 parent 5abac70 commit f87de50

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

dotposh/Config/posh-aliases.ps1

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,19 @@ Add-Alias envs 'Get-ChildItem Env:'
184184
Add-Alias profiles 'Get-PSProfile {$_.exists -eq "True"} | Format-List'
185185

186186
Add-Alias HKLM: 'Set-Location HKLM:'
187-
Add-Alias HKCU: 'Set-Location HKCU:'
187+
Add-Alias HKCU: 'Set-Location HKCU:'
188+
189+
190+
# ----------------------------------------------------------------------------------- #
191+
# Dotfiles related
192+
${function:dotu} = {
193+
$currentLocation = "$(Get-Location)"
194+
Write-Host "Updating windots..."
195+
Set-Location "$env:DOTFILES"
196+
git stash | Out-Null
197+
git pull | Out-Null
198+
git stash pop | Out-Null
199+
Start-Process pwsh -WindowStyle Hidden -ArgumentList "./Setup.ps1"
200+
Set-Location $currentLocation
201+
. $PROFILE.CurrentUserAllHosts
202+
}

0 commit comments

Comments
 (0)