]> apps.delaporte.us Git - dotfiles.git/blob - files/Microsoft.PowerShell_profile.ps1
Down to one page of PSProfile!
[dotfiles.git] / files / Microsoft.PowerShell_profile.ps1
1
2 $env:src = "~\src"
3 Import-Module $env:src\dotfiles\psmodules\add_to_profile.psm1
4 Add-ToProfile $env:src\dotfiles\files\paths.ps1
5 Add-ToProfile $env:src\dotfiles\files\env.ps1
6 Add-ToProfile $env:src\dotfiles\files\load_modules.ps1
7
8 # You can pry my unix commands out of my cold dead fingers
9 Set-Alias which get-command
10
11 # Linux-like up/down in shell
12 Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
13 Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
14 Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
15
16 # Delay loading PoshGit for speed.
17 function Enable-PoshGit {
18 Import-Module posh-git
19 }
20 New-Alias pg Enable-PoshGit
21 Write-Host "+ Type 'pg' to enable PoshGit"
22
23 # Let's face it, I'm about to cd into my source directory
24 if((Get-Location).Path -eq $HOME){
25 cd $env:src
26 }
27
28 # Dashboard
29 New-Alias dash Show-MyDashboard # from dash.psm1
30
31 function Get-JournalAgenda() {
32 agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
33 }
34 New-Alias today Get-JournalAgenda
35 # Write-Host "Real profile file is at $env:realProfile ($$env:realProfile)"