Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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 Merge branch 'Integration_2.2.0'
etc Stomp exit status of initialization scripts so that fish starts out w…
fish.xcodeproj mimedb: kill mimedb.h
osx Merge branch 'Integration_2.2.0'
po translations: update new strings
share machinectl: Fix fatal errors in __fish_systemd_has_machine_image
tests Fix wildcard expansion in directories without read permissions
.gitattributes Merge branch 'master' into documentation-update
.gitignore .gitignore: fishd is dead
.travis.yml travis: parallel make
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 Stop showing help for function on an error
builtin.h Support for command wrapping ("aliases")
builtin_commandline.cpp Unescape the token returned by 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 Correctly handle mixing named arguments with function name
common.h Correctly handle mixing named arguments with function name
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 Revert "Automatically add include paths for ncurses on Cygwin"
create_wajig_completions.py Add the file that generated the wajig completions to the tree. This s…
env.cpp Correctly un-export an env var when it is shadowed
env.h Add new `functions` flag -V/--inherit-variable
env_universal_common.cpp Fix brace style in one line
env_universal_common.h the slow death of fishd continues
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 Pass the character index, not the character, to parse_util_expand_var…
expand.h Rework error messages to be shorter and to handle more special bash-isms
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 Rework error messages to be shorter and to handle more special bash-isms
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 Use mode 0600 for history file
history.h Support for a "pending item" in history.
input.cpp Add 'bigword' vi key bindings
input.h Add 'bigword' vi key bindings
input_common.cpp Change lookahead_list into a queue
input_common.h Change lookahead_list into a queue
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.
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 Rework error messages to be shorter and to handle more special bash-isms
parse_execution.cpp Rework error messages to be shorter and to handle more special bash-isms
parse_execution.h Pass entire argv content to fish_command_not_found recipients
parse_productions.cpp Simplify begin_header production
parse_productions.h Bringup of function definitions, switch statements with new parser
parse_tree.cpp Rework error messages to be shorter and to handle more special bash-isms
parse_tree.h Simplify begin_header production
parse_util.cpp Remove a redundant implementation of append_syntax_error
parse_util.h Rework error messages to be shorter and to handle more special bash-isms
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 Rework how the mode is reported in fish_vi_mode
reader.h Use a more appropriate type for the reader_test function
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 Add 'bigword' vi key bindings
tokenizer.h Add 'bigword' vi key bindings
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 Fix wildcard expansion in directories without read permissions
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.