更新文档

This commit is contained in:
Aoran Zeng
2026-02-24 16:29:30 +08:00
parent 2be4dce1ea
commit 3674fe882c
8 changed files with 23 additions and 21 deletions

2
.gitignore vendored
View File

@@ -53,7 +53,7 @@ chsrc_tmp_test.txt.bak
# Generated when testing (when there's a bug) # Generated when testing (when there's a bug)
nul nul
# 'chsrc set -local' generated # 'chsrc set -scope=project' generated
.bundle .bundle
.npmrc .npmrc

View File

@@ -8,7 +8,7 @@
! | BingChunMoLi <bingchunmoli@bingchunmoli.com> ! | BingChunMoLi <bingchunmoli@bingchunmoli.com>
! | ! |
! Created On : <2023-12-28> ! Created On : <2023-12-28>
! Last Modified : <2025-08-22> ! Last Modified : <2026-02-24>
! ---------------------------------------------------------- --> ! ---------------------------------------------------------- -->
<div align="center"> <div align="center">
@@ -412,7 +412,7 @@ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc; make
选项: 选项:
-dry Dry Run模拟换源过程命令仅打印并不运行 -dry Dry Run模拟换源过程命令仅打印并不运行
-local 仅对本项目而非全局换源 (通过ls <target>查看支持情况) -scope=project|user|system 仅对本项目换源 / 用户级换源 / 系统级换源 (通过ls <target>查看)
-ipv6 使用IPv6测速 -ipv6 使用IPv6测速
-en(glish) 使用英文输出 -en(glish) 使用英文输出
-no-color 无颜色输出 -no-color 无颜色输出
@@ -440,8 +440,8 @@ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc; make
对支持 *项目级* 换源的目标,可以避免全局(*系统级* 或 *用户级*)换源 对支持 *项目级* 换源的目标,可以避免全局(*系统级* 或 *用户级*)换源
$ chsrc set -local bundler $ chsrc set -scope=project bundler
$ chsrc set -local pdm $ chsrc set -scope project pdm
``` ```
<br> <br>

View File

@@ -6,10 +6,10 @@
.\" Contributors : Nul None <nul@none.org> .\" Contributors : Nul None <nul@none.org>
.\" | .\" |
.\" Created On : <2024-08-21> .\" 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 .SH NAME
chsrc - Change Source for every software on every platform from the command line 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 \fB-dry\fR
Dry Run模拟换源过程命令仅打印并不运行 Dry Run模拟换源过程命令仅打印并不运行
.TP .TP
\fB-local\fR \fB-scope\fR
仅对本项目而非全局换源 (通过ls \fI<target>\fR查看支持情况) 设置换源的作用域可选值有project|user|system|default (通过ls \fI<target>\fR查看支持情况)
.TP .TP
\fB-ipv6\fR \fB-ipv6\fR
使用IPv6测速 使用IPv6测速

View File

@@ -6,15 +6,15 @@
@c Contributors : Nul None <nul@none.org> @c Contributors : Nul None <nul@none.org>
@c | @c |
@c Created On : <2024-08-22> @c Created On : <2024-08-22>
@c Last Modified : <2025-10-29> @c Last Modified : <2026-02-24>
@c -------------------------------------------------------------- @c --------------------------------------------------------------
\input texinfo \input texinfo
@setfilename chsrc.info @setfilename chsrc.info
@settitle chsrc @settitle chsrc
@set Chsrc_Version v0.2.3.1 @set Chsrc_Version v0.2.5
@set Doc_Publish_Date 2025-10-29 @set Doc_Publish_Date 2026-02-24
@copying @copying
@comment 这是软件copyright不是文档copyright因此不放在titlepage @comment 这是软件copyright不是文档copyright因此不放在titlepage
@@ -137,8 +137,8 @@ Dry Run模拟换源过程命令仅打印并不运行
@item -ipv6 @item -ipv6
使用IPv6测速 使用IPv6测速
@item -local @item -scope
仅对本项目而非全局换源 (通过ls <target>查看支持情况) 设置换源的作用域可选值有project|user|system|default (通过ls <target>查看支持情况)
@item -en(glish) @item -en(glish)
使用英文输出 使用英文输出

File diff suppressed because one or more lines are too long

View File

@@ -63,7 +63,7 @@
选项: 选项:
-dry Dry Run模拟换源过程命令仅打印并不运行 -dry Dry Run模拟换源过程命令仅打印并不运行
-local 仅对本项目而非全局换源 (通过ls <target>查看支持情况) -scope=project|user|system 仅对本项目换源 / 用户级换源 / 系统级换源 (通过ls <target>查看)
-ipv6 使用IPv6测速 -ipv6 使用IPv6测速
-en(glish) 使用英文输出 -en(glish) 使用英文输出
-no-color 无颜色输出 -no-color 无颜色输出
@@ -114,7 +114,7 @@ COMMANDS:
OPTIONS: OPTIONS:
-dry Dry Run. Simulate the source changing process, command only prints, not run -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 -ipv6 Speed measurement using IPv6
-en(glish) Output in English -en(glish) Output in English
-no-color Output without color -no-color Output without color
@@ -122,7 +122,7 @@ OPTIONS:
MAINTAIN: MAINTAIN:
We invite you to become a Chef to ensure the quality of recipes you are familiar with for users: 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 Become a Maintainer: https://github.com/RubyMetric/chsrc/issues/275
``` ```

View File

@@ -77,7 +77,8 @@ pl_js_yarn_setsrc (char *option)
{ {
if (chsrc_in_project_scope_mode()) 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); chsrc_error (msg);
// 不能直接退出,因为 Leader target 不能就此结束 // 不能直接退出,因为 Leader target 不能就此结束
return; return;

View File

@@ -66,7 +66,8 @@ pl_python_pip_setsrc (char *option)
// 对于不支持的情况,尽早结束 // 对于不支持的情况,尽早结束
if (chsrc_in_project_scope_mode()) 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); chsrc_error (msg);
// 不能直接退出,因为 Leader target 不能就此结束 // 不能直接退出,因为 Leader target 不能就此结束
return; return;