Commit Graph

21 Commits

Author SHA1 Message Date
Matt Hamilton abbeeb9d37 fix typo'd var; otherwise colors would never apply 2017-11-29 18:47:37 -05:00
Eric Nielsen 41c2232166 [utility] Move mkcd to functions subdirectory
Now that we have a general digest file that can contain all the
functions from all active modules, we can add functions to any of them
without the need to update the `fpath`.
2017-11-24 21:05:48 -05:00
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
Eric Nielsen 872926c84c [utility] Use one-liner instead of "if then fi"
in recent tests included, to keep code simpler.
2017-05-15 08:59:17 -05:00
ℳichiel ℛoos f15d6e4e02 [utility] Don't overwrite existing env variables
Environment variables set in `.zshenv` should not be overwritten.
However, it is sourced before Zim loads, making Zim overwrite the
settings.

Fixes #175. Closes #179
2017-05-15 08:49:06 -05:00
Nils Reusse 7d952adf2b [utility] fix warning when logging in on tty
... ${terminfo[colors}, variable not set. Check that the variable
exists before checking for colors.

Closes #125
2017-01-29 14:33:18 -08:00
Eric Nielsen 7a289c4c0d Add less termcap colour variables
Set `less` termcap colour variables, and update the module README.md.
Change the code to enclose all colour logic within a
`(( ${terminfo[colors]} >= 8 ))` condition.
Check if `PAGER` is set before setting the `lm` alias.

Keeping the British "colour" spelling. :-)

Closes #101
2016-12-01 23:51:59 -08:00
Eric Nielsen 0a9d105107 [utility] Simplify correction prompt config
For `setopt CORRECT`. Let the user uncomment a line with the `setopt`
directly in the configuration file, instead of having a flag variable
for it.

Closes #90
2016-10-25 16:12:40 -07:00
Alex Poslavsky 41154cd0c4 [utility] fix OpenBSD grep color
Use ggrep or use no color, also fixes #54.

Closes #54, closes #55
2016-05-20 18:43:20 -07:00
Georgy Yakovlev d510f4f861 Fix for OpenBSD ls alias https://github.com/Eriner/zim/issues/47
Closes #48
2016-05-13 13:38:48 -07:00
Matt Hamilton 474715170b [utility] fix safe-rm alias
Alternative approach to determine if aliasing safe-rm is viable.

If safe-rmdir is available, the OS is Suse (which has it's own safe-rm).
Note to Suse: you're making problems for me. Stop.

Closes #27
2016-01-23 19:45:55 -05:00
Matt Hamilton 5ff931065f [utility] apply ch(mod|root) condoms only on linux
Closes #26
2016-01-23 15:04:52 -05:00
Matt Hamilton bb680b3742 [utility] fix safe-rm condom on opensuse 2016-01-23 03:10:55 -05:00
Matt Hamilton 95cc94d9a0 [utility] add setopt correct option
This option can be enabled by setting `zcorrection='true'` in .zimrc

Closes #25
2016-01-17 07:08:08 -05:00
Matt Hamilton be99dc0971 add comments and fix BSD ls typo 2015-12-29 05:34:13 -05:00
Matt Hamilton b28cdf2f13 fix ls alais for BSD systems 2015-12-29 05:32:02 -05:00
Matt Hamilton 1b2176534a add utility module comments 2015-12-19 17:05:43 -05:00
Matt Hamilton 9d6952400d fix aria2c typos 2015-12-18 07:23:00 -05:00
Matt Hamilton c80bc6d86d add utility aliases 2015-12-18 02:46:16 -05:00
Matt Hamilton 495bde2404 add utility documentation 2015-12-15 18:49:15 -05:00
Matt Hamilton 3a62391e0e initial commit 2015-12-15 00:12:17 -05:00