Module: Vim::Flavor::ShellUtility

Included in:
Flavor
Defined in:
lib/vim-flavor/shellutility.rb

Instance Method Summary collapse

Instance Method Details

#sh(script) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/vim-flavor/shellutility.rb', line 4

def sh script
  output = IO.popen(['bash', '-c', script], 'r', &:read)

  if $? == 0
    output
  else
    raise RuntimeError, output
  end
end