Skip to content

Instantly share code, notes, and snippets.

@timendum
Last active May 8, 2025 12:59
Show Gist options
  • Save timendum/f7afcb313770e6b7a39e5583d76555fd to your computer and use it in GitHub Desktop.
Save timendum/f7afcb313770e6b7a39e5583d76555fd to your computer and use it in GitHub Desktop.
dotbins
tools:
# Order is important!
rg: BurntSushi/ripgrep
bat:
repo: sharkdp/bat
shell_code:
bash: |
alias cat='bat -pp'
alias less='bat --paging=always'
powershell: |
If (Test-Path Alias:cat) {Remove-Item Alias:cat}
If (Test-Path Alias:less) {Remove-Item Alias:less}
function BATCAT {bat --style=plain --paging=never @args}
Set-Alias -Name cat -Value BATCAT -Description "Better cat"
function BATLESS {bat --paging=always @args}
Set-Alias -Name less -Value BATLESS -Description "Better less"
duf: muesli/duf
fd: sharkdp/fd
rclone: rclone/rclone
just: casey/just
eza:
repo: eza-community/eza
shell_code:
bash: |
alias ls='eza'
alias ll='eza -l'
powershell: |
If (Test-Path Alias:ls) {Remove-Item Alias:ls}
If (Test-Path Alias:ll) {Remove-Item Alias:ll}
function EZAP {
param (
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$Args
)
$finalArgs = @()
$hadWildcard = $false
$anyMatches = $false
foreach ($arg in $Args) {
if ($arg -like '*[*?]*') {
$hadWildcard = $true
$matches = Get-ChildItem -Name -ErrorAction SilentlyContinue -Path $arg
if ($matches) {
$finalArgs += $matches
$anyMatches = $true
}
} else {
$finalArgs += $arg
}
}
if ($hadWildcard -and -not $anyMatches) {
Write-Host "No matches found for any wildcard pattern." -ForegroundColor Red
return
}
if ($finalArgs.Count -eq 0) {
eza
} else {
eza @finalArgs
}
}
function EZAG {EZAP -G @Args}
Set-Alias -Name ls -Value EZAG -Description "Better ls"
function EZAL {EZAP -l @Args}
Set-Alias -Name ll -Value EZAL -Description "Better ls -l"
starship:
repo: starship/starship
shell_code:
bash: eval "$(starship init bash)"
powershell: "Invoke-Expression (& { (starship init powershell | Out-String) })"
zoxide: # after starship, too hook on prompt
repo: ajeetdsouza/zoxide
shell_code:
bash: eval "$(zoxide init bash --cmd cd)"
powershell: "Invoke-Expression (& { (zoxide init powershell --cmd cd | Out-String) })"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment