sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.98k stars 4.49k forks source link

Add zstyle to skip aliases in more modules beyond just git #2036

Closed mattmc3 closed 1 year ago

mattmc3 commented 1 year ago

Description

Similar to #310, It would be nice if Prezto supported a zstyle customization like the one in the git module that allows skipping the creation of aliases.

# skip emacs alias creation
zstyle ':prezto:module:emacs:alias' skip 'yes'

# or, skip all alias creation in supported modules
zstyle ':prezto:module:*:alias' skip 'yes'

This is helpful for modules like homebrew, for example, where it's nice to have the environment variable functionality but not necessarily the aliases. Aliases are highly opinionated shortcuts and can be numerous in any given module, and they are not simple to undo without a large series of unalias commands in a users' config. A zstyle would solve this, and it's not a new concept since the git module already does this.

This feature only makes sense for modules that have a purpose beyond just creating aliases. So, for example, dnf, rsync, etc would not need this zstyle unless someday their purpose expands.

This can be implemented with a simple if block similar to how the git module already does it. PR incoming.