Skip to content

a simple cli tool to prepend command lines arguments from stdin and write to stdout

License

Notifications You must be signed in to change notification settings

LauraBeatris/prepend_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prepend

Prepends command lines arguments from stdin and writes to stdout.

Author Languages Stars Forks Contributors CI Status



📌 Table of Contents

👷 Installation

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 inside mix.exs
  • mix escript.build: Build the executable that can be invoked from the command line

📌 Usage

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

🏗️ Development

  • Start mix test.watch and develop TDD or run tests only once with mix 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 and mix dialyzer

🐛 Issues

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.

🎉 Contributing

Check out the contributing page to see the best places to file issues, start discussions and begin contributing.

📕 License

Released in 2020

This project is under the MIT license.

Made with love by Laura Beatris 💜🚀

About

a simple cli tool to prepend command lines arguments from stdin and write to stdout

Topics

Resources

License

Stars

Watchers

Forks

Languages