Fish (Unix shell): Difference between revisions

Content deleted Content added
Undid revision 1261456591 by Daemonspudguy (talk)
Tags: Undo Reverted
document that fish was written in C++ in the past
 
(16 intermediate revisions by 10 users not shown)
Line 7:
{{Infobox software
| name = Fish
| logo = Fish-shell-logo-ascii icon.svgpng
| screenshot = Fish shell 34.30.10 screenshot.pngwebp
| screenshot size = 300px
| caption = Version 34.30.10 of fish
| author = Axel Liljencrantz
| developer = Fish-shell developers<ref>{{cite web| url = https://github.com/fish-shell?tab=members| title = fish shell team members | publisher = GitHub.com| date = | access-date = 2021-07-28}}</ref>
| released = {{release date and age|df=yes|2005|02|13|df=yes}}
| latest release version = {{wikidata|property|reference|edit|P348}}
| latest release date = {{Start date and age|{{wikidata|qualifier|P348|P577}}|df=yes}}
| programming language = [[Rust (programming language)|Rust]] since v4.0<ref>{{cite web |title=fish-shell 4.0b1, now in Rust |url=https://fishshell.com/blog/fish-4b/ |website=fishshell.com |access-date=18 December 2024}}</ref>, [[C++]] up to v3.7.1<ref>{{cite web |url=https://fishshell.com/docs/current/relnotes.html#fish-4-0-0-released-february-27-2025 |title=fish 4.0.0 (released February 27, 2025) |website=fishshell.com |access-date=2025-08-16}}</ref>
| programming language = [[Rust (programming language)|Rust]]
| operating system = [[Unix-like]]
| genre = [[Unix shell]]
Line 22:
| website = {{URL|http://fishshell.com}}
}}
'''Fish''' (or '''f'''riendlyfriendly '''i'''nteractiveinteractive shell'''sh'''ell-; stylized in lowercase) is a [[Unix shell|Unix-like shell]] with a focus on interactivity and usability. Fish is designed to be feature-rich by default, rather than highly configurable.,<ref>{{cite web|url=https://lwn.net/Articles/136232|publisher=[[Linux Weekly News]]|title=Fish - A user-friendly shell|access-date=2010-03-24|date=2005-05-17|author=Liljencrantz, Axel}}</ref> Fish is considered an [[Unix shell#Other shells|exotic shell]] since itand does not adhere to [[POSIX]] shell standards, at the discretion of itsby maintainersdesign.<ref>{{cite web|url=https://fishshell.com/docs/current/design.html|title=Fish docs: design|access-date=2021-04-09}}</ref>
 
==Features==
Fish displays [[incremental search|incremental suggestions]] as the user types, based on command history and the current directory. This functions similarly to [[Bash (Unix shell)|Bash]]'s {{keypress|Ctrl|R}} history search, but is always on, giving the user continuous feedback while typing commands. Fish also includes feature-rich [[command-line completion|tab completion]], with support for expanding file paths (with [[wildcard character|wildcard]]s and [[Bash (Unix shell)#Brace expansion|brace expansion]]{{Broken anchor|date=2025-07-31|bot=User:Cewbot/log/20201008/configuration|target_link=Bash (Unix shell)#Brace expansion|reason=Anchor "Bash (Unix shell)#Brace expansion" links to a specific web page: "Brace expansion". The anchor (Brace expansion) [[Special:Diff/1303454031|has been deleted]].|diff_id=1303454031}}), [[Environment variable|environment variables]], and command-specific completions. Command-specific completions, including options with descriptions, can be to some extent generated from the commands' [[man page|man pages]], but custom completions can also be included with software or written by users of the shell.<ref>{{Cite web |title=Writing your own completions |url=https://fishshell.com/docs/current/completions.html |url-status=live |archive-url=https://web.archive.org/web/20240831075627/https://fishshell.com/docs/current/completions.html |archive-date=2024-08-31 |website=fish shell}}</ref>
 
The creator of Fish preferred to add new features as commands rather than syntax. This made features more [[Discoverability|discoverable]], as the built-in features allow searching commands with options and help texts. [[Subroutine|Functions]] can also include human readable descriptions. A special ''help'' command gives access to all the fish documentation in the user's [[web browser]].<ref>[https://www.linux.com/news/cli-magic-enhancing-shell-fish Linux.com]. CLI Magic: Enhancing the shell with fish. Retrieved 2010-03-24.</ref>
Line 157:
{| class="wikitable"
|-
! style="width: 15%" | Feature !! style="width: 25%" | Bash syntax !! style="width: 45%" | fish syntax !! style="width: 15%" |Comment
|-
| variable expansion:<br />with word splitting and [[glob (programming)|glob]] interpretation ||
Line 335:
* [[Comparison of command shells]]
* [[Unix]]
* [[Unix shell]]
 
==References==
{{Reflist|colwidth=50em35em|refs=
 
<ref name="bash_pitfalls">{{cite web|title=Bash Pitfalls|url=http://mywiki.wooledge.org/BashPitfalls|quote=This page shows common errors that Bash programmers make. (...) You will save yourself from many of these pitfalls if you simply always use quotes and never use word splitting for any reason! Word splitting is a broken legacy misfeature inherited from the Bourne shell that's stuck on by default if you don't quote expansions. The vast majority of pitfalls are in some way related to unquoted expansions, and the ensuing word splitting and globbing that result.|access-date=2016-07-10}}</ref>
 
}}
Line 348 ⟶ 347:
*[https://github.com/fish-shell/fish-shell fish] on [[GitHub]] (active)
*[https://web.archive.org/web/20110726104750/http://gitorious.org/fish-shell/ fish] on [[Gitorious]] (obsolete)
*[httphttps://sourceforge.net/projects/fish/ fish] on [[SourceForge]] (obsolete)
*[https://lists.sourceforge.net/lists/listinfo/fish-users Fish-users] – general discussion list for fish users
*[https://github.com/fish-shell/fish-shell/wiki/Shell-Translation-Dictionary Shell Translation Dictionary] - another Bash/Fish translation table
Line 358 ⟶ 357:
[[Category:Scripting languages]]
[[Category:Unix shells]]
[[Category:Free software programmed in Rust]]