module Nd::ShellScripts

Constants

VERSION

Public Instance Methods

args() click to toggle source
# File lib/nd/shell_scripts.rb, line 9
def args
  ARGV.join(' ')
end
args?() click to toggle source
# File lib/nd/shell_scripts.rb, line 13
def args?
  ARGV.any?
end
command_exists?(command) click to toggle source
# File lib/nd/shell_scripts.rb, line 17
def command_exists?(command)
  `which #{command}`.strip.length > 0
end
execute_and_record(command) click to toggle source
# File lib/nd/shell_scripts.rb, line 5
def execute_and_record(command)
  exec "#{command} && rpt rec \"#{command}\""
end