diff options
author | A Farzat <a@farzat.xyz> | 2022-11-17 18:13:19 +0900 |
---|---|---|
committer | A Farzat <a@farzat.xyz> | 2022-11-17 18:13:19 +0900 |
commit | e90c03a51b7eae12cc54949ea3f818ab23701e6c (patch) | |
tree | 6f19c5d87f85e9796bc74941cb3b712e3e585b16 /my-zsh-completions.plugin.zsh | |
download | my-zsh-completions-e90c03a51b7eae12cc54949ea3f818ab23701e6c.tar.gz my-zsh-completions-e90c03a51b7eae12cc54949ea3f818ab23701e6c.zip |
Initial commit as generated by `zi create`
Diffstat (limited to 'my-zsh-completions.plugin.zsh')
-rw-r--r-- | my-zsh-completions.plugin.zsh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/my-zsh-completions.plugin.zsh b/my-zsh-completions.plugin.zsh new file mode 100644 index 0000000..458878a --- /dev/null +++ b/my-zsh-completions.plugin.zsh @@ -0,0 +1,17 @@ +# -*- mode: sh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- +# Copyright (c) 2022 A Farzat +# According to the Zsh Plugin Standard: +# https://wiki.zshell.dev/community/zsh_plugin_standard +0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}" +0="${${(M)0:#/*}:-$PWD/$0}" +# Then ${0:h} to get plugin's directory +if [[ ${zsh_loaded_plugins[-1]} != */my-zsh-completions && -z ${fpath[(r)${0:h}]} ]] { + fpath+=( "${0:h}" ) +} +# Standard hash for plugins, to not pollute the namespace +typeset -gA Plugins +Plugins[MY_ZSH_COMPLETIONS_DIR]="${0:h}" +autoload -Uz example-script +# Use alternate vim marks [[[ and ]]] as the original ones can +# confuse nested substitutions, e.g.: ${${${VAR}}} +# vim:ft=zsh:tw=120:sw=2:sts=2:et:foldmarker=[[[,]]] |