The user-friendly command line shell.
This release of fish fixes the following problems identified in fish 3.7.0:
history delete
works again (#10190).*
) will no longer sometimes generate paths that did not exist (#10205).This release also contains some improvements:
funced
will now always source
the file after it has written it, even if the contents did not change. This prevents issues if the file was otherwise modified (#10318).Download links: To download the source code for fish, we suggest the file named "fish-3.7.1.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is 614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.7.1.tar.xz.asc".
This release of fish includes a number of improvements over fish 3.6.4, detailed below. Although work continues on the porting of fish internals to the Rust programming language, that work is not included in this release. fish 3.7.0 and any future releases in the 3.7 series remain C++ programs.
git log 3.6.1..Integration_3.7.0
by searching for gitInt
.↑
and then later decide to switch to the full pager.kj
to switching modes in vi mode possible.
The timeout can be set via the new fish_sequence_key_delay_ms
variable (#7401), and may be set by default in future versions.LS_COLORS
is no longer set automatically by the ls
function (#10080). Users
that set .dircolors
should manually import it using other means. Typically this would be set -gx LS_COLORS (dircolors -c .dircolors | string split ' ')[3]
exit
with a negative number no longer crashes fish (#9659).fish --command
will now return a non-zero status if parsing failed (#9888).jobs
builtin will now escape the commands it prints (#9808).string repeat
no longer overflows if the count is a multiple of the chunk size (#9900).builtin
builtin will now properly error out with invalid arguments instead of doing nothing and returning true (#9942).command time
in a pipeline is allowed again, as is command and
and command or
(#9985).exec
will now also apply variable overrides, so FOO=bar exec
will now set $FOO
correctly (#9995).umask
will now handle empty symbolic modes correctly, like umask u=,g=rwx,o=
(#10177).read
no longer enables bracketed paste so it doesn’t stay enabled in combined commandlines like mysql -p(read --silent)
(#8285).fish_cursor_external
to set the cursor shape for external commands (#4656).fish_color_selection
for the foreground and background colors, as intended, rather than just the background (#9717).history delete
interface now allows specifying index ranges like “1..5” (#9736), and history delete --exact
now properly saves the history (#10066).manpath
on macOS, instead of a potential Homebrew version. This prevents awkward error messages (#9817).history-pager-delete
, bound to Shift
+ Delete
by default, will delete the currently-selected history pager item from history (#9454).fish_key_reader
will now use printable characters as-is, so pressing “ö” no longer leads to it telling you to bind \\u00F6
(#9986).open
can be used to launch terminal programs again, as an xdg-open
bug has been fixed and a workaround has been removed (#10045).repaint-mode
binding will now only move the cursor if there is repainting to be done. This fixes Alt
combination bindings in vi mode (#7910).clear-screen
bind function is used for Ctrl
+ l
by default. This clears the screen and repaints the existing prompt at first,
so it eliminates visible flicker unless the terminal is very slow (#10044).alias
convenience function has better support for commands with unusual characters, like +
(#8720).Alt
+ l
binding, which lists the directory of the token under the cursor, correctly expands tilde (~
) to the home directory (#9954).PAGER
environment variable is not set, or write the output to the screen without a pager if there is not one available (#10074).git add
for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (#3707).fish_config
to re-apply it to pick up the changes.fish_vcs_prompt
now also supports fossil (#9497).prompt_pwd
function correctly display directories beginning with dashes (#10169).age
and age-keygen
(#9813)airmon-ng
(#10116)ar
(#9720)blender
(#9905)bws
(#10165)calendar
(#10138)checkinstall
(#10106)crc
(#10034)doctl
gimp
(#9904)gojq
(#9740)horcrux
(#9922)ibmcloud
(#10004)iwctl
(#6884)java_home
(#9998)krita
(#9903)oc
(#10034)qjs
(#9723)qjsc
(#9731)rename
(#10136)rpm-ostool
(#9669)smerge
(#10135)userdel
(#10056)watchexec
(#10027)wpctl
(#10043)xxd
(#10137)zabbix
(#9647)zfs
completions no longer print errors about setting a read-only variable (#9705).kitty
completions have been removed in favor of keeping them upstream (#9750).git
completions now support aliases that reference other aliases (#9992).gw
and gradlew
completions are loaded properly (#10127).Download links: To download the source code for fish, we suggest the file named "fish-3.7.0.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is df1b7378b714f0690b285ed9e4e58afe270ac98dbc9ca5839589c1afcca33ab1
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.7.0.tar.xz.asc".
This release contains a complete fix for the test suite failure in fish 3.6.2 and 3.6.3.
Download links: To download the source code for fish, we suggest the file named "fish-3.6.4.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is 0f3f610e580de092fbe882c8aa76623ecf91bb16fdf0543241e6e90d5d4bc393
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.6.4.tar.xz.asc".
This release contains a fix for a test suite failure in fish 3.6.2.
Download links: To download the source code for fish, we suggest the file named "fish-3.6.3.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is 55520128c8ef515908a3821423b430db9258527a6c6acb61c7cb95626b5a48d5
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.6.3.tar.xz.asc".
(Please note: this release builds and runs successfully, but the test suite does not pass. A new version will be released shortly.)
This release of fish contains a security fix for CVE-2023-49284, a minor security problem identified in fish 3.6.1 and previous versions (thought to affect all released versions of fish).
fish uses certain Unicode non-characters internally for marking wildcards and expansions. It incorrectly allowed these markers to be read on command substitution output, rather than transforming them into a safe internal representation.
For example, echo \UFDD2HOME
has the same output as echo $HOME
.
While this may cause unexpected behavior with direct input, this may become a minor security problem if the output is being fed from an external program into a command substitution where this output may not be expected.
Download links: To download the source code for fish, we suggest the file named "fish-3.6.2.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is a21a6c986f1f80273895ba7e905fa80ad7e1a262ddb3d979efa443367eaf4863
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.6.2.tar.xz.asc".
This release of fish contains a number of fixes for problems identified in fish 3.6.0, as well as some enhancements.
abbr --erase
now also erases the universal variables used by the old abbr function. That means abbr --erase (abbr --list)
can now be used to clean out all old abbreviations (#9468).
abbr --add --universal
now warns about --universal
being non-functional, to make it easier to detect old-style abbr
calls (#9475).abbr --list
no longer escapes the abbr name, which is necessary to be able to pass it to abbr --erase
(#9470).read
will now print an error if told to set a read-only variable, instead of silently doing nothing (#9346).set_color -v
no longer crashes fish (#9640).fish_vi_key_bindings
in combination with fish’s --no-config
mode works without locking up the shell (#9443).--help
on builtins now respects the $MANPAGER
variable, in preference to $PAGER
(#9488).Control-G
closes the history pager, like other shells (#9484).:
, [
and .
builtin commands can now be looked up with man
(#9552).Alt-S
binding will now also use please
if available (#9635).read
in fish_greeting
or similar functions will not trigger an infinite loop (#9564).__fish_complete_suffix
are now offered in the correct order, fixing a regression in 3.6.0 (#8924).git
completions for git-foo
-style commands was restored, fixing a regression in 3.6.0 (#9457).../
and ./
again, fixing a regression in 3.6.0 (#9477).__fish_complete_path
matches standard path completions (#9285).Download links: To download the source code for fish, we suggest the file named "fish-3.6.1.tar.xz". The file downloaded from "Source code (tar.gz)" may not build correctly. The SHA-256 sum of this file is 55402bb47ca6739d8aba25e41780905b5ce1bce0a5e0dd17dca908b5bc0b49b2
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.6.1.tar.xz.asc".
Control-R
now opens the command history in the pager (#602). This is fully searchable and syntax-highlighted, as an alternative to the incremental search seen in other shells. The new special input function history-pager
has been added for custom bindings.For example:
function multicd
echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../)
end
abbr --add dotdot --regex '^\.\.+$' --function multicd
This expands ..
to cd ../
, ...
to cd ../../
and ....
to cd ../../../
and so on.
Or:
function last_history_item; echo $history[1]; end
abbr -a !! --position anywhere --function last_history_item
which expands !!
to the last history item, anywhere on the command line, mimicking other shells’ history expansion.
See the documentation for more.
path
gained a new mtime
subcommand to print the modification time stamp for files. For example, this can be used to handle cache file ages (#9057):> touch foo
> sleep 10
> path mtime --relative foo
10
string
gained a new shorten
subcommand to shorten strings to a given visible width (#9156):> string shorten --max 10 "Hello this is a long string"
Hello thi…
test
(aka [
) gained -ot
(older than) and -nt
(newer than) operators to compare file modification times, and -ef
to compare whether the arguments are the same file (#3589).^
) at the beginning (#9130). For example:checks/set.fish (line 471): for: a,b: invalid variable name. See `help identifiers`
for a,b in y 1 z 3
^~^
fish_delta
, shows changes that have been made in fish’s configuration from the defaults (#9255).set --erase
can now be used with multiple scopes at once, like set -efglU foo
(#7711, #9280).status
gained a new subcommand, current-commandline
, which retrieves the entirety of the currently-executing command line when called from a function during execution. This allows easier job introspection (#8905, #9296).\\x
and \\X
escape syntax is now equivalent. \\xAB
previously behaved the same as \\XAB
, except that it would error if the value “AB” was larger than “7f” (127 in decimal, the highest ASCII value) (#9247, #9245, #1352).fish_git_prompt
will now only turn on features if the appropriate variable has been set to a true value (of “1”, “yes” or “true”) instead of just checking if it is defined. This allows specifically turning features off without having to erase variables, such as via universal variables. If you have defined a variable to a different value and expect it to count as true, you need to change it (#9274).
For example, set -g __fish_git_prompt_show_informative_status 0
previously would have enabled informative status (because any value would have done so), but now it turns it off.config.fish
.-r
for abbreviations has changed from rename
to regex
, for consistency with string
.argparse
can now be used without option specifications, to allow using --min-args
, --max-args
or for commands that take no options (but might in future) (#9006):function my_copy
argparse --min-args 2 -- $argv
or return
cp $argv
end
set --show
now shows when a variable was inherited from fish’s parent process, which should help with debugging (#9029):> set --show XDG_DATA_DIRS
$XDG_DATA_DIRS: set in global scope, exported, a path variable with 4 elements
$XDG_DATA_DIRS[1]: |/home/alfa/.local/share/flatpak/exports/share|
$XDG_DATA_DIRS[2]: |/var/lib/flatpak/exports/share|
$XDG_DATA_DIRS[3]: |/usr/local/share|
$XDG_DATA_DIRS[4]: |/usr/share|
$XDG_DATA_DIRS: originally inherited as |/home/alfa/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/|
fish_read_limit
is unset (#9129).math
produces an error for division-by-zero, as well as augmenting some errors with their extent (#9190). This changes behavior in some limited cases, such as:math min 1 / 0, 5
which would previously print “5” (because in floating point division “1 / 0” yields infinite, and 5 is smaller than infinite) but will now return an error.
fish_clipboard_copy
and fish_clipboard_paste
can now be used in pipes (#9271):git rev-list 3.5.1 | fish_clipboard_copy
fish_clipboard_paste | string join + | math
status fish-path
returns a fully-normalised path, particularly noticeable on NetBSD (#9085).TERM
can’t be found, fish now tries using the “xterm-256color” and “xterm” definitions before “ansi” and “dumb”. As the majority of terminal emulators in common use are now more or less xterm-compatible (often even explicitly claiming the xterm-256color entry), this should often result in a fully or almost fully usable terminal (#9026).fish_cursor_selection_mode
, can be used to configure whether the command line selection includes the character under the cursor (inclusive
) or not (exclusive
). The new default is exclusive
; use set fish_cursor_selection_mode inclusive
to get the previous behavior back (#7762).complete-and-search
binding, used with Shift-Tab
by default, selects the first item in the results immediately (#9080).bind
output is now syntax-highlighted when used interacively.Alt-H
(the default __fish_man_page binding
) does a better job of showing the manual page of the command under cursor (#9020).fish_color_valid_path
contains an actual color instead of just modifiers, those will be used for valid paths even if the underlying color isn’t “normal” (#9159).Control-Backslash
(\\x1c
), can now be sused as a binding (#9234).Control-X
now copies to the local client system’s clipboard if the terminal supports OSC 52.commandline
gained two new options, --selection-start
and --selection-end
, to set the start/end of the current selection (#9197, #9215).Control-C
) correctly (#9266).ark
asciinema
(#9257)clojure
(#9272)csh
direnv
(#9268)dive
(#9082)dolphin
dua
(#9277)efivar
(#9318)eg
es
(#9388)firefox-developer-edition
and firefox
(#9090)fortune
(#9177)kb
kind
(#9110)konsole
ksh
loadkeys
(#9312)okular
op
(#9300)ouch
(#9405)pix
readelf
(#8746, #9386)qshell
rc
sad
(#9145)tcsh
toot
tox
(#9078)wish
xed
xonsh
(#9389)xplayer
xreader
xviewer
yash
(#9391)zig
(#9083)cd
completion much faster (#9220).~
) works properly even when the file name contains an escaped character (#9073).PATH
(#9133).help
on WSL now uses PowerShell to open the browser if available, removing some awkward UNC path errors (#9119).#
(#9199).string
is now faster when reading large strings from stdin (#9139).string repeat
uses less memory and is faster. (#9124)\*
will no longer fail to return some files, as large file support has been enabled.process-exit
and job-exit
events are now generated for all background jobs, including those launched from event handlers (#9096).prompt_pwd
no longer accidentally overwrites a global or universal $fish_prompt_pwd_full_dirs
when called with the -d
or --full-length-dirs
option (#9123).fish_config prompt save disco
again.$0
(#9143).printf
no longer tries to interpret the first argument as an option (#9132).read
in scripts will now have the correct keybindings again (#9227).printf
now properly fills extra %d
specifiers with 0 even on macOS and BSD (#9321).fish_key_reader
now correctly exits when receiving a SIGHUP (like after closing the terminal) (#9309).fish_config theme save
now works as documented instead of erroring out (#9088, #9273).fish_git_prompt
now quietly fails on macOS if the xcrun cache is not yet populated (#6625), working around a potential hang.Download links: To download the source code for fish, we suggest the file named "fish-3.6.0.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is 97044d57773ee7ca15634f693d917ed1c3dc0fa7fde1017f1626d60b83ea6181
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.6.0.tar.xz.asc".
This release of fish introduces the following small enhancements:
printf
returns a better error when used with arguments interpreted as octal numbers (#9035).history merge
when in private mode is now an error, rather than wiping out other sessions’ history (#9050).This release also fixes a number of problems identified in fish 3.5.0.
git blame
or git -C
works correctly (#9053).CSI u
sequence for Shift-Space
, fish inserts a space instead of printing an error. (#9054).status fish-path
on Linux-based platforms could print the path with a ” (deleted)” suffix (such as /usr/bin/fish (deleted)
), which is now removed (#9019).--init-command
option) with Control-C
no longer prevents configuration scripts from running (#9024).and
/or
conditionals, no longer crashes (#9051).Download links: To download the source code for fish, we suggest the file named "fish-3.5.1.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is a6d45b3dc5a45dd31772e7f8dfdfecabc063986e8f67d60bd7ca60cc81db6928
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.5.1.tar.xz.asc".
path
builtin command to filter and transform paths (#7659, #8958). For example, to list all the separate extensions used on files in /usr/share/man (after removing one extension, commonly a “.gz”):path filter -f /usr/share/man/** | path change-extension '' | path extension | path sort -u
complete
) now expands wildcards instead of invoking completions, if there is a wildcard in the path component under the cursor (#954, #8593).function --on-signal
or with trap
(#6649).stderr-nocaret
feature flag, introduced in fish 3.0 and enabled by default in fish 3.1, has been made read-only.
That means it is no longer possible to disable it, and code supporting the ^
redirection has been removed (#8857, #8865).To recap: fish used to support ^
to redirect stderr, so you could use commands like:
test "$foo" -gt 8 ^/dev/null
to ignore error messages. This made the ^
symbol require escaping and quoting, and was a bit of a weird shortcut considering 2>
already worked, which is only one character longer.
So the above can simply become:
test "$foo" -gt 8 2>/dev/null
regex-easyesc
, which makes string replace -r
not do a superfluous round of unescaping in the replacement expression.
That means e.g. to escape any “a” or “b” in an argument you can use string replace -ra '([ab])' '\\\\\\\\$1' foobar
instead of needing 8 backslashes.This only affects the replacement expression, not the match expression (the '([ab])'
part in the example).
A survey of plugins on GitHub did not turn up any affected code, so we do not expect this to affect many users.
This flag was introduced in fish 3.1.
* ampersand-nobg-in-token
, which means that &
will not create a background job if it occurs in the middle of a word. For example, echo foo&bar
will print “foo&bar” instead of running echo foo
in the background and then starting bar
as a second job.
Reformatting with fish_indent
would already introduce spaces, turning echo foo&bar
into echo foo & bar
.
This flag was introduced in fish 3.4.
To turn off these flags, add no-regex-easyesc
or no-ampersand-nobg-in-token
to `fish_features`` and restart fish:
set -Ua fish_features no-regex-easyesc
Like stderr-nocaret
, they will eventually be made read-only.
string
subcommands no longer append a newline to their input if the input didn’t have one (#8473, #3847)string length --visible
or to figure out how wide the prompt is) no longer has special support for non-standard color sequences like from Data General terminals, e.g. the Data General Dasher D220 from 1984. This removes a bunch of work in the common case, allowing string length --visible
to be much faster with unknown escape sequences. We don’t expect anyone to have ever used fish with such a terminal (#8769).set -g fish_color_command blue
set -g fish_color_keyword
would previously make keywords “normal” (usually white in a dark terminal). Now it’ll make them blue. To achieve the previous behavior, use the normal color explicitly: set -g fish_color_keyword normal
.
This makes it easier to make self-contained color schemes that don’t accidentally use color that was set before.
fish_config
has been adjusted to set known color variables that a theme doesn’t explicitly set to empty.
eval
is now a reserved keyword, so it can’t be used as a function name. This follows set
and read
, and is necessary because it can’t be cleanly shadowed by a function - at the very least eval set -l argv foo
breaks. Fish will ignore autoload files for it, so left over eval.fish
from previous fish versions won’t be loaded.__fish_git_prompt_showuntrackedfiles
or set the git config value “bash.showuntrackedfiles” to true
explicitly (which can be done for individual repositories). The “informative+vcs” sample prompt already skipped display of untracked files, but didn’t do so in a way that skipped the computation, so it should be quite a bit faster in many cases (#8980).__terlar_git_prompt
function, used by the “Terlar” sample prompt, has been rebuilt as a configuration of the normal fish_git_prompt
to ease maintenance, improve performance and add features (like reading per-repo git configuration). Some slight changes remain; users who absolutely must have the same behavior are encouraged to copy the old function (#9011, #7918, #8979).echo "$var$(echo x)"
) no longer affect the variable expansion (#8849).echo \\$(echo)
). This regressed in version 3.4.0.math
can now handle underscores (_
) as visual separators in numbers (#8611, #8496):math 5 + 2_123_252
math
’s min
and max
functions now take a variable number of arguments instead of always requiring 2 (#8644, #8646):> math min 8,2,4
2
read
is now faster as the last process in a pipeline (#8552).string join
gained a new --no-empty
flag to skip empty arguments (#8774, #8351).read
now only triggers the fish_read
event, not the fish_prompt
event (#8797). It was supposed to work this way in fish 3.2.0 and later, but both events were emitted.jobs
now correctly reports CPU usage as a percentage, instead of as a number of clock ticks (#8919).process-exit
events now fire when the process exits even if the job has not yet exited, fixing a regression in 3.4.1 (#8914).PATH
(#8804).less
and other interactive commands would occasionally be stopped when run in a pipeline with fish functions; this has been fixed (#8699).ulimit
learned a number of new options for the resource limits available on Linux, FreeBSD ande NetBSD, and returns a specific warning if the limit specified is not available on the active operating system (#8823, #8786).vared
command can now successfully edit variables named “tmp” or “prompt” (#8836, #8837).time
now emits an error if used after the first command in a pipeline (#8841).fish_add_path
now prints a message for skipped non-existent paths when using the -v
flag (#8884).Control-D
while a command is running would end up inserting a space into the next commandline, which has been fixed (#8871).--no-config
will now use the default keybindings (#8493)USER
environment variable value that doesn’t correspond to the current effective user ID, it will now correct it in all cases (#8879, #8583).EUID
variable containing the current effective user id (#8866).history search
no longer interprets the search term as an option (#8853)Alt-S
binding will now insert doas
instead of sudo
if necessary (#8942).kill-whole-line
special input function now kills the newline preceeding the last line. This makes dd
in vi-mode clear the last line properly.kill-inner-line
special input function kills the line without any newlines, allowing cc
in vi-mode to clear the line while preserving newlines (#8983).Shift-Space
is bound like Space
, and Ctrl-Return
is bound like Return
(#8874).Astronaut
prompt (#8775), a multi-line prompt using plain text reminiscent of the Starship.rs prompt.complete
can now be given multiple --condition
options. They will be attempted in the order they were given, and only if all succeed will the completion be made available (as if they were connected with &&
). This helps with caching - fish’s complete system stores the return value of each condition as long as the commandline doesn’t change, so this can reduce the number of conditions that need to be evaluated (#8536, #8967).fish/vendor_completions.d
, fish/vendor_functions.d
, and
fish/vendor_conf.d
(respectively) within XDG_DATA_HOME
(or ~/.local/share
if not defined) (#8887, #7816).--
Download links: To download the source code for fish, we suggest the file named "fish-3.5.0.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly. The SHA-256 sum of this file is 291e4ec7c6c3fea54dc1aed057ce3d42b356fa6f70865627b2c7dfcecaefd210
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.5.0.tar.xz.asc".
This release of fish fixes the following problems identified in fish 3.4.0:
fish_title
function, has been fixed (#8778)nextd-or-forward-word
, bound to Alt-Right Arrow
by default, was inadvertently changed to move like forward-bigword
. This has been corrected (#8790).funcsave -q
and funcsave --quiet
now work correctly (#8830).csharp
and nmcli
completions were corrected.If you are upgrading from version 3.3.1 or before, please also review the release notes for 3.4.0 (included below).
Download links: To download the source code for fish, use the file named "fish-3.4.1.tar.xz". The file downloaded from "Source code (tar.gz)" has extra build requirements. The SHA-256 sum of this file is b6f23b3843b04db6b0a90fea1f6f0d0e40cc027b4a732098200863f2864a94ea
. A GPG signature from David Adam (key ID 0x7A67D962D88A709A
) is available as "fish-3.4.1.tar.xz.asc".