mirror of
https://github.com/RubyMetric/chsrc.git
synced 2024-12-01 05:53:40 +08:00
156 lines
3.2 KiB
Groff
156 lines
3.2 KiB
Groff
.\" --------------------------------------------------------------
|
||
.\" SPDX-License-Identifier: GFDL-1.3-or-later
|
||
.\" --------------------------------------------------------------
|
||
.\" Doc Type : Man Page
|
||
.\" Doc Authors : Aoran Zeng <ccmywish@qq.com>
|
||
.\" Contributors : Nul None <nul@none.org>
|
||
.\" |
|
||
.\" Created On : <2024-08-21>
|
||
.\" Last Modified : <2024-10-09>
|
||
.\" --------------------------------------------------------------
|
||
|
||
.TH chsrc 1 "2024-10-09" "v0.1.9" "RubyMetric chsrc"
|
||
|
||
.SH NAME
|
||
chsrc - Change Source for every software on every platform from the command line
|
||
|
||
.SH SYNOPSIS
|
||
.SY chsrc
|
||
<command> [options] [target] [mirror]
|
||
.YS
|
||
|
||
|
||
.SH DESCRIPTION
|
||
.SS 基本命令
|
||
.TP
|
||
.B help
|
||
打印此帮助,或 h, -h, --help
|
||
.TP
|
||
.B issue
|
||
查看相关issue
|
||
|
||
.TP
|
||
\fBlist\fR (或 \fBls\fR, 或 \fBl\fR)
|
||
列出可用镜像源,和可换源目标
|
||
.TP
|
||
.B list mirror/target
|
||
列出可用镜像源,或可换源目标
|
||
.B list os/lang/ware
|
||
列出可换源的操作系统/编程语言/软件
|
||
|
||
.SS 测速命令
|
||
.TP
|
||
.B measure/cesu \fI<target>\fI
|
||
对该目标所有源测速
|
||
|
||
.SS 查看配置命令
|
||
.TP
|
||
.B list \fI<target>\fR
|
||
查看该目标可用源与支持功能
|
||
.TP
|
||
.B get \fI<target>\fR
|
||
查看该目标当前源的使用情况
|
||
|
||
.SS 换源命令
|
||
.TP
|
||
.B set \fI<target>\fR
|
||
换源,自动测速后挑选最快源
|
||
.TP
|
||
.B set \fI<target>\fR first
|
||
换源,使用维护团队测速第一的源
|
||
.TP
|
||
.B set \fI<target>\fR \fI<mirror>\fR
|
||
换源,指定使用某镜像站 (通过list <target>查看)
|
||
.TP
|
||
.B set \fI<target>\fR \fU<https://url>\fR
|
||
换源,用户自定义源URL
|
||
.TP
|
||
.B reset \fI<target>\fR
|
||
重置,使用上游默认使用的源
|
||
|
||
|
||
|
||
.SH OPTIONS
|
||
.TP
|
||
\fB-dry\fR
|
||
Dry Run,模拟换源过程,命令仅打印并不运行
|
||
.TP
|
||
\fB-local\fR
|
||
仅对本项目而非全局换源 (通过ls \fI<target>\fR查看支持情况)
|
||
.TP
|
||
\fB-ipv6\fR
|
||
使用IPv6测速
|
||
.TP
|
||
\fB-en(glish)\fR
|
||
使用英文输出
|
||
.TP
|
||
\fB-no-color\fR
|
||
无颜色输出
|
||
|
||
|
||
.SH "EXIT STATUS"
|
||
.br
|
||
.TP
|
||
0
|
||
正常执行,一般表示换源成功
|
||
.TP
|
||
1
|
||
用户环境导致的错误,如命令缺失
|
||
.TP
|
||
2
|
||
chsrc 暂未实现支持
|
||
.TP
|
||
3
|
||
维护者导致的镜像站、源信息相关错误
|
||
.TP
|
||
4
|
||
致命错误,由内部Bug导致
|
||
.TP
|
||
5
|
||
致命未知错误,往往代表内部未知Bug
|
||
|
||
|
||
|
||
.SH EXAMPLES
|
||
.EX
|
||
# 测速,寻找最快者,换源
|
||
$ chsrc set ruby
|
||
|
||
# 列出可用的镜像站
|
||
# 使用 RubyChina 作为镜像站
|
||
$ chsrc ls ruby
|
||
$ chsrc set ruby rubychina
|
||
|
||
# 如果您有自己的镜像地址,使用自定义URL
|
||
$ chsrc set ruby https://gems.ruby-china.com/
|
||
|
||
# 使用维护团队测试的最快镜像站
|
||
$ chsrc set ruby first
|
||
.EE
|
||
|
||
|
||
.SH FILES
|
||
.B
|
||
遵循 No UFO(Unidentified File Objects)原则:https://www.yuque.com/ccmywish/blog/no-ufo
|
||
.PP
|
||
因此不会有任何文件存放在你的计算机中!
|
||
|
||
|
||
|
||
.\" .SH SEE ALSO
|
||
|
||
.SH AUTHOR
|
||
Written by Aoran Zeng, Heng Guo and contributors. (See chsrc.c)
|
||
|
||
.SH "REPORTING BUGS"
|
||
On Gitee: https://gitee.com/RubyMetric/chsrc/issues
|
||
.br
|
||
On GitHub: https://github.com/RubyMetric/chsrc/issues
|
||
|
||
.SH COPYRIGHT
|
||
Copyright (C) 2024 Aoran Zeng, Heng Guo.
|
||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
|
||
.br
|
||
This is free software: you are free to change and redistribute it.
|
||
There is NO WARRANTY, to the extent permitted by law.
|