In order to execute a command on your OS, you need to define it as a Shell method.

Alternatively, you can execute any command via Shell::CommandProcessor#system even if it is not defined.

Constants
No documentation available
Class Methods

Creates a command alias at the given alias for the given command, passing any options along with it.

Shell::CommandProcessor.alias_command "lsC", "ls", "-CBF", "--show-control-chars"
Shell::CommandProcessor.alias_command("lsC", "ls"){|*opts| ["-CBF", "--show-control-chars", *opts]}

Returns a list of aliased commands

Defines a command, registering path as a Shell method for the given command.

Shell::CommandProcessor.def_system_command "ls"
  #=> Defines ls.

Shell::CommandProcessor.def_system_command "sys_sort", "sort"
  #=> Defines sys_sort as sort
No documentation available
No documentation available
No documentation available

include run file.

Unaliases the given alias command.

Undefines a command

Instance Methods
An alias for test
No documentation available

Returns a Cat object, for the given filenames

Returns a Concat object, for the given jobs

Returns a Echo object, for the given strings

CommandProcessor#expand_path(path)

  path:   String
  return: String
returns the absolute path for <path>

private functions

See IO.foreach when path is a file.

See Dir.foreach when path is a directory.

def sort(*filenames)
  Sort.new(self, *filenames)
end

Returns a Glob filter object, with the given pattern object

Same as Dir.mkdir, except multiple directories are allowed.

%pwd, %cwd -> @pwd

See IO.open when path is a file.

See Dir.open when path is a directory.

Calls device.print on the result passing the block to transact

Clears the command hash table.

Same as Dir.rmdir, except multiple directories are allowed.

Executes the given command with the options parameter.

Example:

print sh.system("ls", "-l")
sh.system("ls", "-l") | sh.head > STDOUT

Returns a Tee filter object, with the given file command

Tests if the given command exists in file1, or optionally file2.

Example:

sh[?e, "foo"]
sh[:e, "foo"]
sh["e", "foo"]
sh[:exists?, "foo"]
sh["exists?", "foo"]
An alias for test

Executes a block as self

Example:

sh.transact { system("ls", "-l") | head > STDOUT }

See IO.unlink when path is a file.

See Dir.unlink when path is a directory.