def parse(args)
      @global_opts = create_global_args(args)

      @cmd = args.shift || ''
      @search_data = ''

      if cmd == 'search'
        @search_data << args.shift unless args.empty?
      elsif !CLI::SUB_COMMANDS.include?(cmd)
        Trollop.die "unknown subcommand '#{cmd}'"
      end
    end
def parse(args)
      @global_opts = create_global_args(args)

      @cmd = args.shift || ''
      @search_data = ''

      if cmd == 'search'
        @search_data << args.shift unless args.empty?
      elsif !CLI::SUB_COMMANDS.include?(cmd)
        Trollop.die "unknown subcommand '#{cmd}'"
      end
    end
Parse arguments and setup attributes.

 It also handles showing the Help and Version information.

 @example parse command line arguments
   cli = Bitsa::CLI.new
   cli.parse(ARGV)
   cli.cmd # => # => "reload"

 @param args [String[]] Cmd line arguments.

 @return [nil]

 @raise [TrollopException] If invalid data is passed