2024-09-30 11:13:10 -07:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
# Eryn Wells <eryn@erynwells.me>
|
|
|
|
|
|
|
|
function init-rc-ls
|
|
|
|
{
|
|
|
|
alias la="ls -A $ls_options"
|
|
|
|
alias ll="ls -l $ls_options"
|
|
|
|
alias l.="ls -d $ls_options .*"
|
|
|
|
|
2024-11-12 13:47:20 -08:00
|
|
|
# Enable ls colors
|
|
|
|
export CLICOLOR=1 COLORTERM=1
|
|
|
|
|
|
|
|
# Define colors for ls. See the LSCOLORS documentation in ls(1).
|
|
|
|
# The default is "exfxcxdxbxegedabagacadah".
|
|
|
|
export LSCOLORS=Exdxcxfxbxegedabagacadah
|
|
|
|
|
2024-09-30 11:13:10 -07:00
|
|
|
local dircolors_bin=$(whence -p dircolors || whence -p gdircolors)
|
2024-11-12 13:47:20 -08:00
|
|
|
if [[ -x "$dircolors_bin" ]]; then
|
2024-09-30 11:13:10 -07:00
|
|
|
if [[ -f "$HOME/.dircolors/$SYS.cfg" ]]; then
|
2024-11-12 13:47:20 -08:00
|
|
|
eval $dircolors_bin "$HOME/.dircolors/$SYS.cfg"
|
|
|
|
elif [[ -f "$HOME/.dircolors/default.cfg" ]]; then
|
|
|
|
eval $dircolors_bin "$HOME/.dircolors/default.cfg"
|
2024-09-30 11:13:10 -07:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
init-rc-ls "$@"
|