garybernhardt/selecta — pull request #43 by lmarburger (2014-04-15 17:41:45+00:00)
Title: Read input from ARGF

Swap `$stdin` for `ARGV` in order to directly handle bash process substitution.

I wanted to collect the output of several commands and pipe it into `selecta`. I arrived at the following which worked great:

```bash
$ cat <(echo foo) <(echo bar) <(echo baz) | selecta
>
foo
bar
baz
```

Taking it another step, I tried to use `selecta` directly to no avail. By using `ARGF`, the result is the same as the above example:

```bash
$ selecta <(echo foo) <(echo bar) <(echo baz)
>
foo
bar
baz
```

I've only tested briefly on my system (OS X 10.9.2; ruby 2.1.1p76). I know this project handles many edge cases, platforms, and the like, so it's possible `ARGF` may not be appropriate.