diff options
| author | Julian Hurst <ark@mansus.space> | 2023-09-07 00:54:27 +0200 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2023-09-07 00:54:27 +0200 |
| commit | 92092bdba4b0368b42c2906269a61eed259c8821 (patch) | |
| tree | 105dd594e93af0b4bcdad995222c3fa929d2c344 | |
| parent | 8253708cff8a22695d2dd465d43d98d972995ed8 (diff) | |
| download | ilhare-92092bdba4b0368b42c2906269a61eed259c8821.tar.gz | |
Add README.md
| -rw-r--r-- | README.md | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..564b963 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# Building + +To build il(hare) you must first install hare then run: + +``` +hare build -o il . +``` + +# Usage + +To run il, simply pass a list of items to il's stdin: + +``` +ls | il +``` + +This will allow you to select items from the list using **j** and **k**, mark items using the spacebar and print them to stdout and exit using enter or **l**. The currently selected item is also the marked item if none have been marked with space. To quit without printing press **q**. To see other keybindings, refer to handlers.ha. + +## Examples + +This program can be used to allow you to choose items in order to pass them to another command. + +For instance: + +process killer: + +``` +ps aux | il | awk '{print $1}' | xargs kill +``` + +file chooser (this example displays information about the files using **file**), note that il supports a **-0** flag that prints NULL separated items instead of the default whitespace separated which is useful for items that contain spaces: + +``` +ls | il -0 | xargs -0 file +``` + +A launcher for a feed of urls (for instance from an rss feed reader): + +feeds.txt with the following contents: + +``` +yt_channelname | Video Title: https://www.youtube.com/watch?v=0dKrUE_O0VE +peertube_channel | Insert title here: https://spacepub.space/w/1MnYGVguhGM7tuq2DUKtYQ +... +``` + +Then launch: + +``` +il < feeds.txt | awk '{print $NF}' | xargs mpv +``` |
