Release Notes for fish 2.2.0 (released July 12, 2015)
Significant changes
- Abbreviations: the new
abbrcommand allows for interactively-expanded abbreviations, allowing quick access to frequently-used commands (#731). - Vi mode: run
fish_vi_modeto 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
fishduniversal 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 offish. - 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.
commandlineno longer interprets functions "in reverse", instead behaving as expected (#1567).- The previously-undocumented
CMD_DURATIONvariable 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/elseconditional 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. (#1908)
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 withpkgconfiginstalled this path is discoverable withpkg-config --variable completionsdir fish. - A new parser removes many bugs; all existing syntax should keep working.
- New
fish_preexecandfish_postexecevents 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 thesourcecommand is preferred (#310). bindsupports "bind modes", which allows bindings to be set for a particular named mode, to support the implementation of Vi mode.- A new
exportalias, which behaves like other shells (#1833). commandhas a new--searchoption to print the name of the disk file that would be executed, like other shells'command -v(#1540).commandlinehas a new--paging-modeoption to support the new pager.completehas a new--wrapsoption, which allows a command to (recursively) inherit the completions of a wrapped command (#393), andcomplete -enow correctly erases completions (#380).- Completions are now generated from manual pages by default on the first run of fish (#997).
fish_indentcan now produce colorized (--ansi) and HTML (--html) output (#1827).functions --erasenow prevents autoloaded functions from being reloaded in the current session.historyhas a new--mergeoption, to incorporate history from other sessions into the current session (#825).jobsreturns 1 if there are no active jobs (#1484).readhas several new options:typehas a new-qoption to suppress output (#1540 and, like other shells,type -anow prints all matches for a command (#261).- Pressing F1 now shows the manual page for the current command (#1063).
fish_titlefunctions 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
SHLVLenvironment 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), andyast2(#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), andzypper(#1787).