This repository has been archived on 2020-09-21. You can view files and clone it, but cannot push or open issues or pull requests.
zim/modules/utility/init.zsh
2015-12-15 00:12:17 -05:00

31 lines
701 B
Bash

#
# utility functions and options
#
# general aliases
alias chmod='chmod --preserve-root -v'
alias chown='chown --preserve-root -v'
# ls colors
if [[ dircolors ]]; then
if [[ -s ${HOME}/.dir_colors ]]; then
eval "$(dircolors --sh ${HOME}/.dir_colors)"
else
eval "$(dircolors --sh)"
fi
alias ls='ls --group-directories-first --color=auto'
else
export LSCOLORS='exfxcxdxbxGxDxabagacad'
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'
alias ls='ls --group-directories-first -G'
fi
alias l='ls -lAh' # one column, all files, human-readable sizes
# resource usage
alias df='df -kh'
alias du='du -kh'