mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-22 12:49:56 +08:00
Update help info
This commit is contained in:
parent
3456c45575
commit
33bd3124d9
16
README.md
16
README.md
|
@ -73,7 +73,7 @@ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc; make
|
|||
## 使用
|
||||
|
||||
```bash
|
||||
使用:chsrc <command> [target]
|
||||
使用: chsrc <command> [options] [target] [mirror]
|
||||
|
||||
help # 打印此帮助,或 h, -h, --help
|
||||
list (或 ls, 或 l) # 列出可用镜像源,和可换源软件
|
||||
|
@ -85,8 +85,12 @@ cesu <target> # 对该软件所有源测速
|
|||
get <target> # 查看当前软件的源使用情况
|
||||
|
||||
set <target> # 换源,自动测速后挑选最快源
|
||||
set <target> def(ault) # 换源,默认使用维护团队测速第一的源
|
||||
set <target> <mirror> # 换源,指定使用某镜像站
|
||||
set <target> first # 换源,使用维护团队测速第一的源
|
||||
set <target> <mirror> # 换源,指定使用某镜像站 (通过list命令查看)
|
||||
|
||||
选项:
|
||||
-ipv6 # 使用IPv6测速
|
||||
-local # 仅对某项目而非全局换源 (仅部分软件如bundler,pdm支持)
|
||||
```
|
||||
|
||||
当你不想自动测速的时候,你可以直接指定某镜像站。
|
||||
|
@ -98,6 +102,12 @@ chsrc ls ruby # 列出可用的镜像站
|
|||
chsrc set ruby rubychina # 使用 RubyChina 作为镜像站
|
||||
```
|
||||
|
||||
对部分[支持局部换源](https://gitee.com/RubyMetric/chsrc/issues/I9V5I0)的,可以避免全局换源。
|
||||
```bash
|
||||
chsrc set -local bundler
|
||||
chsrc set -local pdm
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## 编程语言开发
|
||||
|
|
14
src/chsrc.c
14
src/chsrc.c
|
@ -1972,9 +1972,9 @@ TargetInfo
|
|||
|
||||
#define t(a) (const char*)(a)
|
||||
static const char
|
||||
*pl_ruby [] = {"gem", "ruby", "rubygem", "rb", "rubygems",NULL, t(&pl_ruby_target)},
|
||||
*pl_python[] = {"pip", "python", "pypi", "py", "pdm", NULL, t(&pl_python_target)},
|
||||
*pl_nodejs[] = {"npm", "node", "nodejs", "js", "yarn", "pnpm", NULL, t(&pl_nodejs_target)},
|
||||
*pl_ruby [] = {"gem", "ruby", "rubygem", "rb", "rubygems", "bundler", NULL, t(&pl_ruby_target)},
|
||||
*pl_python[] = {"pip", "python", "pypi", "py", "pdm", NULL, t(&pl_python_target)},
|
||||
*pl_nodejs[] = {"npm", "node", "nodejs", "js", "yarn", "pnpm", NULL, t(&pl_nodejs_target)},
|
||||
*pl_perl [] = {"perl", "cpan", NULL, t(&pl_perl_target)},
|
||||
*pl_php [] = {"php", "composer", NULL, t(&pl_php_target)},
|
||||
*pl_lua [] = {"lua", "luarocks", NULL, t(&pl_lua_target)},
|
||||
|
@ -2083,7 +2083,7 @@ static const char*
|
|||
usage[] = {
|
||||
"维护: https://gitee.com/RubyMetric/chsrc\n",
|
||||
|
||||
"使用: chsrc <command> [target] [mirror]",
|
||||
"使用: chsrc <command> [options] [target] [mirror]",
|
||||
"help 打印此帮助,或 h, -h, --help",
|
||||
"list (或 ls, 或 l) 列出可用镜像源,和可换源软件",
|
||||
"list mirror/target 列出可用镜像源,或可换源软件",
|
||||
|
@ -2093,7 +2093,11 @@ usage[] = {
|
|||
"get <target> 查看当前软件的源使用情况",
|
||||
"set <target> 换源,自动测速后挑选最快源",
|
||||
"set <target> first 换源,使用维护团队测速第一的源",
|
||||
"set <target> <mirror> 换源,指定使用某镜像站\n"
|
||||
"set <target> <mirror> 换源,指定使用某镜像站 (通过list命令查看)\n",
|
||||
|
||||
"选项:",
|
||||
"-ipv6 使用IPv6测速",
|
||||
"-local 仅对某项目而非全局换源 (仅部分软件如bundler,pdm支持)"
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user