diff --git a/base/profile.d/Style.ps1 b/base/profile.d/Style.ps1 index aedd15b..f635f5a 100644 --- a/base/profile.d/Style.ps1 +++ b/base/profile.d/Style.ps1 @@ -1,6 +1,6 @@ Get-Command Set-PSReadLineKeyHandler | ForEach-Object { Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete } if( Get-Command Set-PoshPrompt -ErrorAction SilentlyContinue ) { $local:poshPrompt = Join-Path $HOME ".oh-my-posh.omp.json" - if( -not (Test-Path $poshPrompt) ) { $poshPrompt = "powerlevel10k_classic" } + if( -not (Test-Path $poshPrompt) ) { $poshPrompt = "slim" } Set-PoshPrompt -Theme $poshPrompt } elseif( Get-Command Set-Theme -ErrorAction SilentlyContinue ) { Set-Theme Paradox } diff --git a/base/src/config.files.json b/base/src/config.files.json index 0653ace..762166f 100644 --- a/base/src/config.files.json +++ b/base/src/config.files.json @@ -7,6 +7,12 @@ ], "vi": "~/.virc", "omp": "~/.oh-my-posh.omp.json", + "profile": [ + "~/.profile", + "/etc/profile", + "/etc/profile.d/" + ], + "bashrc": "~/.bashrc", "zshrc": "~/.zshrc", "zsys": "/etc/zsys.conf", "shrc": "~/.shrc", @@ -17,6 +23,11 @@ "@shell-loading-snippets/bash", "@shell-loading-snippets/sh" ], + "sz-bashrc": [ + "~/.sz.bashrc.sh", + "#bashrc", + "@shell-loading-snippets/bash" + ], "sz-zshrc": [ "~/.sz.zshrc.sh", "#zshrc", diff --git a/docker/Invoke-DockerCompose.ps1 b/docker/Invoke-DockerCompose.ps1 index a67849e..603a984 100644 --- a/docker/Invoke-DockerCompose.ps1 +++ b/docker/Invoke-DockerCompose.ps1 @@ -8,7 +8,7 @@ ) [DockerComposeDirs]::_GetValidValues($wordToComplete,$true) })] - [string[]]$ProjectPath=@($PWD), + [string[]]$ProjectPath, [switch]$Recurse, [int]$Depth=1, [switch]$Force, @@ -17,6 +17,8 @@ [array]$CliParams ) +if( -not $ProjectPath ) { $ProjectPath=@($PWD) } + $script:JobQueue = @() $script:CleanupJobQueue = @() function CompleteJobs { diff --git a/docker/dcdown.ps1 b/docker/dcdown.ps1 index 2efbc40..fe38cc3 100644 --- a/docker/dcdown.ps1 +++ b/docker/dcdown.ps1 @@ -8,13 +8,15 @@ ) [DockerComposeDirs]::_GetValidValues($wordToComplete,$true) })] - [string[]]$ProjectPath=@($PWD), + [string[]]$ProjectPath, + [switch]$Recurse, + [int]$Depth=1, [Parameter(Position = 0, ValueFromRemainingArguments = $true)] [array]$CliParams=@('--timeout=3','--volumes','--remove-orphans') ) -if( $CliParams[0] -is [string] ) { $CliParams = @($CliParams,@($null)) } -$CliParams[0] = @('down') + $CliParams[0] +if( -not $CliParams -or $CliParams[0] -is [string] ) { $CliParams = @($CliParams,@($null)) } +$CliParams[0] = @('&','down') + $CliParams[0] -Invoke-DockerCompose -ProjectPath $ProjectPath -CliParams $CliParams +Invoke-DockerCompose -ProjectPath $ProjectPath -CliParams $CliParams -Recurse:$Recurse -Depth $Depth diff --git a/docker/dcup.ps1 b/docker/dcup.ps1 index 591ffe7..29e9963 100644 --- a/docker/dcup.ps1 +++ b/docker/dcup.ps1 @@ -46,10 +46,10 @@ if( -not $LogsParams[0] ) { $local:moreParams = @() #if( $ForceNoFollow ) { $moreParams = @('--no-color', '--quiet-pull') } -$PullParams[0] = @('pull' ) + $PullParams[0] + $Containers -if( $ForceNoFollow ) { $PullParams[0] = @('&') + $PullParams[0] } -$UpParams[0] = @('up' ) + $UpParams[0] + $Containers -if( $ForceNoFollow ) { $UpParams[0] = @('&') + $UpParams[0] } +$PullParams[0] = @('&', 'pull' ) + $PullParams[0] + $Containers +#if( $ForceNoFollow ) { $PullParams[0] = @('&') + $PullParams[0] } +$UpParams[0] = @('&', 'up' ) + $UpParams[0] + $Containers +#if( $ForceNoFollow ) { $UpParams[0] = @('&') + $UpParams[0] } $LogsParams[0] = @('logs' ) + $LogsParams[0] + $Containers if( -not $NoPull ) { $allParams += $PullParams + @(@('!')) } diff --git a/shell-loading-snippets/bash b/shell-loading-snippets/bash index 6a7ee85..006d8ab 100755 --- a/shell-loading-snippets/bash +++ b/shell-loading-snippets/bash @@ -1,20 +1,22 @@ ## 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 +## __P=".local/share/powershell/Scripts/shell-loading-snippets/$(basename $SHELL)"; find ~/$__P -exec true \; && . ~/$__P if [[ -x ~/.dotnet/tools/pwsh && "1" != "$(which pwsh > /dev/null && echo 1)" ]]; then - PWSH='~/.dotnet/tools/pwsh' - alias pwsh="$PWSH " + PWSH='~/.dotnet/tools/pwsh' + alias pwsh="$PWSH " - export DOTNET_CLI_TELEMETRY_OPTOUT=1 + 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/Setup-Profile.ps1) " >> /tmp/default_shell -if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" && "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then - echo "pwsh" >> /tmp/default_shell - pwsh - exit +if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then + export SZ_SKIP_DEFAULT_SHELL=1 + if [[ "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then + echo 'Starting PowerShell SZcripts...' + echo "pwsh" >> /tmp/default_shell + pwsh + exit + fi fi echo "continue" >> /tmp/default_shell export SZ_SKIP_DEFAULT_SHELL=1 - - - diff --git a/shell-loading-snippets/sh b/shell-loading-snippets/sh index 6a7ee85..006d8ab 100755 --- a/shell-loading-snippets/sh +++ b/shell-loading-snippets/sh @@ -1,20 +1,22 @@ ## 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 +## __P=".local/share/powershell/Scripts/shell-loading-snippets/$(basename $SHELL)"; find ~/$__P -exec true \; && . ~/$__P if [[ -x ~/.dotnet/tools/pwsh && "1" != "$(which pwsh > /dev/null && echo 1)" ]]; then - PWSH='~/.dotnet/tools/pwsh' - alias pwsh="$PWSH " + PWSH='~/.dotnet/tools/pwsh' + alias pwsh="$PWSH " - export DOTNET_CLI_TELEMETRY_OPTOUT=1 + 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/Setup-Profile.ps1) " >> /tmp/default_shell -if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" && "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then - echo "pwsh" >> /tmp/default_shell - pwsh - exit +if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then + export SZ_SKIP_DEFAULT_SHELL=1 + if [[ "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then + echo 'Starting PowerShell SZcripts...' + echo "pwsh" >> /tmp/default_shell + pwsh + exit + fi fi echo "continue" >> /tmp/default_shell export SZ_SKIP_DEFAULT_SHELL=1 - - - diff --git a/shell-loading-snippets/zsh b/shell-loading-snippets/zsh index a3396e0..c126cde 100755 --- a/shell-loading-snippets/zsh +++ b/shell-loading-snippets/zsh @@ -1,19 +1,23 @@ ## 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 +## __P=".local/share/powershell/Scripts/shell-loading-snippets/$(basename $SHELL)"; find ~/$__P -exec true \; && . ~/$__P if [[ -x ~/.dotnet/tools/pwsh && "1" != "$(which pwsh > /dev/null && echo 1)" ]]; then - PWSH='~/.dotnet/tools/pwsh' - alias pwsh="$PWSH " + PWSH='~/.dotnet/tools/pwsh' + alias pwsh="$PWSH " - export DOTNET_CLI_TELEMETRY_OPTOUT=1 + 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/Setup-Profile.ps1) " >> /tmp/default_shell -if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" && "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then - echo "pwsh" >> /tmp/default_shell - pwsh - exit +if [[ "$SZ_SKIP_DEFAULT_SHELL" != "1" ]]; then + export SZ_SKIP_DEFAULT_SHELL=1 + if [[ "1" == "$(which pwsh > /dev/null && echo 1)" && -f ~/.local/share/powershell/Scripts/Setup-Profile.ps1 ]]; then + echo 'Starting PowerShell SZcripts...' + echo "pwsh" >> /tmp/default_shell + pwsh + exit + fi fi echo "continue" >> /tmp/default_shell export SZ_SKIP_DEFAULT_SHELL=1 -