Others with better imagination or Unix-like system hackery skills than myself may respond with a way, but my first inclination is 'no'. In particular, normally what you type at the REPL is being read from standard in.
Perhaps if you had a way of changing the Clojure REPL function executed when you type the command 'lein repl' read from a different Unix file descriptor than 0 (the one for stdin), _and_ you found some way for the terminal/console/whatever to have keystrokes you type go to that file descriptor rather than 0, that would do it. That second part sounds like the trickiest bit to me. Have you look at named pipes? By creating one of those, and cat'ing the file you want into that named pipe, you could start a REPL in the usual way, type commands into it, and when you were ready, open the named pipe and read from it. Andy On Wed, Sep 5, 2018 at 6:56 PM Didier <didi...@gmail.com> wrote: > Hi all, > > I was wondering if there is an easy way I can pipe my shell output into a > REPL. Something like: > > cat /tmp/remus-lighthouse-apis-info.ion | lein repl > > When I try this, it starts a REPL, and then each line gets sent one by one > to the REPL and ran. > > I'd like it so that I'm at the REPL, and standard in is ready to be read > by me, from the REPL, so I can manipulate the input being piped how I see > fit within the repl session. > > Is there anyway to do this? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.