/bash-checkbox

Small bash script to select options from an argument list.

Primary LanguageShell

Bash Checkbox

Small bash script to select options from an argument list.

Install :

Simply past this line in your shell :

git clone https://github.com/HadiDotSh/bash-checkbox

How to use it :

source /path/to/checkbox.sh "{option 1}" ... "{option N}"
# The result is stored in the array nammed $selected
# selected[0] will be "true" if "option 1" is selected
# A variable named "max" allows you to have the total number of options

A script is available to understand how bash-checkbox is used, it is named "exemple.sh"