fish Changelog

What's new in fish 2.7.0

Dec 14, 2017
  • Notable fixes and improvements:
  • A new argparse command is available to allow fish script to parse arguments with the same behavior as builtin commands. This also includes the fish_opt helper command. (#4190).
  • The COLUMNS and LINES env vars are now correctly set the first time fish_prompt is run (#4141).
  • New status is-breakpoint command that is true when a prompt is displayed in response to a breakpoint command (#1310).
  • Invalid array indexes are now silently ignored (#826, #4127).
  • string escape has a new --style=xxx flag where xxx can be script, var, or url (#4150).
  • string unescape has been implemented to reverse the effects of string escape (#3543).
  • The history file can now be specified by setting the fish_history variable (#102).
  • Read history is now controlled by the fish_history variable rather than the --mode-name flag (#1504).
  • Implement a cdh (change directory using recent history) command to provide a more friendly alternative to prevd/nextd and pushd/popd (#2847).
  • command now supports a -a flag to report all directories with the command. This means that which -a $cmd is no longer necessary (#2778).
  • --init-command/-C added to the command line switches, to allow execution of commands before starting the interactive shell (#4164).
  • set has a new --show option to show lots of information about variables (#4265).
  • Other significant changes:
  • complete's --no-files option works as intended (#112).
  • pushd +1 works as documented again (#4091).
  • Improved completions for killall (#4052), ln (#4090) and zypper (#4079).
  • Implemented string lower and string upper (#4080).
  • help can now open the tutorial.
  • echo -h now correctly echoes -h (#4120).
  • Stop converting empty elements in MANPATH to "." (#4158). The behavior being changed was introduced in fish 2.6.0.
  • count -h and count --help now return one rather than produce command help output (#4189).
  • Fix setting $COLUMNS and $LINES before first prompt is displayed (#4141).
  • read failures due to too much data should define the var (#4180).
  • multiple read commands in non-interactive scripts were broken in fish 2.6.0 (#4206).
  • Fix regression involving universal variables with side-effects at startup such as set -U fish_escape_delay_ms 10 (#4196).
  • Option completion for apt list now works properly (#4350).
  • Added completions for:
  • as (#4130)
  • cdh (#2847)
  • dhcpd
  • ezjail-admin (#4324)
  • fab (fabric, #4153)
  • grub-file (#4119)
  • grub-install (#4119)
  • jest (#4142)
  • kdeconnect-cli
  • magneto (#4043, #4108)
  • mdadm (#4198)
  • s3cmd (#4332)
  • sbt (#4347)
  • snap (#4215)
  • subl (Sublime Text 3 editor, #4277)
  • Improved completions for:
  • apt
  • cd (#4061)
  • composer (#4295)
  • flatpak (#4456)
  • git (#4117, #4147, #4329, #4368)
  • gphoto2
  • killall (#4052)
  • npm (#4241)
  • ssh (#4377)
  • tail
  • xdg-mime (#4333)
  • zypper (#4325)

New in fish 2.3.1 (Oct 5, 2016)

  • Significant changes:
  • A new fish_key_reader binary for decoding interactive keypresses (#2991).
  • fish_mode_prompt has been updated to reflect the changes in the way the Vi input mode is set up (#3067), making this more reliable.
  • fish_config can now properly be launched from the OS X app bundle (#3140).
  • Notable fixes and improvements:
  • Extra lines were sometimes inserted into the output under Windows (Cygwin and Microsoft Windows Subsystem for Linux) due to TTY timestamps not being updated (#2859).
  • The string builtin's match mode now handles the combination of -rnv (match, invert and count) correctly (#3098).
  • Improvements to TTY special character handling (#3064), locale handling (#3124) and terminal environment variable handling (#3060).
  • Work towards handling the terminal modes for external commands launched from initialisation files (#2980).
  • Ease the upgrade path from fish 2.2.0 and before by warning users to restart fish if the string builtin is not available (#3057).
  • type -a now syntax-colorizes function source output.
  • Added completions for alsamixer, godoc, gofmt, goimports, gorename, lscpu, mkdir, modinfo, netctl-auto, poweroff, termite, udisksctl and xz (#3123).
  • Improved completions for apt (#3097), aura (#3102),git (#3114), npm (#3158), string and suspend (#3154).

New in fish 2.3.0 (May 27, 2016)

  • SIGNIFICANT CHANGES:
  • A new string builtin to handle… strings! This builtin will measure, split, search and replace text strings, including using regular expressions. It can also be used to turn lists into plain strings using join. string can be used in place of sed, grep, tr, cut, and awk in many situations. (#2296)
  • After seeing an escape character wait up to 300ms for an additional character. This is consistent with readline (e.g. bash) and can be configured via the fish_escape_delay_ms variable. This allows using escape as the Meta modifier. (#1356)
  • Add new directories for vendor functions and configuration snippets (#2498)
  • A new fish_realpath builtin and associated function to allow the use of realpath even on those platforms that don't ship an appropriate command. (#2932)
  • Alt-# toggles the current command line between commented and uncommented states, making it easy to save a command in history without executing it.
  • The fish_vi_mode function is now deprecated in favour of fish_vi_key_bindings
  • BACKWARD-INCOMPATIBLE CHANGES:
  • Unmatched globs will now cause an error, except when used with for, set or count (#2719, #2394)
  • and and or will now bind to the closest if or while, allowing compound conditions without begin and end (#1428)
  • set -ql now searches up to function scope for variables (#2502)
  • status -f will now behave the same when run as the main script or using source (#2643)
  • source no longer puts the file name in $argv if no arguments are given (#139)
  • OTHER NOTABLE FIXES AND IMPROVEMENTS:
  • Fish no longer silences errors in config.fish (#2702)
  • Move the history file to $XDG_DATA_HOME/fish (or ~/.local/share if it has not been set)
  • Directory autosuggestions will now descend as far as possible if there is only one child directory (#2531)
  • Add support for bright colors (#1464)
  • Allow Ctrl-J (\cj) to be bound separately from Ctrl-M (\cm) (#217)
  • psub now has a "-s"/"-suffix" option to name the temporary file with that suffix
  • Enable 24-bit colors on select terminals (#2495)
  • Support for SVN status in the prompt (#2582)
  • Mercurial and SVN support have been added to the Classic + Git (now Classic + VCS) prompt (via the new __fish_vcs_prompt function) (#2592)
  • export now handles variables with a "=" in the value (#2403)
  • Avoid confusing the terminal line driver with non-printing characters in fish_title(#2453)
  • Fish no longer has a function called sgrep, freeing it for user customization (#2245)
  • A rewrite of the completions for cd, fixing a few bugs (#2299, #2300, #562)
  • Linux VTs now run in a simplified mode to avoid issues (#2311)
  • The vi-bindings now inherit from the emacs bindings
  • Fish will also execute fish_user_key_bindings when in vi-mode
  • funced will now also check $VISUAL (#2268)
  • A new suspend function (#2269)
  • Subcommand completion now works better with split /usr (#2141)
  • The command-not-found-handler can now be overridden by defining a function called __fish_command_not_found_handler in config.fish (#2331)
  • A few fixes to the Sorin theme
  • PWD shortening in the prompt can now be configured via the fish_prompt_pwd_dir_length variable, set to the length per path component (#2473)
  • fish now ships a skeleton file for /etc/fish/config.fish that only contains some documentation, the included code has been moved to the corresponding file in /usr (#2799)
  • New completions for:
  • alsactl
  • Archlinux’s asp, makepkg
  • Atom’s apm (#2390)
  • entr - the "Event Notify Test Runner" (#2265)
  • Fedora’s dnf (#2638)
  • OSX diskutil (#2738)
  • pkgng (#2395)
  • pulseaudio’s pacmd and pactl
  • rmmod (#3007)
  • rust’s rustc and cargo (#2409)
  • sysctl (#2214)
  • systemd’s machinectl (#2158), busctl (#2144), systemd-nspawn, systemd-analyze, localectl, timedatectl
  • and more

New in fish 2.2.0 (Jul 13, 2015)

  • SIGNIFICANT CHANGES:
  • Abbreviations: the new `abbr` command allows for interactively-expanded abbreviations, allowing quick access to frequently-used commands (#731).
  • Vi mode: run `fish_vi_mode` to switch fish into the key bindings and prompt familiar to users of the Vi editor (#65).
  • New inline and interactive pager, which will be familiar to users of zsh (#291).
  • Underlying architectural changes: the `fishd` universal variable server has been removed as it was a source of many bugs and security problems. Notably, old fish sessions will not be able to communicate universal variable changes with new fish sessions. For best results, restart all running instances of `fish`.
  • The web-based configuration tool has been redesigned, featuring a prompt theme chooser and other improvements.
  • New German, Brazilian Portuguese, and Chinese translations.
  • BACKWARD-INCOMPATIBLE CHANGES:
  • These are kept to a minimum, but either change undocumented features or are too hard to use in their existing forms. These changes may break existing scripts.
  • `commandline` no longer interprets functions "in reverse", instead behaving as expected (#1567).
  • The previously-undocumented `CMD_DURATION` variable is now set for all commands and contains the execution time of the last command in milliseconds (#1585). It is no longer exported to other commands (#1896).
  • `if` / `else` conditional statements now return values consistent with the Single Unix Specification, like other shells (#1443).
  • A new "top-level" local scope has been added, allowing local variables declared on the commandline to be visible to subsequent commands. (#206)
  • OTHER NOTABLE FIXES AND IMPROVEMENTS:
  • New documentation design (#1662), which requires a Doxygen version 1.8.7 or newer to build.
  • Fish now defines a default directory for other packages to provide completions. By default this is `/usr/share/fish/vendor-completions.d`; on systems with `pkgconfig` installed this path is discoverable with `pkg-config --variable completionsdir fish`.
  • A new parser removes many bugs; all existing syntax should keep working.
  • New `fish_preexec` and `fish_postexec` events are fired before and after job execution respectively (#1549).
  • Unmatched wildcards no longer prevent a job from running. Wildcards used interactively will still print an error, but the job will proceed and the wildcard will expand to zero arguments (#1482).
  • The `.` command is deprecated and the `source` command is preferred (#310).
  • `bind` supports "bind modes", which allows bindings to be set for a particular named mode, to support the implementation of Vi mode.
  • A new `export` alias, which behaves like other shells (#1833).
  • `command` has a new `--search` option to print the name of the disk file that would be executed, like other shells' `command -v` (#1540).
  • `commandline` has a new `--paging-mode` option to support the new pager.
  • `complete` has a new `--wraps` option, which allows a command to (recursively) inherit the completions of a wrapped command (#393), and `complete -e` now correctly erases completions (#380).
  • Completions are now generated from manual pages by default on the first run of fish (#997).
  • `fish_indent` can now produce colorized (`--ansi`) and HTML (`--html`) output (#1827).
  • `functions --erase` now prevents autoloaded functions from being reloaded in the current session.
  • `history` has a new `--merge` option, to incorporate history from other sessions into the current session (#825).
  • `jobs` returns 1 if there are no active jobs (#1484).
  • `type` has a new `-q` option to suppress output (#1540 and, like other shells, `type -a` now prints all matches for a command (#261).
  • Pressing F1 now shows the manual page for the current command (#1063).
  • `fish_title` functions have access to the arguments of the currently running argument as `$argv[1]` (#1542).
  • The OS command-not-found handler is used on Arch Linux (#1925), nixOS (#1852), openSUSE and Fedora (#1280).
  • `Alt`+`.` searches backwards in the token history, mapping to the same behavior as inserting the last argument of the previous command, like other shells (#89).
  • The `SHLVL` environment variable is incremented correctly (#1634 & #1693).
  • Added completions for `adb` (#1165 & #1211), `apt` (#2018), `aura` (#1292), `composer` (#1607), `cygport` (#1841), `dropbox` (#1533), `elixir` (#1167), `fossil`, `heroku` (#1790), `iex` (#1167), `kitchen` (#2000), `nix` (#1167), `node`/`npm` (#1566), `opam` (#1615), `setfacl` (#1752), `tmuxinator` (#1863), and `yast2` (#1739).
  • Improved completions for `brew` (#1090 & #1810), `bundler` (#1779), `cd` (#1135), `emerge` (#1840),`git` (#1680, #1834 & #1951), `man` (#960), `modprobe` (#1124), `pacman` (#1292), `rpm` (#1236), `rsync` (#1872), `scp` (#1145), `ssh` (#1234), `sshfs` (#1268), `systemctl` (#1462, #1950 & #1972), `tmux` (#1853), `vagrant` (#1748), `yum` (#1269), and `zypper` (#1787).
  • `read` has several new options:
  • `--array` to break input into an array (#1540)
  • `--null` to break lines on NUL characters rather than newlines (#1694)
  • `--nchars` to read a specific number of characters (#1616)
  • `--right-prompt` to display a right-hand-side prompt during interactive read (#1698).

New in fish 2.1.2 (Feb 27, 2015)

  • fish 2.1.2 contains a workaround for a filesystem bug in Mac OS X Yosemite. #1859
  • Specifically, after installing fish 2.1.1 and then rebooting, "Verify Disk" in Disk Utility will report "Invalid number of hard links." We don't have any reports of data loss or other adverse consequences. fish 2.1.2 avoids triggering the bug, but does not repair an already affected filesystem. To repair the filesystem, you can boot into Recovery Mode and use Repair Disk from Disk Utility. Linux and versions of OS X prior to Yosemite are believed to be unaffected.

New in fish 2.1.1 (Feb 23, 2015)

  • Security fixes:
  • The fish_config web interface now uses an authentication token to protect requests and only responds to requests from the local machine with this token, preventing a remote code execution attack. (closing CVE-2014-2914). #1438
  • psub and funced are no longer vulnerable to attacks which allow local privilege escalation and data tampering (closing CVE-2014-2906 and CVE-2014-3856). #1437
  • fishd uses a secure path for its socket, preventing a local privilege escalation attack (closing CVE-2014-2905). #1436
  • __fish_print_packages is no longer vulnerable to attacks which would allow local privilege escalation and data tampering (closing CVE-2014-3219). #1440
  • Other fixes:
  • fishd now ignores SIGPIPE, fixing crashes using tools like GNU Parallel and which occurred more often as a result of the other fishd changes. #1084 & #1690