Class: Rman::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/rman/cli.rb

Instance Method Summary collapse

Instance Method Details

#rmanObject



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

def rman
  commands = `ls /bin /sbin /usr/bin /usr/sbin /usr/local/bin | grep -v /`.split("\n")

  loop do
    command = commands.sample
    if command && system("man #{command} 1> /dev/null 2> /dev/null")
      system "man #{command}"
      break
    end
  end
end