Hello everyone!
I'm trying to run a program (fzf - a really useful ncurses text fuzzy
finder) and read its output using (in), but I'm not getting it to
work.
: (in '(fzf) (line T))
Failed to read /dev/tty
-> NIL
The command I actually want to run is a bit more complicated. At the
command line, I would do the following:
$ cat locations.csv | fzf --multi
This would allow me to type, fzf would filter the file contents as I
type. I could then select various lines from the filtered list fzf
presents, press enter and have fzf spit out the lines I selected to
stdout. I was trying to build a small picolisp program, that makes use
of fzf as part of its interface.
I even tried to put the above command in an executable file with the
following contents:
#!/bin/bash
# saved in test.sh
cat locations.csv | fzf --multi
then call it like:
(in '("./test.sh") (line T))
but it just freezes the terminal and I have to forcible kill the script.
If I change the script's contents to:
#!/bin/bash
# saved in test.sh
#cat locations.csv | fzf --multi
echo hello
then (in '("./test.sh") (line T)) works.
I'm not sure what I'm doing wrong. Is it that I can't call an ncurses program?
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe