Streamlined pwsz loading from Linux shells
Get-Path updated to support @ notation. MyConfig class updated to resolve Paths before testing. MyScript class will look recursivley - this might need to change again. config.files.json updated to support shell-loading-snippets shell-loading-snippets added, with single line of code to inject into startup shell scripts (.zshrc, .bashrc, .shrc)
This commit is contained in:
parent
e34d9d4e4d
commit
c6cc116564
7 changed files with 73 additions and 3 deletions
19
shell-loading-snippets/zsh
Executable file
19
shell-loading-snippets/zsh
Executable file
|
@ -0,0 +1,19 @@
|
|||
## Place the following line at the top of your .zshrc to make powershell your default shell.
|
||||
# local P=".local/share/powershell/Scripts/shell-loading-snippets/$(basename $SHELL)"; find ~/$P -exec echo 'Starting PowerShell SZcripts...' \; && . ~/$P
|
||||
|
||||
if [[ -x ~/.dotnet/tools/pwsh && "1" != "$(which pwsh > /dev/null && echo 1)" ]]; then
|
||||
PWSH='~/.dotnet/tools/pwsh'
|
||||
alias pwsh="$PWSH "
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
fi
|
||||
echo "$(date) SZ_SKIP_DEFAULT_SHELL='$SZ_SKIP_DEFAULT_SHELL'; pwsh: $(which pwsh); Setup-Profile: $(ls ~/.local/share/powershell/Scripts/base/Setup-Profile.ps1) " >> /tmp/default_shell
|
||||
if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" && "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/base/Setup-Profile.ps1 ]]; then
|
||||
echo "pwsh" >> /tmp/default_shell
|
||||
pwsh
|
||||
exit
|
||||
fi
|
||||
echo "continue" >> /tmp/default_shell
|
||||
export SZ_SKIP_DEFAULT_SHELL=1
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue