1
0
Fork 0
mirror of synced 2024-11-05 00:08:57 -05:00
zimfw/modules/utility
Eric Nielsen 6022fe46c5 [utility] BSD uses LSCOLORS and GREP_COLOR
and GNU uses LS_COLORS and GREP_COLORS. So change logic to only set
these environment variables for each OSTYPE.

Also original code was setting the `ls` alias with `-G` instead of
`--color=auto` if in a GNU without `dircolors`. Fix that too.

Simplify arithmetic command expression without using `${var}`, but
`var` instead. The second construct does not fail if `var` is not
defined, but defaults its value to `0` in that case.

Closes #225
2017-11-24 19:14:23 -05:00
..
init.zsh [utility] BSD uses LSCOLORS and GREP_COLOR 2017-11-24 19:14:23 -05:00
README.md Add less termcap colour variables 2016-12-01 23:51:59 -08:00

Utility

Utility aliases and functions.

Adds colour to ls, grep and less.

Aliases

ls

alias command description
ls ls --group-directories-first --color=auto directories first, use color (applies to all ls aliases)
l ls -lAh all files, human-readable sizes
lm `l ${PAGER}`
ll ls -lh human-readable sizes
lr ll -R human-readable sizes, recursive
lx ll -XB human-readable sizes, sort by extension (GNU only)
lk ll -Sr human-readable sizes, largest last
lt ll -tr human-readable sizes, most recent last
lc lt -c human-readable sizes, most recent last, change time

File Downloads

Aliases get to ( aria2c || axel || wget || curl ).

Resource Usage

alias command
df df -kh
du du -kh

Condoms

alias command
chmod chmod --preserve-root -v
chown chown --preserve-root -v
rm if available, safe-rm

Misc

alias description
mkcd mkdir and cd