psycotica0 / menu

A Utility that takes lines from stdin, enumerates them, and lets you pick ones to be output on stdout.

This URL has Read+Write access

menu /
name age message
file .gitignore Loading commit data...
file COPYING
file Makefile
file README
file TODO
file menu.c
README
This project is an interactive filter for pipes that enumerates stdin, and lets you pick the lines that go to stdout.

Currently these features are supported:
- Support multiple selections with comma separated syntax
  ex.
  Selection: 5,3,0
  Line5
  Line3
  Line0

- Support multiple selections appended to one another with '+' separated syntax.
  ex.
  Selection: 5 + 3 + 0
  Line5 Line3 Line0

- Support an "a" as a selection for all, which just spits out the list (only the number enumerated)
  At this point it would basically be like "head -nNUM"
  The difference is that you got so see what it was sending through first, and optionally decide to send only part, or 
  nothing at all

- Support use of NUL instead of newline as input/output item delimiter
  This is useful with input/output data that can include '\n'.
  Use -0 to turn this on.

- Escape some characters
  This is on by default.  Use -r to turn it off.
  (It is also forcibly turned off by -0.)
  ex.
  echo "~/JoJo's Pictures" | menu 
  JoJo\'s\ Pictures