1
0
Fork 0
mirror of synced 2024-11-13 19:48:58 -05:00
Commit graph

29 commits

Author SHA1 Message Date
kiryph
3d46387981 [utility] Document that mkcd is run with -p
Closes #259
2018-04-06 12:59:35 -05:00
Eric Nielsen
2f0243e533 [utility] completion uses LS_COLORS for all OSTYPEs
GNU colours are used by the completion module for all `OSTYPE`s, for
colouring the files in the menu. We had lost that for BSD after previous
changes to this module.
2018-04-05 10:19:14 -05:00
Eric Nielsen
5387adb78e [utility] Change colour blue to bold blue
Since some terminal colour schemes have a too dark blue color that does
not go well with a black background. And since some people actually use
such colour schemes!  :- )

Fixes #225
2017-12-01 17:28:02 -05:00
Eric Nielsen
9d0851ed95 [utility] Use "our" ls colors in GNU too
They were only being applied to BSD. Also, GNU uses `LS_COLORS`, and BSD
only uses `LSCOLORS`. Keeping these consistent, with same color scheme,
in both GNU and BSD.

Simplify arithmetic command expression without using `${var}`
substitution, but `var` instead. The second construct does not fail if
`var` is not defined, but defaults its value to `0` in that case.
2017-12-01 07:45:55 -05:00
Eric Nielsen
1716ed6fea Revert "[utility] BSD uses LSCOLORS and GREP_COLOR"
This reverts commit 6022fe46c5.

Current code only works in a GNU with coreutils installed for `ls`, and
only with a `grep` that supports colors (not a Busybox one, for example)

Fixes #230
2017-12-01 07:45:55 -05:00
Eric Nielsen
4004d109cf Revert "fix typo'd var; otherwise colors would never apply"
This reverts commit abbeeb9d37.

That was not a typo
2017-12-01 07:22:28 -05:00
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
4cee50c2d6 [utility] docs: remove unneeded escape 2016-01-12 14:19:38 -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
d00cfeec71 fix utility documentation formatting 2015-12-16 17:51:11 -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