mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
Compare commits
28 Commits
4.0.8
...
Integratio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56bbdb3f39 | ||
|
|
ce4aa7669d | ||
|
|
af8d8d3d1b | ||
|
|
fecd0b4bf1 | ||
|
|
2d4a43302a | ||
|
|
5a4a913220 | ||
|
|
904ceba858 | ||
|
|
3c2adfbd4b | ||
|
|
9e4850b40a | ||
|
|
211b3f6670 | ||
|
|
d530e127f5 | ||
|
|
a6698098db | ||
|
|
f73b260a3a | ||
|
|
ffa7abd6ff | ||
|
|
b87ef689fa | ||
|
|
4fe70f6965 | ||
|
|
7001abca9f | ||
|
|
199316f1a3 | ||
|
|
78c9ab29cd | ||
|
|
91c9dbdd89 | ||
|
|
e737ad1f0f | ||
|
|
6f536c6304 | ||
|
|
a1b4b391b2 | ||
|
|
a27f615350 | ||
|
|
46ce8a1d2f | ||
|
|
03ccc88868 | ||
|
|
79cf4c3e0b | ||
|
|
701e1a3b02 |
14
.github/actions/install-sphinx-markdown-builder/action.yml
vendored
Normal file
14
.github/actions/install-sphinx-markdown-builder/action.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Install sphinx-markdown-builder
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
set -x
|
||||
commit=b259de1dc97573a71470a1d71c3d83535934136b
|
||||
pip install git+https://github.com/krobelus/sphinx-markdown-builder@"$commit"
|
||||
python -c 'import sphinx_markdown_builder'
|
||||
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
||||
sudo apt install gettext libpcre2-dev python3-pexpect tmux
|
||||
# Generate a locale that uses a comma as decimal separator.
|
||||
sudo locale-gen fr_FR.UTF-8
|
||||
- uses: ./.github/actions/install-sphinx-markdown-builder
|
||||
- name: cmake
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
|
||||
90
.github/workflows/release.yml
vendored
90
.github/workflows/release.yml
vendored
@@ -1,9 +1,12 @@
|
||||
name: Create a new release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to release (tag name)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -16,7 +19,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
ref: ${{ inputs.version }}
|
||||
- name: Check if the pushed tag looks like a release
|
||||
run: |
|
||||
set -x
|
||||
@@ -36,57 +39,30 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
ref: ${{ inputs.version }}
|
||||
- name: Install dependencies
|
||||
run: sudo apt install cmake gettext ninja-build python3-pip python3-sphinx
|
||||
- uses: ./.github/actions/install-sphinx-markdown-builder
|
||||
- name: Create tarball
|
||||
run: |
|
||||
set -x
|
||||
mkdir /tmp/fish-built
|
||||
FISH_ARTEFACT_PATH=/tmp/fish-built ./build_tools/make_tarball.sh
|
||||
{
|
||||
pip install sphinx-markdown-builder==0.6.8
|
||||
relnotes_tmp=$(mktemp -d)
|
||||
mkdir "$relnotes_tmp/src" "$relnotes_tmp/out"
|
||||
version=$(git describe)
|
||||
minor_version=${version%.*}
|
||||
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/^----*$//'
|
||||
|
||||
# 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 \
|
||||
-d "$relnotes_tmp/doctree" "$relnotes_tmp/src" $relnotes_tmp/out
|
||||
# Delete title
|
||||
sed -n 1p "$relnotes_tmp/out/index.md" | grep -q "^# fish .*"
|
||||
sed -n 2p "$relnotes_tmp/out/index.md" | grep -q '^$'
|
||||
sed -i 1,2d "$relnotes_tmp/out/index.md"
|
||||
{
|
||||
cat "$relnotes_tmp/out/index.md" - <<EOF
|
||||
----
|
||||
|
||||
*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.*
|
||||
|
||||
*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
|
||||
rm -r "$relnotes_tmp"
|
||||
}
|
||||
relnotes=/tmp/fish-built/release-notes.md
|
||||
# Need history since the last release (i.e. tag) for stats.
|
||||
git fetch --tags
|
||||
git fetch --unshallow
|
||||
sh -x ./build_tools/release-notes.sh >"$relnotes"
|
||||
# Delete title
|
||||
sed -n 1p "$relnotes" | grep -q "^## fish .*"
|
||||
sed -n 2p "$relnotes" | grep -q '^$'
|
||||
sed -i 1,2d "$relnotes"
|
||||
- name: Upload tarball artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: source-tarball
|
||||
path: |
|
||||
/tmp/fish-built/fish-${{ github.ref_name }}.tar.xz
|
||||
/tmp/fish-built/fish-${{ inputs.version }}.tar.xz
|
||||
/tmp/fish-built/release-notes.md
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -98,7 +74,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
ref: ${{ inputs.version }}
|
||||
- name: Install Rust Stable
|
||||
uses: ./.github/actions/rust-toolchain@stable
|
||||
with:
|
||||
@@ -124,7 +100,7 @@ jobs:
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Static builds for Linux
|
||||
path: fish-${{ github.ref_name }}-linux-*.tar.xz
|
||||
path: fish-${{ inputs.version }}-linux-*.tar.xz
|
||||
if-no-files-found: error
|
||||
|
||||
create-draft-release:
|
||||
@@ -138,7 +114,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
ref: ${{ inputs.version }}
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
@@ -149,13 +125,13 @@ jobs:
|
||||
- name: Create draft release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: fish ${{ github.ref_name }}
|
||||
tag_name: ${{ inputs.version }}
|
||||
name: fish ${{ inputs.version }}
|
||||
body_path: /tmp/artifacts/release-notes.md
|
||||
draft: true
|
||||
files: |
|
||||
/tmp/artifacts/fish-${{ github.ref_name }}.tar.xz
|
||||
/tmp/artifacts/fish-${{ github.ref_name }}-linux-*.tar.xz
|
||||
/tmp/artifacts/fish-${{ inputs.version }}.tar.xz
|
||||
/tmp/artifacts/fish-${{ inputs.version }}-linux-*.tar.xz
|
||||
|
||||
packages-for-macos:
|
||||
needs: [is-release-tag, create-draft-release]
|
||||
@@ -166,7 +142,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
ref: ${{ inputs.version }}
|
||||
- name: Install Rust
|
||||
uses: ./.github/actions/rust-toolchain@oldest-supported
|
||||
with:
|
||||
@@ -195,8 +171,9 @@ jobs:
|
||||
./build_tools/make_macos_pkg.sh -s -f /tmp/app.p12 \
|
||||
-i /tmp/installer.p12 -p "$MAC_CODESIGN_PASSWORD" \
|
||||
-n -j /tmp/notarize.json
|
||||
[ -f "${FISH_ARTEFACT_PATH}/fish-${{ github.ref_name }}.app.zip" ]
|
||||
[ -f "${FISH_ARTEFACT_PATH}/fish-${{ github.ref_name }}.pkg" ]
|
||||
version=$(git describe)
|
||||
[ -f "${FISH_ARTEFACT_PATH}/fish-$version.app.zip" ]
|
||||
[ -f "${FISH_ARTEFACT_PATH}/fish-$version.pkg" ]
|
||||
rm /tmp/installer.p12 /tmp/app.p12 /tmp/notarize.json
|
||||
env:
|
||||
MAC_CODESIGN_APP_P12_BASE64: ${{ secrets.MAC_CODESIGN_APP_P12_BASE64 }}
|
||||
@@ -207,6 +184,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload $(git describe) \
|
||||
/tmp/fish-built/fish-${{ github.ref_name }}.app.zip \
|
||||
/tmp/fish-built/fish-${{ github.ref_name }}.pkg
|
||||
version=$(git describe)
|
||||
gh release upload $version \
|
||||
/tmp/fish-built/fish-$version.app.zip \
|
||||
/tmp/fish-built/fish-$version.pkg
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
fish 4.0.9 (released September 27, 2025)
|
||||
========================================
|
||||
|
||||
This release fixes:
|
||||
|
||||
- a regression in 4.0.6 causing shifted keys to not be inserted on some terminals (:issue:`11813`).
|
||||
- a regression in 4.0.6 causing the build to fail on systems where ``char`` is unsigned (:issue:`11804`).
|
||||
- a regression in 4.0.0 causing a crash on an invalid :doc:`bg <cmds/bg>` invocation.
|
||||
|
||||
--------------
|
||||
|
||||
fish 4.0.8 (released September 18, 2025)
|
||||
========================================
|
||||
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -112,7 +112,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fish"
|
||||
version = "4.0.8"
|
||||
version = "4.0.9"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
|
||||
@@ -16,7 +16,7 @@ debug = true
|
||||
|
||||
[package]
|
||||
name = "fish"
|
||||
version = "4.0.8"
|
||||
version = "4.0.9"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
default-run = "fish"
|
||||
|
||||
@@ -53,13 +53,7 @@ if [ -n "$NOTARIZE" ] && [ -z "$API_KEY_FILE" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
VERSION=$(git describe --always --dirty 2>/dev/null)
|
||||
if test -z "$VERSION" ; then
|
||||
echo "Could not get version from git"
|
||||
if test -f version; then
|
||||
VERSION=$(cat version)
|
||||
fi
|
||||
fi
|
||||
VERSION=$(build_tools/git_version_gen.sh --stdout 2>/dev/null)
|
||||
|
||||
echo "Version is $VERSION"
|
||||
|
||||
|
||||
104
build_tools/release-notes.sh
Executable file
104
build_tools/release-notes.sh
Executable file
@@ -0,0 +1,104 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
workspace_root=$(dirname "$0")/..
|
||||
|
||||
relnotes_tmp=$(mktemp -d)
|
||||
mkdir -p "$relnotes_tmp/fake-workspace" "$relnotes_tmp/out"
|
||||
(
|
||||
cd "$workspace_root"
|
||||
cp -r doc_src CONTRIBUTING.rst README.rst "$relnotes_tmp/fake-workspace"
|
||||
)
|
||||
version=$(sed 's,^fish \(\S*\) .*,\1,; 1q' "$workspace_root/CHANGELOG.rst")
|
||||
previous_version=$(
|
||||
cd "$workspace_root"
|
||||
awk <CHANGELOG.rst '
|
||||
( /^fish \S*\.\S*\.\S* \(released .*\)$/ &&
|
||||
NR > 1 &&
|
||||
# Skip tags that have not been created yet..
|
||||
system("git rev-parse --verify >/dev/null --quiet refs/tags/"$2) == 0 \
|
||||
) {
|
||||
print $2; ok = 1; exit
|
||||
}
|
||||
END { exit !ok }
|
||||
'
|
||||
)
|
||||
minor_version=${version%.*}
|
||||
previous_minor_version=${previous_version%.*}
|
||||
{
|
||||
sed -n 1,2p <"$workspace_root/CHANGELOG.rst"
|
||||
|
||||
ListCommitters() {
|
||||
comm "$@" "$relnotes_tmp/committers-then" "$relnotes_tmp/committers-now"
|
||||
}
|
||||
(
|
||||
cd "$workspace_root"
|
||||
git log "$previous_version" --format="%aN" | sort -u >"$relnotes_tmp/committers-then"
|
||||
git log "$previous_version".. --format="%aN" | sort -u >"$relnotes_tmp/committers-now"
|
||||
ListCommitters -13 >"$relnotes_tmp/committers-new"
|
||||
ListCommitters -12 >"$relnotes_tmp/committers-returning"
|
||||
)
|
||||
if [ "$minor_version" != "$previous_minor_version" ]; then
|
||||
(
|
||||
cd "$workspace_root"
|
||||
num_commits=$(git log --no-merges --format=%H "$previous_version".. | wc -l)
|
||||
num_authors=$(wc -l <"$relnotes_tmp/committers-now")
|
||||
num_new_authors=$(wc -l <"$relnotes_tmp/committers-new")
|
||||
printf %s \
|
||||
"This release comprises $num_commits commits since $previous_version," \
|
||||
" contributed by $num_authors authors, $num_new_authors of which are new committers."
|
||||
echo
|
||||
echo
|
||||
)
|
||||
fi
|
||||
|
||||
printf %s "$(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
|
||||
JoinEscaped() {
|
||||
sed 's/\S/\\&/g' |
|
||||
awk '
|
||||
NR != 1 { printf ",\n" }
|
||||
{ printf "%s", $0 }
|
||||
END { printf "\n" }
|
||||
'
|
||||
}
|
||||
echo ""
|
||||
echo "---"
|
||||
echo ""
|
||||
echo "Thanks to everyone who contributed through issue discussions, code reviews, or code changes."
|
||||
echo
|
||||
printf "Welcome our new committers: "
|
||||
JoinEscaped <"$relnotes_tmp/committers-new"
|
||||
echo
|
||||
printf "Welcome back our returning committers: "
|
||||
JoinEscaped <"$relnotes_tmp/committers-returning"
|
||||
fi
|
||||
echo
|
||||
echo "---"
|
||||
echo
|
||||
echo "*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.*"
|
||||
echo
|
||||
echo "*The files called fish-$version-linux-\*.tar.xz are experimental packages containing a single standalone ``fish`` binary for any Linux with the given CPU architecture.*"
|
||||
} >"$relnotes_tmp/fake-workspace"/CHANGELOG.rst
|
||||
|
||||
sphinx-build >&2 -j auto \
|
||||
-W -E -b markdown -c "$workspace_root/doc_src" \
|
||||
-d "$relnotes_tmp/doctree" "$relnotes_tmp/fake-workspace/doc_src" "$relnotes_tmp/out" \
|
||||
-D markdown_http_base="https://fishshell.com/docs/$minor_version" \
|
||||
-D markdown_uri_doc_suffix=".html" \
|
||||
-D markdown_github_flavored=1 \
|
||||
"$@"
|
||||
|
||||
# Skip changelog header
|
||||
sed -n 1p "$relnotes_tmp/out/relnotes.md" | grep -Fxq "# Release notes"
|
||||
sed -n 2p "$relnotes_tmp/out/relnotes.md" | grep -Fxq ''
|
||||
sed 1,2d "$relnotes_tmp/out/relnotes.md"
|
||||
|
||||
rm -r "$relnotes_tmp"
|
||||
@@ -20,6 +20,7 @@ fi
|
||||
for tool in \
|
||||
bundle \
|
||||
gh \
|
||||
jq \
|
||||
ruby \
|
||||
timeout \
|
||||
; do
|
||||
@@ -78,10 +79,15 @@ git tag --annotate --message="Release $version" $version
|
||||
|
||||
git push $remote $version
|
||||
|
||||
TIMEOUT=
|
||||
gh() {
|
||||
command gh --repo "$repository_owner/fish-shell" "$@"
|
||||
command ${TIMEOUT:+timeout $TIMEOUT} \
|
||||
gh --repo "$repository_owner/fish-shell" "$@"
|
||||
}
|
||||
|
||||
gh workflow run release.yml --ref="$version" \
|
||||
--raw-field="version=$version"
|
||||
|
||||
run_id=
|
||||
while [ -z "$run_id" ] && sleep 5
|
||||
do
|
||||
@@ -102,7 +108,8 @@ while ! \
|
||||
gh release download "$version" --dir="$tmpdir" \
|
||||
--pattern="fish-$version.tar.xz"
|
||||
do
|
||||
timeout 30 gh run watch "$run_id" ||:
|
||||
TIMEOUT=30 gh run watch "$run_id" ||:
|
||||
sleep 5
|
||||
done
|
||||
actual_tag_oid=$(git ls-remote "$remote" |
|
||||
awk '$2 == "refs/tags/'"$version"'" { print $1 }')
|
||||
@@ -137,9 +144,33 @@ rm -rf "$tmpdir"
|
||||
" | sed 's,^\s*| \?,,')"
|
||||
)
|
||||
|
||||
# # 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
|
||||
# Approve macos-codesign
|
||||
# TODO what if current user can't approve?
|
||||
gh_pending_deployments() {
|
||||
command gh api \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"/repos/$repository_owner/fish-shell/actions/runs/$run_id/pending_deployments" \
|
||||
"$@"
|
||||
}
|
||||
while {
|
||||
environment_id=$(gh_pending_deployments | jq .[].environment.id)
|
||||
[ -z "$environment_id" ]
|
||||
}
|
||||
do
|
||||
sleep 5
|
||||
done
|
||||
echo '
|
||||
{
|
||||
"environment_ids": ['"$environment_id"'],
|
||||
"state": "approved",
|
||||
"comment": "Approved via ./build_tools/release.sh"
|
||||
}
|
||||
' |
|
||||
gh_pending_deployments -XPOST --input=-
|
||||
|
||||
# Await completion.
|
||||
gh run watch "$run_id"
|
||||
|
||||
while {
|
||||
! draft=$(gh release view "$version" --json=isDraft --jq=.isDraft) \
|
||||
|
||||
1
debian/control
vendored
1
debian/control
vendored
@@ -20,7 +20,6 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
|
||||
|
||||
Package: fish
|
||||
Architecture: any
|
||||
Depends: bsdextrautils,
|
||||
Depends: bsdextrautils | bsdmainutils,
|
||||
file,
|
||||
gettext-base,
|
||||
|
||||
5
debian/rules
vendored
5
debian/rules
vendored
@@ -17,6 +17,9 @@ override_dh_auto_configure:
|
||||
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean
|
||||
dh_clean --exclude=Cargo.toml.orig
|
||||
-unlink .cargo
|
||||
-unlink vendor
|
||||
|
||||
override_dh_auto_test:
|
||||
make fish_run_tests
|
||||
|
||||
@@ -17,12 +17,13 @@ fn send_to_bg(
|
||||
let err = {
|
||||
let job = &jobs[job_pos];
|
||||
wgettext_fmt!(
|
||||
"%ls: Can't put job %s, '%ls' to background because it is not under job control\n",
|
||||
cmd,
|
||||
job.job_id().to_wstring(),
|
||||
job.command()
|
||||
)
|
||||
"%ls: Can't put job %s, '%ls' to background because it is not under job control\n",
|
||||
cmd,
|
||||
job.job_id().to_wstring(),
|
||||
job.command()
|
||||
)
|
||||
};
|
||||
drop(jobs);
|
||||
builtin_print_help_error(parser, streams, cmd, &err);
|
||||
return STATUS_CMD_ERROR;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use crate::universal_notifier::default_notifier;
|
||||
use crate::wchar::{encode_byte_to_char, prelude::*};
|
||||
use crate::wutil::encoding::{mbrtowc, mbstate_t, zero_mbstate};
|
||||
use crate::wutil::fish_wcstol;
|
||||
use crate::wutil::{fish_is_pua, fish_wcstol};
|
||||
use std::collections::VecDeque;
|
||||
use std::mem::MaybeUninit;
|
||||
use std::os::fd::RawFd;
|
||||
@@ -169,6 +169,31 @@ pub(crate) fn from_raw(codepoint: char) -> Self {
|
||||
pub fn from_single_byte(c: u8) -> Self {
|
||||
Self::from(Key::from_single_byte(c))
|
||||
}
|
||||
|
||||
pub(crate) fn codepoint_text(&self) -> Option<char> {
|
||||
let mut modifiers = self.modifiers;
|
||||
let mut c = self.codepoint;
|
||||
if self.shifted_codepoint != '\0' && modifiers.shift {
|
||||
modifiers.shift = false;
|
||||
c = self.shifted_codepoint;
|
||||
}
|
||||
if modifiers.is_some() {
|
||||
return None;
|
||||
}
|
||||
if c == key::Space {
|
||||
return Some(' ');
|
||||
}
|
||||
if c == key::Enter {
|
||||
return Some('\n');
|
||||
}
|
||||
if c == key::Tab {
|
||||
return Some('\t');
|
||||
}
|
||||
if fish_is_pua(c) || u32::from(c) <= 27 {
|
||||
return None;
|
||||
}
|
||||
Some(c)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Key> for KeyEvent {
|
||||
|
||||
24
src/key.rs
24
src/key.rs
@@ -5,7 +5,7 @@
|
||||
fallback::fish_wcwidth,
|
||||
reader::safe_get_terminal_mode_on_startup,
|
||||
wchar::{decode_byte_from_char, prelude::*},
|
||||
wutil::{fish_is_pua, fish_wcstoul},
|
||||
wutil::fish_wcstoul,
|
||||
};
|
||||
|
||||
pub(crate) const Backspace: char = '\u{F500}'; // below ENCODE_DIRECT_BASE
|
||||
@@ -343,28 +343,6 @@ pub(crate) fn canonicalize_raw_escapes(keys: Vec<Key>) -> Vec<Key> {
|
||||
canonical
|
||||
}
|
||||
|
||||
impl Key {
|
||||
pub(crate) fn codepoint_text(&self) -> Option<char> {
|
||||
if self.modifiers.is_some() {
|
||||
return None;
|
||||
}
|
||||
let c = self.codepoint;
|
||||
if c == Space {
|
||||
return Some(' ');
|
||||
}
|
||||
if c == Enter {
|
||||
return Some('\n');
|
||||
}
|
||||
if c == Tab {
|
||||
return Some('\t');
|
||||
}
|
||||
if fish_is_pua(c) || u32::from(c) <= 27 {
|
||||
return None;
|
||||
}
|
||||
Some(c)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Key {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
WString::from(*self).fmt(f)
|
||||
|
||||
@@ -710,7 +710,7 @@ fn path_remoteness(path: &wstr) -> DirRemoteness {
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
fn remoteness_via_statfs<StatFS, Flags>(
|
||||
statfn: unsafe extern "C" fn(*const i8, *mut StatFS) -> libc::c_int,
|
||||
statfn: unsafe extern "C" fn(*const libc::c_char, *mut StatFS) -> libc::c_int,
|
||||
flagsfn: fn(&StatFS) -> Flags,
|
||||
is_local_flag: u64,
|
||||
path: &std::ffi::CStr,
|
||||
|
||||
@@ -18,3 +18,16 @@ or echo "pgroups were the same, job control did not work"
|
||||
$fish -c 'status job-control full ; $fth report_foreground' &
|
||||
wait
|
||||
#CHECKERR: background
|
||||
|
||||
$fish -c '
|
||||
function __fish_print_help
|
||||
if set -q argv[2]
|
||||
echo Error-message: $argv[2] >&2
|
||||
end
|
||||
echo Documentation for $argv[1] >&2
|
||||
return 1
|
||||
end
|
||||
sleep .2 & bg %1
|
||||
'
|
||||
#CHECKERR: Error-message: bg: Can't put job 1, 'sleep .2 &' to background because it is not under job control
|
||||
#CHECKERR: Documentation for bg
|
||||
|
||||
16
tests/checks/sphinx-markdown-changelog.fish
Normal file
16
tests/checks/sphinx-markdown-changelog.fish
Normal file
@@ -0,0 +1,16 @@
|
||||
#RUN: %fish %s
|
||||
#REQUIRES: command -v sphinx-build
|
||||
#REQUIRES: python -c 'import sphinx_markdown_builder'
|
||||
|
||||
set -l workspace_root (status dirname)/../..
|
||||
if not test -e $workspace_root/.git
|
||||
return
|
||||
end
|
||||
|
||||
$workspace_root/build_tools/release-notes.sh -q >?relnotes.md
|
||||
or {
|
||||
echo "Failed to build Markdown release notes."
|
||||
return
|
||||
}
|
||||
sed -n 1p relnotes.md | grep -q '^## fish \S* (released .*)'
|
||||
or echo "Unexpected changelog title"
|
||||
Reference in New Issue
Block a user