<commit_before>complete --command wa --arguments "help" \
  --description "Display Wahoo help."

complete --command wa --arguments "themes" \
  --description "List all installed themes."

complete --command wa --arguments "use" \
  --description "Apply a theme."

complete --command wa --arguments "list" \
  --description "List installed packages."

complete --command wa --arguments "get" \
  --description "Install one or more themes/packages."

complete --command wa --arguments "remove" \
  --description "Remove a theme or package."

complete --command wa --arguments "update" \
  --description "Update framework."

complete --command wa --arguments "version" \
  --description "Display version."<commit_msg>add smarter completions for wa<commit_after>function __wa_single_option
  test (count (commandline -opc)) -le 1
end

function __wa_option_is
  set -l cmd (commandline -opc)
  test (count $cmd) -gt 1; and contains -- $cmd[2] $argv
end

function __wa_complete -a option description
  complete -c wa -n "__wa_single_option" -d $description -a $option
end

complete --no-files -c wa -d "Wahoo"

__wa_complete list    "List local packages"
__wa_complete get     "Install one or more packages"
__wa_complete use     "List / Apply themes"
__wa_complete remove  "Remove a theme or package"
__wa_complete update  "Update Wahoo"
__wa_complete new     "Create a new package from a template"
__wa_complete submit  "Submit a package to the registry"
__wa_complete help    "Display this help"
__wa_complete version "Display version"
__wa_complete destroy "Remove Wahoo"

complete -c wa -n "__wa_option_is r rm remove"  -a \
  (printf "%s " (WAHOO::util::list_installed))
complete -c wa -n "__wa_option_is g get" -a \
  (printf "%s " (WAHOO::util::list_available))
complete -c wa -n "__wa_option_is u use" -a \
  (printf "%s " (WAHOO::util::list_themes))


{'fraction_non_alphanumeric': 0.11428571428571428, 'fraction_numerical': 0.0016172506738544475, 'mean_word_length': 3.7106598984771573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4893972', 'n_tokens_mistral': 568, 'n_tokens_neox': 564, 'n_words': 217}