Compare commits

...

6 Commits

Author SHA1 Message Date
Johannes Altmanninger
b1ec703ceb Release 4.0.8
Created by ./build_tools/release.sh 4.0.8
2025-09-18 10:00:03 +02:00
Johannes Altmanninger
553612f74a github release workflow: work around trailing "---"-line in changelog
The extracted release notes trigger a sphinx warning

	/tmp/tmp.V6RGP92nc2/src/index.rst:6:Document may not end with a transition.

which we don't seem to get on the full CHANGELOG.rst.
Let's work around that for now.

(cherry picked from commit 0d46c26988)
2025-09-18 09:58:55 +02:00
Johannes Altmanninger
861decb003 build_tools/release.sh: relax assertion about changelog title
I'd like to move to a process where everything goes into master first,
and then flows downstream to any release branches (i.e. no merging
of Integration_* branches back into master).

The only thing we need to change for that is to add release notes for
patch releases eagerly on master.  That implies that we want to use
the actual version instead of ???.  (Only if something goes wrong
in the release process, we need to change this on both branches,
but that should happen too often.)

(cherry picked from commit 1840df96a2)
2025-09-18 09:38:30 +02:00
Johannes Altmanninger
3b8780aa6c build_tools/release.sh: push to the integration branch when all goes well
Also, ignore any "sendemail.to" Git config, and remove a temporary
statement in release notes.

