use `&` to load completions for PowerShell
in src/building/suggested.md
You can use
source ./src/etc/completions/x.py.<extension>to load completions for your shell of choice, orsource .\src\etc\completions\x.py.ps1for PowerShell.
to my best knowledge, there is no source command in powershell. it is available only in unix-like os.
we should use call operator(&) to load .ps1 script file for powershell
Other choice we may have:
-
Execute the filename directly:
.\src\etc\completions\x.py.ps1This is equivalent to call operator, but its semantics are not clear enough -
Invoke-Expression:
Invoke-Expression -Command ".\src\etc\completions\x.py.ps1"too long and no obvious benefit -
Dot-Sourcing:
. .\src\etc\completions\x.py.ps1all definitions in the script will be import to the current session. we dont need so much
Is anyone going to review or discuss this?