mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
219 lines
17 KiB
HTML
219 lines
17 KiB
HTML
<head>
|
|
<title>fishfish shell release notes</title>
|
|
<style type="text/css">
|
|
.mono {
|
|
font-family: Courier, "Courier New", monospace;
|
|
font-size: 10pt;
|
|
}
|
|
|
|
li {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.issue_link {
|
|
font-size: small;
|
|
}
|
|
|
|
</style>
|
|
</head><body>
|
|
<h2>Release Notes for fish 2.0.0</h2>
|
|
|
|
<h3>Significant Changes</h3>
|
|
|
|
<ul>
|
|
<li><b>Command substitutions now modify <tt>$status</tt></b> <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/547">#547</a>.
|
|
<p>
|
|
Previously the exit status of command substitutions (like <tt>(pwd)</tt>) was ignored; however now it modifies $status. Furthermore, the <tt>set</tt> command now only sets $status on failure; it is untouched on success. This allows for the following pattern:
|
|
<pre>
|
|
if set python_path (which python)
|
|
...
|
|
end
|
|
</pre>
|
|
|
|
Because set does not modify $status on success, the if branch effectively tests whether <tt>which</tt> succeeded, and if so, whether the <tt>set</tt> also succeeded.
|
|
|
|
</p></li>
|
|
|
|
<li><b>Improvements to $PATH handling</b>.
|
|
<p>
|
|
<ul><li>There is a new variable, <tt>$fish_user_paths</tt>, which can be set universally, and whose contents are appended to $PATH <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/527">#527</a></li>
|
|
<li>/etc/paths and /etc/paths.d are now respected on OS X</li>
|
|
<li>fish no longer modifies $PATH to find its own binaries</li>
|
|
</ul></li>
|
|
</p>
|
|
</li>
|
|
|
|
<li><b>Long lines no longer use ellipsis for line breaks</b>, and copy and paste should no longer include a newline even if the line was broken <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/300">#300</a></li>
|
|
|
|
<li><b>New syntax for index ranges</b> (sometimes known as "slices") <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/212">#212</a></li>
|
|
|
|
<li><b>fish now supports an <tt>else if</tt> statement</b> <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/134">#134</a></li>
|
|
|
|
<li><b>Process and pid completion now works on OS X</b> <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/129">#129</a></li>
|
|
|
|
<li><b>fish is now relocatable</b>, and no longer depends on compiled-in paths <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/125">#125</a></li>
|
|
|
|
<li><b>fish now supports a right prompt (RPROMPT)</b> through the <tt>fish_right_prompt</tt> function <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/80">#80</a></li>
|
|
|
|
<li><b>fish now uses posix_spawn instead of fork when possible</b>, which is much faster on BSD and OS X <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/11">#11</a></li>
|
|
|
|
</ul>
|
|
|
|
<h3>Other Notable Fixes</h3>
|
|
<ul>
|
|
<li>Updated VCS completions (darcs, cvs, svn, etc.)</li>
|
|
<li>Avoid calling getcwd on the main thread, as it can hang <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/696">#696</a></li>
|
|
<li>Control-D (forward delete) no longer stops at a period <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/667">#667</a></li>
|
|
<li>Completions for many new commands </li>
|
|
<li>fish now respects rxvt's unique keybindings <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/657">#657</a></li>
|
|
<li>xsel is no longer built as part of fish. It will still be invoked if installed separately <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/633">#633</a></li>
|
|
<li>__fish_filter_mime no longer spews <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/628">#628</a></li>
|
|
<li>The --no-execute option to fish no longer falls over when reaching the end of a block <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/624">#624</a></li>
|
|
<li>fish_config knows how to find fish even if it's not in the $PATH <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/621">#621</a></li>
|
|
<li>A leading space now prevents writing to history, as is done in bash and zsh <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/615">#615</a></li>
|
|
<li>Hitting enter after a backslash only goes to a new line if it is followed by whitespace or the end of the line <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/613">#613</a></li>
|
|
<li>printf is now a builtin <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/611">#611</a></li>
|
|
<li>Event handlers should no longer fire if signals are blocked <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/608">#608</a></li>
|
|
<li>set_color is now a builtin <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/578">#578</a></li>
|
|
<li>man page completions are now located in a new generated_completions directory, instead of your completions directory <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/576">#576</a></li>
|
|
<li>tab now clears autosuggestions <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/561">#561</a></li>
|
|
<li>tab completion from within a pair of quotes now attempts to "appropriate" the closing quote <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/552">#552</a></li>
|
|
<li>$EDITOR can now be a list: for example, <tt>set EDITOR gvim -f</tt>) <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/541">#541</a></li>
|
|
<li><tt>case</tt> bodies are now indented <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/530">#530</a></li>
|
|
<li>The profile switch <tt>-p</tt> no longer crashes <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/517">#517</a></li>
|
|
<li>You can now control-C out of <tt>read</tt> <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/516">#516</a></li>
|
|
<li><tt>umask</tt> is now functional on OS X <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/515">#515</a></li>
|
|
<li>Avoid calling getpwnam on the main thread, as it can hang <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/512">#512</a></li>
|
|
<li>Alt-F or Alt-right-arrow (Option-F or option-right-arrow) now accepts one word of an autosuggestion <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/435">#435</a></li>
|
|
<li>Setting fish as your login shell no longer kills OpenSUSE <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/367">#367</a></li>
|
|
<li>Backslashes now join lines, instead of creating multiple commands <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/347">#347</a></li>
|
|
<li>echo now implements the -e flag to interpret escapes <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/337">#337</a></li>
|
|
<li>When the last token in the user's input contains capital letters, use its case in preference to that of the autosuggestion <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/335">#335</a></li>
|
|
<li>Descriptions now have their own muted color <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/279">#279</a></li>
|
|
<li>Wildcards beginning with a . (for example, <tt>ls .*</tt>) no longer match . and .. <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/270">#270</a></li>
|
|
<li>Recursive wildcards now handle symlink loops <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/268">#268</a></li>
|
|
<li>You can now delete history items from the fish_config web interface <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/250">#250</a></li>
|
|
<li>The OS X build now weak links <tt>wcsdup</tt> and <tt>wcscasecmp</tt> <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/240">#240</a></li>
|
|
<li>fish now saves and restores the process group, which prevents certain processes from being erroneously reported as stopped <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/197">#197</a></li>
|
|
<li><tt>funced</tt> now takes an editor option <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/187">#187</a></li>
|
|
<li>Alternating row colors are available in fish pager through <tt>fish_pager_color_secondary</tt> <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/186">#186</a></li>
|
|
<li>Universal variable values are now stored based on your MAC address, not your hostname <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/183">#183</a></li>
|
|
<li>The caret ^ now only does a stderr redirection if it is the first character of a token, making git users happy <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/168">#168</a></li>
|
|
<li>Autosuggestions will no longer cause line wrapping <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/167">#167</a></li>
|
|
<li>Better handling of Unicode combining characters <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/155">#155</a></li>
|
|
<li>fish SIGHUPs processes more often <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/138">#138</a></li>
|
|
<li>fish no longer causes <tt>sudo</tt> to ask for a password every time</li>
|
|
<li>fish behaves better under Midnight Commander <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/121">#121</a></li>
|
|
<li><tt>set -e</tt> no longer crashes <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/100">#100</a></li>
|
|
<li>fish now will automatically import history from bash, if there is no fish history <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/66">#66</a></li>
|
|
<li>Backslashed-newlines inside quoted strings now behave more intuitively <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/52">#52</a></li>
|
|
<li>Tab titles should be shown correctly in iTerm2 <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/47">#47</a></li>
|
|
<li>scp remote path completion now sometimes works <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/42">#42</a></li>
|
|
<li>The <tt>read</tt> builtin no longer shows autosuggestions <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/29">#29</a></li>
|
|
<li>Custom key bindings can now be set via the <tt>fish_user_key_bindings</tt> function <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/21">#21</a></li>
|
|
<li>All Python scripts now run correctly under both Python 2 and Python 3 <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/14">#14</a></li>
|
|
<li>The "accept autosuggestion" key can now be configured <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/19">#19</a></li>
|
|
<li>Autosuggestions will no longer suggest invalid commands <a class="issue_link" href="http://github.com/fish-shell/fish-shell/issues/6">#6</a></li>
|
|
|
|
</ul>
|
|
|
|
<h2>Release Notes for <i>fishfish</i> Beta r2</h2>
|
|
|
|
<h3>Bug Fixes</h3>
|
|
<ul>
|
|
<li><b>Implicit cd</b> is back, for paths that start with one or two dots, a slash, or a tilde.</li>
|
|
<li><b>Overrides of default functions should be fixed</b>. The "internalized scripts" feature is disabled for now.</li>
|
|
<li><b>Disabled delayed suspend</b>. This is a strange job-control feature of BSD systems, including OS X. Disabling it frees up Control Y for other purposes; in particular, for yank, which now works on OS X.</li>
|
|
<li><b>fish_indent is fixed</b>. In particular, the <span class="mono">funced</span> and <span class="mono">funcsave</span> functions work again.
|
|
<li>A SIGTERM now ends the whole execution stack again (<a href="https://github.com/ridiculousfish/fishfish/issues/13">resolving this issue</a>).
|
|
<li>Bumped the __fish_config_interactive version number so the default fish_color_autosuggestion kicks in.
|
|
<li>fish_config better handles combined term256 and classic colors like "555 yellow".
|
|
|
|
</ul>
|
|
|
|
<h3>New Features</h3>
|
|
<ul>
|
|
<li>A <b>history builtin</b>, and associated interactive function that enables deleting history items. Example usage:
|
|
|
|
<ul>
|
|
<li>Print all history items beginning with echo: <span class="mono">history --prefix echo</span></li>
|
|
<li>Print all history items containing foo: <span class="mono">history --contains foo</span></li>
|
|
<li>Interactively delete some items containing foo: <span class="mono">history --delete --contains foo</span></li>
|
|
</ul><br>
|
|
Credit to Siteshwar for implementation. Thanks Siteshwar!
|
|
</li>
|
|
</ul>
|
|
|
|
<hr>
|
|
|
|
<h2>Release Notes for <i>fishfish</i> Beta r1</h2>
|
|
|
|
<h3>Scripting</h3>
|
|
<ul>
|
|
<li>No changes! All existing fish scripts, config files, completions, etc. from trunk should continue to work.</li>
|
|
</ul>
|
|
|
|
<h3>New Features</h3>
|
|
<ul>
|
|
|
|
<li><b>Autosuggestions</b>. Think URL fields in browsers. When you type a command, fish will suggest the rest of the command after the cursor, in a muted gray when possible. You can accept the suggestion with the right arrow key or Ctrl-F. Suggestions come from command history, completions, and some custom code for cd; there's a lot of potential for improvement here. The suggestions are computed on a background pthread, so they never slow down your typing.
|
|
|
|
The autosuggestion feature is incredible. I miss it dearly every time I use anything else.</li>
|
|
|
|
<li><b>term256 support</b> where available, specifically modern xterms and OS X Lion. You can specify colors the old way ('set_color cyan') or by specifying RGB hex values ('set_color FF3333'); fish will pick the closest supported color. Some xterms do not advertise term256 support either in the $TERM or terminfo max_colors field, but nevertheless support it. For that reason, fish will default into using it on any xterm (but it can be disabled with an environment variable).</li>
|
|
|
|
<li><b>Web-based configuration</b> page. There is a new function 'fish_config'. This spins up a simple Python web server and opens a browser window to it. From this web page, you can set your shell colors and view your functions, variables, and history; all changes apply immediately to all running shells. Eventually all configuration ought to be supported via this mechanism (but in addition to, not instead of, command line mechanisms).</li>
|
|
|
|
<li><b>Man page completions</b>. There is a new function 'fish_update_completions'. This function reads all the man1 files from your manpath, removes the roff formatting, parses them to find the commands and options, and outputs fish completions into ~/.config/fish/completions. It won't overwrite existing completion files (except ones that it generated itself).</li>
|
|
|
|
</ul>
|
|
|
|
<h3>Programmatic Changes</h3>
|
|
|
|
<ul>
|
|
|
|
<li>fish is now entirely in C++. I have no particular love for C++, but it provides a ready memory-model to replace halloc. We've made an effort to keep it to a sane and portable subset (no C++11, no boost, no going crazy with templates or smart pointers), but we do use the STL and a little tr1.</li>
|
|
|
|
<li>halloc is entirely gone, replaced by normal C++ ownership semantics. If you don't know what halloc is, well, now you have two reasons to be happy.</li>
|
|
|
|
<li>All the crufty C data structures are entirely gone. array_list_t, priority_queue_t, hash_table_t, string_buffer_t have been removed and replaced by STL equivalents like std::vector, std::map, and std::wstring. A lot of the string handling now uses std::wstring instead of wchar_t *</li>
|
|
|
|
<li>fish now spawns pthreads for tasks like syntax highlighting that require blocking I/O.</li>
|
|
|
|
<li>History has been completely rewritten. History files now use an extensible YAML-style syntax. History "merging" (multiple shells writing to the same history file) now works better. There is now a maximum history length of about 250k items (256 * 1024).</li>
|
|
|
|
<li>The parser has been "instanced," so you can now create more than one.</li>
|
|
|
|
<li>Total #LoC has shrunk slightly even with the new features.</li>
|
|
</ul>
|
|
|
|
<h3>Performance</h3>
|
|
|
|
<ul>
|
|
|
|
<li>fish now runs syntax highlighting in a background thread, so typing commands is always responsive even on slow filesystems.</li>
|
|
|
|
<li>echo, test, and pwd are now builtins, which eliminates many forks.</li>
|
|
|
|
<li>The files in share/functions and share/completions now get 'internalized' into C strings that get compiled in with fish. This substantially reduces the number of files touched at startup. A consequence is that you cannot change these functions without recompiling, but often other functions depend on these "standard" functions, so changing them is perhaps not a good idea anyways.</li>
|
|
</ul>
|
|
|
|
<p>Here are some system call counts for launching and then exiting fish with the default configuration, on OS X. The first column is fish trunk, the next column is with our changes, and the last column is bash for comparison. This data was collected via dtrace.
|
|
|
|
<pre>
|
|
before after bash
|
|
open 9 4 5
|
|
fork 28 14 0
|
|
stat 131 85 11
|
|
lstat 670 0 0
|
|
read 332 80 4
|
|
write 172 149 0
|
|
</pre>
|
|
|
|
<p>The large number of forks relative to bash are due to fish's insanely expensive default prompt, which is unchanged in my version. If we switch to a prompt comparable to bash's (lame) default, the forks drop to 16 with trunk, 4 after our changes.
|
|
|
|
<p>The large reduction in lstat() numbers is due to fish no longer needing to call ttyname() on OS X.
|
|
|
|
<p>We've got some work to do to be as lean as bash, but we're on the right track.
|
|
|
|
</body></html>
|