Compare commits

..

3 Commits

Author SHA1 Message Date
Johannes Altmanninger
5af417a5a7 Run build_tools/update_translations.fish
This branch uses the old translation ordering.
2025-10-08 13:12:38 +02:00
Johannes Altmanninger
ad94b562fc Revert "builtin function: remove dead code"
This reverts commit 993b977c9b.

Fixes #11912

(cherry picked from commit b7fe3190bb)
2025-10-08 10:52:41 +02:00
Johannes Altmanninger
6a474ed0f0 release.sh: fix milestone API calls
(cherry picked from commit b6ddb56cc7)
2025-10-08 10:52:28 +02:00
11 changed files with 60 additions and 7 deletions

View File

@@ -1,5 +1,12 @@
fish 4.1.2 (released October 07, 2025)
======================================
fish 4.1.3 (released ???)
=========================
This release fixes the following regressions identified in 4.1.0:
- Crash on invalid :doc:`function <cmds/function>` call (:issue:`11912`).
fish 4.1.2 (released October 7, 2025)
=====================================
This release fixes the following regressions identified in 4.1.0:

View File

@@ -233,7 +233,7 @@ milestone_number=$(
gh_api_repo milestones?state=open |
jq '.[] | select(.title == "fish '"$version"'") | .number'
)
gh_api_repo --method PATCH milestones/$milestone_number \
gh_api_repo milestones/$milestone_number --method PATCH \
--raw-field state=closed
next_patch_version=$(
@@ -244,7 +244,7 @@ next_patch_version=$(
'
)
if [ -n "$next_patch_version" ]; then
gh_api_repo --method POST milestones \
gh_api_repo milestones --method POST \
--raw-field title="fish $next_patch_version"
fi

View File

@@ -707,6 +707,10 @@ msgstr "%ls: Erwartete numerischen Wert"
msgid "%ls: fish was not built with embedded files"
msgstr ""
#, c-format
msgid "%ls: function name required"
msgstr "%ls: Brauche Funktionsnamen"
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr ""

View File

@@ -706,6 +706,10 @@ msgstr "%ls: expected a numeric value"
msgid "%ls: fish was not built with embedded files"
msgstr ""
#, c-format
msgid "%ls: function name required"
msgstr ""
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr ""

View File

@@ -807,6 +807,10 @@ msgstr "%ls : valeur numérique attendue"
msgid "%ls: fish was not built with embedded files"
msgstr ""
#, c-format
msgid "%ls: function name required"
msgstr ""
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr ""

View File

@@ -702,6 +702,10 @@ msgstr "%ls: oczekiwano wartości liczbowej"
msgid "%ls: fish was not built with embedded files"
msgstr ""
#, c-format
msgid "%ls: function name required"
msgstr ""
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr ""

View File

@@ -707,6 +707,10 @@ msgstr "%ls: esperava valor numérico"
msgid "%ls: fish was not built with embedded files"
msgstr ""
#, c-format
msgid "%ls: function name required"
msgstr ""
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr ""

View File

@@ -703,6 +703,10 @@ msgstr ""
msgid "%ls: fish was not built with embedded files"
msgstr ""
#, c-format
msgid "%ls: function name required"
msgstr ""
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr ""

View File

@@ -724,6 +724,10 @@ msgstr "%ls: 预期收到数值"
msgid "%ls: fish was not built with embedded files"
msgstr "%ls: fish 构建时未包含嵌入文件"
#, c-format
msgid "%ls: function name required"
msgstr "%ls: 函数名称是必须的"
#, c-format
msgid "%ls: given %d indexes but %d values\n"
msgstr "%ls: 给定索引 %d 但只有 %d 个值\n"

View File

@@ -243,7 +243,19 @@ fn parse_cmd_opts(
STATUS_CMD_OK
}
fn validate_function_name(function_name: &wstr, cmd: &wstr, streams: &mut IoStreams) -> c_int {
fn validate_function_name(
argv: &mut [&wstr],
function_name: &mut WString,
cmd: &wstr,
streams: &mut IoStreams,
) -> c_int {
if argv.len() < 2 {
streams
.err
.append(wgettext_fmt!("%ls: function name required", cmd));
return STATUS_INVALID_ARGS;
}
*function_name = argv[1].to_owned();
if !valid_func_name(function_name) {
streams.err.append(wgettext_fmt!(
"%ls: %ls: invalid function name",
@@ -281,8 +293,8 @@ pub fn function(
let cmd = argv[0];
// A valid function name has to be the first argument.
let function_name = argv[1].to_owned();
let mut retval = validate_function_name(&function_name, cmd, streams);
let mut function_name = WString::new();
let mut retval = validate_function_name(argv, &mut function_name, cmd, streams);
if retval != STATUS_CMD_OK {
return retval;
}

View File

@@ -186,4 +186,10 @@ function foo; echo before; end
foo (functions --erase foo)
# CHECKERR: error: Unknown function 'foo'
function ()
end
# CHECKERR: {{.*}}/tests/checks/function.fish (line {{\d+}}): function: function name required
# CHECKERR: function ()
# CHECKERR: ^
exit 0