modify ls aliases, and add lsd alternative support

This commit is contained in:
Lockszmith (@VAST) 2025-04-09 14:08:27 -04:00
parent 8d1258e0ca
commit 700d1c7d70
3 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1 @@
../../../_src.posix/private_dot_config/sz.env/zza_lsd.env

View File

@ -1,11 +1,14 @@
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
alias _ls='command ls '
{{- if eq .chezmoi.os "darwin" }} {{- if eq .chezmoi.os "darwin" }}
alias l='ls -lahF --color=auto ' alias ls='_ls -hF --color=auto '
alias l='ls -la '
alias lold='l -t ' alias lold='l -t '
alias lnew='l -tr ' alias lnew='l -tr '
{{ else }} {{ else }}
alias l='ls -lahF --color=auto --group-directories-first ' alias ls='_ls -hF --color=auto --group-directories-first '
alias l='ls -la '
alias lold='l --sort=time ' alias lold='l --sort=time '
alias lnew='l --sort=time --reverse ' alias lnew='l --sort=time --reverse '
{{- end }} {{- end }}

View File

@ -0,0 +1,10 @@
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
if is_cmd lsd; then
alias _ls="$(command -v lsd) "
[[ -n "${DBG}" ]] && echo "assigned lsd as ls alias."
fi