mirror of
https://github.com/RubyMetric/chsrc
synced 2026-02-28 02:11:35 +08:00
更新文档
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -53,7 +53,7 @@ chsrc_tmp_test.txt.bak
|
||||
# Generated when testing (when there's a bug)
|
||||
nul
|
||||
|
||||
# 'chsrc set -local' generated
|
||||
# 'chsrc set -scope=project' generated
|
||||
.bundle
|
||||
.npmrc
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
! | BingChunMoLi <bingchunmoli@bingchunmoli.com>
|
||||
! |
|
||||
! Created On : <2023-12-28>
|
||||
! Last Modified : <2025-08-22>
|
||||
! Last Modified : <2026-02-24>
|
||||
! ---------------------------------------------------------- -->
|
||||
|
||||
<div align="center">
|
||||
@@ -412,7 +412,7 @@ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc; make
|
||||
|
||||
选项:
|
||||
-dry Dry Run,模拟换源过程,命令仅打印并不运行
|
||||
-local 仅对本项目而非全局换源 (通过ls <target>查看支持情况)
|
||||
-scope=project|user|system 仅对本项目换源 / 用户级换源 / 系统级换源 (通过ls <target>查看)
|
||||
-ipv6 使用IPv6测速
|
||||
-en(glish) 使用英文输出
|
||||
-no-color 无颜色输出
|
||||
@@ -440,8 +440,8 @@ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc; make
|
||||
|
||||
对支持 *项目级* 换源的目标,可以避免全局(*系统级* 或 *用户级*)换源
|
||||
|
||||
$ chsrc set -local bundler
|
||||
$ chsrc set -local pdm
|
||||
$ chsrc set -scope=project bundler
|
||||
$ chsrc set -scope project pdm
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
.\" Contributors : Nul None <nul@none.org>
|
||||
.\" |
|
||||
.\" Created On : <2024-08-21>
|
||||
.\" Last Modified : <2025-10-29>
|
||||
.\" Last Modified : <2026-02-24>
|
||||
.\" ----------------------------------------------------------------
|
||||
|
||||
.TH chsrc 1 "2025-10-29" "v0.2.3.1" "RubyMetric chsrc"
|
||||
.TH chsrc 1 "2026-02-24" "v0.2.5" "RubyMetric chsrc"
|
||||
|
||||
.SH NAME
|
||||
chsrc - Change Source for every software on every platform from the command line
|
||||
@@ -75,8 +75,8 @@ chsrc - Change Source for every software on every platform from the command line
|
||||
\fB-dry\fR
|
||||
Dry Run,模拟换源过程,命令仅打印并不运行
|
||||
.TP
|
||||
\fB-local\fR
|
||||
仅对本项目而非全局换源 (通过ls \fI<target>\fR查看支持情况)
|
||||
\fB-scope\fR
|
||||
设置换源的作用域,可选值有:project|user|system|default (通过ls \fI<target>\fR查看支持情况)
|
||||
.TP
|
||||
\fB-ipv6\fR
|
||||
使用IPv6测速
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
@c Contributors : Nul None <nul@none.org>
|
||||
@c |
|
||||
@c Created On : <2024-08-22>
|
||||
@c Last Modified : <2025-10-29>
|
||||
@c Last Modified : <2026-02-24>
|
||||
@c --------------------------------------------------------------
|
||||
|
||||
\input texinfo
|
||||
@setfilename chsrc.info
|
||||
@settitle chsrc
|
||||
|
||||
@set Chsrc_Version v0.2.3.1
|
||||
@set Doc_Publish_Date 2025-10-29
|
||||
@set Chsrc_Version v0.2.5
|
||||
@set Doc_Publish_Date 2026-02-24
|
||||
|
||||
@copying
|
||||
@comment 这是软件copyright,不是文档copyright,因此不放在titlepage
|
||||
@@ -137,8 +137,8 @@ Dry Run,模拟换源过程,命令仅打印并不运行
|
||||
@item -ipv6
|
||||
使用IPv6测速
|
||||
|
||||
@item -local
|
||||
仅对本项目而非全局换源 (通过ls <target>查看支持情况)
|
||||
@item -scope
|
||||
设置换源的作用域,可选值有:project|user|system|default (通过ls <target>查看支持情况)
|
||||
|
||||
@item -en(glish)
|
||||
使用英文输出
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -63,7 +63,7 @@
|
||||
|
||||
选项:
|
||||
-dry Dry Run,模拟换源过程,命令仅打印并不运行
|
||||
-local 仅对本项目而非全局换源 (通过ls <target>查看支持情况)
|
||||
-scope=project|user|system 仅对本项目换源 / 用户级换源 / 系统级换源 (通过ls <target>查看)
|
||||
-ipv6 使用IPv6测速
|
||||
-en(glish) 使用英文输出
|
||||
-no-color 无颜色输出
|
||||
@@ -114,7 +114,7 @@ COMMANDS:
|
||||
|
||||
OPTIONS:
|
||||
-dry Dry Run. Simulate the source changing process, command only prints, not run
|
||||
-local Change source only for this project rather than globally (Via `ls <target>`)
|
||||
-scope=project|user|system Change source only for this project / user level / system level (Via `ls <target>`)
|
||||
-ipv6 Speed measurement using IPv6
|
||||
-en(glish) Output in English
|
||||
-no-color Output without color
|
||||
@@ -122,7 +122,7 @@ OPTIONS:
|
||||
MAINTAIN:
|
||||
We invite you to become a Chef to ensure the quality of recipes you are familiar with for users:
|
||||
|
||||
Source Code: @url@
|
||||
Source Code: https://github.com/RubyMetric/chsrc
|
||||
Become a Maintainer: https://github.com/RubyMetric/chsrc/issues/275
|
||||
```
|
||||
|
||||
|
||||
@@ -77,7 +77,8 @@ pl_js_yarn_setsrc (char *option)
|
||||
{
|
||||
if (chsrc_in_project_scope_mode())
|
||||
{
|
||||
char *msg = ENGLISH ? "Yarn v1 doesn't support `-local`. SKIP changing source!" : "Yarn v1 不支持 -local,跳过换源";
|
||||
char *msg = ENGLISH ? "Yarn v1 doesn't support `-scope=project`. SKIP changing source!"
|
||||
: "Yarn v1 不支持项目级换源,跳过换源";
|
||||
chsrc_error (msg);
|
||||
// 不能直接退出,因为 Leader target 不能就此结束
|
||||
return;
|
||||
|
||||
@@ -66,7 +66,8 @@ pl_python_pip_setsrc (char *option)
|
||||
// 对于不支持的情况,尽早结束
|
||||
if (chsrc_in_project_scope_mode())
|
||||
{
|
||||
char *msg = ENGLISH ? "pip doesn't support `-local`. SKIP changing source!" : "pip 不支持 -local,跳过换源";
|
||||
char *msg = ENGLISH ? "pip doesn't support `-scope=project`. SKIP changing source!"
|
||||
: "pip 不支持项目级换源,跳过换源";
|
||||
chsrc_error (msg);
|
||||
// 不能直接退出,因为 Leader target 不能就此结束
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user