Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The user-friendly command line shell.
C++ Shell Python C HTML JavaScript Other
Failed to load latest commit information.
build_tools Don't require .git before running git-describe
doc_src Revert "document evaluation of /etc/profile.d/*.fish, introduced in 2…
etc Stomp exit status of initialization scripts so that fish starts out w…
fish.xcodeproj Merge branch 'Integration_2.1.2'
osx Merge branch 'Integration_2.1.2'
po translations: update new strings
share Added completions for `apt` command
tests Add a test for issue #1987
.gitattributes Merge branch 'master' into documentation-update
.gitignore .gitignore: fishd is dead
.travis.yml travis: parallel make
CHANGELOG Remove trailing whitespaces and change tabs to spaces
CONTRIBUTING.md Rename STYLEGUIDE.md to CONTRIBUTING.md, so GitHub would notice it.
COPYING Move LICENSE to COPYING and update text.
Dockerfile math requires bc package
Doxyfile Remove CLANG options, for portability
Doxyfile.help Remove CLANG options, for portability
Doxyfile.user Remove CLANG options, for portability
Makefile.in Rewrite of fish_indent
README.md Use svg instead of png to get better image quality
autoload.cpp Don't evict autoloaded functions from background threads
autoload.h Run restyle.sh to enforce style rules.
builtin.cpp Revert 1349d12 and properly fix #213
builtin.h Support for command wrapping ("aliases")
builtin_commandline.cpp Clean up some memory allocation in builtin_commandline
builtin_complete.cpp complete: recognise -w short option for --wraps
builtin_jobs.cpp Fix indentation
builtin_printf.cpp Make octal/hex escapes in printf and echo output literal bytes
builtin_set.cpp Update various strings for translation, avoid _ for non-translations
builtin_set_color.cpp use configure to define NOMACROS
builtin_test.cpp Fix some warnings in Linux build
builtin_ulimit.cpp Remove my_wcswidth() in favor of fish_wcswidth()
color.cpp Solaris build fixes: use memset instead of bzero
color.h Further support for term24bit. Teach output.cpp what to do with it.
common.cpp Fix and add tests for format_long_safe with negative numbers
common.h Add paging into navigating pager
complete.cpp Use natural (digit-sequence-aware) sorting for wildcard expansion
complete.h Use natural (digit-sequence-aware) sorting for wildcard expansion
config.guess Update to latest config.sub and config.guess versions
config.sub Update to latest config.sub and config.guess versions
configure.ac Fix typo in comment.
create_wajig_completions.py Add the file that generated the wajig completions to the tree. This s…
env.cpp Properly fire events for universal variable changes
env.h Add new `functions` flag -V/--inherit-variable
env_universal_common.cpp Mark libnotify FDs as CLO_EXEC
env_universal_common.h Replace some std::string with wcstring to reduce copying
event.cpp Rename events and simplify signal event handling
event.h Formatting and style updates
exec.cpp Ignore user-supplied fd redirections above 2 for builtins
exec.h Rework file descriptor handling
expand.cpp Use natural (digit-sequence-aware) sorting for wildcard expansion
expand.h Remove EXPAND_SKIP_PROCESS, which did not actually work
fallback.cpp use configure to define NOMACROS
fallback.h Remove del_curterm workaround on *BSD.
fish.cpp fish.cpp: check for fishd from old version and warn if reachable
fish.pc.in fish.pc: add pkgconfig file for fish
fish_indent.cpp Close <code> before <pre> in fish_indent
fish_tests.cpp Simplify begin_header production
fish_version.cpp Shorten compilation times
fish_version.h Shorten compilation times
function.cpp Tombstone only when explicitly removing a function.
function.h Revert 1349d12 and properly fix #213
highlight.cpp Teach the highlighter about multiple adjacent square bracket expansions
highlight.h Merge branch 'master' into 1218_rebase
history.cpp Fix tests on FreeBSD
history.h Remove a bunch of dead code identified by cppcheck
input.cpp use configure to define NOMACROS
input.h Rework mode handling of `bind`
input_common.cpp No need for mbstate_t to be static
input_common.h Use the new input_common_add_callback mechanism to not execute callba…
install-sh Update to newer install-sh version
intern.cpp Revert "Merge pull request #1317 from pullreq/cpp"
intern.h Apply new indentation, brace, and whitespace style
io.cpp Rework file descriptor handling
io.h Ignore user-supplied fd redirections above 2 for builtins
iothread.cpp Fix intermittent crash in iothread.cpp
iothread.h Use iothread_perform variant that doesn't take a completion callback
key_reader.cpp Squelch some more warnings on Linux
kill.cpp Make escape() return a wcstring
kill.h Apply new indentation, brace, and whitespace style
lexicon_filter.in Tweak lexicon_filter.in for GNU sed
lru.h Don't evict autoloaded functions from background threads
mimedb.cpp Fixes use-after-free issue.
mimedb.h Add header guards to the header files.
output.cpp use configure to define NOMACROS
output.h Include fallback.h in output.h to avoid a compile error
pager.cpp Add paging into navigating pager
pager.h Remove a bunch of dead code identified by cppcheck
parse_constants.h Rewrite of fish_indent
parse_execution.cpp Modify parser to accept 'begin' without ';'
parse_execution.h Don't stop job execution on wildcard errors
parse_productions.cpp Simplify begin_header production
parse_productions.h Bringup of function definitions, switch statements with new parser
parse_tree.cpp Tweak comment handling. Mark a parse node with a new flag when it has…
parse_tree.h Simplify begin_header production
parse_util.cpp Fix job_or_process_extent with command substitution
parse_util.h Allow parse_util_detect_errors to treat incomplete strings as errors
parser.cpp Stop blocking signals within job_promote
parser.h Remove a bunch of dead code identified by cppcheck
parser_keywords.cpp Remove a bunch of dead code identified by cppcheck
parser_keywords.h Remove a bunch of dead code identified by cppcheck
path.cpp Remove a bunch of dead code identified by cppcheck
path.h Add a fancy new paths_are_equivalent function to test for equivalent
postfork.cpp Rework file descriptor handling
postfork.h Big fat refactoring of how redirections work. In fish 1.x and 2.0.0, …
print_help.cpp Revert "Merge pull request #1317 from pullreq/cpp"
print_help.h Apply new indentation, brace, and whitespace style
proc.cpp Allow fish to properly exit from job_continue when receiving a signal
proc.h Clean up some job status messages
reader.cpp Make "readahead" text insertion clear the pager
reader.h New -n option for read builtin
release_notes.html Release notes for fish 2.0
sanity.cpp Revert "Merge pull request #1317 from pullreq/cpp"
sanity.h Apply new indentation, brace, and whitespace style
screen.cpp use configure to define NOMACROS
screen.h Run restyle.sh to enforce style rules.
signal.cpp Revert "Merge pull request #1317 from pullreq/cpp"
signal.h Fix for issue where history file would be read immediately on launch
tokenizer.cpp Ignore comments for backslash newline
tokenizer.h Ignore comments for backslash newline
utf8.cpp Included missing stdint.h header in utf8.cpp
utf8.h Naive reimplementation of utf2wcs and wcs2utf in
util.cpp Revert "Merge pull request #1317 from pullreq/cpp"
util.h Hack around xdm's dumb assumption that the login shell is POSIX compl…
wcstringutil.cpp Implement new `read --null` flag
wcstringutil.h Implement new `read --null` flag
wgetopt.cpp Properly handle invalid arguments in builtins
wgetopt.h Re-point some URLs at the fish homepage fishshell.com
wildcard.cpp Revert "Prepend ./ to "flag-like file" wildcard expansions and comple…
wildcard.h Revert "Prepend ./ to "flag-like file" wildcard expansions and comple…
wutil.cpp Solaris build fixes: use _sys_errs if available
wutil.h Remove a bunch of dead code identified by cppcheck
xdgmime.cpp Revert "Merge pull request #1317 from pullreq/cpp"
xdgmime.h Update Free Software Foundation address.
xdgmimealias.cpp Revert "Merge pull request #1317 from pullreq/cpp"
xdgmimealias.h Update Free Software Foundation address.
xdgmimeglob.cpp Revert "Merge pull request #1317 from pullreq/cpp"
xdgmimeglob.h Update Free Software Foundation address.
xdgmimeint.cpp Revert "Merge pull request #1317 from pullreq/cpp"
xdgmimeint.h Update Free Software Foundation address.
xdgmimemagic.cpp Revert "Merge pull request #1317 from pullreq/cpp"
xdgmimemagic.h Update Free Software Foundation address.
xdgmimeparent.cpp Revert "Merge pull request #1317 from pullreq/cpp"
xdgmimeparent.h Update Free Software Foundation address.

