1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

add comments

This commit is contained in:
Kelly Brazil
2022-06-14 17:03:54 -07:00
parent 4b86fd8d8a
commit c0c469ae9b

View File

@ -179,9 +179,12 @@ _jc() {
# if magic command is found anywhere in the line, use called command's autocompletion # if magic command is found anywhere in the line, use called command's autocompletion
for i in $${words:0:-1}; do for i in $${words:0:-1}; do
if (( $$jc_commands[(Ie)$${i}] )); then if (( $$jc_commands[(Ie)$${i}] )); then
# hack to remove options between jc and the magic command
shift $$(( $${#words} - 2 )) words shift $$(( $${#words} - 2 )) words
words[1,0]=(jc) words[1,0]=(jc)
CURRENT=$${#words} CURRENT=$${#words}
# run the magic command's completions
_arguments '*::arguments:_normal' _arguments '*::arguments:_normal'
return 0 return 0
fi fi