]> apps.delaporte.us Git - dotfiles.git/blob - files/Microsoft.PowerShell_profile.ps1
Shorter flag
[dotfiles.git] / files / Microsoft.PowerShell_profile.ps1
1 $env:src = "$HOME\src"
2 $env:dotfiles = "$HOME\dotfiles"
3 Import-Module $env:dotfiles\psmodules\add_to_profile.psm1
4 Add-ToProfile $env:dotfiles\files\paths.ps1
5 Add-ToProfile $env:dotfiles\files\env.ps1
6
7 # Delay loading PoshGit for speed.
8 function Enable-PoshGit {
9 Import-Module posh-git
10 }
11 New-Alias pg Enable-PoshGit
12
13 Set-Alias code codium # Prefer Codium
14
15 # Dashboard
16 New-Alias dash Show-MyDashboard # from dash.psm1
17 New-Alias today Get-JournalAgenda
18
19 # You can pry my unix commands out of my cold dead fingers
20 if($iswindows) {
21 Set-Alias which get-command
22 }
23 # Reject Windows heritage, act like Vi
24 # Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
25 Set-PSReadlineOption -BellStyle Visual
26 Set-PSReadlineOption -ViModeIndicator Prompt
27 Set-PSReadlineOption -EditMode Vi
28
29 Write-Host "+ Type 'pg' to enable PoshGit"
30 Write-Host 'See $env:realProfile for version controlled profile file.'
31
32 # Load dotfiles modules
33 $env:psmodules = "$env:dotfiles\psmodules"
34 Import-Module "$env:psmodules\dash.psm1"
35 Import-Module $env:psmodules\file_management.psm1
36 Import-Module "$env:psmodules\fix_vpn.psm1"
37 Import-Module $env:psmodules\house_shopping.psm1
38
39 # Load local source modules
40 Import-Module $env:src\powershell-scripts\modules\AgileGitHubCLI.psm1
41 # Import-Module $env:src\powershell-scripts\modules\MarkdownGitHub.psm1
42
43 # Let's face it, I'm about to cd into my source directory
44 if((Get-Location).Path -eq $HOME){ cd $env:src }