README.md

fish - the friendly interactive shell Build Status

fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family. fish includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions that just work, with no configuration required.

For more on fish's design philosophy, see the design document.

Quick Start

fish generally works like other shells, like bash or zsh. A few important differences can be found at http://fishshell.com/docs/current/tutorial.html by searching for the magic phrase 'unlike other shells'.

Detailed user documentation is available by running help within fish, and also at http://fishshell.com/docs/current/index.html

Building

fish is written in a sane subset of C++98, with a few components from C++TR1. It builds successfully with g++ 4.2 or later, and with clang. It also will build as C++11.

fish can be built using autotools or Xcode. autoconf 2.60 or later is required.

fish depends on a curses implementation, such as ncurses. The headers and libraries are required for building.

fish requires gettext for translation support.

Building the documentation requires Doxygen 1.8.7 or newer.

Autotools Build

autoconf
./configure
make [gmake on BSD]
sudo make install

Xcode Development Build

  • Build the base target in Xcode
  • Run the fish executable, for example, in DerivedData/fish/Build/Products/Debug/base/bin/fish

Xcode Build and Install

xcodebuild install
sudo ditto /tmp/fish.dst /

Help, it didn't build!

If fish reports that it could not find curses, try installing a curses development package and build again.

On Debian or Ubuntu you want:

