diff --git a/.gitmodules b/.gitmodules index cb8f419e..f75ea4cf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "modules/prompt/functions/pure"] path = modules/prompt/external/pure url = https://github.com/sindresorhus/pure.git +[submodule "modules/alias-tips/external"] + path = modules/alias-tips/external + url = https://github.com/jedahan/alias-tips diff --git a/modules/alias-tips/README.md b/modules/alias-tips/README.md new file mode 100644 index 00000000..61e118f3 --- /dev/null +++ b/modules/alias-tips/README.md @@ -0,0 +1,40 @@ +Alias Tips +========== + +Integrates [alias-tips][1] into Prezto, which reminds you +whenever the command you just ran has an defined alias. + +Settings +-------- + +### Text + +To change the tip text prefix, add the following line to *zpreztorc*: + + zstyle ':prezto:module:alias-tips' text '💡 ' + +To exclude certain commands + + zstyle ':prezto:module:alias-tips' exclude '_ c' + +To automatically expand the alias + + zstyle ':prezto:module:alias-tips' expand 'yes' + + +Contributors +------------ + +New features and bug fixes should be submitted to the +[alias-tips][1] project according to its rules and +regulations. This module will be synchronized against it. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][2].* + + - [Jonathan Dahan](https://github.com/jedahan) + +[1]: https://github.com/djui/alias-tips +[2]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/alias-tips/external b/modules/alias-tips/external new file mode 160000 index 00000000..d7539207 --- /dev/null +++ b/modules/alias-tips/external @@ -0,0 +1 @@ +Subproject commit d753920778d09571d4b20f7e35e5a23af79f848c diff --git a/modules/alias-tips/init.zsh b/modules/alias-tips/init.zsh new file mode 100644 index 00000000..c1bbaa01 --- /dev/null +++ b/modules/alias-tips/init.zsh @@ -0,0 +1,21 @@ +# +# Integrates alias-tips into Prezto. +# +# Authors: +# Jonathan Dhan +# + +# Source module files. + +# Options +zstyle -s ':prezto:module:alias-tips' text 'ZSH_PLUGINS_ALIAS_TIPS_TEXT' && \ + export 'ZSH_PLUGINS_ALIAS_TIPS_TEXT' + +zstyle -s ':prezto:module:alias-tips' excludes 'ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES' && \ + export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES + +if zstyle -t ':prezto:module:alias-tips' expand; then + export ZSH_PLUGINS_ALIAS_TIPS_EXPAND=1 +fi + +source "${0:h}/external/alias-tips.plugin.zsh" || return 1