# %name% plugin # # %description% # # This file is sourced by Oh My Zsh in every new shell, so keep it fast. # Avoid running external commands at the top level unless you really need to. # # Wrapping a command-line tool? Guard everything so people who don't have it # installed don't end up with broken aliases: # # if (( ! $+commands[sometool] )); then # return # fi # # Aliases # # Document every alias in README.md. Short, obvious, and few beats many. # # alias %name%='echo "hello from %name%"' # # Functions # # Anything that needs arguments in the middle, or more than one command, # belongs here rather than in an alias. # # function %name%_hello() { # echo "hello, ${1:-world}" # } # # Completion # # Oh My Zsh adds this directory to $fpath, so a file named `_sometool` next to # this one is picked up automatically as the completion for `sometool`. # # # Need the path to this plugin's own directory (for data files, a lib/ dir...)? # This is the standard way to get it, since $0 is not reliable on its own: # https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html # # 0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}" # 0="${${(M)0:#/*}:-$PWD/$0}" # source "${0:A:h}/lib/helpers.zsh"