Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
powershell_configuration [2021/11/03 12:18] – mgupton | powershell_configuration [2022/04/08 12:54] (current) – mgupton | ||
---|---|---|---|
Line 12: | Line 12: | ||
To edit Powershell profile | To edit Powershell profile | ||
- | < | + | < |
notepad $PROFILE | notepad $PROFILE | ||
</ | </ | ||
- | === Example: sample config | + | Dot (.) source to reload $PROFILE into current sessions, just like Bash |
+ | <code powerhell> | ||
+ | . $profile | ||
+ | </ | ||
+ | |||
+ | Get path to command history file | ||
+ | <code powershell> | ||
+ | (Get-PSReadlineOption).HistorySavePath | ||
+ | </ | ||
+ | |||
+ | === Reference Config | ||
<code powershell> | <code powershell> | ||
Line 25: | Line 35: | ||
Set-PoshPrompt -Theme mg | Set-PoshPrompt -Theme mg | ||
+ | $host.PrivateData.ErrorForegroundColor = ' | ||
+ | $host.PrivateData.ErrorBackgroundColor = ' | ||
+ | |||
set-alias exp explorer.exe | set-alias exp explorer.exe | ||
set-alias gs git-save | set-alias gs git-save | ||
Line 57: | Line 70: | ||
} | } | ||
} | } | ||
- | + | ||
+ | function hpp { | ||
+ | Start-Process notepad++.exe (Get-PSReadlineOption).HistorySavePath | ||
+ | } | ||
function git-dump([Parameter(Mandatory=$true)][string]$commit, | function git-dump([Parameter(Mandatory=$true)][string]$commit, | ||
$temp_file=" | $temp_file=" |