Completions: Use comments to structure file
+# -- Functions -----------------------------------------------------------------------------------------------------------------------------
+
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)
@@ -12,4 +14,6 @@ function __fish_kdb_print_subcommands -d 'Print a list of kdb subcommands'
kdb list-commands $argv | awk '{if(NR>1)print}'
end
+# -- Completions ---------------------------------------------------------------------------------------------------------------------------
+
complete -c kdb -n '__fish_kdb_no_subcommand' -x -a '(__fish_kdb_print_subcommands -v)'
