Sha256: 9c5415a0f896b9787f0242ee8dfe636ecb9c673ec93eb7f56225d72db934e174

Contents?: true

Size: 1.03 KB

Versions: 15

Compression:

Stored size: 1.03 KB

Contents

# -*- coding: utf-8 -*-
#
# Copyright 2013 whiteleaf. All rights reserved.
#

require "optparse"
require_relative "commandbase"
Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "command", "*.rb"))) do |path|
  require path
end

module Command
  #
  # コマンド一覧を取得
  #
  def self.get_list
    COMMAND_LIST
  end

  # この順番がヘルプに表示される順番
  COMMAND_LIST = {
    "download" => Download,
    "update" => Update,
    "list" => List,
    "convert" => Convert,
    "diff" => Diff,
    "setting" => Setting,
    "alias" => Alias,
    "inspect"=> Inspect,
    "send" => Send,
    "folder" => Folder,
    "browser" => Browser,
    "remove" => Remove,
    "freeze" => Freeze,
    "tag" => Tag,
    "web" => Web,
    "mail" => Mail,
    "backup" => Backup,
    "help" => Help,
    "version" => Version,
    "init" => Init
  }

  # ショートカット定義
  # COMMAND_LIST の上から順に優先度が高い
  Shortcuts = Hash[*get_list.keys.reverse.map { |s|
    [s[0], s, s[0..1], s]
  }.flatten]
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
narou-2.6.1 lib/command.rb
narou-2.6.0 lib/command.rb
narou-2.5.2 lib/command.rb
narou-2.5.1 lib/command.rb
narou-2.4.2 lib/command.rb
narou-2.4.1 lib/command.rb
narou-2.4.0 lib/command.rb
narou-2.3.3 lib/command.rb
narou-2.3.2 lib/command.rb
narou-2.3.1 lib/command.rb
narou-2.3.0 lib/command.rb
narou-2.3.0.pre.test1 lib/command.rb
narou-2.2.0 lib/command.rb
narou-2.1.1.pre.test1 lib/command.rb
narou-2.1.0 lib/command.rb