Completions: Add storage suggestion for `editor`
@@ -123,6 +123,16 @@ function __fish_kdb_subcommand_convert_needs_storage_plugin -d 'Check if the sub
and not __input_includes (__fish_kdb_print_storage_plugins) 2
end
+function __fish_kdb_subcommand_editor_needs_storage_plugin -d 'Check if the subcommand editor needs a storage plugin completion'
+ set -l subcommand (__fish_kdb_subcommand)
+ test "$subcommand" != editor
+ and return 1
+
+ __fish_kdb_needs_namespace editor 1
+ and return 1
+ not __input_includes (__fish_kdb_print_storage_plugins)
+end
+
function __fish_kdb_print_subcommands -d 'Print a list of kdb subcommands'
set -l commands (kdb list-commands $argv)
if contains -- $argv -v
@@ -236,6 +246,7 @@ complete -c kdb -n '__fish_kdb_needs_namespace complete ls editor get set 1' -x
complete -c kdb -n '__fish_kdb_needs_namespace cp 2' -x -a '(__fish_kdb_print_namespaces)'
complete -c kdb -n '__fish_kdb_needs_plugin' -x -a '(__fish_kdb_print_plugins)'
complete -c kdb -n '__fish_kdb_subcommand_convert_needs_storage_plugin' -x -a '(__fish_kdb_print_storage_plugins)'
+complete -c kdb -n '__fish_kdb_subcommand_editor_needs_storage_plugin' -x -a '(__fish_kdb_print_storage_plugins)'
# ===========
# = Options =
