Can I send a string to the system pager in Elixir?

Viewed 53

I'm writing a little command-line app in Elixir, and trying to display some data in a paged format, similar to e.g. git log.

I've tried to approach this by using Elixir's and Erlang's built-in capabilities to send commands to the shell, i.e.:

System.cmd("ls | less", []) # Erlang error: :enoent
:os.cmd(:"ls | less") # Silently exits

Neither of these approaches has worked for me.

0 Answers
Related