From 195ec8e3a4e56194a2a7474c6f1f37e6efd4fef7 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Tue, 31 Dec 2024 10:45:18 +0800 Subject: [PATCH] Updating the index number CLI prompt --- README.md | 4 ++-- lib/knuckle_cluster.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 87aee88..1ae8460 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ task-three | i-456def456def456de | 4 | t3-container-one | | 5 | t3-container-two | | 6 | t3-container-three -Connect to which container? (INDEX) +Enter the INDEX number and press ENTER to connect: ``` Same with connecting directly to agents @@ -179,7 +179,7 @@ INDEX | INSTANCE_ID | TASK | CONTAINER | | | t3-container-two | | | t3-container-three -Connect to which agent? (INDEX) +Enter the INDEX number and press ENTER to connect: ``` Both `connect_to_containers` and `connect_to_agents` can have the following optional arguments: diff --git a/lib/knuckle_cluster.rb b/lib/knuckle_cluster.rb index 06d015a..dcf194c 100644 --- a/lib/knuckle_cluster.rb +++ b/lib/knuckle_cluster.rb @@ -101,7 +101,7 @@ def select_agent(auto: false) output_agents - puts "\nConnect to which agent? (INDEX)" + puts "\nEnter the INDEX number and press ENTER to connect:" agents[STDIN.gets.strip.to_i - 1] end @@ -116,7 +116,7 @@ def select_container(auto: false) { index: { display_method: 'containers.index' } }, { container: { display_method: 'containers.name', width: 999 } } - puts "\nConnect to which container? (INDEX)" + puts "\nEnter the INDEX number and press ENTER to connect:" containers[STDIN.gets.strip.to_i - 1] end