Skip to content

Commit

Permalink
fix: List-Files in Powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Sep 9, 2024
1 parent e23f47b commit 229bb06
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Microsoft.PowerShell_profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,14 @@ function Disable-Http-Proxy {
$Env:http_proxy="";$Env:https_proxy=""
}

function List-Files-Simple {
param ([string]$Files = ".")
Invoke-Expression 'exa --icons --group-directories-first $Files'
}

function List-Files {
param ([string]$Files = ".")
Invoke-Expression 'exa -lhF --icons --group-directories-first $Files'
param ([string]$Path)
Invoke-Expression "eza -lhF --icons --group-directories-first $Path"
}

function List-All-Files {
param ([string]$Files = ".")
Invoke-Expression 'exa -lAhF --group-directories-first --icons $Files'
param ([string]$Path)
Invoke-Expression "eza -lAhF --icons --group-directories-first $Path"
}

#
Expand All @@ -87,7 +82,7 @@ if (Get-Alias -Name "rm" -ErrorAction SilentlyContinue) {
Set-Alias -Name cat -Value bat # Use the latest less or --paging=never
Set-Alias -Name df -Value duf
Set-Alias -Name du -Value dust
Set-Alias -Name ls -Value List-Files-Simple
Set-Alias -Name ls -Value List-Files
Set-Alias -Name l -Value List-Files
Set-Alias -Name ll -Value List-Files
Set-Alias -Name la -Value List-All-Files
Expand Down

0 comments on commit 229bb06

Please sign in to comment.