From 0e3196aae798d553d4f7f673c1ab8fbb10571781 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Tue, 30 Apr 2024 02:57:04 -0400 Subject: [PATCH] completions: add new `create` options (#857) * Update configlet completions for new `create` options * add --offline too --- completions/configlet.bash | 8 +------- completions/configlet.fish | 3 +++ completions/configlet.zsh | 3 +++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/completions/configlet.bash b/completions/configlet.bash index 314aab03..f20fc403 100644 --- a/completions/configlet.bash +++ b/completions/configlet.bash @@ -84,14 +84,8 @@ _configlet_complete_create_() { '-e' | '--exercise') _configlet_complete_slugs_ "practice" "concept" ;; - '--concept-exercise') - _configlet_complete_slugs_ "concept" - ;; - '--practice-exercise') - _configlet_complete_slugs_ "practice" - ;; *) - _configlet_complete_options_ "--approach --article -e --exercise $global_opts" + _configlet_complete_options_ "--approach --article --concept-exercise -e --exercise --practice-exercise -o --offline $global_opts" ;; esac } diff --git a/completions/configlet.fish b/completions/configlet.fish index b41ec26e..e283b836 100644 --- a/completions/configlet.fish +++ b/completions/configlet.fish @@ -24,8 +24,11 @@ complete -c configlet -n "__fish_seen_subcommand_from completion" -s s -l shell # create subcommand complete -c configlet -n "__fish_seen_subcommand_from create" -s e -l exercise -d "exercise slug" \ -xa '(__fish_configlet_find_dirs ./exercises/{concept,practice})' +complete -c configlet -n "__fish_seen_subcommand_from create" -s o -l offline -d "Do not update prob-specs cache" complete -c configlet -n "__fish_seen_subcommand_from create" -l approach -d "The slug of the approach" complete -c configlet -n "__fish_seen_subcommand_from create" -l article -d "The slug of the article" +complete -c configlet -n "__fish_seen_subcommand_from create" -l practice-exercise -d "The slug of the practice exercise" +complete -c configlet -n "__fish_seen_subcommand_from create" -l concept-exercise -d "The slug of the concept exercise" # fmt subcommand complete -c configlet -n "__fish_seen_subcommand_from fmt" -s e -l exercise -d "exercise slug" \ diff --git a/completions/configlet.zsh b/completions/configlet.zsh index c8553f5b..eda48c74 100644 --- a/completions/configlet.zsh +++ b/completions/configlet.zsh @@ -82,8 +82,11 @@ _configlet() { _arguments "${_arguments_options[@]}" \ "$_configlet_global_opts[@]" \ '(-e --exercise)'{-e+,--exercise=}'[exercise slug]:slug:_configlet_complete_any_exercise_slug' \ + {-o,--offline}'[Do not update prob-specs cache]' \ '--approach=[The slug of the approach]' \ '--article=[The slug of the article]' \ + '--concept-exercise=[The slug of the concept exercise]' \ + '--practice-exercise=[The slug of the practice exercise]' \ ;; (fmt) _arguments "${_arguments_options[@]}" \