Module: Sh

Defined in:
lib/sh.rb,
lib/sh/version.rb

Overview

Sh::Cmd is useful for constructing large Sh commands programmatically. It also has the benefit of Shell escaping any args you pass.

Usage:

cmd = Sh::Cmd.new("git") do |c|
  c.arg "log"
  c.opt "--oneline"
end

# OR

cmd = Sh::Cmd.new("git").arg("log").opt("--oneline")

puts cmd # => "git log --oneline"

Defined Under Namespace

Classes: Cmd

Constant Summary collapse

VERSION =
"0.0.2"