From 12e6e47fafb58de2a82b28f83d25dd395bc2ac93 Mon Sep 17 00:00:00 2001 From: Niko Lubbe Date: Wed, 24 Jul 2024 11:28:06 +0200 Subject: [PATCH] make module override in subcommands a flag --- src/k16/kl/commands/containers.clj | 6 +++--- src/k16/kl/commands/endpoints.clj | 3 ++- src/k16/kl/commands/modules.clj | 6 ++++-- src/k16/kl/commands/routes.clj | 4 ++-- src/k16/kl/commands/services.clj | 8 ++++---- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/k16/kl/commands/containers.clj b/src/k16/kl/commands/containers.clj index a5ac58d..f5dd581 100644 --- a/src/k16/kl/commands/containers.clj +++ b/src/k16/kl/commands/containers.clj @@ -18,7 +18,7 @@ :description "Select containers to run" :opts [{:option "module" - :short 0 + :short "m" :type :string}] :runs (fn [props] @@ -43,7 +43,7 @@ :description "Select containers to run" :opts [{:option "module" - :short 0 + :short "m" :type :string}] :runs (fn [props] @@ -90,7 +90,7 @@ :description "Stop all running containers " :opts [{:option "module" - :short 0 + :short "m" :type :string}] :runs (fn [props] diff --git a/src/k16/kl/commands/endpoints.clj b/src/k16/kl/commands/endpoints.clj index 7881574..f1ccebd 100644 --- a/src/k16/kl/commands/endpoints.clj +++ b/src/k16/kl/commands/endpoints.clj @@ -38,10 +38,11 @@ :description "List all endpoints" :opts [{:option "module" - :short 0 + :short "m" :type :string} {:option "service" + :short 0 :type :string}] :runs list-endpoints}]}) diff --git a/src/k16/kl/commands/modules.clj b/src/k16/kl/commands/modules.clj index 7e7fdff..7053a64 100644 --- a/src/k16/kl/commands/modules.clj +++ b/src/k16/kl/commands/modules.clj @@ -33,11 +33,12 @@ :description "Pull down changes to a module" :opts [{:option "module" - :short 0 + :short "m" :type :string} {:option "update" :default false + :short 0 :type :with-flag}] :runs pull!} @@ -46,11 +47,12 @@ :description "Resolve the latest sha's of a module. This is the same as `pull --update`" :opts [{:option "module" - :short 0 + :short "m" :type :string} {:option "force" :default false + :short 0 :type :with-flag}] :runs (fn [props] diff --git a/src/k16/kl/commands/routes.clj b/src/k16/kl/commands/routes.clj index 595ab90..335d3a0 100644 --- a/src/k16/kl/commands/routes.clj +++ b/src/k16/kl/commands/routes.clj @@ -91,7 +91,7 @@ :description "List all routes" :opts [{:option "module" - :short 0 + :short "m" :type :string} {:option "output" @@ -105,7 +105,7 @@ :description "Apply any route changes" :opts [{:option "module" - :short 0 + :short "m" :type :string}] :runs apply-routes!}]}) diff --git a/src/k16/kl/commands/services.clj b/src/k16/kl/commands/services.clj index 30a763a..5c36d5f 100644 --- a/src/k16/kl/commands/services.clj +++ b/src/k16/kl/commands/services.clj @@ -77,7 +77,7 @@ :description "List all services" :opts [{:option "module" - :short 0 + :short "m" :type :string}] :runs list-services} @@ -86,13 +86,13 @@ :description "Set the default endpoint for a service" :opts [{:option "module" - :short 0 + :short "m" :type :string} {:option "service" - :short 1 + :short 0 :type :string} {:option "endpoint" - :short 2 + :short 1 :type :string}] :runs set-default-service-endpoint!}]})