Compare commits

...

34 Commits

Author SHA1 Message Date
Johannes Altmanninger
1f6cd5fc2d Release 4.1.1
Created by ./build_tools/release.sh 4.1.1
2025-09-30 19:27:13 +02:00
Johannes Altmanninger
635525be96 Changelog update for 4.1.1
(cherry picked from commit 412149a5de)
2025-09-30 19:26:51 +02:00
Johannes Altmanninger
280791c0f5 Increase escape sequence timeout while waiting for query response
Running "fish -d reader" inside SSH inside Windows terminal sometimes
results in hangs on startup (or whenever we run "scrollback-push"),
because not all of the Primary DA response is available for reading
at once:

	reader: Incomplete escape sequence: \e\[?61\;4\;6\;7\;14\;21\;22\;23\;24\;28\;32

Work around this by increasing the read timeout while we're waiting
for query responses.

We should try to find a better (more comprehensive?) fix in future,
but for the patch release, this small change will do.

Fixes #11841

(cherry picked from commit abd23d2a1b)
2025-09-30 19:05:04 +02:00
Johannes Altmanninger
91faa1be49 Changelog for translation fixes from #11833
(cherry picked from commit b774c54a6f)
2025-09-30 19:05:04 +02:00
王宇逸
24e529ea07 zh_CN: fix tier 1 translations
Closes #11833

(cherry picked from commit e4b797405b)
2025-09-30 19:05:04 +02:00
Johannes Altmanninger
595bfda331 release-notes.sh: fix sphinx warning for patch release notes
Integration_4.1.1 fails to generate release notes with

	CHANGELOG.rst:9: WARNING: Bullet list ends without a blank
	line; unexpected unindent. [docutils].

(cherry picked from commit 81a89a5dec)
2025-09-30 19:05:04 +02:00
Johannes Altmanninger
0f358756a2 Primary Device Attribute is a proper noun
We don't care about any specific attributes but we do very much care
about the specific query and response format associated with VT100's
primary device attribute query. Use a proper noun to emphasize that
we want that one and no other.

Ref: https://github.com/fish-shell/fish-shell/pull/11833#discussion_r2385659040
(cherry picked from commit 0da12a6b55)
2025-09-30 12:08:37 +02:00
Johannes Altmanninger
0ace46d127 build.rs: fix MSRV (1.70) clippy
(cherry picked from commit 86ec8994e6)
2025-09-30 12:08:37 +02:00
Johannes Altmanninger
a143a67318 po/de.po: copy-edit German translations
Go through all existing translations except for tier3.

(cherry picked from commit caf426ddb2)
2025-09-30 11:52:43 +02:00
Johannes Altmanninger
047b9d96a0 builtin commandline: fix completion description
(cherry picked from commit 508ae410a6)
2025-09-30 11:52:43 +02:00
Johannes Altmanninger
c942b034ba builtin function: remove dead code
(cherry picked from commit 993b977c9b)
2025-09-30 11:52:42 +02:00
Johannes Altmanninger
0f1caacae4 builtin function: fix a misleading error message
Issue introduced in 7914c92824 (replaced the functions '--rename'
option with '--copy'., 2010-09-09).

(cherry picked from commit a7f0138fc7)
2025-09-30 11:52:42 +02:00
Johannes Altmanninger
f332cdc757 builtin set: fix regression in error message description
(cherry picked from commit ab3c932903)
2025-09-30 11:52:42 +02:00
Johannes Altmanninger
c6912c6721 Remove translations for some error messages that basically never happen
Executable path is empty only in contrived circumstances.

The regex error happens only when the user explicitly turns off a
feature flag.

The orphaned process error seems very unlikely, not worth translating.

(cherry picked from commit ae0fdadcff)
2025-09-30 11:52:42 +02:00
Johannes Altmanninger
678edbd223 Fix short description for builtin wait
(cherry picked from commit e3974989d8)
2025-09-30 11:52:42 +02:00
Johannes Altmanninger
1a78407efe Translation update implied by parent commit
Part of #11833

(cherry picked from commit 080b1e0e4f)
2025-09-30 11:52:41 +02:00
Johannes Altmanninger
3ecf1bc46d po: add section markers to indicate translation priority
Part of #11833

(cherry picked from commit a5db91dd85)
2025-09-30 11:52:41 +02:00
Johannes Altmanninger
4d99e51e62 Translation update implied by parent commit
Part of #11833

(cherry picked from commit b62f54631b)
2025-09-30 11:52:41 +02:00
Johannes Altmanninger
a9576d44e3 Prepare to not localize private function descriptions
The overwhelming majority of localizable messages comes from
completions:

	$ ls share/completions/ | wc -l
	$ 1048

OTOH functions also contribute a small amount, mostly via their
descriptions (so usually just one per file).

	$ ls share/functions/ | wc -l
	$ 237

Most of these are private and almost never shown to the user, so it's
not worth bothering translators with them. So:

- Skip private (see the parent commit) and deprecated functions.
- Skip wrapper functions like grep (where the translation seems to
  be provided by apropos), and even the English description is not
  helpful.
  - Assume that most real systems have "seq", "realpath" etc.,
    so it's no use providing our own translations for our fallbacks.
- Mark fish's own functions as tier1, and some barely-used functiosn
  and completions as tier3, so we can order them that way in
  po/*.po. Most translators should only look at tier1 and tier2.
  In future we could disable localization for tier3.

See the explanation at the bottom of
tests/checks/message-localization-tier-is-declared.fish

Part of #11833

(cherry picked from commit d835c5252a)
2025-09-30 11:52:41 +02:00
Johannes Altmanninger
2c0e912fe1 Mark private functions that don't need localization
See the next commit.

Part of #11833

(cherry picked from commit a53db72564)
2025-09-30 11:52:41 +02:00
Johannes Altmanninger
1f96e58852 functions/realpath: remove weird wrapping
Wrapping the same thing is redundant and wrapping grealpath is kinda
pointless since we only provide completions for realpath.

(cherry picked from commit 61b0368dac)
2025-09-30 11:52:41 +02:00
Integral
03f4bf262a completions/help: correct the spelling of "redirection"
Closes #11839

(cherry picked from commit 568b4a22f9)
2025-09-30 11:52:41 +02:00
Jiangqiu Shen
bb61c948af Re-add translations for share/completions/cjpm.fish
As removed in the parent commit.
Cherry-picked from e4c55131c7 (Update translation, 2025-07-04)

(cherry picked from commit 8abba8a089)
2025-09-30 11:52:41 +02:00
王宇逸
fa59a736bf zh_CN: bad translations are worse than none
Part of #11833

(cherry picked from commit b3b789cd68)
2025-09-30 11:52:40 +02:00
Johannes Altmanninger
97dc8f69d9 functions/seq: use early return
(cherry picked from commit 425a166111)
2025-09-30 11:52:40 +02:00
Johannes Altmanninger
57753474e4 tests/checks/check-all-fish-files.fish: follow naming convention
(cherry picked from commit 1dcc290e29)
2025-09-30 11:52:40 +02:00
Johannes Altmanninger
d5f4cedeb5 build.rs: remove dead code
(cherry picked from commit 863204dbfa)
2025-09-30 11:52:40 +02:00
Sebastian Fleer
ec4700308e webconfig: Replace str.stripprefix with str.removeprefix
str.stripprefix doesn't exist in Python:
https://docs.python.org/3/library/stdtypes.html#str.removeprefix

Closes #11840

(cherry picked from commit 4b21e7c9c7)
2025-09-30 11:52:40 +02:00
Johannes Altmanninger
1d5ae08696 Reliably disable modifyOtherKeys on WezTerm
WezTerm allows applications to enable modifyOtherKeys by default.
Its implementation has issues on non-English or non-QWERTY layouts,
see https://github.com/wezterm/wezterm/issues/6087 and #11204.

fish 4.0.1 disabled modifyOtherKeys on WezTerm specifically
(7ee6d91ba0 (Work around keyboard-layout related bugs in WezTerm's
modifyOtherKeys, 2025-03-03)), fish 4.1.0 didn't, because at that
time, WezTerm would advertise support for the kitty keyboard protocol
(even if applications are not allowed to enable it) which would make
fish skip requesting the legacy modifyOtherKeys.

WezTerm no longer advertises that if config.enable_kitty_keyboard
is false.  Let's work around it in another way.

(cherry picked from commit df5230ff4a)
2025-09-30 11:52:40 +02:00
Johannes Altmanninger
bb5b583d63 Tighten some screws for TTY-specific workarounds
(cherry picked from commit 7cd0943056)
2025-09-30 11:52:40 +02:00
Johannes Altmanninger
7d80a599f2 fish_config: fix for non-embedded builds
I only tested with embedded-builds; CMake tests were failing because
they use different code paths here.

fish_config could use some love.  Start by extracting common
functionality between "{theme,prompt} show", fixing the behavior.

Fixes 29a35a7951 (fish_config: fix "prompt/theme show" in embed-data
builds, 2025-09-28).

(cherry picked from commit 6f0532460a)
2025-09-28 12:31:00 +02:00
Johannes Altmanninger
284d8fa3d1 fish_config: fix "prompt/theme show" in embed-data builds
Fixes #11832

(cherry picked from commit 29a35a7951)
2025-09-28 11:08:14 +02:00
Johannes Altmanninger
a03f52add0 release workflow: install msgfmt for staticbuilds
This makes us actually embed localized messages.

Part of #11828

(cherry picked from commit 0ff0de7efe)
2025-09-28 11:06:21 +02:00
Johannes Altmanninger
89fa81123b build_tools/release.sh: actually add new docs
Not quite sure for which step this is actually needed.  While at it,
fix the errexit issue that caused this blunder.

(cherry picked from commit 97ae05b69d)
2025-09-28 11:06:21 +02:00
249 changed files with 35723 additions and 37993 deletions

View File

@@ -80,7 +80,7 @@ jobs:
with:
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
- name: Install dependencies
run: sudo apt install crossbuild-essential-arm64 musl-tools python3-sphinx
run: sudo apt install crossbuild-essential-arm64 gettext musl-tools python3-sphinx
- name: Build statically-linked executables
run: |
set -x

View File

@@ -1,3 +1,20 @@
fish 4.1.1 (released September 30, 2025)
========================================
This release fixes the following regressions identified in 4.1.0:
- Many of our new Chinese translations were more confusing than helpful; they have been fixed or removed (:issue:`11833`).
Note that you can work around this type of issue by configuring fish's :doc:`message localization <cmds/_>`:
if your environment contains something like ``LANG=zh_CN.UTF-8``,
you can use ``set -g LC_MESSAGES en`` to use English messages inside fish.
This will not affect fish's child processes unless ``LC_MESSAGES`` was already exported.
- Some :doc:`fish_config <cmds/fish_config>` subcommands for showing prompts and themes had been broken in standalone Linux builds (those using the ``embed-data`` cargo feature), which has been fixed (:issue:`11832`).
- On Windows Terminal, we observed an issue where fish would fail to read the terminal's response to our new startup queries, causing noticeable lags and a misleading error message. A workaround has been added (:issue:`11841`).
- A WezTerm `issue breaking shifted key input <https://github.com/wezterm/wezterm/issues/6087>`__ has resurfaced on some versions of WezTerm; our workaround has been extended to cover all versions for now (:issue:`11204`).
- Fixed a crash in :doc:`the web-based configuration tool <cmds/fish_config>` when using the new underline styles (:issue:`11840`).
fish 4.1.0 (released September 27, 2025)
========================================
@@ -30,7 +47,7 @@ Deprecations and removed features
- The ``--install`` option when fish is built as self-installing is removed, see :ref:`below <changelog-4.1-embedded>`.
- ``set_color ff0000`` now outputs 24-bit RGB true-color even if :envvar:`COLORTERM` is unset.
One can override this by setting :envvar:`fish_term24bit` to 0 (:issue:`11372`).
- fish now requires the terminal to respond to queries for the :ref:`primary device attribute <term-compat-primary-da>`.
- fish now requires the terminal to respond to queries for the :ref:`Primary Device Attribute <term-compat-primary-da>`.
For now, this can be reversed via a :ref:`feature flag <featureflags>`,
by running (once) ``set -Ua fish_features no-query-term`` and restarting fish.
- Users of GNU screen may experience :ref:`minor glitches <term-compat-dcs-gnu-screen>` when starting fish.
@@ -83,9 +100,6 @@ Improved terminal support
- Support for double, curly, dotted and dashed underlines, for use in ``fish_color_*`` variables and the :doc:`set_color builtin <cmds/set_color>` (:issue:`10957`).
- Underlines can now be colored independent of text (:issue:`7619`).
- New documentation page :doc:`Terminal Compatibility <terminal-compatibility>` (also accessible via ``man fish-terminal-compatibility``) lists the terminal control sequences used by fish.
- fish now requires the terminal to respond to queries for the :ref:`primary device attribute <term-compat-primary-da>`.
For now, this can be reversed via a :ref:`feature flag <featureflags>`,
by running (once) ``set -Ua fish_features no-query-term``.
Other improvements
------------------

2
Cargo.lock generated
View File

@@ -105,7 +105,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "fish"
version = "4.1.0"
version = "4.1.1"
dependencies = [
"bitflags",
"cc",

View File

@@ -64,7 +64,7 @@ debug = true
[package]
name = "fish"
version = "4.1.0"
version = "4.1.1"
edition.workspace = true
rust-version.workspace = true
default-run = "fish"

View File

@@ -180,7 +180,7 @@ To install fish with embedded files, just use ``cargo``, like::
cargo install --git https://github.com/fish-shell/fish-shell --tag "$(curl -s https://api.github.com/repos/fish-shell/fish-shell/releases/latest | jq -r .tag_name)" # to build the latest release
cargo install --git https://github.com/fish-shell/fish-shell # to build the latest development snapshot
This will place the binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
This will place the standalone binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
This build won't have the HTML docs (``help`` will open the online version).
It will try to build the man pages with sphinx-build. If that is not available and you would like to include man pages, you need to install it and retrigger the build script, e.g. by setting FISH_BUILD_DOCS=1::

View File

@@ -3,7 +3,6 @@
use fish_build_helper::{fish_build_dir, workspace_root};
use rsconf::Target;
use std::env;
use std::error::Error;
use std::path::{Path, PathBuf};
fn canonicalize<P: AsRef<Path>>(path: P) -> PathBuf {
@@ -81,53 +80,44 @@ fn detect_cfgs(target: &mut Target) {
for (name, handler) in [
// Ignore the first entry, it just sets up the type inference. Model new entries after the
// second line.
(
"",
&(|_: &Target| Ok(false)) as &dyn Fn(&Target) -> Result<bool, Box<dyn Error>>,
),
("", &(|_: &Target| false) as &dyn Fn(&Target) -> bool),
("apple", &detect_apple),
("bsd", &detect_bsd),
("cygwin", &detect_cygwin),
("small_main_stack", &has_small_stack),
// See if libc supports the thread-safe localeconv_l(3) alternative to localeconv(3).
("localeconv_l", &|target| {
Ok(target.has_symbol("localeconv_l"))
target.has_symbol("localeconv_l")
}),
("FISH_USE_POSIX_SPAWN", &|target| {
Ok(target.has_header("spawn.h"))
target.has_header("spawn.h")
}),
("HAVE_PIPE2", &|target| {
Ok(target.has_symbol("pipe2"))
target.has_symbol("pipe2")
}),
("HAVE_EVENTFD", &|target| {
// FIXME: NetBSD 10 has eventfd, but the libc crate does not expose it.
if cfg!(target_os = "netbsd") {
Ok(false)
false
} else {
Ok(target.has_header("sys/eventfd.h"))
target.has_header("sys/eventfd.h")
}
}),
("HAVE_WAITSTATUS_SIGNAL_RET", &|target| {
Ok(target.r#if("WEXITSTATUS(0x007f) == 0x7f", &["sys/wait.h"]))
target.r#if("WEXITSTATUS(0x007f) == 0x7f", &["sys/wait.h"])
}),
] {
match handler(target) {
Err(e) => {
rsconf::warn!("{}: {}", name, e);
rsconf::declare_cfg(name, false);
},
Ok(enabled) => rsconf::declare_cfg(name, enabled),
}
rsconf::declare_cfg(name, handler(target))
}
}
fn detect_apple(_: &Target) -> Result<bool, Box<dyn Error>> {
Ok(cfg!(any(target_os = "ios", target_os = "macos")))
fn detect_apple(_: &Target) -> bool {
cfg!(any(target_os = "ios", target_os = "macos"))
}
fn detect_cygwin(_: &Target) -> Result<bool, Box<dyn Error>> {
fn detect_cygwin(_: &Target) -> bool {
// Cygwin target is usually cross-compiled.
Ok(std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "cygwin")
std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "cygwin"
}
/// Detect if we're being compiled for a BSD-derived OS, allowing targeting code conditionally with
@@ -136,13 +126,14 @@ fn detect_cygwin(_: &Target) -> Result<bool, Box<dyn Error>> {
/// Rust offers fine-grained conditional compilation per-os for the popular operating systems, but
/// doesn't necessarily include less-popular forks nor does it group them into families more
/// specific than "windows" vs "unix" so we can conditionally compile code for BSD systems.
fn detect_bsd(_: &Target) -> Result<bool, Box<dyn Error>> {
fn detect_bsd(_: &Target) -> bool {
// Instead of using `uname`, we can inspect the TARGET env variable set by Cargo. This lets us
// support cross-compilation scenarios.
let mut target = std::env::var("TARGET").unwrap();
if !target.chars().all(|c| c.is_ascii_lowercase()) {
target = target.to_ascii_lowercase();
}
#[allow(clippy::let_and_return)] // for old clippy
let is_bsd = target.ends_with("bsd") || target.ends_with("dragonfly");
#[cfg(any(
target_os = "dragonfly",
@@ -151,7 +142,7 @@ fn detect_bsd(_: &Target) -> Result<bool, Box<dyn Error>> {
target_os = "openbsd",
))]
assert!(is_bsd, "Target incorrectly detected as not BSD!");
Ok(is_bsd)
is_bsd
}
/// Rust sets the stack size of newly created threads to a sane value, but is at at the mercy of the
@@ -160,13 +151,13 @@ fn detect_bsd(_: &Target) -> Result<bool, Box<dyn Error>> {
///
/// 0.5 MiB is small enough that we'd have to drastically reduce MAX_STACK_DEPTH to less than 10, so
/// we instead use a workaround to increase the main thread size.
fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
fn has_small_stack(_: &Target) -> bool {
#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "netbsd")))]
return Ok(false);
return false;
// NetBSD 10 also needs this but can't find pthread_get_stacksize_np.
#[cfg(target_os = "netbsd")]
return Ok(true);
return true;
#[cfg(any(target_os = "ios", target_os = "macos"))]
{
@@ -182,8 +173,8 @@ fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
let stack_size = unsafe { pthread_get_stacksize_np(pthread_self()) };
const TWO_MIB: usize = 2 * 1024 * 1024 - 1;
match stack_size {
0..=TWO_MIB => Ok(true),
_ => Ok(false),
0..=TWO_MIB => true,
_ => false,
}
}
}

View File

@@ -19,7 +19,7 @@ begin
echo ""
end
set -g workspace_root (status dirname)/..
set -g workspace_root (path resolve (status dirname)/..)
set -l rust_extraction_file
if set -l --query _flag_use_existing_template
@@ -31,6 +31,7 @@ begin
or exit 1
end
echo '# fish-section-tier1-from-rust'
# Get rid of duplicates and sort.
msguniq --no-wrap --strict --sort-output $rust_extraction_file
or exit 1
@@ -39,8 +40,9 @@ begin
rm $rust_extraction_file
end
function extract_fish_script_messages --argument-names regex
function extract_fish_script_messages_impl
set -l regex $argv[1]
set -e argv[1]
# Using xgettext causes more trouble than it helps.
# This is due to handling of escaping in fish differing from formats xgettext understands
# (e.g. POSIX shell strings).
@@ -59,24 +61,74 @@ begin
# 5. Double quotes are escaped, such that they are not interpreted as the start or end of
# a msgid.
# 6. We transform the string into the format expected in a PO file.
cat $share_dir/config.fish $share_dir/completions/*.fish $share_dir/functions/*.fish |
cat $argv |
string replace --filter --regex $regex '$1' |
string unescape |
sort -u |
sed -E -e 's_\\\\_\\\\\\\\_g' -e 's_"_\\\\"_g' -e 's_^(.*)$_msgid "\1"\nmsgstr ""\n_'
end
function extract_fish_script_messages
set -l tier $argv[1]
set -e argv[1]
if not set -q argv[1]
return
end
# This regex handles explicit requests to translate a message. These are more important to translate
# than messages which should be implicitly translated.
set -l explicit_regex '.*\( *_ (([\'"]).+?(?<!\\\\)\\2) *\).*'
echo "# fish-section-$tier-from-script-explicitly-added"
extract_fish_script_messages_impl $explicit_regex $argv
# This regex handles descriptions for `complete` and `function` statements. These messages are not
# particularly important to translate. Hence the "implicit" label.
set -l implicit_regex '^(?:\s|and |or )*(?:complete|function).*? (?:-d|--description) (([\'"]).+?(?<!\\\\)\\2).*'
echo "# fish-section-$tier-from-script-implicitly-added"
extract_fish_script_messages_impl $implicit_regex $argv
end
set -g share_dir $workspace_root/share
# This regex handles explicit requests to translate a message. These are more important to translate
# than messages which should be implicitly translated.
set -l explicit_regex '.*\( *_ (([\'"]).+?(?<!\\\\)\\2) *\).*'
extract_fish_script_messages $explicit_regex
set -l tier1 $share_dir/config.fish
set -l tier2
set -l tier3
# This regex handles descriptions for `complete` and `function` statements. These messages are not
# particularly important to translate. Hence the "implicit" label.
set -l implicit_regex '^(?:\s|and |or )*(?:complete|function).*? (?:-d|--description) (([\'"]).+?(?<!\\\\)\\2).*'
extract_fish_script_messages $implicit_regex
for file in $share_dir/completions/*.fish $share_dir/functions/*.fish
# set -l tier (string match -r '^# localization: .*' <$file)
set -l tier (string replace -rf -m1 \
'^# localization: (.*)$' '$1' <$file)
if set -q tier[1]
switch "$tier"
case tier1 tier2 tier3
set -a $tier $file
case 'skip*'
case '*'
echo >&2 "$file:1 unexpected localization tier: $tier"
exit 1
end
continue
end
set -l dirname (path basename (path dirname $file))
set -l command_name (path basename --no-extension $file)
if test $dirname = functions &&
string match -q -- 'fish_*' $command_name
set -a tier1 $file
continue
end
if test $dirname != completions
echo >&2 "$file:1 missing localization tier for function file"
exit 1
end
if test -e $workspace_root/doc_src/cmds/$command_name.rst
set -a tier1 $file
else
set -a tier3 $file
end
end
extract_fish_script_messages tier1 $tier1
extract_fish_script_messages tier2 $tier2
extract_fish_script_messages tier3 $tier3
end |
# At this point, all extracted strings have been written to stdout,
# starting with the ones taken from the Rust sources,

View File

@@ -53,14 +53,14 @@ previous_minor_version=${previous_version%.*}
)
fi
printf %s "$(awk <"$workspace_root/CHANGELOG.rst" '
printf '%s\n' "$(awk <"$workspace_root/CHANGELOG.rst" '
NR <= 2 || /^\.\. ignore / { next }
/^===/ { exit }
{ print }
' | sed '$d')" |
sed -e '$s/^----*$//' # Remove spurious transitions at the end of the document.
if [ "$minor_version" != "$previous_minor_version" ]; then
if [ "$minor_version" != "$previous_minor_version" ]; then {
JoinEscaped() {
sed 's/\S/\\&/g' |
awk '
@@ -79,7 +79,7 @@ previous_minor_version=${previous_version%.*}
echo
printf "Welcome back our returning committers: "
JoinEscaped <"$relnotes_tmp/committers-returning"
fi
} fi
echo
echo "---"
echo

View File

@@ -136,7 +136,10 @@ rm -rf "$tmpdir"
cd "$fish_site"
make
git add -u
! git ls-files --others --exclude-standard | grep .
git add docs
if git ls-files --others --exclude-standard | grep .; then
exit 1
fi
git commit --message="$(printf %s "\
| Release $version (docs)
|
@@ -184,7 +187,10 @@ done
cd "$fish_site"
make new-release
git add -u
! git ls-files --others --exclude-standard | grep .
git add docs
if git ls-files --others --exclude-standard | grep .; then
exit 1
fi
git commit --message="$(printf %s "\
| Release $version (release list update)
|

View File

@@ -99,15 +99,55 @@ if set -l --query _flag_dry_run
cp -r $po_dir/* $tmpdir
end
function merge_po_files --argument-names template_file po_file
msgmerge --no-wrap --update --no-fuzzy-matching --backup=none --quiet \
$po_file $template_file
or cleanup_exit
set -l new_po_file (mktemp) # TODO Remove on failure.
and msgattrib --no-wrap --no-obsolete -o $new_po_file $po_file
or cleanup_exit
begin
echo "# fish-note-sections: Translations are divided into sections, each starting with a fish-section-* comment."
echo "# fish-note-sections: The first few sections are more important."
echo "# fish-note-sections: Ignore the tier3 sections unless you have a lot of time."
sed -i '
/^# fish-note-sections:/d;
/^# fish-section-/d;
' $new_po_file
set -l next_line 1
set -l section
awk <$template_file '
/^# fish-section-\S*$/ {
section = $0
}
section != "" && /^msgid ".+"$/ {
print section
print $0
section = ""
}
' |
while read -l section
read -l msgid_line
set -l line_number (grep -m1 -Fxn $msgid_line $new_po_file | string split :)[1]
sed -n "$next_line,$(math $line_number - 1)"p $new_po_file
echo $section
set next_line $line_number
# set section
end
sed -n "$next_line,\$"p $new_po_file
end >$po_file
rm $new_po_file
end
for po_file in $po_files
if set --query tmpdir[1]
set po_file $tmpdir/(basename $po_file)
end
if set -l --query po
if test -e $po_file
msgmerge --no-wrap --update --no-fuzzy-matching --backup=none --quiet $po_file $template_file
and msgattrib --no-wrap --no-obsolete -o $po_file $po_file
or cleanup_exit
merge_po_files $template_file $po_file
else
cp $template_file $po_file
end

View File

@@ -72,7 +72,7 @@ Required Commands
``\e[0c``
-
- Request primary device attribute.
- Request Primary Device Attribute.
The terminal must respond with a CSI command that starts with the ``?`` parameter byte (so a sequence starting with ``\e[?``) and has ``c`` as final byte.
Failure to implement this will cause a brief pause at startup followed by a warning.

3948
po/de.po

File diff suppressed because it is too large Load Diff

3830
po/en.po

File diff suppressed because it is too large Load Diff

3830
po/fr.po

File diff suppressed because it is too large Load Diff

3830
po/pl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3828
po/sv.po

File diff suppressed because it is too large Load Diff

49670
po/zh_CN.po

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1,2 @@
# localization: tier1
complete ! --wraps not

View File

@@ -1 +1,2 @@
# localization: tier1
complete [ --wraps test

View File

@@ -11,7 +11,7 @@ complete -c commandline -s t -l current-token -d "Select token under cursor"
complete -c commandline -s b -l current-buffer -d "Select entire command line (default)"
complete -c commandline -s c -l cut-at-cursor -d "Only return that part of the command line before the cursor"
complete -c commandline -s f -l function -d "Inject readline functions to reader"
complete -c commandline -s f -l function -d "execute readline function"
complete -c commandline -s x -l tokens-expanded -d "Print a list of expanded tokens"
complete -c commandline -s I -l input -d "Specify command to operate on"

View File

@@ -1,3 +1,5 @@
# localization: skip(barely-used)
set --local CONDITION '! __fish_seen_argument --short r --long required-val --short o --long optional-val'
complete --command fish_opt --no-files

View File

@@ -122,7 +122,7 @@ complete -c help -x -a exporting-variables -d "What set -x does"
complete -c help -x -a functions -d "How to define functions"
complete -c help -x -a home-directory-expansion -d "~ expansion"
complete -c help -x -a index-range-expansion -d "var[x..y] slices"
complete -c help -x -a input-output-redirection -d "< and > redirectoins"
complete -c help -x -a input-output-redirection -d "< and > redirections"
complete -c help -x -a lists -d "Variables with multiple elements"
complete -c help -x -a loops-and-blocks -d "while, for and begin"
complete -c help -x -a more-on-universal-variables

View File

@@ -1,3 +1,4 @@
function N_ --description No-op
# localization: skip(deprecated)
function N_
printf "%s" $argv
end

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
# returns 0 only if any argument is on of the supplied arguments
function __fish_any_arg_in
set -l haystack $argv

View File

@@ -1,4 +1,5 @@
function __fish_anyeditor --description "Print a editor to use, or an error message"
# localization: tier1
function __fish_anyeditor
set -l editor
if set -q VISUAL
echo $VISUAL | read -at editor

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_anypager --description "Print a pager to use"
set -l pager
# We prefer $PAGER if we have it

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_anypython
# Try python3 first, because that's usually faster and generally nicer.
# Do not consider the stub /usr/bin/python3 that comes installed on Darwin to be Python

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_append -d "Internal completion function for appending string to the commandline" --argument-names sep
set -e argv[1]
set -l str (commandline -tc | string replace -rf "(.*$sep)[^$sep]*" '$1' | string replace -r -- '--.*=' '')

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
if not type -q apropos
function __fish_apropos
end

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_argcomplete_complete
set -lx _ARGCOMPLETE 1
set -lx _ARGCOMPLETE_IFS \n

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_cache_put
set -l cache_file $argv[1]
touch $cache_file

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_cache_sourced_completions
# Allow a `--name=foo` option which ends up in the filename.
argparse -s name= -- $argv

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_cached --description "Cache the command output for a given amount of time"
argparse --min-args 1 --max-args 1 --stop-nonopt 't/max-age=!_validate_int --min 0' 'k/cache-key=' -- $argv

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
# This is meant to be bound to something like ctrl-c
function __fish_cancel_commandline
commandline -f cancel-commandline

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_change_key_bindings --argument-names bindings
set -g __fish_active_key_bindings $bindings
# Allow the user to set the variable universally

View File

@@ -1,4 +1,5 @@
function __fish_cmd__complete_args -d 'Function to generate args'
# localization: tier3
function __fish_cmd__complete_args
set -l current_token (commandline -tc)
switch $current_token

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
# TODO: This function is deprecated. It was used in fish_clipboard_paste
# which some users copied, so maybe leave it around for a few years.
function __fish_commandline_is_singlequoted --description "Return 0 if the current token has an open single-quote"

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_atool_archive_contents --description 'List archive contents'
set -l cmd (commandline -cxp)
set -e cmd[1]

View File

@@ -1,5 +1,6 @@
# localization: tier3
#
# Bittorrent commands
function __fish_complete_bittorrent
complete -c $argv -l max_uploads -x --description "Maximum uploads at once"
complete -c $argv -l keepalive_interval -x --description "Number of seconds between keepalives"

View File

@@ -1,3 +1,5 @@
# localization: skip(private)
#
# Helper function for completions that need to enumerate block devices.
function __fish_complete_blockdevice
set -l cmd (commandline -ct)

View File

@@ -1,3 +1,5 @@
# localization: skip(private)
#
# This function only emits completions that might result from matches against $CDPATH. We rely on
# the core file name completion logic to include all other possible matches.
function __fish_complete_cd -d "Completions for the cd command"

View File

@@ -1,3 +1,5 @@
# localization: skip(private)
#
# This function is compatible with clang, clang++, and variations thereof, and is shared
# by clang.fish and clang++.fish.
# We dynamically query the head at `(commandline -x)[1]` to get the correct completions.

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_command --description 'Complete using all available commands'
set -l ctoken "$(commandline -ct)"
switch $ctoken

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_convert_options --description 'Complete Convert options' --argument-names what
switch $what
case format Format

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
#
# Find directories that complete $argv[1], output them as completions
# with description $argv[2] if defined, otherwise use 'Directory'.

View File

@@ -1,4 +1,5 @@
function __fish_complete_docutils -d "Completions for Docutils common options" -a cmd
# localization: tier3
function __fish_complete_docutils -a cmd
complete -x -c $cmd -k -a "(__fish_complete_suffix .rst .txt)"
# General Docutils Options

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_freedesktop_icons -d 'List installed icon names according to `https://specifications.freedesktop.org/icon-theme-spec/0.13/`'
# The latest `icon-theme-spec` as of 2024-08-10 is 0.13
# https://specifications.freedesktop.org/icon-theme-spec/latest/

View File

@@ -1,4 +1,5 @@
function __fish_complete_ftp -d 'Complete ftp, pftp' --argument-names ftp
# localization: tier3
function __fish_complete_ftp --argument-names ftp
# Common across all ftp implementations
complete -c $ftp -xa "(__fish_print_hostnames)" -d Hostname
complete -c $ftp -s 4 -d 'Use IPv4 only'

View File

@@ -1,3 +1,4 @@
# localization: tier3
#
# Completions for the gpg program.
#
@@ -15,7 +16,7 @@
# removed. The remaining list of completions is still quite
# impressive.
function __fish_complete_gpg -d "Internal function for gpg completion code deduplication" -a __fish_complete_gpg_command
function __fish_complete_gpg -a __fish_complete_gpg_command
if string match -q 'gpg (GnuPG) 1.*' ($__fish_complete_gpg_command --version 2>/dev/null)
complete -c $__fish_complete_gpg_command -l simple-sk-checksum -d 'Integrity protect secret keys by using a SHA-1 checksum'
complete -c $__fish_complete_gpg_command -l no-sig-create-check -d "Do not verify each signature right after creation"

View File

@@ -1,5 +1,6 @@
# Helper function for contextual autocompletion of GPG key ids
# localization: skip(private)
# Helper function for contextual autocompletion of GPG key ids
function __fish_complete_gpg_key_id -d 'Complete using gpg key ids' -a __fish_complete_gpg_command list_arg
# Use user id as description
set -l keyid

View File

@@ -1,5 +1,6 @@
# Helper function for contextual autocompletion of gpg user ids
# localization: skip(private)
# Helper function for contextual autocompletion of gpg user ids
function __fish_complete_gpg_user_id -d "Complete using gpg user ids" -a __fish_complete_gpg_command list_arg
# gpg doesn't seem to like it when you use the whole key name as a
# completion, so we skip the <EMAIL> part and use it as a description.

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_group_ids --description "Complete group IDs with group name as description"
if command -sq getent
getent group | string replace -f -r '^([[:alpha:]_][^:]*):[^:]*:(\d+).*' '$2\t$1'

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_groups --description "Print a list of local groups, with group members as the description"
if command -sq getent
getent group | while read -l line

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_job_pids --description "Print a list of job PIDs and their commands"
if set -l jobpids (jobs -p)
# when run at the commandline, the first line of output is a header, but

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_list --argument-names div cmd prefix iprefix
if not set -q cmd[1]
echo "Usage:

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_complete_lpr -d 'Complete lpr common options' --argument-names cmd
complete -c $cmd -s E -d 'Forces encryption when connecting to the server'
complete -c $cmd -s U -d 'Specifies an alternate username' -xa '(__fish_complete_users)'

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_lpr_option --description 'Complete lpr option'
set -l optstr "$(commandline -t)"
switch $optstr

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_complete_magick
complete -c $argv -o adjoin -d 'Join images into a single multi-image file'
complete -c $argv -o affine -d 'Affine transform matrix [matrix]'

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_man
# Try to guess what section to search in. If we don't know, we
# use [^)]*, which should match any section.

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_print_user_ids
if command -sq getent
for line in (getent passwd)

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_mysql_query -a query
argparse -u 'u/user=' 'P/port=' 'h/host=' 'p/password=?' 'S/socket=' -- (commandline -px)
set -l mysql_cmd mysql

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_complete_netcat
set -l nc $argv[1]
set -l flavor $argv[-1]

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_path --description "Complete using path"
set -l target
set -l description

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_pg_database
psql -AtqwlXF \t 2>/dev/null | awk 'NF > 1 { print $1 }'
end

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_pg_user
psql -AtqwXc 'select usename from pg_user' template1 2>/dev/null
end

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_complete_pgrep -d 'Complete pgrep/pkill' --argument-names cmd
complete -c $cmd -xa '(__fish_complete_proc)'
complete -c $cmd -s f -d 'Match pattern against full command line'

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_pids -d "Print a list of process identifiers along with brief descriptions"
# This may be a bit slower, but it's nice - having the tty displayed is really handy
# 'tail -n +2' deletes the first line, which contains the headers

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_ppp_peer --description 'Complete isp name for pon/poff'
find /etc/ppp/peers/ -type f -printf '%f\n'

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_proc
# "comm=" means "print comm field with an empty name", which causes the header to be removed.
# On many systems, comm is truncated (e.g. on Linux it's 15 chars),

View File

@@ -1,3 +1,4 @@
# localization: tier3
function __fish_complete_ssh -d "common completions for ssh commands" --argument-names command
complete -c $command -s 4 -d "IPv4 only"
complete -c $command -s 6 -d "IPv6 only"

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowing
# How many non-option tokens we skip in the input commandline before completing the subcommand
# Usually 1; use "--fcs-skip=2" to make it 2 (see e.g. tmux and ssh completions)

View File

@@ -1,3 +1,5 @@
# localization: skip(private)
#
# Find files ending in any of the non-switch arguments and output them as completions.
# * --description provides the description that should be part of each generated completion,
# * --prefix=DIR makes __fish_complete_suffix behave as if it were called in DIR rather than $PWD

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_user_at_hosts -d "Print list host-names with user@"
for user_at in (commandline -ct | string match -r '.*@'; or echo "")(__fish_print_hostnames)
echo $user_at

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_user_ids --description "Complete user IDs with user name as description"
if command -sq getent
getent passwd | string replace -f -r '^([[:alpha:]_][^:]*):[^:]*:(\d+).*' '$2\t$1'

View File

@@ -1,3 +1,5 @@
# localization: skip(private)
#
# This should be used where you want user names with a description. Such as in an argument
# completion. If you just want a list of user names use __fish_print_users.
# The string replace command takes into account GECOS-formatted description fields, by retaining

View File

@@ -1,3 +1,5 @@
# localization: tier3
#
# Helper functions for wireshark/tshark/dumpcap completion
function __fish_wireshark_choices

View File

@@ -1,4 +1,5 @@
function __fish_complete_zfs_mountpoint_properties -d "Completes with ZFS mountpoint properties"
# localization: tier3
function __fish_complete_zfs_mountpoint_properties
set -l OS ""
switch (uname)
case Linux

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_complete_zfs_pools -d "Completes with available ZFS pools"
zpool list -o name,comment -H | string replace -a \t'-' ''
end

View File

@@ -1,4 +1,5 @@
function __fish_complete_zfs_ro_properties -d "Completes with ZFS read-only properties"
# localization: tier3
function __fish_complete_zfs_ro_properties
echo -e "available\tAvailable space"
echo -e "avail\tAvailable space"
echo -e "compressratio\tAchieved compression ratio"

View File

@@ -1,4 +1,5 @@
function __fish_complete_zfs_rw_properties -d "Completes with ZFS read-write properties"
# localization: tier3
function __fish_complete_zfs_rw_properties
set -l OS ""
switch (uname)
case Linux

View File

@@ -1,4 +1,5 @@
function __fish_complete_zfs_write_once_properties -d "Completes with ZFS properties which can only be written at filesystem creation, and only be read thereafter"
# localization: tier3
function __fish_complete_zfs_write_once_properties
set -l OS ""
switch (uname)
case Linux

View File

@@ -1,3 +1,5 @@
# localization: skip(private)
#
# This function is intended to be used to generate completions in `-a "(...)"` calls for arguments that take 1..n values
# separated by commas and we dynamically or statically generated a list of n values that must be combined and permuted
# in order to appease both the `complete` machinery and the target application.

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
#
# Initializations that should only be performed when entering interactive mode.
#

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_contains_opt -d "Checks if a specific option has been given in the current commandline"
set -l next_short
set -l short_opt

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
# a function to obtain a list of installed packages with CRUX pkgutils
function __fish_crux_packages -d 'Obtain a list of installed packages'
pkginfo -i | string split -f1 ' '

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_cursor_konsole -d 'Set cursor (konsole)'
set -l shape $argv[1]
switch "$shape"

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_cursor_xterm -d 'Set cursor (xterm)'
set -l shape $argv[1]

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
#
# This function is used internally by the fish command completion code
#

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
set -l erase_line "$(
if status test-feature ignore-terminfo
echo \e\[K

View File

@@ -1,3 +1,4 @@
# localization: tier1
function __fish_edit_command_if_at_cursor --description 'If cursor is at the command token, edit the command source file'
set -l tokens (commandline -xpc)
set -l command

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
# Retrieves the first non-switch argument from the command line buffer
function __fish_first_token
set -l tokens (commandline -cx)

View File

@@ -1,3 +1,4 @@
# localization: skip(deprecated)
function __fish_git_prompt
# TODO: This name is deprecated, figure out a way to tell users.
fish_git_prompt $argv

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_gnu_complete -d "Wrapper for the complete built-in. Skips the long completions on non-GNU systems"
set -l is_gnu 0

View File

@@ -1,3 +1,4 @@
# localization: skip(deprecated)
function __fish_hg_prompt
fish_hg_prompt
end

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
set -l dir "$(path dirname -- (status fish-path 2>/dev/null))"
if command -v $dir/fish_indent >/dev/null

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
# determine if this is the very first argument (regardless if switch or not)
function __fish_is_first_arg
set -l tokens (commandline -pxc)

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_is_first_token -d 'Test if no non-switch argument has been specified yet'
__fish_is_nth_token 1
end

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_is_git_repository --description 'Check if the current directory is a git repository'
git rev-parse --is-inside-work-tree 2>/dev/null >/dev/null
end

View File

@@ -1,3 +1,4 @@
# localization: skip(private)
function __fish_is_nth_token --description 'Test if current token is the Nth (ignoring command and switches/flags)' --argument-names n
set -l tokens (commandline -pxc)
set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens)

Some files were not shown because too many files have changed in this diff Show More