Completions: Add option `min-depth`
@@ -191,6 +191,12 @@ function __fish_kdb_print_option_color_arguments -d 'Print possible arguments fo
echo -e 'never\tDo not print colored output'
end
+function __fish_kdb_print_option_depth_arguments -d 'Print possible arguments for the option min-depth'
+ set -l description $argv[1]
+ set -l start $argv[2]
+ seq $start 10 | string replace -r '\d+' "\$0\tComplete at $description \$0 Level" | string replace -r '([02-9]|\d{2}) Level$' '$0s'
+end
+
# -- Completions ---------------------------------------------------------------------------------------------------------------------------
# =============
@@ -221,6 +227,11 @@ __fish_kdb_add_option '__fish_kdb_subcommand_supports_option_force' 'force' 'f'
# --help -H
__fish_kdb_add_option '__fish_kdb_subcommand_supports_common_options' 'help' 'H' 'Show the man page'
+# --min-depth -m
+set -l description 'Specify the minimum depth of completion suggestions (0 by default), exclusive'
+set -l argument_function '__fish_kdb_print_option_depth_arguments least 0'
+__fish_kdb_add_option '__fish_kdb_subcommand_includes complete' 'min-depth' 'm' "$description" "($argument_function)"
+
# --null -0
__fish_kdb_add_option '__fish_kdb_subcommand_supports_option_null' 'null' '0' 'Use binary 0 termination'
