From c0c469ae9b6e99678134e3dbb5550817c5892ac6 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 14 Jun 2022 17:03:54 -0700 Subject: [PATCH] add comments --- jc/shell_completions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jc/shell_completions.py b/jc/shell_completions.py index a8120791..65f497db 100644 --- a/jc/shell_completions.py +++ b/jc/shell_completions.py @@ -179,9 +179,12 @@ _jc() { # if magic command is found anywhere in the line, use called command's autocompletion for i in $${words:0:-1}; do if (( $$jc_commands[(Ie)$${i}] )); then + # hack to remove options between jc and the magic command shift $$(( $${#words} - 2 )) words words[1,0]=(jc) CURRENT=$${#words} + + # run the magic command's completions _arguments '*::arguments:_normal' return 0 fi