diff --git a/CHANGELOG.rst b/CHANGELOG.rst index df5eceaaf..c0bce4727 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,7 +22,6 @@ Notable improvements and fixes For example:: fish_add_path /opt/mycoolthing/bin - will add /opt/mycoolthing/bin to the beginning of $fish_user_path without creating duplicates, so it can be called again and again from config.fish or just once interactively, and the path will just be there, once. - The ``test`` builtin now better shows where an error occured (:issue:`6030`):: @@ -40,10 +39,11 @@ Notable improvements and fixes - ``string match --regex`` now integrates named PCRE2 capture groups with fish variables, allowing variables to be set directly from ``string match`` (:issue:`7459`). To support this functionality, ``string`` is now a reserved word and can no longer be wrapped in a function. - Globs and other expansions are limited to 512,288 results (:issue:`7226`). Because operating systems limit arguments to ARG_MAX, larger values are unlikely to work anyway, and this helps to avoid hangs. - fish will now always attempt to become process group leader in interactive mode (:issue:`7060`). This helps avoid hangs in certain circumstances, and allows tmux's current directory introspection to work (:issue:`5699`). +- A new ``fish for bash users`` documentation page gives a quick overview of the scripting differences between bash and fish (:issue:`2382`). Syntax changes and new commands ------------------------------- -- Range limits in index range expansions like ``$x[$start..$end]`` may be omitted: ``$start`` and ``$end`` default to 1 and -1 (the last item) respectively. +- Range limits in index range expansions like ``$x[$start..$end]`` may be omitted: ``$start`` and ``$end`` default to 1 and -1 (the last item) respectively (:issue:`6574`). - Logical operators ``&&`` and ``||`` can be followed by newlines before their right operand, matching POSIX shells. - When globbing, a segment which is exactly ``**`` may now match zero directories. For example ``**/foo`` may match ``foo`` in the current directory (:issue:`7222`). @@ -54,7 +54,7 @@ Scripting improvements - A new variable, ``fish_kill_signal``, is set to the signal that terminated the last foreground job, or ``0`` if the job exited normally (:issue:`6824`). - A new subcommand, ``string pad``, allows extending strings to a given width (:issue:`7340`). - ``string sub`` has a new ``--end`` option to specify the end index of - a substring (:issue:`6765`). + a substring (:issue:`6765`, :issue:`5974`). - ``string split`` has a new ``--fields`` option to specify fields to output, similar to ``cut -f`` (:issue:`6770`). - ``printf`` no longer prints an error if not given an argument (not @@ -69,20 +69,20 @@ Scripting improvements - ``fish_indent`` indents continuation lines that follow a line ending in a backslash, ``|``, ``&&`` or ``||``. - ``pushd`` only adds a directory to the stack if changing to it was successful (:issue:`6947`). - A new ``fish_job_summary`` function is called whenever a - background job stops or ends, or any job terminates from a signal (:issue:`6959`). + background job stops or ends, or any job terminates from a signal (:issue:`6959`, :issue:`2727`). The default behaviour can now be customized by redefining it. - The ``fish_prompt`` event no longer fires when ``read`` is used. If you need a function to run any time ``read`` is invoked by a script, use the new ``fish_read`` event instead (:issue:`7039`). - ``status`` gained new ``dirname`` and ``basename`` convenience subcommands to get just the directory to the running script or the name of it, - to simplify common tasks such as running ``(dirname (status filename))`` (:issue:`7076`). + to simplify common tasks such as running ``(dirname (status filename))`` (:issue:`7076`, :issue:`1818`). - The ``type`` and ``_`` gettext functions are now implemented as a builtin for performance purposes (:issue:`7342`, :issue:`7036`). - Broken pipelines are now handled more smoothly; in particular, bad redirection mid-pipeline results in the job continuing to run but with the broken file descriptor replaced with a closed file descriptor. This allows better error recovery and is more in line with other shells' behaviour (:issue:`7038`). -- ``jobs --quiet PID`` no longer prints "no suitable job" if the job for PID does not exist (eg because it has finished) (:issue:`6809`). +- ``jobs --quiet PID`` no longer prints "no suitable job" if the job for PID does not exist (eg because it has finished) (:issue:`6809`, :issue:`6812`). - ``command``, ``jobs`` and ``type`` builtins support ``--query`` as the long form of ``-q``, matching other builtins. The long form ``--quiet`` is deprecated (:issue:`7276`). - ``argparse`` no longer requires a short flag letter for long-only options (:issue:`7585`) and only prints a backtrace with invalid options to argparse itself (:issue:`6703`). - ``argparse`` now passes the validation variables (e.g. ``$_flag_value``) as local-exported variables, @@ -98,6 +98,7 @@ Scripting improvements - ``abbr --erase`` no longer errors on an unset abbreviation (:issue:`7376`). - ``test -t``, for testing whether file descriptors are connected to a terminal, works for file descriptors 0, 1, and 2 (:issue:`4766`). It can still return incorrect results in other cases (:issue:`1228`). - Trying to execute scripts with Windows line endings (CRLF) produces a sensible error (:issue:`2783`). +- Trying to execute commands with arguments that exceed the operating system limit now produces a specific error (:issue:`6800`). - An ``alias`` that delegates to a command with the same name no longer triggers an error about recursive completion (:issue:`7389`). - ``math`` now has a ``--base`` option to output the result in hexadecimal or octal (:issue:`7496`) and produces more specific error messages (:issue:`7508`). - ``math`` learned bitwise functions ``bitand``, ``bitor`` and ``bitxor``, used like ``math "bitand(0xFE, 5)"`` (:issue:`7281`). @@ -108,13 +109,14 @@ Scripting improvements - More consistent $status after errors, including invalid expansions like ``$foo[``. - ``read`` can now read interactively from other files, so e.g. forcing it to read from the terminal via ``read ``). - The ``set`` completions no longer hide variables starting with ``__``, they are sorted last instead. +Changes not visible to users +---------------------------- + +- fish has a new interactive test driver based on pexpect. This means that interactive tests are now written in python rather than the less known tcl, which reduces the number of programming languages required to work on fish (:issue:`5451`, :issue:`6825`). +- The ``littlecheck`` script test driver gained improved output based on diffing rather than stopping on the first error. This makes understanding test failures much easier. +- fish's test suite now checks all of its .fish scripts with ``fish --no-execute`` (:issue:`6619`). +- The tests no longer fail if a user with a name starting with "haha" exists on the system (:issue:`6811`). +- The CHANGELOG was moved to restructured text, allowing it to be included in the documentation. +- fish moved CI from Travis (which is no longer available for opensource projects) to Github Actions (:issue:`6846`, :issue:`7447`) + Deprecations and removed features --------------------------------- - fish no longer attempts to modify the terminal size via ``TIOCSWINSZ`` (:issue:`6994`).