prezto_config/modules/gnu-utils
Sorin Ionescu 878d0fbab3 [Fix #125] Wrap GNU utilities in functions
There are three methods for calling prefixed GNU utilities interactively
non-prefixed aliasing, hashing, and wrapper functions. Two of these
methods are unreliable and are discussed bellow for reference only.

The aliasing method is unreliable since aliases are at risk of being
overridden resulting in non-GNU utilities being called with invalid
switches.

The hashing method is unreliable because hashed commands are lost
whenever hash -r or rehash -f are called. Thus, said built-ins have to
be wrapped to rehash GNU utilities. Unfortunately, altering $path will
cause Zsh to call the built-in rehash instead of the wrapped one
resulting in the hashed commands being lost.

The wrapper function method is currently the most reliable and is the
one used.
2012-04-11 16:40:20 -04:00
..
init.zsh [Fix #125] Wrap GNU utilities in functions 2012-04-11 16:40:20 -04:00
README.md [#23] Rename plugins to modules 2012-04-05 13:39:40 -04:00

gnu-utils

Provides for the interactive use of GNU Core Utilities on non-GNU systems.

Installing the GNU Core Utilities on non-GNU systems in $PATH without a prefix, i.e. ls instead of gls, is not recommended since scripts that target other core utilities will be broken.

However, for interactive use, prefixed commands can be hashed to their non-prefixed counterparts.

Settings

Prefix

To use a different prefix, add the following to zshrc, and replace 'g' with the desired prefix:

zstyle ':omz:module:gnu-utils' prefix 'g'

Authors

The authors of this module should be contacted via the GitHub issue tracker.