Skip to content

Commit

Permalink
Merge pull request #148 from szymonos/dev
Browse files Browse the repository at this point in the history
fix: exa references
  • Loading branch information
szymonos authored Dec 9, 2023
2 parents a708dc9 + 91d1858 commit d82998c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .assets/provision/setup_profile_allusers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
8 changes: 4 additions & 4 deletions .assets/provision/setup_profile_allusers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d82998c

Please sign in to comment.