2020-12-02 04:31:42 +00:00
|
|
|
## Place the following line at the top of your .zshrc to make powershell your default shell.
|
2021-02-22 19:58:49 +00:00
|
|
|
## __P=".local/share/powershell/Scripts/shell-loading-snippets/$(basename $SHELL)"; find ~/$__P -exec true \; && . ~/$__P
|
2020-12-02 04:31:42 +00:00
|
|
|
|
|
|
|
if [[ -x ~/.dotnet/tools/pwsh && "1" != "$(which pwsh > /dev/null && echo 1)" ]]; then
|
2021-02-22 19:58:49 +00:00
|
|
|
PWSH='~/.dotnet/tools/pwsh'
|
|
|
|
alias pwsh="$PWSH "
|
2020-12-02 04:31:42 +00:00
|
|
|
|
2021-02-22 19:58:49 +00:00
|
|
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
2020-12-02 04:31:42 +00:00
|
|
|
fi
|
2021-02-22 19:58:49 +00:00
|
|
|
|
2021-04-27 21:41:00 +00:00
|
|
|
echo "$(date) SZ_SKIP_DEFAULT_SHELL='$SZ_SKIP_DEFAULT_SHELL'; pwsh: $(which pwsh); Setup-ScriptEnv: $(ls ~/.local/share/powershell/Scripts/Setup-ScriptEnv.ps1) " >> /tmp/default_shell
|
2021-02-22 19:58:49 +00:00
|
|
|
if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then
|
|
|
|
export SZ_SKIP_DEFAULT_SHELL=1
|
2021-04-27 21:41:00 +00:00
|
|
|
if [[ "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-ScriptEnv.ps1 ]]; then
|
2021-02-22 19:58:49 +00:00
|
|
|
echo 'Starting PowerShell SZcripts...'
|
|
|
|
echo "pwsh" >> /tmp/default_shell
|
|
|
|
pwsh
|
2021-07-16 13:30:11 +00:00
|
|
|
if [[ ! -f /tmp/keep_shell_after_pwsh ]]; then
|
|
|
|
exit
|
|
|
|
fi
|
2021-02-22 19:58:49 +00:00
|
|
|
fi
|
2020-12-02 04:31:42 +00:00
|
|
|
fi
|
|
|
|
echo "continue" >> /tmp/default_shell
|
|
|
|
export SZ_SKIP_DEFAULT_SHELL=1
|
|
|
|
|