lib/sample_cmdlet_patterns/commands/which_which.rb
def execute(input: $stdin, output: $stdout)
        values = [
          ['less', which('less')],
          ['git', which('git')],
          ['ruby', which('ruby')],
          ['/usr/bin/ruby', which('/usr/bin/ruby')],
          ['ruby in limited paths', which('ruby', paths: ['/usr/local/bin', '/usr/bin', '/bin'])]
        ]

        pretty_table('Which paths', %w[key path], values)

        :gui
      end
# Execute WhichWhich subcommand taking input from
# a input stream and writing to output stream
#
# sample: output.puts 'OK'
Execute WhichWhich subcommand taking input from
a input stream and writing to output stream


Execute WhichWhich subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        values = [
          ['less', which('less')],
          ['git', which('git')],
          ['ruby', which('ruby')],
          ['/usr/bin/ruby', which('/usr/bin/ruby')],
          ['ruby in limited paths', which('ruby', paths: ['/usr/local/bin', '/usr/bin', '/bin'])]
        ]
        pretty_table('Which paths', %w[key path], values)
        :gui
      end
def execute ( input : $stdin , output : $stdout ) values = [ [ 'less' , which ( 'less' ) ] , [ 'git' , which ( 'git' ) ] , [ 'ruby' , which ( 'ruby' ) ] , [ '/usr/bin/ruby' , which ( '/usr/bin/ruby' ) ] , [ 'ruby in limited paths' , which ( 'ruby' , paths : [ '/usr/local/bin' , '/usr/bin' , '/bin' ] ) ] ] pretty_table ( 'Which paths' , %w[ key path ] , values ) :gui end
Execute WhichWhich subcommand taking input from
a input stream and writing to output stream
Execute WhichWhich subcommand taking input from a input stream and writing to output stream
input
output