14 lines
400 B
Markdown
14 lines
400 B
Markdown
# Select Option
|
|
|
|
Creates a tui selector based off of `stdin`.
|
|
`printf '1\n2\n3' | select_option` will create a selector for a, b, c.
|
|
Navigate with F-keys, j/k, or arrow keys, then press enter on your selection.
|
|
This will print out the selected option to stdout.
|
|
|
|
## Usecases
|
|
|
|
Selecting a drive from the system
|
|
```bash
|
|
lsblk -lno type,name | grep part | awk '{ print "/dev/" $2 }' | select_option
|
|
```
|