]> apps.delaporte.us Git - dotfiles.git/commitdiff
More tidying
authorEdward Delaporte <delaport@illinois.edu>
Fri, 6 Oct 2023 16:20:35 +0000 (11:20 -0500)
committerEdward Delaporte <delaport@illinois.edu>
Fri, 6 Oct 2023 16:20:35 +0000 (11:20 -0500)
files/Microsoft.PowerShell_profile.ps1
files/dashboard.ps1 [new file with mode: 0644]

index ca6cfd66bf7b67e2765d16307a9a1bc1395d7d35..fc17319d137302cbd7dd03632f6e9d40763cf465 100644 (file)
@@ -1,35 +1,24 @@
-
 $env:src = "~\src"
 Import-Module $env:src\dotfiles\psmodules\add_to_profile.psm1
 Add-ToProfile $env:src\dotfiles\files\paths.ps1
 Add-ToProfile $env:src\dotfiles\files\env.ps1
 Add-ToProfile $env:src\dotfiles\files\load_modules.ps1
 
 $env:src = "~\src"
 Import-Module $env:src\dotfiles\psmodules\add_to_profile.psm1
 Add-ToProfile $env:src\dotfiles\files\paths.ps1
 Add-ToProfile $env:src\dotfiles\files\env.ps1
 Add-ToProfile $env:src\dotfiles\files\load_modules.ps1
 
-# You can pry my unix commands out of my cold dead fingers
-Set-Alias which get-command
-
-# Linux-like up/down in shell
-Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward 
-Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward 
-Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
-
 # Delay loading PoshGit for speed. 
 function Enable-PoshGit {
        Import-Module posh-git
 }
 New-Alias pg    Enable-PoshGit
 # Delay loading PoshGit for speed. 
 function Enable-PoshGit {
        Import-Module posh-git
 }
 New-Alias pg    Enable-PoshGit
-Write-Host "+ Type 'pg' to enable PoshGit"
-
-# Let's face it, I'm about to cd into my source directory
-if((Get-Location).Path -eq $HOME){
-       cd $env:src
-}
 
 
-# Dashboard
-New-Alias dash   Show-MyDashboard # from dash.psm1
+# You can pry my unix commands out of my cold dead fingers
+Set-Alias which get-command
+# Reject Windows heritage, act like Vi
+Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
+Set-PSReadlineOption -BellStyle Visual
+Set-PSReadlineOption -ViModeIndicator Prompt
+Set-PSReadlineOption -EditMode Vi
 
 
-function Get-JournalAgenda() {
-       agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
-}
-New-Alias today Get-JournalAgenda
-# Write-Host "Real profile file is at $env:realProfile ($$env:realProfile)"
\ No newline at end of file
+Write-Host "+ Type 'pg' to enable PoshGit"
+Write-Host 'See $env:realProfile for version controlled profile file.'
+# Let's face it, I'm about to cd into my source directory
+if((Get-Location).Path -eq $HOME){ cd $env:src }
\ No newline at end of file
diff --git a/files/dashboard.ps1 b/files/dashboard.ps1
new file mode 100644 (file)
index 0000000..6012df2
--- /dev/null
@@ -0,0 +1,7 @@
+# Dashboard
+New-Alias dash   Show-MyDashboard # from dash.psm1
+
+function Get-JournalAgenda() {
+       agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
+}
+New-Alias today Get-JournalAgenda
\ No newline at end of file