iomenu - interactive text selection menu

git clone git://git.josuah.net/iomenu


iomenu
================================================================================

*iomenu* is an interactive menu inspired from dmenu [1]: it reads lines from
stdin display them to the screen [1], and filter them as the user type.  When
`Enter` is pressed, the selected line is printed to stdout.

This permits to build interactive menu with shell pipes.  As an example, a poor
man's music player could be done this way:

	$ find ~/music -name '*.flac' | iomenu | xargs mplayer

It will print all the FLAC files in `~/music` to iomenu which shows a fulscreen
menu, and the selected file will be printed to xargs mplayer.

iomenu does not use ncurses but ansi escape sequences [2] instead so it does
not have dependencies beyond a C compiler.

[1]: https://tools.suckless.org/dmenu
[2]: https://en.wikipedia.org/wiki/ANSI_escape_code


* 0e5ef4f8 2018-06-22 Josuah Demangeon <mail@josuah.net>
| io-xdg-open: add missing argument to xdg-open
| 
* 543b9520 2018-06-22 Josuah Demangeon <mail@josuah.net>
| io-xdg-open: remove sh debug flag
| 
* 9c174ec5 2018-06-22 Josuah Demangeon <mail@josuah.net>
| update the cache while a directory is selected
| 
* 043e7514 2018-06-21 Josuah Demangeon <mail@josuah.net>
| make "io-xdg-open" independent of my config and release it
| 
* 6231864a 2018-06-19 Josuah Demangeon <mail@josuah.net>
| finish conversion from rc(1) to sh(1)
| 
* 4387fdf6 2018-06-19 Josuah Demangeon <mail@josuah.net>
| use the user's ~/mail directory instead of hardercoded /home/mail
| 
* 7e90ef5e 2018-06-17 Josuah Demangeon <mail@josuah.net>
| add example scripts
| 
* 3905e591 2018-06-12 Josuah Demangeon <mail@josuah.net>
| add a real README (not from the man pages)
| 
* dc5363e1 2018-06-09 Josuah Demangeon <mail@josuah.net>
| make the code a bit cleaner
| 
* e72aa011 2018-05-05 Josuah Demangeon <mail@josuah.net>
| move to the prev/next header with Alt + n/p
| 
* 49b2a2f6 2018-04-15 Josuah Demangeon <mail@josuah.net>
| make arg.h work as usual
| 
* ab7bc829 2018-04-11 Josuah Demangeon <mail@josuah.net>
| do not keep getting a key if reading from stdin fail
| 
* 3d11052f 2018-04-11 Josuah Demangeon <mail@josuah.net>
| ISIG for ignoring Ctrl + C on BSDs
| 
* 486f6970 2018-03-18 Josuah Demangeon <mail@josuah.net>
| removed unused variables
| 
* dfe94b79 2018-03-18 Josuah Demangeon <mail@josuah.net>
| improved the util functions files
| 
* bdefd3e9 2018-03-17 Josuah Demangeon <mail@josuah.net>
| switch to arg.h
| 
* d6c740ae 2018-03-08 Josuah Demangeon <mail@josuah.net>
| switch to getopt
| 
* 7ffa2976 2018-03-06 Josuah Demangeon <mail@josuah.net>
| remove debug
| 
* 9747f2c9 2018-03-03 Josuah Demangeon <mail@josuah.net>
| fixed CTL macro causing buggy input
| 
* c1fc5b0c 2018-02-16 Josuah Demangeon <mail@josuah.net>
| iomenu.1: use Dl for single line examples
| 
* 462875a4 2018-01-20 Josuah Demangeon <mail@josuah.net>
| still blank the screen on terminal that does not use the ALT SCREEN extension
| 
* 1a73e991 2018-01-18 Josuah Demangeon <mail@josuah.net>
| use utf8_col() instead of format() which used a buffer, remove -p flag
| 
* 00bb578f 2018-01-18 Josuah Demangeon <mail@josuah.net>
| use cheap caching by choosing the buffer
| 
* d189ed55 2018-01-18 Josuah Demangeon <mail@josuah.net>
| simplified tokenization using strsep and static buffer
| 
* 8284bea9 2018-01-17 Josuah Demangeon <mail@josuah.net>
| added wcwidth and tests
| 
* 39fe39dd 2018-01-16 Josuah Demangeon <mail@josuah.net>
| add more useful functions to utf.h
| 
* 9adba189 2017-12-31 Josuah Demangeon <mail@josuah.net>
| use strncpy and a null terminator, use strncacestr
| 
* c1f1cc57 2017-12-31 Josuah Demangeon <mail@josuah.net>
| use more compact layout
| 
* 636bd34b 2017-12-11 Josuah Demangeon <mail@josuah.net>
| fix segfault while reading buffer greater than 256 lines
| 
* db81899f 2017-12-08 Josuah Demangeon <mail@josuah.net>
| style
| 
* e5026f5e 2017-12-08 Josuah Demangeon <mail@josuah.net>
| prevent off by 1
| 
* e3bca30c 2017-12-08 Josuah Demangeon <mail@josuah.net>
| fix stdin plitting into lines
| 
* aed045ad 2017-11-29 Hiltjo Posthuma <hiltjo@codemadness.org>
| remove free_lines, the OS will handle freeing resources on exit
| 
* e844872a 2017-11-29 Hiltjo Posthuma <hiltjo@codemadness.org>
| check malloc()
| 
* e62b3c99 2017-11-29 Hiltjo Posthuma <hiltjo@codemadness.org>
| assign realloc directly and no need to free, we die anyway
| 
* 90c2e1d2 2017-11-29 Hiltjo Posthuma <hiltjo@codemadness.org>
| free(NULL) is valid
| 
* 409c996d 2017-11-29 Hiltjo Posthuma <hiltjo@codemadness.org>
| utf8.c: remove unused functions
| 
* 251f7a64 2017-11-16 Josuah Demangeon <mail@josuah.net>
| it is not that big, a single file will do
| 
* b69d6f59 2017-11-02 Josuah Demangeon <mail@josuah.net>
| linux kernel coding style -> BSD
| 
* afbe8d1e 2017-11-01 Josuah Demangeon <mail@josuah.net>
| buffer.c: off by one
| 
* 972969f0 2017-11-01 Josuah Demangeon <mail@josuah.net>
| fixing empty input and removing not used -l option
| 
* 17183e90 2017-11-01 Josuah Demangeon <mail@josuah.net>
| reading the buffer fast
| 
* 277ca729 2017-10-31 Josuah Demangeon <mail@josuah.net>
| cleaner code
| 
* cf83d371 2017-10-30 Josuah Demangeon <mail@josuah.net>
| display.c: fixed input offset bug
| 
* 787d55ac 2017-10-30 Josuah Demangeon <mail@josuah.net>
| use alternate display rather than clearing the screen
| 
* b0af07b5 2017-10-30 Josuah Demangeon <mail@josuah.net>
| control.c: fixed page jump bug
| 
* 8850bebc 2017-10-30 Josuah Demangeon <mail@josuah.net>
| removed the segment feature all over again
| 
* 0502e73c 2017-10-29 Josuah Demangeon <mail@josuah.net>
| *.c: included each other
| 
* 2743c784 2017-10-29 Josuah Demangeon <mail@josuah.net>
| split into multiple files
| 
* e24cea68 2017-10-29 Josuah Demangeon <mail@josuah.net>
| iomenu.c: rawer raw mode and 0x1b rather than 033
| 
* 84dbca01 2017-10-23 Josuah Demangeon <mail@josuah.net>
| iomenu.c, Makefile: style change and making it work on OpenBSD
| 
* 376d9cfc 2017-10-15 Josuah Demangeon <mail@josuah.net>
| split line reading function
| 
* 223058fd 2017-09-29 Josuah Demangeon <mail@josuah.net>
| iomenu.c: -Wimplicit-fallthrough
| 
* bfaf3a78 2017-09-04 Josuah Demangeon <josuah.demangeon@gandi.net>
| iomenu.1: updated -l option
| 
* 2b8b6e22 2017-09-04 Josuah Demangeon <josuah.demangeon@gandi.net>
| iomenu.c: horizontal page navigation
| 
* 4b996da3 2017-09-04 Josuah Demangeon <josuah.demangeon@gandi.net>
| iomenu.c: fixed tab width calculation
| 
* 695c25f7 2017-09-03 Josuah Demangeon <josuah.demangeon@gandi.net>
| iomenu.c: horizontal mode with -l 0
| 
* 5ac10691 2017-09-03 Josuah Demangeon <josuah.demangeon@gandi.net>
| more descriptive names
| 
* 8614ad4e 2017-08-26 Josuah Demangeon <josuah.demangeon@gandi.net>
| iomenu.c: refactored readlines()
| 
* 3d81e355 2017-08-23 Josuah Demangeon <josuah.demangeon@gandi.net>
| iomenu.c: simplified buffer management
| 
* 787fef74 2017-08-23 Josuah Demangeon <josuah.demangeon@gandi.net>
| unicode support
| 
*   a0f50a4b 2017-08-22 Josuah Demangeon <josuah.demangeon@gandi.net>
|\  Merge branch 'master' of https://github.com/josuah/iomenu
| | 
| * 83bb8655 2017-08-22 Josuah Demangeon <josuah.demangeon@gandi.net>
| | Makefile: cleanup comment and spacing
| | 
| * 3e7fb9cd 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| | iomenu.1: simplified the sections
| | 
* | 278c57db 2017-08-22 Josuah Demangeon <josuah.demangeon@gandi.net>
| | starting to add utf8 functions to iomenu
| | 
* | c383bef4 2017-08-22 Josuah Demangeon <josuah.demangeon@gandi.net>
|/  utf8.[ch]: imported utf8len() and utf8check()
|   
* 09d7cdbc 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| simpler input escape sequence management
| 
* 2425ac3f 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| added support for arrow and page keys
| 
* 422bb3cf 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| Added support for page up and down with Ctrl/Alt + v
| 
* e2db9fd4 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| not re-implementing fputs.
| 
* 33e51a89 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| split main argument parsing in another function
| 
* abf6f97c 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| regenerated README from man page
| 
* f764d7df 2017-08-21 Josuah Demangeon <josuah.demangeon@gandi.net>
| Simplified the options.
| 
* 6b29b825 2017-06-04 Josuah Demangeon <josuah.demangeon@gandi.net>
| installing man pages to $PREFIX/share/man
| 
* 4a488ca1 2017-05-18 Josuah Demangeon <josuah.demangeon@gandi.net>
| sigwinch
| 
*   4ce57030 2017-05-17 Josuah Demangeon⠠⠵ <mail@josuah.net>
|\  Merge pull request #1 from pranomostro/master
| | 
| * 4b6b4d71 2017-05-17 pranomostro <pranomostro@posteo.net>
|/  README typo fix
|   
* 3d78cd36 2017-04-30 Josuah Demangeon <mail@josuah.net>
| C-v M-v
| 
* cd0632ce 2017-04-28 Josuah Demangeon <mail@josuah.net>
| remove confusing behavior ^Y
| 
* d319a26e 2017-04-27 Josuah Demangeon <mail@josuah.net>
| do not use variable
| 
* 563f0845 2017-04-16 Josuah Demangeon <mail@josuah.net>
| fixed unconsistant printed line count
| 
* 285c6733 2017-04-16 Josuah Demangeon <mail@josuah.net>
| fixed tabs, I was doing silly things!
| 
* c03da0d7 2017-04-16 Josuah Demangeon <mail@josuah.net>
| fixed argument parsing -_-
| 
* f979f7c1 2017-04-16 Josuah Demangeon <mail@josuah.net>
| c89
| 
* 831d075a 2017-04-15 Josuah Demangeon <mail@josuah.net>
| fixed man page
| 
* a59517e3 2017-04-15 Josuah Demangeon <mail@josuah.net>
| reverted some changes and improved display performances
| 
* 345619b1 2017-04-14 Josuah Demangeon <mail@josuah.net>
| Larger margin
| 
* b95967e4 2017-04-13 Josuah Demangeon <mail@josuah.net>
| adding the mighty stest.c from dmenu
| 
* fff2395e 2017-04-12 Josuah Demangeon <mail@josuah.net>
| using 100% of the screen by default
| 
* 736debe5 2017-04-12 Josuah Demangeon <mail@josuah.net>
| only line mode (no column mode)
| 
* 173b8e98 2017-04-11 Josuah Demangeon <mail@josuah.net>
| added -s option
| 
* f85d89ea 2017-04-11 Josuah Demangeon <mail@josuah.net>
| Back to ASCII
| 
* 08cb9174 2017-04-05 Josuah Demangeon⠠⠵ <mail@josuah.net>
| do not overflow while there is a prompt
| 
* cca47254 2017-04-05 Josuah Demangeon⠠⠵ <mail@josuah.net>
| reverting (CTRL(J) behavior != CTRL(M) behavior)
| 
* 1a93ead7 2017-04-04 Josuah Demangeon⠠⠵ <mail@josuah.net>
| fixed functions declarations
| 
* d039d19d 2017-04-04 Josuah Demangeon⠠⠵ <mail@josuah.net>
| C-j for printing input rather than the candidate.
| 
* e01fa60f 2017-04-03 Josuah Demangeon⠠⠵ <mail@josuah.net>
| Added embedded UTF-8 handling library
| 
* bc428475 2017-04-02 Josuah Demangeon⠠⠵ <mail@josuah.net>
| shuffled lines
| 
* fa785944 2017-04-02 Josuah Demangeon⠠⠵ <mail@josuah.net>
| added character class function
| 
* 353e9eb3 2017-04-02 Josuah Demangeon⠠⠵ <mail@josuah.net>
| working prototype of libtext
| 
* 61b9b7ee 2017-04-02 Josuah Demangeon⠠⠵ <mail@josuah.net>
| added library to deal with text (libtext)
| 
* 5fa48204 2017-04-01 Josuah Demangeon⠠⠵ <mail@josuah.net>
| display a prompt with the -p option
| 
* 0bf49abb 2017-03-31 Josuah Demangeon⠠⠵ <mail@josuah.net>
| added a -t / -b option to set the menu at the top / bottom of the screen
| 
* 1035fe68 2017-03-30 Josuah Demangeon⠠⠵ <mail@josuah.net>
| reopen /dev/tty as stdin and stderr at interaction time
| 
* 99385dc2 2017-03-29 Josuah Demangeon⠠⠵ <mail@josuah.net>
| newline after every line sent to stdout
| 
* 2f9fbc26 2017-03-25 Josuah Demangeon⠠⠵ <mail@josuah.net>
| move match_line close to filter_line
| 
* b29fc218 2017-03-24 Josuah Demangeon⠠⠵ <mail@josuah.net>
| Unicode support using str->wcs and char->wchar_t
| 
* 04f14a2a 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| Added a man page
| 
* 2c6e76a0 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| support for tabs in input line and long input string
| 
* 7563651b 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| tab int stdin and multiple selection support.
| 
* 601965c2 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| ii managed the btty file with less open/close.
| 
* 70864688 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| Fixed horizontal scrolling
| 
* 62853eb7 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| cleaner page next/prev and global window dimension property
| 
* a74019ac 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| working horizontal scrolling
| 
* d4456379 2017-03-19 Josuah Demangeon⠠⠵ <mail@josuah.net>
| half-working horizontal scrolling, with indicators
| 
* 930de4d4 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| Paginating like in dmenu.  This works really well!
| 
* a393b370 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| scrolling working on line mode
| 
* 63ce568f 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| fixed indices
| 
* 179c4bde 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| not using any struct at all
| 
* a6d7fac8 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| fixed print_selection on no match
| 
* 196463ec 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| Free the token!
| 
* 5560f1aa 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| fixed line overflow issue
| 
* 32c00d93 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| working without scrolling
| 
* e58594b7 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| no error in simple horizontal session
| 
* 8be6c99a 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| No valgrind error on simple line-oriented session
| 
* 9bdaa10a 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| fixed buffer errors (reading, empty)
| 
* 8be3cf65 2017-03-18 Josuah Demangeon⠠⠵ <mail@josuah.net>
| checking for malloc failure
| 
* 3f19ac31 2017-03-17 Josuah Demangeon⠠⠵ <mail@josuah.net>
| horizontal mode full of bugs and half working
| 
* f7009a9d 2017-03-17 Josuah Demangeon⠠⠵ <mail@josuah.net>
| can now store and print a buffer
| 
* d3fb1d64 2017-03-17 Josuah Demangeon⠠⠵ <mail@josuah.net>
| even less lines
| 
* 13035ab9 2017-03-16 Josuah Demangeon⠠⠵ <mail@josuah.net>
| on my way for cleaning this up
| 
* 35d50bc1 2017-03-16 Josuah Demangeon⠠⠵ <mail@josuah.net>
| single file implementation
| 
* 60947ffd 2017-03-15 Josuah Demangeon⠠⠵ <mail@josuah.net>
| midway from converting input.c
| 
* 9786d2c2 2017-03-15 Josuah Demangeon⠠⠵ <mail@josuah.net>
| converted buffer.c from linked list to array
| 
* 6a1d1b69 2017-03-13 Josuah Demangeon⠠⠵ <mail@josuah.net>
| (broken) removing further code
| 
* 0a259537 2017-03-13 Josuah Demangeon⠠⠵ <mail@josuah.net>
| (broken) removing a lot of code
| 
* b327379a 2017-03-11 Josuah Demangeon⠠⠵ <mail@josuah.net>
| adapting Makefile
| 
* 816338aa 2017-03-11 Josuah Demangeon⠠⠵ <mail@josuah.net>
| removed the scripts
| 
* d0e21509 2017-03-11 Josuah Demangeon⠠⠵ <mail@josuah.net>
  import from repo.or.cz (sadly)