ryotosaito / select4sh

Element Selection for Shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

select4sh

Name

select4sh - element selection for shell

Usage

selected=$(select4sh a b c d e)
#Then you choose an element with arrow keys(up/down) and return key.
echo $selected
selected=$(select4sh -p "Select:" a b c d e)
#Then a prompt appears before options.
Select:a
array=(a b c)
selected=$(select4sh ${array[@]})
#Argument is available even if it is an array
selected=$(select4sh -a a b c d e)
#Then all options appear.
a #Only the active option is highlighted.
b
c
d
e

License

MIT

About

Element Selection for Shell


Languages

Language:Shell 100.0%