head 1.4; access; symbols pkgsrc-2020Q4:1.3.0.8 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.6 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.4 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.2 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.2.0.10 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.6 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.4 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.2 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.1.0.12 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.10 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.8 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.6 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.4 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.2; locks; strict; comment @// @; 1.4 date 2021.03.05.08.47.29; author nia; state dead; branches; next 1.3; commitid Vq4BrCztKWXy76KC; 1.3 date 2020.02.18.22.00.49; author maya; state Exp; branches; next 1.2; commitid lrqFfGqdmjyfKcXB; 1.2 date 2019.02.12.16.49.31; author maya; state Exp; branches; next 1.1; commitid YbWDBM8S1gudXubB; 1.1 date 2017.10.24.03.51.41; author maya; state Exp; branches 1.1.2.1; next ; commitid 8m4IGfPNhNSbXfcA; 1.1.2.1 date 2017.10.24.03.51.41; author spz; state dead; branches; next 1.1.2.2; commitid Z8IAmPfOulTKPQcA; 1.1.2.2 date 2017.10.28.18.56.04; author spz; state Exp; branches; next ; commitid Z8IAmPfOulTKPQcA; desc @@ 1.4 log @fish: Update to 3.2.0 fish 3.2.0 (released March 1, 2021) =================================== Notable improvements and fixes ------------------------------ - **Undo and redo support** for the command-line editor and pager search (:issue:`1367`). By default, undo is bound to Control+Z, and redo to Alt+/. - **Builtins can now output before all data is read**. For example, ``string replace`` no longer has to read all of stdin before it can begin to output. This makes it usable also for pipes where the previous command hasn't finished yet, like:: # Show all dmesg lines related to "usb" dmesg -w | string match '*usb*' - **Prompts will now be truncated** instead of replaced with ``"> "`` if they are wider than the terminal (:issue:`904`). For example:: ~/dev/build/fish-shell-git/src/fish-shell/build (makepkg)> will turn into:: …h-shell/build (makepkg)> It is still possible to react to the ``COLUMNS`` variable inside the prompt to implement smarter behavior. - **fish completes ambiguous completions** after pressing :kbd:`Tab` even when they have a common prefix, without the user having to press :kbd:`Tab` again (:issue:`6924`). - fish is less aggressive about resetting terminal modes, such as flow control, after every command. Although flow control remains off by default, enterprising users can now enable it with ``stty`` (:issue:`2315`, :issue:`7704`). - A new **"fish_add_path" helper function to add paths to $PATH** without producing duplicates, to be used interactively or in ``config.fish`` (:issue:`6960`, :issue:`7028`). 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 safely from config.fish or interactively, and the path will just be there, once. - **Better errors with "test"** (:issue:`6030`):: > test 1 = 2 and echo true or false test: Expected a combining operator like '-a' at index 4 1 = 2 and echo true or echo false ^ This includes numbering the index from 1 instead of 0, like fish lists. - **A new theme for the documentation and Web-based configuration** (:issue:`6500`, :issue:`7371`, :issue:`7523`), matching the design on fishshell.com. - ``fish --no-execute`` **will no longer complain about unknown commands** or non-matching wildcards, as these could be defined differently at runtime (especially for functions). This makes it usable as a static syntax checker (:issue:`977`). - ``string match --regex`` now integrates **named PCRE2 capture groups as 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 the number of arguments to commands, larger values are unlikely to work anyway, and this helps to avoid hangs. - A new **"fish for bash users" documentation page** gives a quick overview of the scripting differences between bash and fish (:issue:`2382`), and the completion tutorial has also been moved out into its own document (:issue:`6709`). 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 (:issue:`6574`):: echo $var[1..] echo $var[..-1] echo $var[..] All print the full list ``$var``. - When globbing, a segment which is exactly ``**`` may now match zero directories. For example ``**/foo`` may match ``foo`` in the current directory (:issue:`7222`). Scripting improvements ---------------------- - The ``type``, ``_`` (gettext), ``.`` (source) and ``:`` (no-op) functions are now implemented builtins for performance purposes (:issue:`7342`, :issue:`7036`, :issue:`6854`). - ``set`` and backgrounded jobs no longer overwrite ``$pipestatus`` (:issue:`6820`), improving its use in command substitutions (:issue:`6998`). - Computed ("electric") variables such as ``status`` are now only global in scope, so ``set -Uq status`` returns false (:issue:`7032`). - The output for ``set --show`` has been shortened, only mentioning the scopes in which a variable exists (:issue:`6944`). In addition, it now shows if a variable is a path variable. - 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`, :issue:`6822`). - A new subcommand, ``string pad``, allows extending strings to a given width (:issue:`7340`, :issue:`7102`). - ``string sub`` has a new ``--end`` option to specify the end index of a substring (:issue:`6765`, :issue:`5974`). - ``string split`` has a new ``--fields`` option to specify fields to output, similar to ``cut -f`` (:issue:`6770`). - ``string trim`` now also trims vertical tabs by default (:issue:`6795`). - ``string replace`` no longer prints an error if a capturing group wasn't matched, instead treating it as empty (:issue:`7343`). - ``string`` subcommands now quit early when used with ``--quiet`` (:issue:`7495`). - ``string repeat`` now handles multiple arguments, repeating each one (:issue:`5988`). - ``printf`` no longer prints an error if not given an argument (not even a format string). - The ``true`` and ``false`` builtins ignore any arguments, like other shells (:issue:`7030`). - ``fish_indent`` now removes unnecessary quotes in simple cases (:issue:`6722`) and gained a ``--check`` option to just check if a file is indented correctly (:issue:`7251`). - ``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`, :issue:`2727`, :issue:`4319`). The default behaviour can now be customized by redefining it. - ``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`, :issue:`1818`). - 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`, :issue:`6812`). - ``jobs`` now shows continued child processes correctly (:issue:`6818`) - ``disown`` should no longer create zombie processes when job control is off, such as in ``config.fish`` (:issue:`7183`). - ``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, avoiding the need for ``--no-scope-shadowing`` in validation functions. - ``complete`` takes the first argument as the name of the command if the ``--command``/``-c`` option is not used, so ``complete git`` is treated like ``complete --command git``, and it can show the loaded completions for specific commands with ``complete COMMANDNAME`` (:issue:`7321`). - ``set_color -b`` (without an argument) no longer prints an error message, matching other invalid invocations of this command (:issue:`7154`). - ``exec`` no longer produces a syntax error when the command cannot be found (:issue:`6098`). - ``set --erase`` and ``abbr --erase`` can now erase multiple things in one go, matching ``functions --erase`` (:issue:`7377`). - ``abbr --erase`` no longer prints errors when used with no arguments or on an unset abbreviation (:issue:`7376`, :issue:`7732`). - ``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`). - ``math`` learned tau for those who don't like typing "2 * pi". - Failed redirections will now set ``$status`` (:issue:`7540`). - fish sets exit status in a more consistent manner after errors, including invalid expansions like ``$foo[``. - Using ``read --silent`` while fish is in private mode was adding these potentially-sensitive entries to the history; this has been fixed (:issue:`7230`). - ``read`` can now read interactively from other files, and can be used to read from the terminal via ``read &5`` is now an error. This prevents corruption of internal state (#3303). Interactive improvements ------------------------ - 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`). - The interactive reader now allows ending a line in a logical operators (``&&`` and ``||``) instead of complaining about a missing command. (This was already syntactically valid, but interactive sessions didn't know about it yet). - The prompt is reprinted after a background job exits (:issue:`1018`). - fish no longer inserts a space after a completion ending in ``.``, ``,`` or ``-`` is accepted, improving completions for tools that provide dynamic completions (:issue:`6928`). - If a filename is invalid when first pressing :kbd:`Tab`, but becomes valid, it will be completed properly on the next attempt (:issue:`6863`). - ``help string match/replace/`` will show the help for string subcommands (:issue:`6786`). - ``fish_key_reader`` sets the exit status to 0 when used with ``--help`` or ``--version`` (:issue:`6964`). - ``fish_key_reader`` and ``fish_indent`` send output from ``--version`` to standard output, matching other fish binaries (:issue:`6964`). - A new variable ``$status_generation`` is incremented only when the previous command produces an exit status (:issue:`6815`). This can be used, for example, to check whether a failure status is a holdover due to a background job, or actually produced by the last run command. - ``fish_greeting`` is now a function that reads a variable of the same name, and defaults to setting it globally. This removes a universal variable by default and helps with updating the greeting. However, to disable the greeting it is now necessary to explicitly specify universal scope (``set -U fish_greeting``) or to disable it in config.fish (:issue:`7265`). - Events are properly emitted after a job is cancelled (:issue:`2356`). - ``fish_preexec`` and ``fish_postexec`` events are no longer triggered for empty commands (:issue:`4829`, :issue:`7085`). - Functions triggered by the ``fish_exit`` event are correctly run when the terminal is closed or the shell receives SIGHUP (:issue:`7014`). - 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`). - A new ``fish_posterror`` event is emitted when attempting to execute a command with syntax errors (:issue:`6880`, :issue:`6816`). - The debugging system has now fully switched from the old numbered level to the new named category system introduced in 3.1. A number of new debugging categories have been added, including ``config``, ``path``, ``reader`` and ``screen`` (:issue:`6511`). See the output of ``fish --print-debug-categories`` for the full list. - The warning about read-only filesystems has been moved to a new "warning-path" debug category and can be disabled by setting a debug category of ``-warning-path`` (:issue:`6630`):: fish --debug=-warning-path - The enabled debug categories are now printed on shell startup (:issue:`7007`). - The ``-o`` short option to fish, for ``--debug-output``, works correctly instead of producing an invalid option error (:issue:`7254`). - fish's debugging can now also be enabled via ``FISH_DEBUG`` and ``FISH_DEBUG_OUTPUT`` environment variables. This helps with debugging when no commandline options can be passed, like when fish is called in a shebang (:issue:`7359`). - Abbreviations are now expanded after all command terminators (eg ``;`` or ``|``), not just space, as in fish 2.7.1 and before (:issue:`6970`), and after closing a command substitution (:issue:`6658`). - The history file is now created with user-private permissions, matching other shells (:issue:`6926`). The directory containing the history file was already private, so there should not have been any private data revealed. - The output of ``time`` is now properly aligned in all cases (:issue:`6726`, :issue:`6714`) and no longer depends on locale (:issue:`6757`). - The command-not-found handling has been simplified. When it can't find a command, fish now just executes a function called ``fish_command_not_found`` instead of firing an event, making it easier to replace and reason about. Previously-defined ``__fish_command_not_found_handler`` functions with an appropriate event listener will still work (:issue:`7293`). - :kbd:`Control-C` handling has been reimplemented in C++ and is therefore quicker (:issue:`5259`), no longer occasionally prints an "unknown command" error (:issue:`7145`) or overwrites multiline prompts (:issue:`3537`). - :kbd:`Control-C` no longer kills background jobs for which job control is disabled, matching POSIX semantics (:issue:`6828`, :issue:`6861`). - Autosuggestions work properly after :kbd:`Control-C` cancels the current commmand line (:issue:`6937`). - History search is now case-insensitive unless the search string contains an uppercase character (:issue:`7273`). - ``fish_update_completions`` gained a new ``--keep`` option, which improves speed by skipping completions that already exist (:issue:`6775`, :issue:`6796`). - Aliases containing an embedded backslash appear properly in the output of ``alias`` (:issue:`6910`). - ``open`` no longer hangs indefinitely on certain systems, as a bug in ``xdg-open`` has been worked around (:issue:`7215`). - Long command lines no longer add a blank line after execution (:issue:`6826`) and behave better with :kbd:`Backspace` (:issue:`6951`). - ``functions -t`` works like the long option ``--handlers-type``, as documented, instead of producing an error (:issue:`6985`). - History search now flashes when it found no more results (:issue:`7362`) - fish now creates the path in the environment variable ``XDG_RUNTIME_DIR`` if it does not exist, before using it for runtime data storage (:issue:`7335`). - ``set_color --print-colors`` now also respects the bold, dim, underline, reverse, italic and background modifiers, to better show their effect (:issue:`7314`). - The fish Web configuration tool (``fish_config``) shows prompts correctly on Termux for Android (:issue:`7298`) and detects Windows Services for Linux 2 properly (:issue:`7027`). It no longer shows the ``history`` variable as it may be too large (one can use the History tab instead). It also starts the browser in another thread, avoiding hangs in some circumstances, especially with Firefox's Developer Edition (:issue:`7158`). Finally, a bug in the Source Code Pro font may cause browsers to hang, so this font is no longer chosen by default (:issue:`7714`). - ``funcsave`` gained a new ``--directory`` option to specify the location of the saved function (:issue:`7041`). - ``help`` works properly on MSYS2 (:issue:`7113`) and only uses ``cmd.exe`` if running on WSL (:issue:`6797`). - Resuming a piped job by its number, like ``fg %1``, works correctly (:issue:`7406`). Resumed jobs show the correct title in the terminal emulator (:issue:`7444`). - Commands run from key bindings now use the same TTY modes as normal commands (:issue:`7483`). - Autosuggestions from history are now case-sensitive (:issue:`3978`). - ``$status`` from completion scripts is no longer passed outside the completion, which keeps the status display in the prompt as the last command's status (:issue:`7555`). - Updated localisations for pt_BR (:issue:`7480`). - ``fish_trace`` output now starts with ``->`` (like ``fish --profile``), making the depth more visible (:issue:`7538`). - Resizing the terminal window no longer produces a corrupted prompt (:issue:`6532`, :issue:`7404`). - ``functions`` produces an error rather than crashing on certain invalid arguments (:issue:`7515`). - A crash in completions with inline variable assignment (eg ``A= b``) has been fixed (:issue:`7344`). - ``fish_private_mode`` may now be changed dynamically using ``set`` (:issue:`7589`), and history is kept in memory in private mode (but not stored permanently) (:issue:`7590`). - Commands with leading spaces may be retrieved from history with up-arrow until a new command is run, matching zsh's ``HIST_IGNORE_SPACE`` (:issue:`1383`). - Importing bash history or reporting errors with recursive globs (``**``) no longer hangs (:issue:`7407`, :issue:`7497`). - ``bind`` now shows ``\x7f`` for the del key instead of a literal DEL character (:issue:`7631`) - Paths containing variables or tilde expansion are only suggested when they are still valid (:issue:`7582`). - Syntax highlighting can now color a command as invalid even if executed quickly (:issue:`5912`). - Redirection targets are no longer highlighted as error if they contain variables which will likely be defined by the current commandline (:issue:`6654`). - fish is now more resilient against broken terminal modes (:issue:`7133`, :issue:`4873`). - fish handles being in control of the TTY without owning its own process group better, avoiding some hangs in special configurations (:issue:`7388`). - Keywords can now be colored differently by setting the ``fish_color_keyword`` variable (``fish_color_command`` is used as a fallback) (:issue:`7678`). - Just like ``fish_indent``, the interactive reader will indent continuation lines that follow a line ending in a backslash, ``|``, ``&&`` or ``||`` (:issue:`7694`). - Commands with a trailing escaped space are saved in history correctly (:issue:`7661`). - ``fish_prompt`` no longer mangles Unicode characters in the private-use range U+F600-U+F700. (:issue:`7723`). - The universal variable file, ``fish_variables``, can be made a symbolic link without it being overwritten (:issue:`7466`). - fish is now more resilient against ``mktemp`` failing (:issue:`7482`). New or improved bindings ^^^^^^^^^^^^^^^^^^^^^^^^ - As mentioned above, new special input functions ``undo`` (:kbd:`Control+\_` or :kbd:`Control+Z`) and ``redo`` (:kbd:`Alt-/`) can be used to revert changes to the command line or the pager search field (:issue:`6570`). - :kbd:`Control-Z` is now available for binding (:issue:`7152`). - Additionally, using the ``cancel`` special input function (bound to :kbd:`Escape` by default) right after fish picked an unambiguous completion will undo that (:issue:`7433`). - ``fish_clipboard_paste`` (:kbd:`Control+V`) trims indentation from multiline commands, because fish already indents (:issue:`7662`). - Vi mode bindings now support ``dh``, ``dl``, ``c0``, ``cf``, ``ct``, ``cF``, ``cT``, ``ch``, ``cl``, ``y0``, ``ci``, ``ca``, ``yi``, ``ya``, ``di``, ``da``, ``d;``, ``d,``, ``o``, ``O`` and Control+left/right keys to navigate by word (:issue:`6648`, :issue:`6755`, :issue:`6769`, :issue:`7442`, :issue:`7516`). - Vi mode bindings support :kbd:`~` (tilde) to toggle the case of the selected character (:issue:`6908`). - Functions ``up-or-search`` and ``down-or-search`` (:kbd:`Up` and :kbd:`Down`) can cross empty lines, and don't activate search mode if the search fails, which makes them easier to use to move between lines in some situations. - If history search fails to find a match, the cursor is no longer moved. This is useful when accidentally starting a history search on a multi-line commandline. - The special input function ``beginning-of-history`` (:kbd:`Page Up`) now moves to the oldest search instead of the youngest - that's ``end-of-history`` (:kbd:`Page Down`). - A new special input function ``forward-single-char`` moves one character to the right, and if an autosuggestion is available, only take a single character from it (:issue:`7217`, :issue:`4984`). - Special input functions can now be joined with ``or`` as a modifier (adding to ``and``), though only some commands set an exit status (:issue:`7217`). This includes ``suppress-autosuggestion`` to reflect whether an autosuggestion was suppressed (:issue:`1419`) - A new function ``__fish_preview_current_file``, bound to :kbd:`Alt+O`, opens the current file at the cursor in a pager (:issue:`6838`, :issue:`6855`). - ``edit_command_buffer`` (:kbd:`Alt-E` and :kbd:`Alt-V`) passes the cursor position to the external editor if the editor is recognized (:issue:`6138`, :issue:`6954`). - ``__fish_prepend_sudo`` (:kbd:`Alt-S`) now toggles a ``sudo`` prefix (:issue:`7012`) and avoids shifting the cursor (:issue:`6542`). - ``__fish_prepend_sudo`` (:kbd:`Alt-S`) now uses the previous commandline if the current one is empty, to simplify rerunning the previous command with ``sudo`` (:issue:`7079`). - ``__fish_toggle_comment_commandline`` (:kbd:`Alt-#`) now uncomments and presents the last comment from history if the commandline is empty (:issue:`7137`). - ``__fish_whatis_current_token`` (:kbd:`Alt-W`) prints descriptions for functions and builtins (:issue:`7191`, :issue:`2083`). - The definition of "word" and "bigword" for movements was refined, fixing (eg) vi mode's behavior with :kbd:`e` on the second-to-last char, and bigword's behavior with single-character words and non-blank non-graphical characters (:issue:`7353`, :issue:`7354`, :issue:`4025`, :issue:`7328`, :issue:`7325`) - fish's clipboard bindings now also support Windows Subsystem for Linux via PowerShell and clip.exe (:issue:`7455`, :issue:`7458`) and will properly copy newlines in multi-line commands. - Using the ``*-jump`` special input functions before typing anything else no longer crashes fish. - Completing variable overrides (``foo=bar``) could replace the entire thing with just the completion in some circumstances. This has been fixed (:issue:`7398`). Improved prompts ^^^^^^^^^^^^^^^^ - The default and example prompts print the correct exit status for commands prefixed with ``not`` (:issue:`6566`). - git prompts include all untracked files in the repository, not just those in the current directory (:issue:`6086`). - The git prompts correctly show stash states (:issue:`6876`, :issue:`7136`) and clean states (:issue:`7471`). - The Mercurial prompt correctly shows untracked status (:issue:`6906`), and by default only shows the branch for performance reasons. A new variable ``$fish_prompt_hg_show_informative_status`` can be set to enable more information. - The ``fish_vcs_prompt`` passes its arguments to the various VCS prompts that it calls (:issue:`7033`). - The Subversion prompt was broken in a number of ways in 3.1.0 and has been restored (:issue:`6715`, :issue:`7278`). - A new helper function ``fish_is_root_user`` simplifies checking for superuser privilege (:issue:`7031`, :issue:`7123`). - New colorschemes - ``ayu Light``, ``ayu Dark`` and ``ayu Mirage`` (:issue:`7596`). - Bugs related to multiline prompts, including repainting (:issue:`5860`) or navigating directory history (:issue:`3550`) leading to graphical glitches have been fixed. - The ``nim`` prompt now handles vi mode better (:issue:`6802`) Improved terminal support ^^^^^^^^^^^^^^^^^^^^^^^^^ - A new variable, ``fish_vi_force_cursor``, can be set to force ``fish_vi_cursor`` to attempt changing the cursor shape in vi mode, regardless of terminal (:issue:`6968`). The ``fish_vi_cursor`` option ``--force-iterm`` has been deprecated. - ``diff`` will now colourize output, if supported (:issue:`7308`). - Autosuggestions appear when the cursor passes the right prompt (:issue:`6948`) or wraps to the next line (:issue:`7213`). - The cursor shape in Vi mode changes properly in Windows Terminal (:issue:`6999`, :issue:`6478`). - The spurious warning about terminal size in small terminals has been removed (:issue:`6980`). - Dynamic titles are now enabled in Alacritty (:issue:`7073`) and emacs' vterm (:issue:`7122`). - Current working directory updates are enabled in foot (:issue:`7099`) and WezTerm (:issue:`7649`). - The width computation for certain emoji agrees better with terminals (especially flags). (:issue:`7237`). - Long command lines are wrapped in all cases, instead of sometimes being put on a new line (:issue:`5118`). - The pager is properly rendered with long command lines selected (:issue:`2557`). - Sessions with right prompts can be resized correctly in terminals that handle reflow, like GNOME Terminal (and other VTE-based terminals), upcoming Konsole releases and Alacritty. This detection can be overridden with the new ``fish_handle_reflow`` variable (:issue:`7491`). - fish now sets terminal modes sooner, which stops output from appearing before the greeting and prompt are ready (:issue:`7489`). - Better detection of new Konsole versions for true color support and cursor shape changing. - fish no longer attempts to modify the terminal size via ``TIOCSWINSZ``, improving compatibility with Kitty (:issue:`6994`). Completions ^^^^^^^^^^^ - Added completions for - ``7z``, ``7za`` and ``7zr`` (:issue:`7220`) - ``alias`` (:issue:`7035`) - ``alternatives`` (:issue:`7616`) - ``apk`` (:issue:`7108`) - ``asciidoctor`` (:issue:`7000`) - ``avifdec`` and ``avifenc`` (:issue:`7674`) - ``bluetoothctl`` (:issue:`7438`) - ``cjxl`` and ``djxl`` (:issue:`7673`) - ``cmark`` (:issue:`7000`) - ``create_ap`` (:issue:`7096`) - ``deno`` (:issue:`7138`) - ``dhclient`` (:issue:`6684`) - Postgres-related commands ``dropdb``, ``createdb``, ``pg_restore``, ``pg_dump`` and ``pg_dumpall`` (:issue:`6620`) - ``dotnet`` (:issue:`7558`) - ``downgrade`` (:issue:`6751`) - ``gapplication``, ``gdbus``, ``gio`` and ``gresource`` (:issue:`7300`) - ``gh`` (:issue:`7112`) - ``gitk`` - ``groups`` (:issue:`6889`) - ``hashcat`` (:issue:`7746`) - ``hikari`` (:issue:`7083`) - ``icdiff`` (:issue:`7503`) - ``imv`` (:issue:`6675`) - ``john`` (:issue:`7746`) - ``julia`` (:issue:`7468`) - ``k3d`` (:issue:`7202`) - ``ldapsearch`` (:issue:`7578`) - ``lightdm`` and ``dm-tool`` (:issue:`7624`) - ``losetup`` (:issue:`7621`) - ``micro`` (:issue:`7339`) - ``mpc`` (:issue:`7169`) - Metasploit's ``msfconsole``, ``msfdb`` and ``msfvenom`` (:issue:`6930`) - ``mtr`` (:issue:`7638`) - ``mysql`` (:issue:`6819`) - ``ncat``, ``nc.openbsd``, ``nc.traditional`` and ``nmap`` (:issue:`6873`) - ``openssl`` (:issue:`6845`) - ``prime-run`` (:issue:`7241`) - ``ps2pdf{12,13,14,wr}`` (:issue:`6673`) - ``pyenv`` (:issue:`6551`) - ``rst2html``, ``rst2html4``, ``rst2html5``, ``rst2latex``, ``rst2man``, ``rst2odt``, ``rst2pseudoxml``, ``rst2s5``, ``rst2xetex``, ``rst2xml`` and ``rstpep2html`` (:issue:`7019`) - ``spago`` (:issue:`7381`) - ``sphinx-apidoc``, ``sphinx-autogen``, ``sphinx-build`` and ``sphinx-quickstart`` (:issue:`7000`) - ``strace`` (:issue:`6656`) - systemd's ``bootctl``, ``coredumpctl``, ``hostnamectl`` (:issue:`7428`), ``homectl`` (:issue:`7435`), ``networkctl`` (:issue:`7668`) and ``userdbctl`` (:issue:`7667`) - ``tcpdump`` (:issue:`6690`) - ``tig`` - ``traceroute`` and ``tracepath`` (:issue:`6803`) - ``windscribe`` (:issue:`6788`) - ``wireshark``, ``tshark``, and ``dumpcap`` - ``xbps-*`` (:issue:`7239`) - ``xxhsum``, ``xxh32sum``, ``xxh64sum`` and ``xxh128sum`` (:issue:`7103`) - ``yadm`` (:issue:`7100`) - ``zopfli`` and ``zopflipng`` (:issue:`6872`) - Lots of improvements to completions, including: - ``git`` completions can complete the right and left parts of a commit range like ``from..to`` or ``left...right``. - Completion scripts for custom Git subcommands like ``git-xyz`` are now loaded with Git completions. The completions can now be defined directly on the subcommand (using ``complete git-xyz``), and completion for ``git xyz`` will work. (:issue:`7075`, :issue:`7652`, :issue:`4358`) - ``make`` completions no longer second-guess make's file detection, fixing target completion in some cases (:issue:`7535`). - Command completions now correctly print the description even if the command was fully matched (like in ``ls``). - ``set`` completions no longer hide variables starting with ``__``, they are sorted last instead. - Improvements to the manual page completion generator (:issue:`7086`, :issue:`6879`, :issue:`7187`). - Significant performance improvements to completion of the available commands (:issue:`7153`), especially on macOS Big Sur where there was a significant regression (:issue:`7365`, :issue:`7511`). - Suffix completion using ``__fish_complete_suffix`` uses the same fuzzy matching logic as normal file completion, and completes any file but sorts files with matching suffix first (:issue:`7040`, :issue:`7547`). Previously, it only completed files with matching suffix. For distributors ---------------- - fish has a new interactive test driver based on pexpect, removing the optional dependency on expect (and adding an optional dependency on pexpect) (:issue:`5451`, :issue:`6825`). - The CHANGELOG was moved to restructured text, allowing it to be included in the documentation (:issue:`7057`). - fish handles ncurses installed in a non-standard prefix better (:issue:`6600`, :issue:`7219`), and uses variadic tparm on NetBSD curses (:issue:`6626`). - The Web-based configuration tool no longer uses an obsolete Angular version (:issue:`7147`). - The fish project has adopted the Contributor Covenant code of conduct (:issue:`7151`). Deprecations and removed features --------------------------------- - The ``fish_color_match`` variable is no longer used. (Previously this controlled the color of matching quotes and parens when using ``read``). - fish 3.2.0 will be the last release in which the redirection to standard error with the ``^`` character is enabled. The ``stderr-nocaret`` feature flag will be changed to "on" in future releases. - ``string`` is now a reserved word and cannot be used for function names (see above). - ``fish_vi_cursor``'s option ``--force-iterm`` has been deprecated (see above). - ``command``, ``jobs`` and ``type`` long-form option ``--quiet`` is deprecated in favor of ``--query`` (see above). - The ``fish_command_not_found`` event is no longer emitted, instead there is a function of that name. By default it will call a previously-defined ``__fish_command_not_found_handler``. To emit the event manually use ``emit fish_command_not_found``. - 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`). - To disable the greeting message permanently it is no longer enough to just run ``set fish_greeting`` interactively as it is no longer implicitly a universal variable. Use ``set -U fish_greeting`` or disable it in config.fish with ``set -g fish_greeting``. - The long-deprecated and non-functional ``-m``/``--read-mode`` options to ``read`` were removed in 3.1b1. Using the short form, or a never-implemented ``-B`` option, no longer crashes fish (:issue:`7659`). - With the addition of new categories for debug options, the old numbered debugging levels have been removed. For distributors and developers ------------------------------- - fish source tarballs are now distributed using the XZ compression method (:issue:`5460`). - The fish source tarball contains an example FreeDesktop entry and icon. - The CMake variable ``MAC_CODESIGN_ID`` can now be set to "off" to disable code-signing (:issue:`6952`, :issue:`6792`). - Building on on macOS earlier than 10.13.6 succeeds, instead of failing on code-signing (:issue:`6791`). - The pkg-config file now uses variables to ensure paths used are portable across prefixes. - The default values for the ``extra_completionsdir``, ``extra_functionsdir`` and ``extra_confdir`` options now use the installation prefix rather than ``/usr/local`` (:issue:`6778`). - A new CMake variable ``FISH_USE_SYSTEM_PCRE2`` controls whether fish builds with the system-installed PCRE2, or the version it bundles. By default it prefers the system library if available, unless Mac codesigning is enabled (:issue:`6952`). - Running the full interactive test suite now requires Python 3.5+ and the pexpect package (:issue:`6825`); the expect package is no longer required. - Support for Python 2 in fish's tools (``fish_config`` and the manual page completion generator) is no longer guaranteed. Please use Python 3.5 or later (:issue:`6537`). - The Web-based configuration tool is compatible with Python 3.10 (:issue:`7600`) and no longer requires Python's distutils package (:issue:`7514`). - fish 3.2 is the last release to support Red Hat Enterprise Linux & CentOS version 6. -------------- @ text @$NetBSD: patch-src_fallback.cpp,v 1.3 2020/02/18 22:00:49 maya Exp $ constify, for clang --- src/fallback.cpp.orig 2020-02-12 14:04:07.000000000 +0000 +++ src/fallback.cpp @@@@ -47,8 +47,8 @@@@ #if defined(TPARM_SOLARIS_KLUDGE) #undef tparm -char *tparm_solaris_kludge(char *str, long p1, long p2, long p3, long p4, long p5, long p6, long p7, - long p8, long p9) { +char *tparm_solaris_kludge(const char *str, long p1, long p2, long p3, long p4, + long p5, long p6, long p7, long p8, long p9) { return tparm(str, p1, p2, p3, p4, p5, p6, p7, p8, p9); } @ 1.3 log @fish: update to 3.1.0 From Jonathan Schleifer in PR pkg/54965, lightly changed by myself for netbsd support. fish 3.1.0 (released February 12, 2020) Compared to the beta release of fish 3.1b1, fish version 3.1.0: * fixes a regression where spaces after a brace were removed despite brace expansion not occurring (#6564) * fixes a number of problems in compiling and testing on Cygwin (#6549) and Solaris-derived systems such as Illumos (#6553, #6554, #6555, #6556, and #6558); * fixes the process for building macOS packages; * fixes a regression where excessive error messages are printed if Unicode characters are emitted in non-Unicode-capable locales (#6584); and * contains some improvements to the documentation and a small number of completions. If you are upgrading from version 3.0.0 or before, please also review the release notes for 3.1b1 (included below). Release notes for fish 3.1b1 (released January 26, 2020) Notable improvements and fixes * A new $pipestatus variable contains a list of exit statuses of the previous job, for each of the separate commands in a pipeline (#5632). * fish no longer buffers pipes to the last function in a pipeline, improving many cases where pipes appeared to block or hang (#1396). * An overhaul of error messages for builtin commands, including a removal of the overwhelming usage summary, more readable stack traces (#3404, #5434), and stack traces for test (aka [) (#5771). * fish's debugging arguments have been significantly improved. The --debug-level option has been removed, and a new --debug option replaces it. This option accepts various categories, which may be listed via fish --print-debug-categories (#5879). A new --debug-output option allows for redirection of debug output. * string has a new collect subcommand for use in command substitutions, producing a single output instead of splitting on new lines (similar to "$(cmd)" in other shells) (#159). * The fish manual, tutorial and FAQ are now available in man format as fish-doc, fish-tutorial and fish-faq respectively (#5521). * Like other shells, cd now always looks for its argument in the current directory as a last resort, even if the CDPATH variable does not include it or "." (#4484). * fish now correctly handles CDPATH entries that start with .. (#6220) or contain ./ (#5887). * The fish_trace variable may be set to trace execution (#3427). This performs a similar role as set -x in other shells. * fish uses the temporary directory determined by the system, rather than relying on /tmp (#3845). * The fish Web configuration tool (fish_config) prints a list of commands it is executing, to help understanding and debugging (#5584). * Major performance improvements when pasting (#5866), executing lots of commands (#5905), importing history from bash (#6295), and when completing variables that might match $history (#6288). Syntax changes and new commands * A new builtin command, time, which allows timing of fish functions and builtins as well as external commands (#117). * Brace expansion now only takes place if the braces include a "," or a variable expansion, meaning common commands such as git reset HEAD@@{0} do not require escaping (#5869). * New redirections &> and &| may be used to redirect or pipe stdout, and also redirect stderr to stdout (#6192). * switch now allows arguments that expand to nothing, like empty variables (#5677). * The VAR=val cmd syntax can now be used to run a command in a modified environment (#6287). * and is no longer recognised as a command, so that nonsensical constructs like and and and produce a syntax error (#6089). * math's exponent operator, '^', was previously left-associative, but now uses the more commonly-used right-associative behaviour (#6280). This means that math '3^0.5^2' was previously calculated as '(3^0.5)^2', but is now calculated as '3^(0.5^2)'. * In fish 3.0, the variable used with for loops inside command substitutions could leak into enclosing scopes; this was an inadvertent behaviour change and has been reverted (#6480). Scripting improvements * string split0 now returns 0 if it split something (#5701). * In the interest of consistency, builtin -q and command -q can now be used to query if a builtin or command exists (#5631). * math now accepts --scale=max for the maximum scale (#5579). * builtin $var now works correctly, allowing a variable as the builtin name (#5639). * cd understands the -- argument to make it possible to change to directories starting with a hyphen (#6071). * complete --do-complete now also does fuzzy matches (#5467). * complete --do-complete can be used inside completions, allowing limited recursion (#3474). * count now also counts lines fed on standard input (#5744). * eval produces an exit status of 0 when given no arguments, like other shells (#5692). * printf prints what it can when input hasn't been fully converted to a number, but still prints an error (#5532). * complete -C foo now works as expected, rather than requiring complete -Cfoo. * complete has a new --force-files option, to re-enable file completions. This allows sudo -E and pacman -Qo to complete correctly (#5646). * argparse now defaults to showing the current function name (instead of argparse) in its errors, making --name often superfluous (#5835). * argparse has a new --ignore-unknown option to keep unrecognized options, allowing multiple argparse passes to parse options (#5367). * argparse correctly handles flag value validation of options that only have short names (#5864). * read -S (short option of --shell) is recognised correctly (#5660). * read understands --list, which acts like --array in reading all arguments into a list inside a single variable, but is better named (#5846). * read has a new option, --tokenize, which splits a string into variables according to the shell's tokenization rules, considering quoting, escaping, and so on (#3823). * read interacts more correctly with the deprecated $IFS variable, in particular removing multiple separators when splitting a variable into a list (#6406), matching other shells. * fish_indent now handles semicolons better, including leaving them in place for ; and and ; or instead of breaking the line (#5859). * fish_indent --write now supports multiple file arguments, indenting them in turn. * The default read limit has been increased to 100MiB (#5267). * math now also understands x for multiplication, provided it is followed by whitespace (#5906). * math reports the right error when incorrect syntax is used inside parentheses (#6063), and warns when unsupported logical operations are used (#6096). * functions --erase now also prevents fish from autoloading a function for the first time (#5951). * jobs --last returns 0 to indicate success when a job is found (#6104). * commandline -p and commandline -j now split on && and || in addition to ; and & (#6214). * A bug where string split would drop empty strings if the output was only empty strings has been fixed (#5987). * eval no long creates a new local variable scope, but affects variables in the scope it is called from (#4443). source still creates a new local scope. * abbr has a new --query option to check for the existence of an abbreviation. * Local values for fish_complete_path and fish_function_path are now ignored; only their global values are respected. * Syntax error reports now display a marker in the correct position (#5812). * Empty universal variables may now be exported (#5992). * Exported universal variables are no longer imported into the global scope, preventing shadowing. This makes it easier to change such variables for all fish sessions and avoids breakage when the value is a list of multiple elements (#5258). * A bug where for could use invalid variable names has been fixed (#5800). * A bug where local variables would not be exported to functions has been fixed (#6153). * The null command (:) now always exits successfully, rather than passing through the previous exit status (#6022). * The output of functions FUNCTION matches the declaration of the function, correctly including comments or blank lines (#5285), and correctly includes any --wraps flags (#1625). * type supports a new option, --short, which suppress function expansion (#6403). * type --path with a function argument will now output the path to the file containing the definition of that function, if it exists. * type --force-path with an argument that cannot be found now correctly outputs nothing, as documented (#6411). * The $hostname variable is no longer truncated to 32 characters (#5758). * Line numbers in function backtraces are calculated correctly (#6350). * A new fish_cancel event is emitted when the command line is cancelled, which is useful for terminal integration (#5973). Interactive improvements * New Base16 color options are available through the Web-based configuration (#6504). * fish only parses /etc/paths on macOS in login shells, matching the bash implementation (#5637) and avoiding changes to path ordering in child shells (#5456). It now ignores blank lines like the bash implementation (#5809). * The locale is now reloaded when the LOCPATH variable is changed (#5815). * read no longer keeps a history, making it suitable for operations that shouldn't end up there, like password entry (#5904). * dirh outputs its stack in the correct order (#5477), and behaves as documented when universal variables are used for its stack (#5797). * funced and the edit-commandline-in-buffer bindings did not work in fish 3.0 when the $EDITOR variable contained spaces; this has been corrected (#5625). * Builtins now pipe their help output to a pager automatically (#6227). * set_color now colors the --print-colors output in the matching colors if it is going to a terminal. * fish now underlines every valid entered path instead of just the last one (#5872). * When syntax highlighting a string with an unclosed quote, only the quote itself will be shown as an error, instead of the whole argument. * Syntax highlighting works correctly with variables as commands (#5658) and redirections to close file descriptors (#6092). * help works properly on Windows Subsytem for Linux (#5759, #6338). * A bug where disown could crash the shell has been fixed (#5720). * fish will not autosuggest files ending with ~ unless there are no other candidates, as these are generally backup files (#985). * Escape in the pager works correctly (#5818). * Key bindings that call fg no longer leave the terminal in a broken state (#2114). * Brackets (#5831) and filenames containing $ (#6060) are completed with appropriate escaping. * The output of complete and functions is now colorized in interactive terminals. * The Web-based configuration handles aliases that include single quotes correctly (#6120), and launches correctly under Termux (#6248) and OpenBSD (#6522). * function now correctly validates parameters for --argument-names as valid variable names (#6147) and correctly parses options following --argument-names, as in "--argument-names foo --description bar" (#6186). * History newly imported from bash includes command lines using && or ||. * The automatic generation of completions from manual pages is better described in job and process listings, and no longer produces a warning when exiting fish (#6269). * In private mode, setting $fish_greeting to an empty string before starting the private session will prevent the warning about history not being saved from being printed (#6299). * In the interactive editor, a line break (Enter) inside unclosed brackets will insert a new line, rather than executing the command and producing an error (#6316). * Ctrl-C always repaints the prompt (#6394). * When run interactively from another program (such as Python), fish will correctly start a new process group, like other shells (#5909). * Job identifiers (for example, for background jobs) are assigned more logically (#6053). * A bug where history would appear truncated if an empty command was executed was fixed (#6032). New or improved bindings * Pasting strips leading spaces to avoid pasted commands being omitted from the history (#4327). * Shift-Left and Shift-Right now default to moving backwards and forwards by one bigword (words separated by whitespace) (#1505). * The default escape delay (to differentiate between the escape key and an alt-combination) has been reduced to 30ms, down from 300ms for the default mode and 100ms for Vi mode (#3904). * The forward-bigword binding now interacts correctly with autosuggestions (#5336). * The fish_clipboard_* functions support Wayland by using [wl-clipboard](https://github.com/bugaevc/wl-clipboard) (#5450). * The nextd and prevd functions no longer print "Hit end of history", instead using a bell. They correctly store working directories containing symbolic links (#6395). * If a fish_mode_prompt function exists, Vi mode will only execute it on mode-switch instead of the entire prompt. This should make it much more responsive with slow prompts (#5783). * The path-component bindings (like Ctrl-w) now also stop at ":" and "@@", because those are used to denote user and host in commands such as ssh (#5841). * The NULL character can now be bound via bind -k nul. Terminals often generate this character via control-space. (#3189). * A new readline command expand-abbr can be used to trigger abbreviation expansion (#5762). * A new readline command, delete-or-exit, removes a character to the right of the cursor or exits the shell if the command line is empty (moving this functionality out of the delete-or-exit function). * The self-insert readline command will now insert the binding sequence, if not empty. * A new binding to prepend sudo, bound to Alt-S by default (#6140). * The Alt-W binding to describe a command should now work better with multiline prompts (#6110) * The Alt-H binding to open a command's man page now tries to ignore sudo (#6122). * A new pair of bind functions, history-prefix-search-backward (and forward), was introduced (#6143). * Vi mode now supports R to enter replace mode (#6342), and d0 to delete the current line (#6292). * In Vi mode, hitting Enter in replace-one mode no longer erases the prompt (#6298). * Selections in Vi mode are inclusive, matching the actual behaviour of Vi (#5770). Improved prompts * The Git prompt in informative mode now shows the number of stashes if enabled. * The Git prompt now has an option ($__fish_git_prompt_use_informative_chars) to use the (more modern) informative characters without enabling informative mode. * The default prompt now also features VCS integration and will color the host if running via SSH (#6375). * The default and example prompts print the pipe status if an earlier command in the pipe fails. * The default and example prompts try to resolve exit statuses to signal names when appropriate. Improved terminal output * New fish_pager_color_ options have been added to control more elements of the pager's colors (#5524). * Better detection and support for using fish from various system consoles, where limited colors and special characters are supported (#5552). * fish now tries to guess if the system supports Unicode 9 (and displays emoji as wide), eliminating the need to set $fish_emoji_width in most cases (#5722). * Improvements to the display of wide characters, particularly Korean characters and emoji (#5583, #5729). * The Vi mode cursor is correctly redrawn when regaining focus under terminals that report focus (eg tmux) (#4788). * Variables that control background colors (such as fish_pager_color_search_match) can now use --reverse. Completions * Added completions for * aws * bat (#6052) * bosh (#5700) * btrfs * camcontrol * cf (#5700) * chronyc (#6496) * code (#6205) * cryptsetup (#6488) * csc and csi (#6016) * cwebp (#6034) * cygpath and cygstart (#6239) * epkginfo (#5829) * ffmpeg, ffplay, and ffprobe (#5922) * fsharpc and fsharpi (#6016) * fzf (#6178) * g++ (#6217) * gpg1 (#6139) * gpg2 (#6062) * grub-mkrescue (#6182) * hledger (#6043) * hwinfo (#6496) * irb (#6260) * iw (#6232) * kak * keepassxc-cli (#6505) * keybase (#6410) * loginctl (#6501) * lz4, lz4c and lz4cat (#6364) * mariner (#5718) * nethack (#6240) * patool (#6083) * phpunit (#6197) * plutil (#6301) * pzstd (#6364) * qubes-gpg-client (#6067) * resolvectl (#6501) * rg * rustup * sfdx (#6149) * speedtest and speedtest-cli (#5840) * src (#6026) * tokei (#6085) * tsc (#6016) * unlz4 (#6364) * unzstd (#6364) * vbc (#6016) * zpaq (#6245) * zstd, zstdcat, zstdgrep, zstdless and zstdmt (#6364) * Lots of improvements to completions. * Selecting short options which also have a long name from the completion pager is possible (#5634). * Tab completion will no longer add trailing spaces if they already exist (#6107). * Completion of subcommands to builtins like and or not now works correctly (#6249). * Completion of arguments to short options works correctly when multiple short options are used together (#332). * Activating completion in the middle of an invalid completion does not move the cursor any more, making it easier to fix a mistake (#4124). * Completion in empty commandlines now lists all available commands. * Functions listed as completions could previously leak parts of the function as other completions; this has been fixed. Deprecations and removed features * The vcs-prompt functions have been promoted to names without double-underscore, so __fish_git_prompt is now fish_git_prompt, __fish_vcs_prompt is now fish_vcs_prompt, __fish_hg_prompt is now fish_hg_prompt and __fish_svn_prompt is now fish_svn_prompt. Shims at the old names have been added, and the variables have kept their old names (#5586). * string replace has an additional round of escaping in the replacement expression, so escaping backslashes requires many escapes (eg string replace -ra '([ab])' '\\\\\\\$1' a). The new feature flag regex-easyesc can be used to disable this, so that the same effect can be achieved with string replace -ra '([ab])' '\\\\$1' a (#5556). As a reminder, the intention behind feature flags is that this will eventually become the default and then only option, so scripts should be updated. * The fish_vi_mode function, deprecated in fish 2.3, has been removed. Use fish_vi_key_bindings instead (#6372). For distributors and developers * fish 3.0 introduced a CMake-based build system. In fish 3.1, both the Autotools-based build and legacy Xcode build system have been removed, leaving only the CMake build system. All distributors and developers must install CMake. * fish now depends on the common tee external command, for the psub process substitution function. * The documentation is now built with Sphinx. The old Doxygen-based documentation system has been removed. Developers, and distributors who wish to rebuild the documentation, must install Sphinx. * The INTERNAL_WCWIDTH build option has been removed, as fish now always uses an internal wcwidth function. It has a number of configuration options that make it more suitable for general use (#5777). * mandoc can now be used to format the output from --help if nroff is not installed, reducing the number of external dependencies on systems with mandoc installed (#5489). * Some bugs preventing building on Solaris-derived systems such as Illumos were fixed (#5458, #5461, #5611). * Completions for npm, bower and yarn no longer require the jq utility for full functionality, but will use Python instead if it is available. * The paths for completions, functions and configuration snippets have been extended. On systems that define XDG_DATA_DIRS, each of the directories in this variable are searched in the subdirectories fish/vendor_completions.d, fish/vendor_functions.d, and fish/vendor_conf.d respectively. On systems that do not define this variable in the environment, the vendor directories are searched for in both the installation prefix and the default "extra" directory, which now defaults to /usr/local (#5029). @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @fish: update to 3.0.0 Add a "doc" option, default on, to avoid a doxygen dependency. requested by martin & also in PR pkg/53934. # fish 3.0.0 (released December 28, 2018) fish 3 is a major release, which introduces some breaking changes alongside improved functionality. Although most existing scripts will continue to work, they should be reviewed against the list contained in the 3.0b1 release notes below. Compared to the beta release of fish 3.0b1, fish version 3.0.0: - builds correctly against musl libc (#5407) - handles huge numeric arguments to `test` correctly (#5414) - removes the history colouring introduced in 3.0b1, which did not always work correctly There is one significant known issue which was not able to be corrected before the release: - fish 3.0.0 builds on Cygwin (#5423), but does not run correctly (#5426) and will result in a hanging terminal when started. Cygwin users are encouraged to continue using 2.7.1 until a release which corrects this is available. If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0b1 (included below). --- # fish 3.0b1 (released December 11, 2018) fish 3 is a major release, which introduces some breaking changes alongside improved functionality. Although most existing scripts will continue to work, they should be reviewed against the list below. ## Notable non-backward compatible changes - Process and job expansion has largely been removed. `%` will no longer perform these expansions, except for `%self` for the PID of the current shell. Additionally, job management commands (`disown`, `wait`, `bg`, `fg` and `kill`) will expand job specifiers starting with `%` (#4230, #1202). - `set x[1] x[2] a b`, to set multiple elements of an array at once, is no longer valid syntax (#4236). - A literal `{}` now expands to itself, rather than nothing. This makes working with `find -exec` easier (#1109, #4632). - Literally accessing a zero-index is now illegal syntax and is caught by the parser (#4862). (fish indices start at 1) - Successive commas in brace expansions are handled in less surprising manner. For example, `{,,,}` expands to four empty strings rather than an empty string, a comma and an empty string again (#3002, #4632). - `for` loop control variables are no longer local to the `for` block (#1935). - Variables set in `if` and `while` conditions are available outside the block (#4820). - Local exported (`set -lx`) vars are now visible to functions (#1091). - The new `math` builtin (see below) does not support logical expressions; `test` should be used instead (#4777). - Range expansion will now behave sensibly when given a single positive and negative index (`$foo[5..-1]` or `$foo[-1..5]`), clamping to the last valid index without changing direction if the list has fewer elements than expected. - `read` now uses `-s` as short for `--silent` (à la `bash`); `--shell`'s abbreviation (formerly `-s`) is now `-S` instead (#4490). - `cd` no longer resolves symlinks. fish now maintains a virtual path, matching other shells (#3350). - `source` now requires an explicit `-` as the filename to read from the terminal (#2633). - Arguments to `end` are now errors, instead of being silently ignored. - The names `argparse`, `read`, `set`, `status`, `test` and `[` are now reserved and not allowed as function names. This prevents users unintentionally breaking stuff (#3000). - The `fish_user_abbreviations` variable is no longer used; abbreviations will be migrated to the new storage format automatically. - The `FISH_READ_BYTE_LIMIT` variable is now called `fish_byte_limit` (#4414). - Environment variables are no longer split into arrays based on the record separator character on startup. Instead, variables are not split, unless their name ends in PATH, in which case they are split on colons (#436). - The `history` builtin's `--with-time` option has been removed; this has been deprecated in favor of `--show-time` since 2.7.0 (#4403). - The internal variables `__fish_datadir` and `__fish_sysconfdir` are now known as `__fish_data_dir` and `__fish_sysconf_dir` respectively. ## Deprecations With the release of fish 3, a number of features have been marked for removal in the future. All users are encouraged to explore alternatives. A small number of these features are currently behind feature flags, which are turned on at present but may be turned off by default in the future. A new feature flags mechanism is added for staging deprecations and breaking changes. Feature flags may be specified at launch with `fish --features ...` or by setting the universal `fish_features` variable. (#4940) - The use of the `IFS` variable for `read` is deprecated; `IFS` will be ignored in the future (#4156). Use the `read --delimiter` option instead. - The `function --on-process-exit` switch will be removed in future (#4700). Use the `fish_exit` event instead: `function --on-event fish_exit`. - `$_` is deprecated and will removed in the future (#813). Use `status current-command` in a command substitution instead. - `^` as a redirection deprecated and will be removed in the future. (#4394). Use `2>` to redirect stderr. This is controlled by the `stderr-nocaret` feature flag. - `?` as a glob (wildcard) is deprecated and will be removed in the future (#4520). This is controlled by the `qmark-noglob` feature flag. ## Notable fixes and improvements ### Syntax changes and new commands - fish now supports `&&` (like `and`), `||` (like `or`), and `!` (like `not`), for better migration from POSIX-compliant shells (#4620). - Variables may be used as commands (#154). - fish may be started in private mode via `fish --private`. Private mode fish sessions do not have access to the history file and any commands evaluated in private mode are not persisted for future sessions. A session variable `$fish_private_mode` can be queried to detect private mode and adjust the behavior of scripts accordingly to respect the user's wish for privacy. - A new `wait` command for waiting on backgrounded processes (#4498). - `math` is now a builtin rather than a wrapper around `bc` (#3157). Floating point computations is now used by default, and can be controlled with the new `--scale` option (#4478). - Setting `$PATH` no longer warns on non-existent directories, allowing for a single $PATH to be shared across machines (eg via dotfiles) (#2969). - `while` sets `$status` to a non-zero value if the loop is not executed (#4982). - Command substitution output is now limited to 10 MB by default, controlled by the `fish_read_limit` variable (#3822). Notably, this is larger than most operating systems' argument size limit, so trying to pass argument lists this size to external commands has never worked. - The machine hostname, where available, is now exposed as the `$hostname` reserved variable. This removes the dependency on the `hostname` executable (#4422). - Bare `bind` invocations in config.fish now work. The `fish_user_key_bindings` function is no longer necessary, but will still be executed if it exists (#5191). - `$fish_pid` and `$last_pid` are available as replacements for `%self` and `%last`. ### New features in commands - `alias` has a new `--save` option to save the generated function immediately (#4878). - `bind` has a new `--silent` option to ignore bind requests for named keys not available under the current terminal (#4188, #4431). - `complete` has a new `--keep-order` option to show the provided or dynamically-generated argument list in the same order as specified, rather than alphabetically (#361). - `exec` prompts for confirmation if background jobs are running. - `funced` has a new `--save` option to automatically save the edited function after successfully editing (#4668). - `functions` has a new ` --handlers` option to show functions registered as event handlers (#4694). - `history search` supports globs for wildcard searching (#3136) and has a new `--reverse` option to show entries from oldest to newest (#4375). - `jobs` has a new `--quiet` option to silence the output. - `read` has a new `--delimiter` option for splitting input into arrays (#4256). - `read` writes directly to stdout if called without arguments (#4407). - `read` can now read individual lines into separate variables without consuming the input in its entirety via the new `/--line` option. - `set` has new `--append` and `--prepend` options (#1326). - `set` has a new `--show` option to show lots of information about variables (#4265). - `string match` with an empty pattern and `--entire` in glob mode now matches everything instead of nothing (#4971). - `string split` supports a new `--no-empty` option to exclude empty strings from the result (#4779). - `string` has new subcommands `split0` and `join0` for working with NUL-delimited output. - `string` no longer stops processing text after NUL characters (#4605) - `string escape` has a new `--style regex` option for escaping strings to be matched literally in `string` regex operations. - `test` now supports floating point values in numeric comparisons. ### Interactive improvements - A pipe at the end of a line now allows the job to continue on the next line (#1285). - Italics and dim support out of the box on macOS for Terminal.app and iTerm (#4436). - `cd` tab completions no longer descend into the deepest unambiguous path (#4649). - Pager navigation has been improved. Most notably, moving down now wraps around, moving up from the commandline now jumps to the last element and moving right and left now reverse each other even when wrapping around (#4680). - Typing normal characters while the completion pager is active no longer shows the search field. Instead it enters them into the command line, and ends paging (#2249). - A new input binding `pager-toggle-search` toggles the search field in the completions pager on and off. By default, this is bound to Ctrl-S. - Searching in the pager now does a full fuzzy search (#5213). - The pager will now show the full command instead of just its last line if the number of completions is large (#4702). - Abbreviations can be tab-completed (#3233). - Tildes in file names are now properly escaped in completions (#2274). - Wrapping completions (from `complete --wraps` or `function --wraps`) can now inject arguments. For example, `complete gco --wraps 'git checkout'` now works properly (#1976). The `alias` function has been updated to respect this behavior. - Path completions now support expansions, meaning expressions like `python ~/` now provides file suggestions just like any other relative or absolute path. (This includes support for other expansions, too.) - Autosuggestions try to avoid arguments that are already present in the command line. - Notifications about crashed processes are now always shown, even in command substitutions (#4962). - The screen is no longer reset after a BEL, fixing graphical glitches (#3693). - vi-mode now supports ';' and ',' motions. This introduces new {forward,backward}-jump-till and repeat-jump{,-reverse} bind functions (#5140). - The `*y` vi-mode binding now works (#5100). - True color is now enabled in neovim by default (#2792). - Terminal size variables (`$COLUMNS`/`$LINES`) are now updated before `fish_prompt` is called, allowing the prompt to react (#904). - Multi-line prompts no longer repeat when the terminal is resized (#2320). - `xclip` support has been added to the clipboard integration (#5020). - The Alt-P keybinding paginates the last command if the command line is empty. - `$cmd_duration` is no longer reset when no command is executed (#5011). - Deleting a one-character word no longer erases the next word as well (#4747). - Token history search (Alt-Up) omits duplicate entries (#4795). - The `fish_escape_delay_ms` timeout, allowing the use of the escape key both on its own and as part of a control sequence, was applied to all control characters; this has been reduced to just the escape key. - Completing a function shows the description properly (#5206). - Added completions for - `ansible`, including `ansible-galaxy`, `ansible-playbook` and `ansible-vault` (#4697) - `bb-power` (#4800) - `bd` (#4472) - `bower` - `clang` and `clang++` (#4174) - `conda` (#4837) - `configure` (for autoconf-generated files only) - `curl` - `doas` (#5196) - `ebuild` (#4911) - `emaint` (#4758) - `eopkg` (#4600) - `exercism` (#4495) - `hjson` - `hugo` (#4529) - `j` (from autojump #4344) - `jbake` (#4814) - `jhipster` (#4472) - `kitty` - `kldload` - `kldunload` - `makensis` (#5242) - `meson` - `mkdocs` (#4906) - `ngrok` (#4642) - OpenBSD's `pkg_add`, `pkg_delete`, `pkg_info`, `pfctl`, `rcctl`, `signify`, and `vmctl` (#4584) - `openocd` - `optipng` - `opkg` (#5168) - `pandoc` (#2937) - `port` (#4737) - `powerpill` (#4800) - `pstack` (#5135) - `serve` (#5026) - `ttx` - `unzip` - `virsh` (#5113) - `xclip` (#5126) - `xsv` - `zfs` and `zpool` (#4608) - Lots of improvements to completions (especially `darcs` (#5112), `git`, `hg` and `sudo`). - Completions for `yarn` and `npm` now require the `all-the-package-names` NPM package for full functionality. - Completions for `bower` and `yarn` now require the `jq` utility for full functionality. - Improved French translations. ### Other fixes and improvements - Significant performance improvements to `abbr` (#4048), setting variables (#4200, #4341), executing functions, globs (#4579), `string` reading from standard input (#4610), and slicing history (in particular, `$history[1]` for the last executed command). - Fish's internal wcwidth function has been updated to deal with newer Unicode, and the width of some characters can be configured via the `fish_ambiguous_width` (#5149) and `fish_emoji_width` (#2652) variables. Alternatively, a new build-time option INTERNAL_WCWIDTH can be used to use the system's wcwidth instead (#4816). - `functions` correctly supports `-d` as the short form of `--description`. (#5105) - `/etc/paths` is now parsed like macOS' bash `path_helper`, fixing $PATH order (#4336, #4852) on macOS. - Using a read-only variable in a `for` loop produces an error, rather than silently producing incorrect results (#4342). - The universal variables filename no longer contains the hostname or MAC address. It is now at the fixed location `.config/fish/fish_variables` (#1912). - Exported variables in the global or universal scope no longer have their exported status affected by local variables (#2611). - Major rework of terminal and job handling to eliminate bugs (#3805, #3952, #4178, #4235, #4238, #4540, #4929, #5210). - Improvements to the manual page completion generator (#2937, #4313). - `suspend --force` now works correctly (#4672). - Pressing Ctrl-C while running a script now reliably terminates fish (#5253). ### For distributors and developers - fish ships with a new build system based on CMake. CMake 3.2 is the minimum required version. Although the autotools-based Makefile and the Xcode project are still shipped with this release, they will be removed in the near future. All distributors and developers are encouraged to migrate to the CMake build. - Build scripts for most platforms no longer require bash, using the standard sh instead. - The `hostname` command is no longer required for fish to operate. @ text @d1 1 a1 1 $NetBSD: patch-src_fallback.cpp,v 1.1 2017/10/24 03:51:41 maya Exp $ d5 1 a5 1 --- src/fallback.cpp.orig 2018-12-28 13:01:03.000000000 +0000 d7 2 a8 2 @@@@ -46,7 +46,7 @@@@ #ifdef TPARM_SOLARIS_KLUDGE d11 2 a12 1 -char *tparm_solaris_kludge(char *str, long p1, long p2, long p3, long p4, d14 1 a14 1 long p5, long p6, long p7, long p8, long p9) { d17 1 @ 1.1 log @fish: add patches from pkgsrc-wip reported to fix build with clang force ncurses because auto-completion is broken with netbsd curses. bump pkgrevision @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 1 --- src/fallback.cpp.orig 2017-06-03 12:45:13.000000000 +0000 d8 1 d11 5 a15 6 /// Checks for known string values and maps to correct number of parameters. -char *tparm_solaris_kludge(char *str, ...) { +char *tparm_solaris_kludge(const char *str, ...) { long int param[9] = {}; va_list ap; @ 1.1.2.1 log @file patch-src_fallback.cpp was added on branch pkgsrc-2017Q3 on 2017-10-28 18:56:04 +0000 @ text @d1 13 @ 1.1.2.2 log @Pullup ticket #5588 - requested by maya shells/fish: build fix Revisions pulled up: - shells/fish/Makefile 1.12 - shells/fish/distinfo 1.9 - shells/fish/patches/patch-configure.ac 1.1 - shells/fish/patches/patch-src_fallback.cpp 1.1 - shells/fish/patches/patch-src_fallback.h 1.1 - shells/fish/patches/patch-src_output.cpp 1.1 - shells/fish/patches/patch-src_output.h 1.1 - shells/fish/patches/patch-src_screen.cpp 1.1 ------------------------------------------------------------------- Module Name: pkgsrc Committed By: maya Date: Tue Oct 24 03:51:41 UTC 2017 Modified Files: pkgsrc/shells/fish: Makefile distinfo Added Files: pkgsrc/shells/fish/patches: patch-configure.ac patch-src_fallback.cpp patch-src_fallback.h patch-src_output.cpp patch-src_output.h patch-src_screen.cpp Log Message: fish: add patches from pkgsrc-wip reported to fix build with clang force ncurses because auto-completion is broken with netbsd curses. bump pkgrevision To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 pkgsrc/shells/fish/Makefile cvs rdiff -u -r1.8 -r1.9 pkgsrc/shells/fish/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/shells/fish/patches/patch-configure.ac \ pkgsrc/shells/fish/patches/patch-src_fallback.cpp \ pkgsrc/shells/fish/patches/patch-src_fallback.h \ pkgsrc/shells/fish/patches/patch-src_output.cpp \ pkgsrc/shells/fish/patches/patch-src_output.h \ pkgsrc/shells/fish/patches/patch-src_screen.cpp @ text @a0 13 $NetBSD$ --- src/fallback.cpp.orig 2017-06-03 12:45:13.000000000 +0000 +++ src/fallback.cpp @@@@ -46,7 +46,7 @@@@ #undef tparm /// Checks for known string values and maps to correct number of parameters. -char *tparm_solaris_kludge(char *str, ...) { +char *tparm_solaris_kludge(const char *str, ...) { long int param[9] = {}; va_list ap; @