Method: Nautilus::Shell#build_command

Defined in:
lib/nautilus/shell.rb

#build_command(command, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/nautilus/shell.rb', line 9

def build_command(command, options = {})
  actual_command = command.kind_of?(Array) ? command.join(" ") : command
  if options[:background]
    if windows?
      actual_command = "start /wait /b " + command
    elsif options[:background]
      actual_command << " &"
    end
  end      
  actual_command
end