After installing cheat
(command cheat sheets from the command line), I tried to enable the autocompletion using the provided zsh script. However, I don't seem to find the correct location for the script.
cheat.zsh
;~/.oh-my-zsh/custom/plugins/cheat/_cheat.zsh
;plugins
array in my ~/.zshrc
;Auto-completion doesn't happen when typing cheat d<TAB>
.
So where to place zsh auto-completion script on Linux?
I got this to work by adding cheat.zsh
to the ~/.oh-my-zsh/plugins
directory. Zsh checks to autoload functions on FPATH
, so try:
echo $FPATH
and then either add to FPATH
or move the file into a folder on the path.
This actually does a much better job of explaining it: https://unix.stackexchange.com/questions/33255/how-to-define-and-load-your-own-shell-function-in-zsh