-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile.ps1
27 lines (21 loc) · 859 Bytes
/
profile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Invoke-Expression (&starship init powershell)
Set-PSReadlineKeyHandler -Key ctrl+d -Function ViExit
Invoke-Expression (& { (zoxide init --cmd cd powershell | Out-String) })
Function Invoke-Explorer {
explorer.exe .
}
Function Update-EnvPath {
$env:Path = [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('Path', 'User')
}
Function New-PythonVenv {
uv venv
.\.venv\Scripts\activate.ps1
}
Set-Alias -Name 'here' -Value Invoke-Explorer
Set-Alias -Name 'refreshenv' -Value Update-EnvPath
Set-Alias -Name 'venv' -Value New-PythonVenv
Set-Alias -Name 'touch' -Value New-Item
Set-Alias -Name 'rm' -Value Remove-ItemSafely -Force
Set-Alias -Name 'which' -Value Get-Command
Set-Alias -Name 'activate' -Value '.\.venv\Scripts\activate.ps1'
Set-Alias -Name 'pt' -Value 'ptpython'