<commit_before>function __fish_kdb_no_subcommand \
-d 'Check if the current commandline buffer does not contain a subcommand'
    set subcommands (__fish_kdb_complete)
    for input in (commandline -opc)
        if contains -- $input $subcommands
            return 1
        end
    end
    return 0
end

function __fish_kdb_complete -d 'Print a list of kdb subcommands'
    kdb list-commands $argv | awk '{if(NR>1)print}'
end

complete -c kdb -n '__fish_kdb_no_subcommand' -x -a '(__fish_kdb_complete -v)'<commit_msg>Completions: Use more descriptive function name<commit_after>function __fish_kdb_no_subcommand \
-d 'Check if the current commandline buffer does not contain a subcommand'
    set subcommands (__fish_kdb_print_subcommands)
    for input in (commandline -opc)
        if contains -- $input $subcommands
            return 1
        end
    end
    return 0
end

function __fish_kdb_print_subcommands -d 'Print a list of kdb subcommands'
    kdb list-commands $argv | awk '{if(NR>1)print}'
end

complete -c kdb -n '__fish_kdb_no_subcommand' -x \
    -a  '(__fish_kdb_print_subcommands -v)'
{'fraction_non_alphanumeric': 0.07414104882459313, 'fraction_numerical': 0.0054249547920434, 'mean_word_length': 3.3411764705882354, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2832471', 'n_tokens_mistral': 366, 'n_tokens_neox': 359, 'n_words': 118}