Home

Awesome

selector

Shell interactive menu (bash/zsh/ksh compatible)

image

usage

usage: selector [-p <prompt>] -i <items>|-f <itemfile> [-P <y|n>]
args :
  -p, --prompt          menu prompt
  -i, --items           menu items \n separated
  -f, --file            file with items
  -F, --filter          regexp pattern filter items
  -P, --powerline       y or n, powerline symbol usage
  -a, --autofilter      y or n, filter at keystrokes
  -k, --keyfunc         Custom additional key function

selector can be used as command line or sourced to be used as function (bash/zsh/ksh compatible) When sourced, the selected item is available as $selected.

demo

selector

keys

keyaction
<kbd></kbd>select next item
<kbd></kbd>select prev item
<kbd>End</kbd>/<kbd></kbd>select last item
<kbd>Home</kbd>/<kbd></kbd>select first item
<kbd>Shift</kdb>+<kbd></kbd>/<kbd>PgUp</kbd>/<kbd>Ctl</kbd>+<kbd>F</kbd>next page
<kbd>Shift</kdb>+<kbd></kbd>/<kbd>PgDn</kbd>/<kbd>Ctl</kbd>+<kbd>B</kbd>previous page
<kbd>Del</kbd>/<kbd>F8</kbd>delete item in menu
<kbd>Esc</kbd>exit
<kbd>Ctrl</kbd>+<kbd>A</kbd>use all screen to display menu
<kbd>Tab</kbd>apply/new filter
<kbd>Enter</kbd>validate item selected

demo usage at: