mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-09 17:01:16 -03:00
Compare commits
17 Commits
4.2.0
...
macos-apro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
233355bc9b | ||
|
|
5c2073135e | ||
|
|
58cc0ad760 | ||
|
|
41387a6a3a | ||
|
|
ee94272eaf | ||
|
|
dd6000f1fd | ||
|
|
3bc896bd89 | ||
|
|
80b46fbc28 | ||
|
|
b9af3eca9f | ||
|
|
840efb76d0 | ||
|
|
8a845861f3 | ||
|
|
39d6443b6b | ||
|
|
1c9d4e77df | ||
|
|
15f9d6d279 | ||
|
|
cf2f7eb785 | ||
|
|
e7d740785d | ||
|
|
8cc25fe772 |
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github:
|
||||
- krobelus
|
||||
3
.github/actions/install-sphinx/action.yml
vendored
3
.github/actions/install-sphinx/action.yml
vendored
@@ -9,8 +9,7 @@ runs:
|
||||
- shell: bash
|
||||
run: |
|
||||
set -x
|
||||
pip=$(command -v pip pip3 | head -1)
|
||||
sudo "$pip" install uv --break-system-packages
|
||||
sudo pip install uv --break-system-packages
|
||||
# Check that pyproject.toml and the lock file are in sync.
|
||||
# TODO Use "uv" to install Python as well.
|
||||
: 'Note that --no-managed-python below would be implied but be explicit'
|
||||
|
||||
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@@ -148,9 +148,6 @@ jobs:
|
||||
- name: make fish_run_tests
|
||||
run: |
|
||||
make -C build VERBOSE=1 fish_run_tests
|
||||
- name: Setup tmate session
|
||||
if: ${{ failure() }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
fish ?.?.? (released ???)
|
||||
=========================
|
||||
|
||||
fish 4.2.1 (released November 13, 2025)
|
||||
=======================================
|
||||
|
||||
This release fixes the following problems identified in 4.2.0:
|
||||
|
||||
- When building from a tarball without Sphinx (that is, with ``-DBUILD_DOCS=OFF`` or when ``sphinx-build`` is not found),
|
||||
builtin man pages and help files were missing, which has been fixed (:issue:`12052`).
|
||||
- ``fish_config``'s theme selector (the "colors" tab) was broken, which has been fixed (:issue:`12053`).
|
||||
|
||||
fish 4.2.0 (released November 10, 2025)
|
||||
=======================================
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ set(VARS_FOR_CARGO
|
||||
"${FISH_PCRE2_BUILDFLAG}"
|
||||
"RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}"
|
||||
"FISH_SPHINX=${SPHINX_EXECUTABLE}"
|
||||
"FISH_USE_PREBUILT_DOCS=${USE_PREBUILT_DOCS}"
|
||||
)
|
||||
|
||||
# Let fish pick up when we're running out of the build directory without installing
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -152,7 +152,7 @@ checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
|
||||
|
||||
[[package]]
|
||||
name = "fish"
|
||||
version = "4.2.0"
|
||||
version = "4.2.1-snapshot"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
|
||||
@@ -70,7 +70,7 @@ debug = true
|
||||
|
||||
[package]
|
||||
name = "fish"
|
||||
version = "4.2.0"
|
||||
version = "4.2.1-snapshot"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
default-run = "fish"
|
||||
|
||||
1
build.rs
1
build.rs
@@ -82,6 +82,7 @@ fn detect_cfgs(target: &mut Target) {
|
||||
("apple", &detect_apple),
|
||||
("bsd", &detect_bsd),
|
||||
("using_cmake", &|_| option_env!("FISH_CMAKE_BINARY_DIR").is_some()),
|
||||
("use_prebuilt_docs", &|_| env_var("FISH_USE_PREBUILT_DOCS").is_some_and(|v| v == "TRUE") ),
|
||||
("cygwin", &detect_cygwin),
|
||||
("small_main_stack", &has_small_stack),
|
||||
// See if libc supports the thread-safe localeconv_l(3) alternative to localeconv(3).
|
||||
|
||||
@@ -66,13 +66,15 @@ PREFIX_TMPDIR=$(mktemp -d)
|
||||
cd "$PREFIX_TMPDIR"
|
||||
echo "$VERSION" > version
|
||||
cmake -G "$BUILD_GENERATOR" -DCMAKE_BUILD_TYPE=Debug "$wd"
|
||||
mkdir $PWD/user_doc/src
|
||||
FISH_SPHINX_BUILD_DATE=$tag_creation_date \
|
||||
FISH_SPHINX_HELP_SECTIONS_OUTPUT=$PWD/user_doc/src/help_sections.rs \
|
||||
$BUILD_TOOL doc
|
||||
|
||||
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \
|
||||
--mode=g+w,a+rX --transform s/^/$prefix\//"
|
||||
$TAR_APPEND --no-recursion user_doc
|
||||
$TAR_APPEND user_doc/html user_doc/man
|
||||
$TAR_APPEND user_doc/html user_doc/man user_doc/src/help_sections.rs
|
||||
$TAR_APPEND version
|
||||
|
||||
cd -
|
||||
|
||||
@@ -255,23 +255,27 @@ EOF
|
||||
git push $remote HEAD:master
|
||||
} fi
|
||||
|
||||
milestone_version="$(
|
||||
if echo "$version" | grep -q '\.0$'; then
|
||||
echo "$minor_version"
|
||||
else
|
||||
echo "$version"
|
||||
fi
|
||||
)"
|
||||
milestone_number=$(
|
||||
gh_api_repo milestones?state=open |
|
||||
jq '.[] | select(.title == "fish '"$version"'") | .number'
|
||||
jq --arg name "fish $1" '
|
||||
.[] | select(.title == $name) | .number
|
||||
'
|
||||
)
|
||||
gh_api_repo milestones/$milestone_number --method PATCH \
|
||||
gh_api_repo milestones/"$milestone_number" --method PATCH \
|
||||
--raw-field state=closed
|
||||
|
||||
next_patch_version=$(
|
||||
echo "$version" | awk -F. '
|
||||
NF == 3 && $3 ~ /[0-9]+/ {
|
||||
printf "%s.%s.%s", $1, $2, $3+1
|
||||
}
|
||||
'
|
||||
)
|
||||
if [ -n "$next_patch_version" ]; then
|
||||
next_minor_version=$(echo "$minor_version" |
|
||||
awk -F. '{ printf "%s.%s", $1, $2+1 }')
|
||||
if [ -z "$(milestone_number "$next_minor_version")" ]; then
|
||||
gh_api_repo milestones --method POST \
|
||||
--raw-field title="fish $next_patch_version"
|
||||
--raw-field title="fish $next_minor_version"
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
@@ -66,6 +66,7 @@ endif()
|
||||
|
||||
add_feature_info(Documentation INSTALL_DOCS "user manual and documentation")
|
||||
|
||||
set(USE_PREBUILT_DOCS FALSE)
|
||||
if(BUILD_DOCS)
|
||||
configure_file("${SPHINX_SRC_DIR}/conf.py" "${SPHINX_BUILD_DIR}/conf.py" @ONLY)
|
||||
add_custom_target(doc ALL
|
||||
@@ -76,6 +77,7 @@ if(BUILD_DOCS)
|
||||
PROPERTY FOLDER cmake/DocTargets)
|
||||
|
||||
elseif(HAVE_PREBUILT_DOCS)
|
||||
set(USE_PREBUILT_DOCS TRUE)
|
||||
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
# Out of tree build - link the prebuilt documentation to the build tree
|
||||
add_custom_target(link_doc ALL)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use fish_build_helper::env_var;
|
||||
use fish_build_helper::{env_var, workspace_root};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
@@ -9,6 +9,16 @@ fn main() {
|
||||
let _ = std::fs::create_dir_all(&sec1_dir);
|
||||
|
||||
let help_sections_path = Path::new(&env_var("OUT_DIR").unwrap()).join("help_sections.rs");
|
||||
|
||||
if env_var("FISH_USE_PREBUILT_DOCS").is_some_and(|v| v == "TRUE") {
|
||||
std::fs::copy(
|
||||
workspace_root().join("user_doc/src/help_sections.rs"),
|
||||
help_sections_path,
|
||||
)
|
||||
.unwrap();
|
||||
return;
|
||||
}
|
||||
|
||||
std::fs::write(
|
||||
help_sections_path.clone(),
|
||||
r#"pub static HELP_SECTIONS: &str = "";"#,
|
||||
@@ -26,8 +36,6 @@ fn build_man(man_dir: &Path, sec1_dir: &Path, help_sections_path: &Path) {
|
||||
process::{Command, Stdio},
|
||||
};
|
||||
|
||||
use fish_build_helper::workspace_root;
|
||||
|
||||
let workspace_root = workspace_root();
|
||||
let doc_src_dir = workspace_root.join("doc_src");
|
||||
|
||||
|
||||
@@ -97,7 +97,12 @@ def setup(app):
|
||||
app.add_directive("synopsis", FishSynopsisDirective)
|
||||
|
||||
app.add_config_value("issue_url", default=None, rebuild="html")
|
||||
app.add_config_value("fish_help_sections_output", "", "man", str)
|
||||
app.add_config_value(
|
||||
"fish_help_sections_output",
|
||||
default=os.environ.get("FISH_SPHINX_HELP_SECTIONS_OUTPUT", ""),
|
||||
rebuild="man",
|
||||
types=str,
|
||||
)
|
||||
app.add_role("issue", issue_role)
|
||||
|
||||
app.connect("builder-inited", remove_fish_indent_lexer)
|
||||
|
||||
3
po/de.po
3
po/de.po
@@ -2328,6 +2328,9 @@ msgstr ""
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr ""
|
||||
|
||||
|
||||
3
po/en.po
3
po/en.po
@@ -2326,6 +2326,9 @@ msgstr ""
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr ""
|
||||
|
||||
|
||||
3
po/fr.po
3
po/fr.po
@@ -2457,6 +2457,9 @@ msgstr ""
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr ""
|
||||
|
||||
|
||||
3
po/pl.po
3
po/pl.po
@@ -2322,6 +2322,9 @@ msgstr ""
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -2327,6 +2327,9 @@ msgstr ""
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr ""
|
||||
|
||||
|
||||
3
po/sv.po
3
po/sv.po
@@ -2323,6 +2323,9 @@ msgstr ""
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr ""
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr ""
|
||||
|
||||
|
||||
47
po/zh_CN.po
47
po/zh_CN.po
@@ -109,7 +109,7 @@ msgstr "%s"
|
||||
|
||||
#, c-format
|
||||
msgid "%s %s: Abbreviation %s already exists for commands %s, cannot rename %s\n"
|
||||
msgstr ""
|
||||
msgstr "%s %s: 名为 %s 且适用于命令 %s 的缩写已存在,无法重命名 %s\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s %s: Abbreviation %s already exists, cannot rename %s\n"
|
||||
@@ -123,9 +123,9 @@ msgstr "%s %s: 缩写词 '%s' 不能包含空格\n"
|
||||
msgid "%s %s: Name cannot be empty\n"
|
||||
msgstr "%s %s: 名称不能为空\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s %s: No abbreviation named %s with the specified command restrictions\n"
|
||||
msgstr "%s %s: 没有命名为 %s 的缩写\n"
|
||||
msgstr "%s %s: 没有命名为 %s 且符合指定命令限制的缩写\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s %s: Requires at least two arguments\n"
|
||||
@@ -343,11 +343,11 @@ msgstr "%s: 无法将作业 %s,'%s' 放到后台,因为它不受作业控制
|
||||
msgid "%s: Cannot combine options %s\n"
|
||||
msgstr "%s: 无法合并选项 %s\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Cannot specify multiple positions\n"
|
||||
msgstr "%s: 无法指定多个位置\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Cannot specify multiple regex patterns\n"
|
||||
msgstr "%s: 无法指定多种正则匹配规则\n"
|
||||
|
||||
@@ -367,11 +367,11 @@ msgstr "%s: 命令在交互提示符下无效\n"
|
||||
msgid "%s: Could not find '%s'\n"
|
||||
msgstr "%s: 找不到 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Could not find a job with process ID '%d'\n"
|
||||
msgstr "%s: 无法找到进程 ID 为 '%d' 的作业\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Could not find child processes with the name '%s'\n"
|
||||
msgstr "%s: 无法找到名为 '%s' 的子进程\n"
|
||||
|
||||
@@ -431,7 +431,7 @@ msgstr "%s: 非法函数名 '%s'\n"
|
||||
msgid "%s: Implicit int flag '%c' already defined\n"
|
||||
msgstr "%s: 隐式整形标识 '%c' 已被定义\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Implicit int short flag '%c' does not allow modifiers like '%c'\n"
|
||||
msgstr "%s: 隐式整形短标识 '%c' 不能带有形如 '%c' 的修饰符\n"
|
||||
|
||||
@@ -447,7 +447,7 @@ msgstr "%s: 无效的 --min-args 值 '%s'\n"
|
||||
msgid "%s: Invalid --unknown-arguments value '%s'\n"
|
||||
msgstr "%s: 无效的 --unknown-arguments 值 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid count value '%s'\n"
|
||||
msgstr "%s: 无效的计数值 '%s'\n"
|
||||
|
||||
@@ -459,11 +459,11 @@ msgstr "%s: 无效的终止值 '%s'\n"
|
||||
msgid "%s: Invalid escape style '%s'\n"
|
||||
msgstr "%s: 无效的转义格式 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid fields value '%s'\n"
|
||||
msgstr "%s: 无效的字段值 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid function name: %s\n"
|
||||
msgstr "%s: 无效的函数名:%s\n"
|
||||
|
||||
@@ -475,11 +475,11 @@ msgstr "%s: 无效的起始索引值 '%s'\n"
|
||||
msgid "%s: Invalid job control mode '%s'\n"
|
||||
msgstr "%s: 无效的作业控制模式 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid length value '%s'\n"
|
||||
msgstr "%s: 无效的长度值 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid level value '%s'\n"
|
||||
msgstr "%s: 无效的级别值 '%s'\n"
|
||||
|
||||
@@ -491,11 +491,11 @@ msgstr "%s: 无效的限制 '%s'\n"
|
||||
msgid "%s: Invalid max matches value '%s'\n"
|
||||
msgstr "%s: 无效的最大匹配值 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid max value '%s'\n"
|
||||
msgstr "%s: 无效的最大值 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid option spec '%s' at char '%c'\n"
|
||||
msgstr "%s: 无效的选项规范 '%s' 于字符 '%c'\n"
|
||||
|
||||
@@ -519,7 +519,7 @@ msgstr "%s: 字段 '%s' 的范围值无效\n"
|
||||
msgid "%s: Invalid sort key '%s'\n"
|
||||
msgstr "%s: 无效的排序键 '%s'\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Invalid start value '%s'\n"
|
||||
msgstr "%s: 无效的起始值 '%s'\n"
|
||||
|
||||
@@ -611,7 +611,7 @@ msgstr "%s: 该操作系统不支持资源限制\n"
|
||||
msgid "%s: STEP must be a positive integer\n"
|
||||
msgstr "%s: STEP 必须是正整数\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s: Short flag '%c' already defined\n"
|
||||
msgstr "%s: 已经定义了短标识 '%c'\n"
|
||||
|
||||
@@ -1357,7 +1357,7 @@ msgstr "多次执行一条命令"
|
||||
msgid "Perform a set of commands multiple times"
|
||||
msgstr "多次执行一组指令"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "Please set $%s to a directory where you have write access."
|
||||
msgstr "请将 $%s 设置为您有写入权限的目录。"
|
||||
|
||||
@@ -1468,7 +1468,7 @@ msgstr "搜索/使用路径"
|
||||
msgid "Send job %d (%s) to foreground\n"
|
||||
msgstr "将作业 %d (%s) 发送到前台\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "Send job %s '%s' to background\n"
|
||||
msgstr "将作业 %s '%s' 发送到后台\n"
|
||||
|
||||
@@ -1624,7 +1624,7 @@ msgstr "无法求值字符串替换"
|
||||
msgid "Unable to expand variable name '%s'"
|
||||
msgstr "无法展开变量名称 '%s'"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "Unable to locate %s directory derived from $%s: '%s'."
|
||||
msgstr "无法定位目录 %s 导出自 $%s:'%s'。"
|
||||
|
||||
@@ -1871,7 +1871,7 @@ msgstr "仅支持 f1 至 f%d,不支持 'f%s'"
|
||||
msgid "or press ctrl-%c or ctrl-%c twice in a row."
|
||||
msgstr "或按下 ctrl-%c 键,或连续按两次 ctrl-%c 键。"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "rows %u to %u of %u"
|
||||
msgstr "第 %u 行至第 %u 行,共 %u 行"
|
||||
|
||||
@@ -2355,6 +2355,9 @@ msgstr "foo=bar 变量覆盖"
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr "funced: 无法使用 $EDITOR '$editor' 的值,因为找不到命令 '$editor[1]'"
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr "funced: 无法使用 $VISUAL '$editor' 的值,因为找不到命令 '$editor[1]'"
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr "help: %s 不是有效的命令:%s\\n"
|
||||
|
||||
@@ -2827,7 +2830,7 @@ msgid "List embedded files contained in the fish binary"
|
||||
msgstr "列出 fish 二进制文件包含的嵌入文件"
|
||||
|
||||
msgid "List section arguments for the 'help' command"
|
||||
msgstr ""
|
||||
msgstr "列出传给 'help' 命令的段落名称参数"
|
||||
|
||||
msgid "List the names of the functions, but not their definition"
|
||||
msgstr "列出函数的名称,但不列出其定义"
|
||||
|
||||
11
po/zh_TW.po
11
po/zh_TW.po
@@ -82,7 +82,7 @@ msgstr "%s"
|
||||
|
||||
#, c-format
|
||||
msgid "%s %s: Abbreviation %s already exists for commands %s, cannot rename %s\n"
|
||||
msgstr ""
|
||||
msgstr "%s %s:名為 %s 且適用於命令 %s 的縮寫已存在,無法重新命名 %s\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s %s: Abbreviation %s already exists, cannot rename %s\n"
|
||||
@@ -96,9 +96,9 @@ msgstr "%s %s:縮寫「%s」中不能包含空格\n"
|
||||
msgid "%s %s: Name cannot be empty\n"
|
||||
msgstr "%s %s:名稱不能空白\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%s %s: No abbreviation named %s with the specified command restrictions\n"
|
||||
msgstr "%s %s:沒有縮寫名為 %s\n"
|
||||
msgstr "%s %s:沒有縮寫名為 %s 且符合指定命令限制\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%s %s: Requires at least two arguments\n"
|
||||
@@ -2330,6 +2330,9 @@ msgstr "foo=bar 變數覆寫"
|
||||
msgid "funced: The value for $EDITOR '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr "funced:$EDITOR 的值「$editor」無法使用,找不到命令「$editor[1]」"
|
||||
|
||||
msgid "funced: The value for $VISUAL '$editor' could not be used because the command '$editor[1]' could not be found"
|
||||
msgstr "funced:$VISUAL 的值「$editor」無法使用,找不到命令「$editor[1]」"
|
||||
|
||||
msgid "help: %s is not a valid command: %s\\n"
|
||||
msgstr "help:%s 不是有效的命令:%s\\n"
|
||||
|
||||
@@ -2802,7 +2805,7 @@ msgid "List embedded files contained in the fish binary"
|
||||
msgstr "列出 fish 二進位檔中嵌入的檔案"
|
||||
|
||||
msgid "List section arguments for the 'help' command"
|
||||
msgstr ""
|
||||
msgstr "列出傳給「help」命令的段落名稱引數"
|
||||
|
||||
msgid "List the names of the functions, but not their definition"
|
||||
msgstr "列出函式名稱,不包括其定義"
|
||||
|
||||
@@ -38,7 +38,7 @@ complete -c man -n 'string match -q -- "*/*" (commandline -t | string collect)'
|
||||
if command -q man
|
||||
# We have a conditionally-defined man function,
|
||||
# so we need to check for existence here.
|
||||
if echo | MANPAGER=cat command man -l - &>/dev/null
|
||||
if echo | __fish_without_manpager command man -l - &>/dev/null
|
||||
complete -c man -s l -l local-file -d "Local file" -r
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,9 +5,7 @@ if not type -q apropos
|
||||
exit
|
||||
end
|
||||
|
||||
# Check for macOS Catalina or above.
|
||||
if test (__fish_uname) = Darwin
|
||||
and test (string match -r "^\d+" "$(uname -r)") -ge 19
|
||||
and test -x /usr/libexec/makewhatis
|
||||
|
||||
set -l dir
|
||||
@@ -18,6 +16,11 @@ if test (__fish_uname) = Darwin
|
||||
end
|
||||
|
||||
function __fish_apropos -V dir
|
||||
if test "$(command -v apropos)" != /usr/bin/apropos
|
||||
__fish_without_manpager apropos "$argv"
|
||||
return
|
||||
end
|
||||
|
||||
# macOS 10.15 "Catalina" has a read only filesystem where the whatis database should be.
|
||||
# The whatis database is non-existent, so apropos tries (and fails) to create it every time,
|
||||
# which can take seconds.
|
||||
@@ -34,17 +37,19 @@ if test (__fish_uname) = Darwin
|
||||
set age (path mtime -R -- $whatis)
|
||||
end
|
||||
|
||||
MANPATH="$dir" MANPAGER=cat WHATISPAGER=cat apropos "$argv"
|
||||
MANPATH="$dir" __fish_without_manpager apropos "$argv"
|
||||
|
||||
if test $age -ge $max_age
|
||||
test -d "$dir" || mkdir -m 700 -p $dir
|
||||
/bin/sh -c '( "$@" ) >/dev/null 2>&1 </dev/null &' -- /usr/libexec/makewhatis -o "$whatis" (/usr/bin/manpath | string split : | xargs realpath)
|
||||
/bin/sh -c '( "$@" ) >/dev/null 2>&1 </dev/null &' -- \
|
||||
/usr/libexec/makewhatis -o "$whatis" \
|
||||
(/usr/bin/manpath | string split : | xargs realpath)
|
||||
end
|
||||
end
|
||||
else
|
||||
function __fish_apropos
|
||||
# we only ever prefix match for completions. This also ensures results for bare apropos <TAB>
|
||||
# (apropos '' gives no results, but apropos '^' lists all manpages)
|
||||
MANPAGER=cat WHATISPAGER=cat apropos "$argv"
|
||||
__fish_without_manpager apropos "$argv"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ function __fish_print_help --description "Print help for the specified fish func
|
||||
end
|
||||
set -l args -l (path filter -- $man1/$item.1 $man1/$item.1.gz)[1]
|
||||
# Work around macOS/FreeBSD man not supporting -l yet (only mandoc really needs it).
|
||||
if not MANPAGER=cat WHATISPAGER=cat command man -l $args[2] &>/dev/null
|
||||
if not __fish_without_manpager command man -l $args[2] &>/dev/null
|
||||
set -e args[1]
|
||||
end
|
||||
command man $args
|
||||
|
||||
@@ -4,7 +4,6 @@ function __fish_print_port_packages
|
||||
|
||||
__fish_cached -t 250 -k port '
|
||||
printf "all\ncurrent\nactive\ninactive\ninstalled\nuninstalled\noutdated\n"
|
||||
port echo all | awk \'{$1=$1};1\'
|
||||
'
|
||||
port echo all | awk \'{$1=$1};1\''
|
||||
return 0
|
||||
end
|
||||
|
||||
7
share/functions/__fish_without_manpager.fish
Normal file
7
share/functions/__fish_without_manpager.fish
Normal file
@@ -0,0 +1,7 @@
|
||||
function __fish_without_manpager
|
||||
MANPAGER=cat WHATISPAGER=cat if test "$argv[1]" = command
|
||||
command $argv[2..]
|
||||
else
|
||||
$argv
|
||||
end
|
||||
end
|
||||
@@ -376,7 +376,7 @@ function __fish_config_matching
|
||||
if not set -q argv[1]
|
||||
set -a paths (status list-files $prefix)
|
||||
else
|
||||
set -a paths (status list-files $prefix | grep -Fx -e"$prefix/"$argv$suffix)
|
||||
set -a paths (status list-files "$prefix/"$argv$suffix)
|
||||
end
|
||||
end
|
||||
string join \n $paths
|
||||
|
||||
@@ -39,7 +39,11 @@ function funced --description 'Edit function definition'
|
||||
end
|
||||
|
||||
if not type -q -f "$editor[1]"
|
||||
echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor[1]' could not be found") >&2
|
||||
if set -q VISUAL
|
||||
echo (_ "funced: The value for \$VISUAL '$editor' could not be used because the command '$editor[1]' could not be found") >&2
|
||||
else
|
||||
echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor[1]' could not be found") >&2
|
||||
end
|
||||
set editor fish
|
||||
end
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import typing
|
||||
from typing import Optional
|
||||
from itertools import chain
|
||||
|
||||
COMMON_WSL_CMD_PATHS = (
|
||||
|
||||
@@ -334,10 +334,19 @@ fn parse_cmd_opts(
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
#[cfg(feature = "embed-data")]
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "$FISH_RESOLVED_BUILD_DIR/fish-man/man1"]
|
||||
#[prefix = "man/man1/"]
|
||||
struct Docs;
|
||||
cfg_if!(
|
||||
if #[cfg(use_prebuilt_docs)] {
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "user_doc/man/man1"]
|
||||
#[prefix = "man/man1/"]
|
||||
struct Docs;
|
||||
} else {
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "$FISH_RESOLVED_BUILD_DIR/fish-man/man1"]
|
||||
#[prefix = "man/man1/"]
|
||||
struct Docs;
|
||||
}
|
||||
);
|
||||
|
||||
#[cfg(all(using_cmake, feature = "embed-data"))]
|
||||
#[derive(RustEmbed)]
|
||||
|
||||
@@ -6,7 +6,7 @@ status help-sections | grep -v ^cmds/ >expected
|
||||
|
||||
__fish_data_with_file completions/help.fish cat |
|
||||
awk '
|
||||
/(\s)case(\s)/ && $2 != "'\''cmds/*'\''" {
|
||||
/ case / && $2 != "'\''cmds/*'\''" {
|
||||
sub(/^introduction/, "index", $2);
|
||||
print $2
|
||||
}
|
||||
|
||||
@@ -8,12 +8,14 @@ __fish_data_with_file functions/__fish_print_help.fish source
|
||||
# REQUIRES: test "$FISH_BUILD_DOCS" != "0"
|
||||
# REQUIRES: %fish -c 'status build-info' | grep '^Features:.*embed-data'
|
||||
|
||||
set -l deroff col -b -p -x
|
||||
|
||||
set -lx MANWIDTH 80
|
||||
man abbr | head -n4
|
||||
man abbr | $deroff | head -n4
|
||||
# CHECK: ABBR(1) {{ *}} fish-shell {{ *}} ABBR(1)
|
||||
# CHECK: NAME
|
||||
# CHECK: abbr - manage fish abbreviations
|
||||
man : | head -n4
|
||||
man : | $deroff | head -n4
|
||||
# CHECK: TRUE(1) {{ *}} fish-shell {{ *}} TRUE(1)
|
||||
# CHECK: NAME
|
||||
# CHECK: true - return a successful result
|
||||
|
||||
Reference in New Issue
Block a user