项目作者: LauraBeatris

项目描述 :
a simple cli tool to prepend command lines arguments from stdin and write to stdout
高级语言: Elixir
项目地址: git://github.com/LauraBeatris/prepend_cli.git
创建时间: 2020-08-11T11:48:44Z
项目社区:https://github.com/LauraBeatris/prepend_cli

开源协议:MIT License

下载




Prepend

Prepends command lines arguments from stdin and writes to stdout.

Author
Languages
Stars
Forks
Contributors
CI Status







:pushpin: Table of Contents

:construction_worker: 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

:pushpin: Usage

With compiled binary:

  1. $ echo -e "fork\nstar" | ./prepend "Give a "
  2. Give a fork
  3. Give a star

Or run prepend directly via mix task

  1. $ echo -e "fork\nstar" | mix prepend "Give a "
  2. Give a fork
  3. Give a star

:building_construction: 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:
  1. ["one", "two"] |> Prepend.stream_lines("$ ") |> Enum.to_list
  • Format code using mix format
  • Lint code using mix credo and mix dialyzer

:bug: 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.

:tada: Contributing

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

:closed_book: License

Released in 2020

This project is under the MIT license.

Made with love by Laura Beatris 💜🚀