Need help with sh?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

devinus
131 Stars 8 Forks The Unlicense 31 Commits 2 Opened issues

Description

Run programs as functions in Elixir

Services available

!
?

Need anything else?

Contributors list

# 114,742
Elixir
oauth2
elixir-...
lesson
1 commit
# 7,145
C#
JavaScr...
oculus-...
steamvr
1 commit
# 128,273
Elixir
css-sel...
elixir-...
dalvik
1 commit
# 9,667
autohot...
ahk
bitwise...
Nette
1 commit

Sh

Build Status

Support via Gratipay

An Elixir module inspired by Python's sh package.

Sh
allows you to call any program as if it were a function.

Adding Sh to Your Project

To use Sh with your projects, simply edit your mix.exs file and add it as a dependency:

  defp deps do
    [{:sh, "~> 1.1.2"}]
  end

Example

iex> Sh.echo "Hello World!"
"Hello World!\n"

Options

Sh
commands accept as the last argument a list of options.
Sh.curl "http://example.com/", o: "page.html", silent: true
""

The equivalent call without using this feature would be:

Sh.curl "-o", "page.html", "--silent", "http://example.com/"

Underscores

Underscores in a program name or keyword options are converted to dashes.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.