(cherry picked from commit 3456b33050)
2025-09-18 09:32:37 +02:00
Johannes Altmanninger
7783505bee Fix new-style bindings shadowing raw escape sequence bindings
Given

	bind up "echo user up, new notation"
	bind \e\[A "echo user up, legacy notation"

prior to b9d9e7edc6 (Match bindings with explicit shift
first, 2025-05-24), we prioritized the legacy notation because
input_mapping_insert_sorted() makes us try longer sequences first --
and "up" is only one key compared to the three-key legacy sequence.

This prioritization was broken in b9d9e7edc6, causing plugins that
update to the "bind up" notation to break users who haven't (#11803).

Even worse, it caused preset bindings to shadow user ones:

	bind --preset up "echo preset up, new notation"
	bind \e\[A "echo user up, legacy notation"

Restore backwards compatibility by treating matches against legacy
notation like exact matches again.

(cherry picked from commit 9a04c15894)
2025-09-18 09:29:45 +02:00
Johannes Altmanninger
23c25ffe43 build_tools/release.sh: fixes for updating fish-site
Also check that "cd fish-site && make && make new-release" doesn't
leave behind untracked files we're not aware of.  This implies that
this script ought to refuse to run if there are untracked files,
at least in fish-site.

(cherry picked from commit 529f722d2f)
2025-09-13 11:13:17 +02:00
7 changed files with 79 additions and 58 deletions

View File

@@ -50,15 +50,18 @@ jobs:
mkdir "$relnotes_tmp/src" "$relnotes_tmp/out"
version=$(git describe)
minor_version=${version%.*}
# Delete notes for prior releases.
# Also fix up any relative references to other documentation files.
awk <CHANGELOG.rst '
changelog_for_this_version=$(awk <CHANGELOG.rst '
/^fish/ && $2 != "'"$version"'" { exit }
{ print }
' |
')
# Also fix up any relative references to other documentation files.
# Also remove spurious transitions at the end of the document.
printf %s "$changelog_for_this_version" |
sed >"$relnotes_tmp/src"/index.rst \
-e 's,:doc:`\(.*\) <\([^>]*\)>`,`\1 <https://fishshell.com/docs/'"$minor_version"'/\2.html>`_,g' \
-e 's,:envvar:`\([^`]*\)`,``$\1``,g'
-e 's,:envvar:`\([^`]*\)`,``$\1``,g' \
-e '$s/^----*$//'
# In future, we could reuse doctree from when we made HTML docs.
sphinx-build -j 1 $(: "sphinx-markdown-builder is not marked concurrency-safe") \
-W -E -b markdown -c doc_src \
@@ -73,8 +76,6 @@ jobs:
*Download links: To download the source code for fish, we suggest the file named "fish-$version.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly.*
*There is no GPG signature because we haven't yet decided how to integrate signing into the new release automation.*
*The files called fish-$version-linux-\*.tar.xz are experimental packages containing a single standalone ``fish`` binary for any Linux with the given architecture.*
EOF
} >/tmp/fish-built/release-notes.md

View File

@@ -1,3 +1,10 @@
fish 4.0.8 (released September 18, 2025)
========================================
This release fixes a regression in 4.0.6 that caused user bindings to be shadowed by either fish's or a plugin's bindings (:issue:`11803`).
--------------
fish 4.0.6 (released September 12, 2025)
========================================

2
Cargo.lock generated
View File

@@ -112,7 +112,7 @@ dependencies = [
[[package]]
name = "fish"
version = "4.0.6"
version = "4.0.8"
dependencies = [
"bitflags",
"cc",

View File

@@ -16,7 +16,7 @@ debug = true
[package]
name = "fish"
version = "4.0.6"
version = "4.0.8"
edition.workspace = true
rust-version.workspace = true
default-run = "fish"

View File

@@ -34,7 +34,8 @@ fish_site=$repo_root/../fish-site
for path in . "$fish_site"
do
if ! git -C "$path" diff HEAD --quiet; then
if ! git -C "$path" diff HEAD --quiet ||
git ls-files --others --exclude-standard | grep .; then
echo >&2 "$0: index and worktree must be clean"
exit 1
fi
@@ -45,7 +46,14 @@ if git tag | grep -qxF "$version"; then
exit 1
fi
sed -n 1p CHANGELOG.rst | grep -q '^fish .*(released ???)$'
integration_branch=$(
git for-each-ref --points-at=HEAD 'refs/heads/Integration_*' \
--format='%(refname:strip=2)'
)
[ -n "$integration_branch" ] ||
git merge-base --is-ancestor $remote/master HEAD
sed -n 1p CHANGELOG.rst | grep -q '^fish .*(released .*)$'
sed -n 2p CHANGELOG.rst | grep -q '^===*$'
changelog_title="fish $version (released $(date +'%B %d, %Y'))"
@@ -86,6 +94,10 @@ done
# Update fishshell.com
tag_oid=$(git rev-parse "$version")
tmpdir=$(mktemp -d)
# TODO This works on draft releases only if "gh" is configured to
# have write access to the fish-shell repository. Unless we are fine
# publishing the release at this point, we should at least fail if
# "gh" doesn't have write access.
while ! \
gh release download "$version" --dir="$tmpdir" \
--pattern="fish-$version.tar.xz"
@@ -95,13 +107,13 @@ done
actual_tag_oid=$(git ls-remote "$remote" |
awk '$2 == "refs/tags/'"$version"'" { print $1 }')
[ "$tag_oid" = "$actual_tag_oid" ]
tar -C "$tmpdir" xf fish-$version.tar.xz
minor_version=${version%.*}
( cd "$tmpdir" && tar xf fish-$version.tar.xz )
CopyDocs() {
rm -rf "fish-site/site/docs/$1"
cp -r "$tmpdir/fish-$version/user_doc/html" "fish-site/site/docs/$1"
git -C fish-site add "site/docs/$1"
rm -rf "$fish_site/site/docs/$1"
cp -r "$tmpdir/fish-$version/user_doc/html" "$fish_site/site/docs/$1"
git -C $fish_site add "site/docs/$1"
}
minor_version=${version%.*}
CopyDocs "$minor_version"
latest_release=$(
releases=$(git tag | grep '^[0-9]*\.[0-9]*\.[0-9]*.*' |
@@ -115,17 +127,19 @@ fi
rm -rf "$tmpdir"
(
cd "$fish_site"
make new-release
make
git add -u
! git ls-files --others --exclude-standard | grep .
git commit --message="$(printf %s "\
| Release $version
| Release $version (docs)
|
| Created by ../fish-shell/build_tools/release.sh
" | sed 's,^\s*| ,,')"
" | sed 's,^\s*| \?,,')"
)
# N.B. --exit-status doesn't fail reliably.
gh run view "$run_id" --verbose --log-failed --exit-status
# # Uncomment this to wait the full workflow run (i.e. macOS packages).
# # Also note that --exit-status doesn't fail reliably.
# gh run view "$run_id" --verbose --log-failed --exit-status
while {
! draft=$(gh release view "$version" --json=isDraft --jq=.isDraft) \
@@ -137,39 +151,47 @@ done
(
cd "$fish_site"
git push git@github.com:$repository_owner/fish-site
make new-release
git add -u
! git ls-files --others --exclude-standard | grep .
git commit --message="$(printf %s "\
| Release $version (release list update)
|
| Created by ../fish-shell/build_tools/release.sh
" | sed 's,^\s*| \?,,')"
# This takes care to support remote names that are different from
# fish-shell remote name. Also, support detached HEAD state.
git push git@github.com:$repository_owner/fish-site HEAD:master
)
if git merge-base --is-ancestor $remote/master $version
then
git push $remote $version:master
if [ -n "$integration_branch" ]; then
git push $remote "$version^{commit}":refs/heads/$integration_branch
else
# Probably on an integration branch.
# TODO Maybe push when that's safe (or move this to CI).
:
fi
if [ "$repository_owner" = fish-shell ]; then {
mail=$(mktemp)
cat >$mail <<EOF
From: $(git var GIT_AUTHOR_IDENT | sed 's/ [0-9]* +[0-9]*$//')
To: fish-users Mailing List <fish-users@lists.sourceforge.net>
Subject: fish $version released
See https://github.com/fish-shell/fish-shell/releases/tag/$version
EOF
git send-email --suppress-cc=all $mail
rm $mail
} fi
changelog=$(cat - CHANGELOG.rst <<EOF
changelog=$(cat - CHANGELOG.rst <<EOF
fish ?.?.? (released ???)
=========================
EOF
)
printf %s\\n "$changelog" >CHANGELOG.rst
CommitVersion ${version}-snapshot "start new cycle"
)
printf %s\\n "$changelog" >CHANGELOG.rst
CommitVersion ${version}-snapshot "start new cycle"
git push $remote HEAD:master
fi
# TODO This can currently require a TTY for editing and password
# prompts.
if [ "$repository_owner" = fish-shell ]; then {
mail=$(mktemp)
cat >$mail <<EOF
From: $(git var GIT_AUTHOR_IDENT | sed 's/ [0-9]* +[0-9]*$//')
Subject: fish $version released
See https://github.com/fish-shell/fish-shell/releases/tag/$version
EOF
git send-email --suppress-cc=all --confirm=always $mail \
--to="fish-users Mailing List <fish-users@lists.sourceforge.net>"
rm $mail
} fi
exit

View File

@@ -589,11 +589,7 @@ fn next_is_char(
actual_seq.len()
)
);
return Some(if matches!(style, KeyNameStyle::Terminfo(_)) {
KeyMatchQuality::Exact
} else {
KeyMatchQuality::Legacy
});
return Some(KeyMatchQuality::Exact);
}
if key.modifiers == Modifiers::ALT && seq_char == '\x1b' {
if self.subidx + 1 == actual_seq.len() {
@@ -613,11 +609,7 @@ fn next_is_char(
self.subidx = 0;
}
FLOG!(reader, format!("matched {key} against raw escape sequence"));
return Some(if matches!(style, KeyNameStyle::Terminfo(_)) {
KeyMatchQuality::Exact
} else {
KeyMatchQuality::Legacy
});
return Some(KeyMatchQuality::Exact);
}
}
}

View File

@@ -211,7 +211,6 @@ fn apply_shift(mut key: Key, do_ascii: bool, shifted_codepoint: char) -> Option<
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub enum KeyMatchQuality {
Legacy,
BaseLayoutModuloShift,
BaseLayout,
ModuloShift,