Last active
February 4, 2021 08:54
-
-
Save disco0/184ef99bf9e48ed2e4f2373d5951da40 to your computer and use it in GitHub Desktop.
Boilerplate for zsh completion scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"#compdef": | |
{ | |
"scope": "shellscript", | |
"prefix": "!compdef", | |
"body": | |
[ | |
"#compdef ${TM_FILENAME/^_(.+)(\\.[\\w]*sh)?/$1/}", | |
"", | |
"###", | |
"### Completion for ${TM_FILENAME/^_(.+)(\\.[\\w]*sh)?/$1/}", | |
"###", | |
"", | |
"# Uncomment to disable reloading on every completion call", | |
"# (( $+functions[_$TM_FILENAME] )) ||", | |
"function _$TM_FILENAME()", | |
"{", | |
" $0", | |
"}", | |
"", | |
"_$TM_FILENAME ${(@)^@}" | |
], | |
"description": "Boilerplate for zsh completion script." | |
} | |
} | |
// code: language=jsonc insertSpaces=true tabSize=4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment