Skip to content

Commit

Permalink
Updating the index number CLI prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjdavis committed Dec 31, 2024
1 parent 487df64 commit 195ec8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions lib/knuckle_cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 195ec8e

Please sign in to comment.