Skip to content

Commit

Permalink
Fix #select default help text to include real submit keys
Browse files Browse the repository at this point in the history
Update README.md examples.
  • Loading branch information
Geekfish committed May 14, 2021
1 parent f849efe commit d0bfe5a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Asking question with list of options couldn't be easier using `select` like so:
```ruby
prompt.select("Choose your destiny?", %w(Scorpion Kano Jax))
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move, Space or Enter to select)
# ‣ Scorpion
# Kano
# Jax
Expand Down Expand Up @@ -639,7 +639,7 @@ By default the choice name is also the value the prompt will return when selecte
choices = {small: 1, medium: 2, large: 3}
prompt.select("What size?", choices)
# =>
# What size? (Press ↑/↓ arrow to move and Enter to select)
# What size? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ small
# medium
# large
Expand All @@ -666,7 +666,7 @@ prompt.select("What size?") do |menu|
menu.choice name: "large", value: 3
end
# =>
# What size? (Press ↑/↓ arrow to move and Enter to select)
# What size? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ small
# ✘ medium (out of stock)
# large
Expand Down Expand Up @@ -701,7 +701,7 @@ For asking questions involving list of options use `select` method by passing th
```ruby
prompt.select("Choose your destiny?", %w(Scorpion Kano Jax))
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ Scorpion
# Kano
# Jax
Expand All @@ -716,7 +716,7 @@ prompt.select("Choose your destiny?") do |menu|
menu.choice "Jax"
end
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ Scorpion
# Kano
# Jax
Expand All @@ -731,7 +731,7 @@ prompt.select("Choose your destiny?") do |menu|
menu.choice "Jax", -> { "Nice choice captain!" }
end
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ Scorpion
# Kano
# Jax
Expand All @@ -756,7 +756,7 @@ prompt.select("Choose your destiny?") do |menu|
menu.choice "Jax", 3
end
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move and Space or Enter to select)
# Scorpion
# Kano
# ‣ Jax
Expand All @@ -769,7 +769,7 @@ You can navigate the choices using the arrow keys or define your own key mapping
```ruby
prompt.select("Choose your destiny?", %w(Scorpion Kano Jax), cycle: true)
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ Scorpion
# Kano
# Jax
Expand All @@ -788,7 +788,7 @@ prompt.select("Choose your destiny?") do |menu|
menu.choice "Jax", 3
end
# =>
# Choose your destiny? (Use ↑/↓ arrow or number (0-9) keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow or 1-9 number to move and Space or Enter to select)
# 1. Scorpion
# 2. Kano
# ‣ 3. Jax
Expand Down Expand Up @@ -816,7 +816,7 @@ You can configure active marker like so:
choices = %w(Scorpion Kano Jax)
prompt.select("Choose your destiny?", choices, symbols: { marker: ">" })
# =>
# Choose your destiny? (Use ↑/↓ and ←/→ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ to move and Space or Enter to select)
# > Scorpion
# Kano
# Jax
Expand All @@ -830,7 +830,7 @@ By default the menu is paginated if selection grows beyond `6` items. To change
letters = ("A".."Z").to_a
prompt.select("Choose your letter?", letters, per_page: 4)
# =>
# Which letter? (Use ↑/↓ and ←/→ arrow keys, press Enter to select)
# Which letter? (Press ↑/↓/←/→ arrow to move and press Space or Enter to select)
# ‣ A
# B
# C
Expand Down Expand Up @@ -873,7 +873,7 @@ The disabled choice will be displayed with a cross `✘` character next to it an
```ruby
prompt.select("Choose your destiny?", warriors)
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select)
# Choose your destiny? (Press ↑/↓ arrow to move and Space or Enter to select)
# ‣ Scorpion
# Kano
# ✘ Goro (injury)
Expand All @@ -890,7 +890,7 @@ To activate dynamic list searching on letter/number key presses use `:filter` op
warriors = %w(Scorpion Kano Jax Kitana Raiden)
prompt.select("Choose your destiny?", warriors, filter: true)
# =>
# Choose your destiny? (Use ↑/↓ arrow keys, press Enter to select, and letter keys to filter)
# Choose your destiny? (Press ↑/↓ arrow to move, Space or Enter to select and letters to filter)
# ‣ Scorpion
# Kano
# Jax
Expand Down
Loading

0 comments on commit d0bfe5a

Please sign in to comment.