mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Compare commits
3 Commits
Integratio
...
Integratio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5af417a5a7 | ||
|
|
ad94b562fc | ||
|
|
6a474ed0f0 |
@@ -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:
|
This release fixes the following regressions identified in 4.1.0:
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ milestone_number=$(
|
|||||||
gh_api_repo milestones?state=open |
|
gh_api_repo milestones?state=open |
|
||||||
jq '.[] | select(.title == "fish '"$version"'") | .number'
|
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
|
--raw-field state=closed
|
||||||
|
|
||||||
next_patch_version=$(
|
next_patch_version=$(
|
||||||
@@ -244,7 +244,7 @@ next_patch_version=$(
|
|||||||
'
|
'
|
||||||
)
|
)
|
||||||
if [ -n "$next_patch_version" ]; then
|
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"
|
--raw-field title="fish $next_patch_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
4
po/de.po
4
po/de.po
@@ -707,6 +707,10 @@ msgstr "%ls: Erwartete numerischen Wert"
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr "%ls: Brauche Funktionsnamen"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
4
po/en.po
4
po/en.po
@@ -706,6 +706,10 @@ msgstr "%ls: expected a numeric value"
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
4
po/fr.po
4
po/fr.po
@@ -807,6 +807,10 @@ msgstr "%ls : valeur numérique attendue"
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
4
po/pl.po
4
po/pl.po
@@ -702,6 +702,10 @@ msgstr "%ls: oczekiwano wartości liczbowej"
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -707,6 +707,10 @@ msgstr "%ls: esperava valor numérico"
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
4
po/sv.po
4
po/sv.po
@@ -703,6 +703,10 @@ msgstr ""
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -724,6 +724,10 @@ msgstr "%ls: 预期收到数值"
|
|||||||
msgid "%ls: fish was not built with embedded files"
|
msgid "%ls: fish was not built with embedded files"
|
||||||
msgstr "%ls: fish 构建时未包含嵌入文件"
|
msgstr "%ls: fish 构建时未包含嵌入文件"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%ls: function name required"
|
||||||
|
msgstr "%ls: 函数名称是必须的"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%ls: given %d indexes but %d values\n"
|
msgid "%ls: given %d indexes but %d values\n"
|
||||||
msgstr "%ls: 给定索引 %d 但只有 %d 个值\n"
|
msgstr "%ls: 给定索引 %d 但只有 %d 个值\n"
|
||||||
|
|||||||
@@ -243,7 +243,19 @@ fn parse_cmd_opts(
|
|||||||
STATUS_CMD_OK
|
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) {
|
if !valid_func_name(function_name) {
|
||||||
streams.err.append(wgettext_fmt!(
|
streams.err.append(wgettext_fmt!(
|
||||||
"%ls: %ls: invalid function name",
|
"%ls: %ls: invalid function name",
|
||||||
@@ -281,8 +293,8 @@ pub fn function(
|
|||||||
let cmd = argv[0];
|
let cmd = argv[0];
|
||||||
|
|
||||||
// A valid function name has to be the first argument.
|
// A valid function name has to be the first argument.
|
||||||
let function_name = argv[1].to_owned();
|
let mut function_name = WString::new();
|
||||||
let mut retval = validate_function_name(&function_name, cmd, streams);
|
let mut retval = validate_function_name(argv, &mut function_name, cmd, streams);
|
||||||
if retval != STATUS_CMD_OK {
|
if retval != STATUS_CMD_OK {
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,4 +186,10 @@ function foo; echo before; end
|
|||||||
foo (functions --erase foo)
|
foo (functions --erase foo)
|
||||||
# CHECKERR: error: Unknown function 'foo'
|
# CHECKERR: error: Unknown function 'foo'
|
||||||
|
|
||||||
|
function ()
|
||||||
|
end
|
||||||
|
# CHECKERR: {{.*}}/tests/checks/function.fish (line {{\d+}}): function: function name required
|
||||||
|
# CHECKERR: function ()
|
||||||
|
# CHECKERR: ^
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user