Prepends command lines arguments from stdin and writes to stdout.
Make sure you have Elixir installed. If you're on a Mac, just run brew install elixir
Run mix deps.get
and mix escript.build
or combine them as mix do deps.get, escript.build
mix deps.get
: Download the dependencies defined insidemix.exs
mix escript.build
: Build the executable that can be invoked from the command line
With compiled binary:
$ echo -e "fork\nstar" | ./prepend "Give a "
Give a fork
Give a star
Or run prepend
directly via mix task
$ echo -e "fork\nstar" | mix prepend "Give a "
Give a fork
Give a star
- Start
mix test.watch
and develop TDD or run tests only once withmix test
- Property tests can be run with
mix test --only property
- To give the code a try in the REPL use
iex -S mix
and try the this:
["one", "two"] |> Prepend.stream_lines("$ ") |> Enum.to_list
- Format code using
mix format
- Lint code using
mix credo
andmix dialyzer
Feel free to file a new issue with a respective title and description on the the Prepend CLI repository. If you already found a solution to your problem, I would love to review your pull request! Have a look at our contribution guidelines to find out about the coding standards.
Check out the contributing page to see the best places to file issues, start discussions and begin contributing.
Released in 2020
This project is under the MIT license.
Made with love by Laura Beatris 💜🚀