24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/m-git/command/config.rb', line 24
def options
return [
ARGV::Opt.new(OPT_LIST[:update_manifest],
short_key:OPT_LIST[:update_manifest_s],
info:"该指令用于更新mgit所使用的配置文件,如:\"mgit config -m <new_path>/manifest.json\"。",
type: :string),
ARGV::Opt.new(OPT_LIST[:update_local],
short_key:OPT_LIST[:update_local_s],
info:"该指令用于更新mgit所使用的本地配置文件,如:\"mgit config -u <new_path>/local_manifest.json\"。",
type: :string),
ARGV::Opt.new(OPT_LIST[:create_local],
short_key:OPT_LIST[:create_local_s],
info:"在指定目录下创建本地配置文件,若目录不存在则自动创建。如执行:\"mgit config -c /a/b/c\",则生成本地配置文件:\"/a/b/c/local_manifest.json\"。如果未传入值,如:\"mgit config -c\",那么若配置仓库存在的话,会在配置仓库中创建本地配置文件。",
type: :string),
ARGV::Opt.new(OPT_LIST[:list],
short_key:OPT_LIST[:list_s],
info:"列出当前MGit所有配置,无参数,如:\"mgit config -l\"。",
type: :boolean),
ARGV::Opt.new(OPT_LIST[:set],
short_key:OPT_LIST[:set_s],
info:"对MGit进行配置,遵守格式:\"mgit config -s <key> <value>\",如:\"mgit config -s maxconcurrentcount 5\"。")
].concat(super)
end
|