vselect
is a simple utility for visually selecting a subset from a list
using a curses-like interface. Inputs are taken from stdin
and output is
sent to stdout
.
Each line in the input is one possible selection. One or more of these can be selected, and the output is printed one item per line.
For example, to count the number of lines in a few files in the current directory
ls -1 | vselect | xargs wc -l
The vselect
stage of the pipeline will bring up a list view of the inputs
from the first stage. After exiting from vselect
, its outputs are fed into
the next stage.
- Enter: exit with current selection
- q: exit without a selection
- x: mark current item as selected
- j: move down
- k: move up
The current selection is either:
- the set of all marked items;
- or, if there are no marked items the currently active item in the list
runghc Setup.hs configure
runghc Setup.hs build
runghc Setup.hs install