Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
557d5f21
提交
557d5f21
authored
7月 18, 2015
作者:
Michael Muré
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update the bash completion script
License: MIT Signed-off-by:
Michael Muré
<
batolettre@gmail.com
>
上级
8668f409
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
118 行增加
和
42 行删除
+118
-42
ipfs-completion.bash
misc/completion/ipfs-completion.bash
+118
-42
没有找到文件。
misc/completion/ipfs-completion.bash
浏览文件 @
557d5f21
...
...
@@ -10,8 +10,23 @@ _ipfs_help_only()
_ipfs_add
()
{
_ipfs_comp
"-recursive -quiet -progress -wrap-with-directory
\
-trickle --help"
_ipfs_comp
"--recursive --quiet --progress --trickle --only-hash
--wrap-with-directory --hidden --help"
}
_ipfs_bitswap
()
{
ipfs_comp
"stat wantlist --help"
}
_ipfs_bitswap_stat
()
{
_ipfs_help_only
}
_ipfs_bitswap_wantlist
()
{
ipfs_comp
"--peer= --help"
}
_ipfs_block
()
...
...
@@ -41,7 +56,7 @@ _ipfs_bootstrap()
_ipfs_bootstrap_add
()
{
_ipfs_comp
"-default --help"
_ipfs_comp
"-
-
default --help"
}
_ipfs_bootstrap_list
()
...
...
@@ -51,7 +66,7 @@ _ipfs_bootstrap_list()
_ipfs_bootstrap_rm
()
{
_ipfs_comp
"-all --help"
_ipfs_comp
"-
-
all --help"
}
_ipfs_cat
()
...
...
@@ -67,7 +82,7 @@ _ipfs_commands()
_ipfs_config
()
{
# TODO: auto-complete existing config keys
_ipfs_comp
"edit replace show -
bool
--help"
_ipfs_comp
"edit replace show -
-bool --json
--help"
}
_ipfs_config_edit
()
...
...
@@ -88,13 +103,14 @@ _ipfs_config_show()
_ipfs_daemon
()
{
_ipfs_comp
"-init -routing= -mount -writable -mount-ipfs=
\
-mount-ipns= --help"
_ipfs_comp
"--init --routing= --mount --writable --mount-ipfs=
\
--mount-ipns= --unrestricted-api --disable-transport-encryption
\
--help"
}
_ipfs_dht
()
{
_ipfs_comp
"findpeer findprovs query --help"
_ipfs_comp
"findpeer findprovs
get put
query --help"
}
_ipfs_dht_findpeer
()
...
...
@@ -104,12 +120,22 @@ _ipfs_dht_findpeer()
_ipfs_dht_findprovs
()
{
_ipfs_comp
"-verbose --help"
_ipfs_comp
"--verbose --help"
}
_ipfs_dht_get
()
{
_ipfs_comp
"--verbose --help"
}
_ipfs_dht_put
()
{
_ipfs_comp
"--verbose --help"
}
_ipfs_dht_query
()
{
_ipfs_comp
"-verbose --help"
_ipfs_comp
"-
-
verbose --help"
}
_ipfs_diag
()
...
...
@@ -120,22 +146,37 @@ _ipfs_diag()
_ipfs_diag_net
()
{
# TODO: auto-complete -vis=*
_ipfs_comp
"-timeout= -vis= --help"
_ipfs_comp
"--timeout= --vis= --help"
}
_ipfs_dns
()
{
_ipfs_comp
"--recursive --help"
}
_ipfs_file
()
{
_ipfs_comp
"ls --help"
}
_ipfs_file_ls
()
{
_ipfs_help_only
}
_ipfs_get
()
{
_ipfs_comp
"-
output= -archive -compress
-compression-level= --help"
_ipfs_comp
"-
-output= --archive --compress -
-compression-level= --help"
}
_ipfs_id
()
{
_ipfs_comp
"-format= --help"
_ipfs_comp
"-
-
format= --help"
}
_ipfs_init
()
{
_ipfs_comp
"-
bits= -passphrase=
-force --help"
_ipfs_comp
"-
-bits= -
-force --help"
}
_ipfs_log
()
...
...
@@ -151,12 +192,12 @@ _ipfs_log_level()
_ipfs_log_tail
()
{
_ipfs_
comp
"tail level --help"
_ipfs_
help_only
}
_ipfs_ls
()
{
_ipfs_
help_only
_ipfs_
comp
"--headers --help"
}
_ipfs_mount
()
...
...
@@ -176,12 +217,12 @@ _ipfs_name_publish()
_ipfs_name_resolve
()
{
_ipfs_
help_only
_ipfs_
comp
"--recursive --help"
}
_ipfs_object
()
{
_ipfs_comp
"data get links put stat --help"
_ipfs_comp
"data get links
new patch
put stat --help"
}
_ipfs_object_data
()
...
...
@@ -192,7 +233,7 @@ _ipfs_object_data()
_ipfs_object_get
()
{
# TODO: auto-complete encoding
_ipfs_comp
"--encoding="
_ipfs_comp
"--encoding=
--help
"
}
_ipfs_object_links
()
...
...
@@ -200,11 +241,21 @@ _ipfs_object_links()
_ipfs_help_only
}
_ipfs_object_put
()
_ipfs_object_new
()
{
_ipfs_help_only
}
_ipfs_object_patch
()
{
_ipfs_help_only
}
_ipfs_object_put
()
{
_ipfs_comp
"--inputenc= --help"
}
_ipfs_object_stat
()
{
_ipfs_help_only
...
...
@@ -217,28 +268,28 @@ _ipfs_pin()
_ipfs_pin_add
()
{
_ipfs_comp
"-recursive --help"
_ipfs_comp
"-
-
recursive --help"
}
_ipfs_pin_ls
()
{
# TODO: auto-complete -type=*
_ipfs_comp
"-type= --help"
_ipfs_comp
"-
-count --quiet --
type= --help"
}
_ipfs_pin_rm
()
{
_ipfs_comp
"-recursive --help"
_ipfs_comp
"-
-
recursive --help"
}
_ipfs_ping
()
{
_ipfs_comp
"-count= --help"
_ipfs_comp
"-
-
count= --help"
}
_ipfs_refs
()
{
_ipfs_comp
"local -
format= -edges -unique
-recursive --help"
_ipfs_comp
"local -
-format= --edges --unique -
-recursive --help"
}
_ipfs_refs_local
()
...
...
@@ -253,17 +304,37 @@ _ipfs_repo()
_ipfs_repo_gc
()
{
_ipfs_comp
"-quiet --help"
_ipfs_comp
"--quiet --help"
}
_ipfs_resolve
()
{
_ipfs_comp
"--recursive --help"
}
_ipfs_stats
()
{
_ipfs_comp
"bw --help"
}
_ipfs_stats_bw
()
{
_ipfs_comp
"--peer= --proto= --poll --interval= --help"
}
_ipfs_swarm
()
{
_ipfs_comp
"addrs connect disconnect peers --help"
_ipfs_comp
"addrs connect disconnect
filters
peers --help"
}
_ipfs_swarm_addrs
()
{
_ipfs_help_only
_ipfs_comp
"local --help"
}
_ipfs_swarm_addrs_local
()
{
_ipfs_comp
"--id --help"
}
_ipfs_swarm_connect
()
...
...
@@ -276,6 +347,21 @@ _ipfs_swarm_disconnect()
_ipfs_help_only
}
_ipfs_swarm_filters
()
{
_ipfs_comp
"add rm --help"
}
_ipfs_swarm_filters_add
()
{
_ipfs_help_only
}
_ipfs_swarm_filters_rm
()
{
_ipfs_help_only
}
_ipfs_swarm_peers
()
{
_ipfs_help_only
...
...
@@ -303,22 +389,12 @@ _ipfs_tour_restart()
_ipfs_update
()
{
_ipfs_comp
"check log --help"
}
_ipfs_update_check
()
{
_ipfs_help_only
}
_ipfs_update_log
()
{
_ipfs_help_only
}
_ipfs_version
()
{
_ipfs_comp
"-number --help"
_ipfs_comp
"-
-
number --help"
}
_ipfs
()
...
...
@@ -328,9 +404,9 @@ _ipfs()
case
"
${
COMP_CWORD
}
"
in
1
)
local
opts
=
"add b
lock bootstrap cat commands config daemon dht diag get id
\
init log ls mount name object pin ping refs repo swarm tour
\
update version"
local
opts
=
"add b
itswap block bootstrap cat commands config daemon dht
\
diag dns file get id init log ls mount name object pin ping
\
refs repo swarm tour
update version"
COMPREPLY
=(
$(
compgen
-W
"
${
opts
}
"
--
${
word
})
)
;;
2
)
local command
=
"
${
COMP_WORDS
[1]
}
"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论