diff --git a/.assets/provision/setup_profile_allusers.ps1 b/.assets/provision/setup_profile_allusers.ps1 index a9ecc428..07bae5b7 100755 --- a/.assets/provision/setup_profile_allusers.ps1 +++ b/.assets/provision/setup_profile_allusers.ps1 @@ -49,10 +49,10 @@ begin { process { # *modify eza alias if (Test-Path $CFG_PATH/_aliases_linux.ps1) { - $exa_git = eza --version | Select-String '+git' -SimpleMatch -Quiet - $exa_nerd = Select-String '' -Path /usr/local/share/oh-my-posh/theme.omp.json -SimpleMatch -Quiet - $exa_param = ($exa_git ? '--git ' : '') + ($exa_nerd ? '--icons ' : '') - $content = [IO.File]::ReadAllLines("$CFG_PATH/_aliases_linux.ps1").Replace('eza -g ', "eza -g $exa_param") + $eza_git = eza --version | Select-String '+git' -SimpleMatch -Quiet + $eza_nerd = Select-String '' -Path /usr/local/share/oh-my-posh/theme.omp.json -SimpleMatch -Quiet + $eza_param = ($eza_git ? '--git ' : '') + ($eza_nerd ? '--icons ' : '') + $content = [IO.File]::ReadAllLines("$CFG_PATH/_aliases_linux.ps1").Replace('eza -g ', "eza -g $eza_param") [IO.File]::WriteAllLines("$CFG_PATH/_aliases_linux.ps1", $content) } diff --git a/.assets/provision/setup_profile_allusers.sh b/.assets/provision/setup_profile_allusers.sh index 4735ba6a..de1ffb1b 100755 --- a/.assets/provision/setup_profile_allusers.sh +++ b/.assets/provision/setup_profile_allusers.sh @@ -30,10 +30,10 @@ fi # *modify eza alias if [ -f "$CFG_PATH/aliases.sh" ]; then # *set nerd fonts if oh-my-posh uses them - exa_param='' - eza --version 2>/dev/null | grep -Fqw '+git' && exa_param+='--git ' || true - grep -Fqw '' ""$OMP_PATH/theme.omp.json"" 2>/dev/null && exa_param+='--icons ' || true - sed -i "s/eza -g /eza -g $exa_param/" "$CFG_PATH/aliases.sh" + eza_param='' + eza --version 2>/dev/null | grep -Fqw '+git' && eza_param+='--git ' || true + grep -Fqw '' ""$OMP_PATH/theme.omp.json"" 2>/dev/null && eza_param+='--icons ' || true + sed -i "s/eza -g /eza -g $eza_param/" "$CFG_PATH/aliases.sh" fi # *Copy global profiles