From e90c03a51b7eae12cc54949ea3f818ab23701e6c Mon Sep 17 00:00:00 2001 From: A Farzat Date: Thu, 17 Nov 2022 18:13:19 +0900 Subject: Initial commit as generated by `zi create` --- my-zsh-completions.plugin.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 my-zsh-completions.plugin.zsh (limited to 'my-zsh-completions.plugin.zsh') 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=[[[,]]] -- cgit v1.2.3-70-g09d2