I love the adaptability of command line interfaces. Use both powershell and bash on windows, maybe bash a little more than the ps. Anyway i add stuff to the bash or powershell Profile Files quite often. So the first things i add are two functions(ps) or aliases(bash) when setting up new shell:
- A function named eprof (edit profile). This opens the profile file in an editor.
- A function named rprof (refresh profile). This reloads the profile for the curren sessiont without having to reopen the shell.
so how does this look?
bash
alias epr="code ~/.bashrc"
alias rpr="source ~/.bashrc"
powershell
function eprof {
Set-Location 'Path to my Powershell Profile'
code .\Microsoft.PowerShell_profile.ps1
}
function rprof {
. $PROFILE
}
The code keyword opens the specific files in vs code.