sudo apt-get install build-essential ncurses-dev libncurses5-dev gettext

On RedHat, CentOS, or Amazon EC2:

sudo yum install ncurses-devel

Runtime Dependencies

fish requires a curses implementation, such as ncurses, to run.

fish requires a number of utilities to operate, which should be present on any Unix, GNU/Linux or OS X system. These include (but are not limited to) hostname, grep, awk, sed, which, and getopt. fish also requires the bc program.

Translation support requires the gettext program.

Some optional features of fish, such as the manual page completion parser and the web configuration tool, require Python.

In order to generate completions from man pages compressed with either lzma or xz, you may need to install an extra Python package. Python versions prior to 2.6 are not supported. For Python versions 2.6 to 3.2 you need to install the module backports.lzma. How to install it depends on your system and how you installed Python. Most Linux distributions should include it as a package named backports-lzma (or similar). From version 3.3 onwards, Python already includes the required module.

Packages for Linux

Instructions on how to find builds for several Linux distros are at https://github.com/fish-shell/fish-shell/wiki/Nightly-builds

Switching to fish

If you wish to use fish as your default shell, use the following command:

chsh -s /usr/local/bin/fish

chsh will prompt you for your password, and change your default shell.

To switch your default shell back, you can run:

chsh -s /bin/bash

Substitute /bin/bash with /bin/tcsh or /bin/zsh as appropriate.

Contact Us

Questions, comments, rants and raves can be posted to the official fish mailing list at https://lists.sourceforge.net/lists/listinfo/fish-users or join us on our IRC channel #fish at irc.oftc.net.

Found a bug? Have an awesome idea? Please open an issue on this github page.

Something went wrong with that request. Please try again.