Added a call to Reload-MyAliases
This commit is contained in:
parent
bfb2e38cc0
commit
bb2488e591
11
README.md
11
README.md
|
@ -8,7 +8,14 @@ They are provided 'as is' for your review and for your reuse.
|
|||
|
||||
There is a [blog post](https://blog.lksz.me/keeping-track-of-everything/#-mypsscriptroot) about how to clone this repo and use it as your own.
|
||||
|
||||
The scripts all [assume](https://blog.lksz.me/functions-or-scripts/#myprofilecode) the following code is part of one of your $PROFILE files:
|
||||
The scripts all [assume](https://blog.lksz.me/functions-or-scripts/#myprofilecode) the code below is part of one of your $PROFILE files.
|
||||
The code establishes the following variables:
|
||||
* `$PathEnvDelimiter` - Linux/Unix it's `:`, while in Windows it's `;`
|
||||
* `$MyPSModulePath` - Location to place personal Modules
|
||||
* `$MyPSScrtipRoot` - Location of personal Scripts.
|
||||
|
||||
The code also makes sure `$MyPSScriptRoot` is in the `$env:PATH` environment vairable, and finally it calls [`Reload-MyAliases`](https://blog.lksz.me/a-case-of-sensitivity/#myaliases) if it exists.
|
||||
|
||||
```
|
||||
$global:PathEnvDelimiter = $(if( $PSVersionTable.Platform -match 'unix' ) {':'} else {';'})
|
||||
function Split-PathEnv {
|
||||
|
@ -34,4 +41,6 @@ if( -not (Test-Path $MyPSScrtipRoot) ) {
|
|||
|
||||
$p = @($p[0], $MyPSScrtipRoot) + $($p | Select-Object -Skip 1)
|
||||
$env:PATH = $p -join $PathEnvDelimiter
|
||||
|
||||
Get-Command Reload-MyAliases -ErrorAction SilentlyContinue | ForEach-Object { Reload-MyAliases }
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue