aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc_src/Doxyfile.in1161
-rw-r--r--doc_src/and.txt23
-rw-r--r--doc_src/begin.txt30
-rw-r--r--doc_src/bg.txt16
-rw-r--r--doc_src/bind.txt16
-rw-r--r--doc_src/break.txt21
-rw-r--r--doc_src/builtin.txt17
-rw-r--r--doc_src/case.txt35
-rw-r--r--doc_src/cd.txt12
-rw-r--r--doc_src/command.txt14
-rw-r--r--doc_src/commandline.txt51
-rw-r--r--doc_src/complete.txt67
-rw-r--r--doc_src/continue.txt20
-rw-r--r--doc_src/count.txt33
-rw-r--r--doc_src/dirh.txt8
-rw-r--r--doc_src/dirs.txt7
-rw-r--r--doc_src/doc.hdr1832
-rw-r--r--doc_src/else.txt17
-rw-r--r--doc_src/end.txt13
-rw-r--r--doc_src/eval.txt16
-rw-r--r--doc_src/exec.txt16
-rw-r--r--doc_src/exit.txt14
-rw-r--r--doc_src/fg.txt14
-rw-r--r--doc_src/fish.1.in27
-rw-r--r--doc_src/for.txt23
-rw-r--r--doc_src/function.txt48
-rw-r--r--doc_src/functions.txt17
-rw-r--r--doc_src/help.txt16
-rw-r--r--doc_src/if.txt23
-rw-r--r--doc_src/jobs.txt13
-rw-r--r--doc_src/mimedb.txt19
-rw-r--r--doc_src/nextd.txt9
-rw-r--r--doc_src/not.txt21
-rw-r--r--doc_src/open.txt13
-rw-r--r--doc_src/or.txt23
-rw-r--r--doc_src/popd.txt8
-rw-r--r--doc_src/prevd.txt9
-rw-r--r--doc_src/pushd.txt9
-rw-r--r--doc_src/random.txt25
-rw-r--r--doc_src/read.txt26
-rw-r--r--doc_src/return.txt22
-rw-r--r--doc_src/set.txt40
-rw-r--r--doc_src/set_color.txt19
-rw-r--r--doc_src/source.txt19
-rw-r--r--doc_src/switch.txt37
-rw-r--r--doc_src/tokenize.txt14
-rw-r--r--doc_src/while.txt13
-rw-r--r--init/completions/apm.fish8
-rw-r--r--init/completions/apropos.fish20
-rw-r--r--init/completions/apt-build.fish29
-rw-r--r--init/completions/apt-cache.fish33
-rw-r--r--init/completions/apt-cdrom.fish13
-rw-r--r--init/completions/apt-config.fish7
-rw-r--r--init/completions/apt-extracttemplates.fish7
-rw-r--r--init/completions/apt-file.fish17
-rw-r--r--init/completions/apt-ftparchive.fish17
-rw-r--r--init/completions/apt-get.fish64
-rw-r--r--init/completions/apt-key.fish5
-rw-r--r--init/completions/apt-listbugs.fish25
-rw-r--r--init/completions/apt-listchanges.fish13
-rw-r--r--init/completions/apt-move.fish23
-rw-r--r--init/completions/apt-proxy-import.fish10
-rw-r--r--init/completions/apt-rdepends.fish13
-rw-r--r--init/completions/apt-setup.fish4
-rw-r--r--init/completions/apt-show-source.fish10
-rw-r--r--init/completions/apt-show-versions.fish14
-rw-r--r--init/completions/apt-sortpkgs.fish7
-rw-r--r--init/completions/apt-spy.fish20
-rw-r--r--init/completions/apt-src.fish24
-rw-r--r--init/completions/apt-zip-inst.fish10
-rw-r--r--init/completions/apt-zip-list.fish13
-rw-r--r--init/completions/arp.fish11
-rw-r--r--init/completions/at.fish10
-rw-r--r--init/completions/atd.fish6
-rw-r--r--init/completions/atq.fish4
-rw-r--r--init/completions/atrm.fish2
-rw-r--r--init/completions/bc.fish9
-rw-r--r--init/completions/btdownloadcurses.py.fish2
-rw-r--r--init/completions/btdownloadheadless.py.fish34
-rw-r--r--init/completions/bunzip2.fish15
-rw-r--r--init/completions/bzcat.fish8
-rw-r--r--init/completions/bzip2.fish19
-rw-r--r--init/completions/bzip2recover.fish8
-rw-r--r--init/completions/cat.fish12
-rw-r--r--init/completions/cd.fish39
-rw-r--r--init/completions/chgrp.fish12
-rw-r--r--init/completions/chown.fish12
-rw-r--r--init/completions/commandline.fish12
-rw-r--r--init/completions/complete.fish13
-rw-r--r--init/completions/configure.fish12
-rw-r--r--init/completions/cut.fish10
-rw-r--r--init/completions/cvs.fish53
-rw-r--r--init/completions/date.fish11
-rw-r--r--init/completions/df.fish18
-rw-r--r--init/completions/diff.fish26
-rw-r--r--init/completions/du.fish20
-rw-r--r--init/completions/echo.fish5
-rw-r--r--init/completions/emacs.fish10
-rw-r--r--init/completions/fish.fish5
-rw-r--r--init/completions/function.fish4
-rw-r--r--init/completions/functions.fish6
-rw-r--r--init/completions/gcc.fish96
-rw-r--r--init/completions/gprof.fish34
-rw-r--r--init/completions/grep.fish47
-rw-r--r--init/completions/gunzip.fish25
-rw-r--r--init/completions/gzip.fish23
-rw-r--r--init/completions/help.fish29
-rw-r--r--init/completions/id.fish8
-rw-r--r--init/completions/ifconfig.fish25
-rw-r--r--init/completions/kill.fish35
-rw-r--r--init/completions/less.fish52
-rw-r--r--init/completions/ls.fish71
-rw-r--r--init/completions/make.fish23
-rw-r--r--init/completions/makedepend.fish13
-rw-r--r--init/completions/man.fish64
-rw-r--r--init/completions/mimedb.fish9
-rw-r--r--init/completions/modprobe.fish23
-rw-r--r--init/completions/mount.fish68
-rw-r--r--init/completions/mplayer.fish85
-rw-r--r--init/completions/mv.fish12
-rw-r--r--init/completions/nextd.fish1
-rw-r--r--init/completions/perl.fish20
-rw-r--r--init/completions/pine.fish26
-rw-r--r--init/completions/ping.fish30
-rw-r--r--init/completions/prevd.fish1
-rw-r--r--init/completions/ps.fish37
-rw-r--r--init/completions/pushd.fish1
-rw-r--r--init/completions/python.fish14
-rw-r--r--init/completions/read.fish7
-rw-r--r--init/completions/rm.fish11
-rw-r--r--init/completions/rmdir.fish8
-rw-r--r--init/completions/rpm.fish135
-rw-r--r--init/completions/ruby.fish25
-rw-r--r--init/completions/scp.fish35
-rw-r--r--init/completions/screen.fish37
-rw-r--r--init/completions/sed.fish12
-rw-r--r--init/completions/service.fish7
-rw-r--r--init/completions/set.fish45
-rw-r--r--init/completions/set_color.fish5
-rw-r--r--init/completions/sort.fish21
-rw-r--r--init/completions/ssh.fish106
-rw-r--r--init/completions/su.fish12
-rw-r--r--init/completions/tar.fish62
-rw-r--r--init/completions/test.fish39
-rw-r--r--init/completions/tokenize.fish3
-rw-r--r--init/completions/top.fish14
-rw-r--r--init/completions/touch.fish11
-rw-r--r--init/completions/uname.fish11
-rw-r--r--init/completions/uniq.fish15
-rw-r--r--init/completions/valgrind.fish72
-rw-r--r--init/completions/vared.fish3
-rw-r--r--init/completions/w.fish6
-rw-r--r--init/completions/wc.fish7
-rw-r--r--init/completions/wget.fish110
-rw-r--r--init/completions/whatis.fish3
-rw-r--r--init/completions/who.fish20
-rw-r--r--init/completions/xprop.fish32
-rw-r--r--init/completions/xsel.fish18
-rw-r--r--init/completions/yum.fish75
-rw-r--r--init/completions/zcat.fish10
-rw-r--r--init/completions/zip.fish32
-rw-r--r--init/fish.in84
-rw-r--r--init/fish_complete.fish249
-rw-r--r--init/fish_function.fish674
-rw-r--r--init/fish_inputrc36
-rw-r--r--init/fish_interactive.fish110
-rwxr-xr-xtests/gen_output.fish17
-rwxr-xr-xtests/test.fish42
-rw-r--r--tests/test1.err0
-rw-r--r--tests/test1.in53
-rw-r--r--tests/test1.out7
-rw-r--r--tests/test1.status1
-rw-r--r--tests/test2.err0
-rw-r--r--tests/test2.in6
-rw-r--r--tests/test2.out1
-rw-r--r--tests/test2.status1
-rw-r--r--tests/test3.err0
-rw-r--r--tests/test3.in113
-rw-r--r--tests/test3.out9
-rw-r--r--tests/test3.status1
-rw-r--r--tests/test4.err0
-rw-r--r--tests/test4.in35
-rw-r--r--tests/test4.out4
-rw-r--r--tests/test4.status1
-rw-r--r--tests/test5.err0
-rw-r--r--tests/test5.in25
-rw-r--r--tests/test5.out3
-rw-r--r--tests/test5.status1
188 files changed, 8114 insertions, 0 deletions
diff --git a/doc_src/Doxyfile.in b/doc_src/Doxyfile.in
new file mode 100644
index 00000000..0e2c0069
--- /dev/null
+++ b/doc_src/Doxyfile.in
@@ -0,0 +1,1161 @@
+# Doxyfile 1.3.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = fish
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = @PACKAGE_VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = builtin_doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
+# cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation.
+
+SHOW_DIRECTORIES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT =
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS = *.doxygen
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = NO
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = YES
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .1
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
+# recommended to install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes that
+# lay further from the root node will be omitted. Note that setting this option to
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that a graph may be further truncated if the graph's image dimensions are
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/doc_src/and.txt b/doc_src/and.txt
new file mode 100644
index 00000000..ca454bce
--- /dev/null
+++ b/doc_src/and.txt
@@ -0,0 +1,23 @@
+
+\section and and - Conditionally execute a command
+
+\subsection and-synopsis Synopsis
+ <tt>and COMMAND1; COMMAND2</tt>
+
+\subsection and-description Description
+
+The \c and builtin is used to execute one command, and if it returns
+zero status, also execute a second command.
+
+\subsection and-example Example
+
+The following code runs the \c make command to build a program, and if it suceeds, it runs <tt>make install</tt>, which installs the program.
+<pre>
+and make; make install
+</pre>
+
+\c or and \c and can be nested, as in this example, that attempts to build and install a program, and removed the files created by the build process on failiure
+
+<pre>
+or and make; make install; make clean
+</pre>
diff --git a/doc_src/begin.txt b/doc_src/begin.txt
new file mode 100644
index 00000000..02284f21
--- /dev/null
+++ b/doc_src/begin.txt
@@ -0,0 +1,30 @@
+
+\section begin begin - Start a new block of code
+
+\subsection begin-synopsis Synopsis
+ <tt>begin; [COMMAND;...] end </tt>
+
+\subsection begin-description Description
+
+The \c begin builtin is used to create a new block of code. The block
+is unconditionally erxecuted. Begin is equivalent to <tt>if
+true</tt>. The begin command is used to group any number of commands
+into a block. The reason for this is usually either to introduce a new
+variable scope or to redirect the input ot output of this set of
+commands as a group.
+
+\subsection begin-example Example
+
+The following code sets a number of variables inside of a block
+scope. Since the variables are set inside the block and have local
+scope, they will be automatically deleted when the block ends.
+
+<pre>
+begin
+ set -x PIRATE Yarrr
+ ...
+end
+# This will not output anything, since PIRATE went out of scope at the end of
+# the block and was killed
+echo $PIRATE
+</pre>
diff --git a/doc_src/bg.txt b/doc_src/bg.txt
new file mode 100644
index 00000000..d1b6625c
--- /dev/null
+++ b/doc_src/bg.txt
@@ -0,0 +1,16 @@
+\section bg bg - send to background
+
+\subsection bg-synopsis Synopsis
+<tt>bg [PID...]</tt>
+
+\subsection bg-description Description
+Sends the specified jobs to the background. A background job is
+executed simultaneously with fish, and does not have access to the
+keyboard. If no job is specified, the last job to be used is put in the background. If PID is specified, the jobs with the specified group ids are put in the background.
+
+The PID of the desired process is usually found by using process globbing.
+
+\subsection bg-example Example
+
+<tt>bg \%0</tt> will put the job with job id 0 in the background.
+
diff --git a/doc_src/bind.txt b/doc_src/bind.txt
new file mode 100644
index 00000000..54e0cd9f
--- /dev/null
+++ b/doc_src/bind.txt
@@ -0,0 +1,16 @@
+\section bind bind - Handle key bindings.
+
+\subsection bind-synopsis Synopsis
+<tt>bind [OPTIONS] [BINDINGS...] </tt>
+
+The <tt>bind</tt> builtin causes fish to add the readline style bindings specified by <tt>BINDINGS</tt> to the list of key bindings. For more information on specifying keyboard bindings, use <tt>man readline</tt> to access the readline documentation.
+
+\subsection bind-description Description
+- <tt>-M MODE</tt> or <tt>--set-mode=MODE</tt> sets the current input mode to MODE.
+
+
+\subsection bind-example Example
+
+<tt>bind -M vi</tt> changes to the vi input mode
+
+<tt>bind '"\\M-j": jobs'</tt> Binds the jobs command to the Alt-j keyboard shortcut
diff --git a/doc_src/break.txt b/doc_src/break.txt
new file mode 100644
index 00000000..03e8a416
--- /dev/null
+++ b/doc_src/break.txt
@@ -0,0 +1,21 @@
+
+\section break break - stop the innermost currently evaluated loop
+
+\subsection break-synopsis Synopsis
+ <tt>LOOP_CONSTRUCT; [COMMANDS...] break; [COMMANDS...] end</tt>
+
+\subsection break-description Description
+The \c break builtin is used to halt a currently running loop, such as a <a href="#for">for</a> loop or a <a href="#while">while</a> loop. It is usually added inside of a conditional block such as an <a href="#if">if</a> statement or a <a href="#switch">switch</a> statement.
+
+\subsection break-example Example
+The following code searches all .c files for smurfs, and halts at the first occurance.
+<p>
+<tt>for i in *.c;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;if grep smurf $i;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo Smurfs are present in $i;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;end;
+<br>end;
+</tt>
+</p>
+
diff --git a/doc_src/builtin.txt b/doc_src/builtin.txt
new file mode 100644
index 00000000..528f058e
--- /dev/null
+++ b/doc_src/builtin.txt
@@ -0,0 +1,17 @@
+
+\section builtin builtin - run a builtin command
+
+\subsection builtin-synopsis Synopsis
+ <tt>builtin BUILTINNAME [OPTIONS...]</tt>
+
+\subsection builtin-description Description
+
+- <tt>-n</tt> or <tt>--names</tt> List the names of all defined builtins
+
+Prefixing a command with the word 'builtin' forces fish to ignore any aliases with the same name.
+
+\subsection builtin-example Example
+
+<tt>builtin jobs</tt>
+
+causes fish to execute the jobs builtin, even if a function named jobs exists.
diff --git a/doc_src/case.txt b/doc_src/case.txt
new file mode 100644
index 00000000..44246c9b
--- /dev/null
+++ b/doc_src/case.txt
@@ -0,0 +1,35 @@
+\section case case - conditionally execute a block of commands
+
+\subsection case-synopsis Synopsis
+<tt>switch VALUE; [case [WILDCARD...]; [COMMANDS...];...] end</tt>
+
+\subsection case-description Description
+
+The \c switch statement is used to perform one of several blocks of
+commands depending on whether a specified value equals one of several
+wildcarded values. The \c case statement is used together with the \c
+switch statement in order to determine which block should be
+performed.
+
+\subsection case-example Example
+
+If the variable \$animal contains the name of an animal, the following
+code would attempt to classify it:
+
+<p>
+<pre>
+switch $animal
+ case cat
+ echo evil
+ case wolf dog human moose dolphin whale
+ echo mammal
+ case duck goose albatros
+ echo bird
+ case shark trout stingray
+ echo fish
+end
+</pre>
+</p>
+<p>
+If the above code was run with \$animal set to \c whale, the output would be \c mammal.
+</p>
diff --git a/doc_src/cd.txt b/doc_src/cd.txt
new file mode 100644
index 00000000..0b79bc0e
--- /dev/null
+++ b/doc_src/cd.txt
@@ -0,0 +1,12 @@
+\section cd cd - change directory
+
+\subsection cd-synopsis Synopsis
+<tt>cd [DIRECTORY]</tt>
+
+\subsection cd-description Description
+Changes the current directory. If <tt>DIRECTORY</tt> is supplied it
+will become the new directory. If \c DIRECTORY is a relative path, the
+CDPATH environment variable will be separated using the : as
+separator, and the resulting list will be searched for a suitable new
+current directory. If CDPATH is not set, it is assumed to be '.'. If
+\c DIRECTORY is not specified, \$HOME will be the new directory.
diff --git a/doc_src/command.txt b/doc_src/command.txt
new file mode 100644
index 00000000..369586de
--- /dev/null
+++ b/doc_src/command.txt
@@ -0,0 +1,14 @@
+\section command command - run a program
+
+\subsection command-synopsis Synopsis
+<tt>command COMMANDNAME [OPTIONS...]</tt>
+
+\subsection command-description Description
+prefixing a command with the word 'command' forces fish to ignore any aliases or builtins with the same name.
+
+\subsection command-example Example
+
+
+<tt>command ls</tt>
+
+causes fish to execute the ls program, even if there exists a 'ls' alias.
diff --git a/doc_src/commandline.txt b/doc_src/commandline.txt
new file mode 100644
index 00000000..2f9ec02c
--- /dev/null
+++ b/doc_src/commandline.txt
@@ -0,0 +1,51 @@
+\section commandline commandline - Set or get the current commandline buffer
+
+\subsection commandline-synopsis Synopsis
+<tt>commandline [OPTIONS] [CMD]</tt>
+
+\subsection commandline-description Description
+
+
+- \c CMD is the new value of the commandline. If unspecified, the
+ current value of the commandline is written to standard output.
+
+The following switches change the way \c commandline updates the
+commandline
+
+- \c -a or \c --append do not remove the current commandline, append
+ the specified string at the end of it
+- \c -i or \c --insert do not remove the current commandline, insert
+ the specified string at the current cursor position
+- \c -r or \c --replace remove the current commandline and replace it
+ with the specified string (default)
+
+The following switches change what part of the commandline is printed
+or updated
+
+- \c -b or \c --current-buffer select the entire buffer (default)
+- \c -j or \c --current-job select the current job
+- \c -p or \c --current-process select the current process
+- \c -t or \c --current_token select the current token.
+
+The following switch changes the way \c commandline prints the current
+commandline
+
+- \c -c or \c --cut-at-cursor only print selection up until the
+ current cursor position
+- \c o or \c --tokenize tokenize the selection and print one string-type token per line
+
+Other switches
+
+- \c -f or \c --function inject readline functions into the
+ reader. This option can not be combined with any other option. It
+ will cause any additional arguments to be interpreted as readline
+ functions, and these functions will be injected into the reader, so
+ that they will be returned to the reader before any additional
+ actual keypresses are read.
+
+\subsection commandline-example Example
+
+<tt>commandline -j $history[3]</tt>
+
+replaces the job under the cursor with the third item from the
+commandline history.
diff --git a/doc_src/complete.txt b/doc_src/complete.txt
new file mode 100644
index 00000000..30d643eb
--- /dev/null
+++ b/doc_src/complete.txt
@@ -0,0 +1,67 @@
+\section complete complete - edit command specific tab-completions.
+
+\subsection complete-synopsis Synopsis
+<tt>complete (-c|--command|-p|--path) COMMAND [(-s|--short-option) SHORT_OPTION] [(-l|--long-option|-o|--old-option) LONG_OPTION [(-a||--arguments) OPTION_ARGUMENTS] [(-d|--description) DESCRIPTION] </tt>
+
+\subsection complete-description Description
+- <tt>COMMAND</tt> is the name of the command for which to add a completion
+- <tt>SHORT_OPTION</tt> is a one character option for the command
+- <tt>LONG_OPTION</tt> is a multi character option for the command
+- <tt>OPTION_ARGUMENTS</tt> is parameter containing a space-separated list of possible option-arguments, which may contain subshells
+- <tt>DESCRIPTION</tt> is a description of what the option and/or option arguments do
+- <tt>-e</tt> or <tt>--erase</tt> implies that the specified completion should be deleted
+- <tt>-f</tt> or <tt>--no-files</tt> specifies that the option specified by this completion may not be followed by a filename
+- <tt>-n</tt> or <tt>--condition</tt> specides a shell command that must return 0 if the completion is to be used. This makes it possible to specify completions that should only be used in some cases.
+- <tt>-o</tt> or <tt>--old-option</tt> implies that the command uses old long style options with only one dash
+- <tt>-p</tt> or <tt>--path</tt> implies that the string COMMAND is the full path of the command
+- <tt>-r</tt> or <tt>--require-parameter</tt> specifies that the option specified by this completion always must have an option argument, i.e. may not be followed by another option
+- <tt>-u</tt> or <tt>--unauthorative</tt> implies that there may be more options than the ones specified, and that fish should not assume that options not listed are spelling errors
+- <tt>-x</tt> or <tt>--exclusive</tt> implies both <tt>-r</tt> and <tt>-f</tt>
+
+Command specific tab-completions in \c fish are based on the notion
+of options and arguments. An option is a parameter which begins with a
+hyphen, such as '-h', '-help' or '--help'. Arguments are parameters
+that do not begin with a hyphen. Fish recognizes three styles of
+options, the same styles as the GNU version of the getopt
+library. These styles are:
+
+- Short options, like '-a'. Short options are a single character long, are preceeded by a single hyphen and may ge grouped together (like '-la', which is equivalent to '-l -a'). Option arguments may be specified in the following parameter ('-w 32') or by appending the option with the value ('-w32').
+- Old style long options, like '-Wall'. Old style long options are more than one character long, are preceeded by a single hyphen and may not be grouped together. Option arguments are specified in the following parameter ('-ao null').
+- GNU style long options, like '--colors'. GNU style long options are more than one character long, are preceeded by two hyphens, and may not be grouped together. Option arguments may be specified in the following parameter ('--quoting-style shell') or by appending the option with a '=' and the value ('--quoting-style=shell'). GNU style long options may be abbrevated so long as the abbrevation is unique ('--h' is equivalent to '--help' if help is the only long option beginning with an 'h').
+
+\c complete only allows one of old style long options and GNU style
+long options to be used on a specific command, but short options can
+always be specified.
+
+When erasing completions, it is possible to either erase all
+completions for a specific command by specifying <tt>complete -e -c
+COMMAND</tt>, or by specifying a specific completion option to delete
+by specifying either a long, short or old style option.
+
+\subsection complete-example Example
+
+The short style option <tt>-o</tt> for the \c gcc command requires
+that a file follows it. This can be done using writing <tt>complete
+-c gcc -s o -r</tt>.
+
+The short style option <tt>-d</tt> for the \c grep command requires
+that one of the strings 'read', 'skip' or 'recurse' is used. This can
+be specified writing <tt>complete -c grep -s d -x -a "read skip
+recurse"</tt>.
+
+The \c su command takes any username as an argument. Usernames are
+given as the first colon-separated field in the file /etc/passwd. This
+can be specified as: <tt>complete -x -c su -d "Username" -a "(cat
+/etc/passwd|cut -d : -f 1)" </tt>.
+
+The \c rpm command has several different modes. If the \c -e or \c
+--erase flag has been specified, \c rpm should delete one or more
+packages, in which case several switches related to deleting packages
+are valid, like the \c nodeps switch.
+
+This can be written as:
+
+<tt>complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d 'Dont check dependencies'</tt>
+
+where \c __fish_contains_opt is a function that checks the commandline buffer for the presense of a specified set of options.
+
diff --git a/doc_src/continue.txt b/doc_src/continue.txt
new file mode 100644
index 00000000..43335240
--- /dev/null
+++ b/doc_src/continue.txt
@@ -0,0 +1,20 @@
+
+\section continue continue - skip the rest of the current lap of the innermost currently evaluated loop
+
+\subsection continue-synopsis Synopsis
+<tt>LOOP_CONSTRUCT; [COMMANDS...] continue; [COMMANDS...] end</tt>
+
+\subsection continue-description Description
+The \c continue builtin is used to skip the current lap of the innermost currently running loop, such as a <a href="#for">for</a> loop or a <a href="#while">while</a> loop. It is usually added inside of a conditional block such as an <a href="#if">if</a> statement or a <a href="#switch">switch</a> statement.
+
+\subsection continue-example Example
+The following code removes all tmp files without smurfs.
+<p>
+<tt>for i in *.tmp;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;if grep smurf $i;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;end;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;rm $i;
+<br>end;
+</tt>
+</p>
diff --git a/doc_src/count.txt b/doc_src/count.txt
new file mode 100644
index 00000000..11009dd8
--- /dev/null
+++ b/doc_src/count.txt
@@ -0,0 +1,33 @@
+
+\section count count - Count the number of elements of an array
+
+\subsection count-synopsis Synopsis
+ <tt>count $VARIABLE</tt>
+
+\subsection count-description Description
+
+<tt>count</tt> returns the number of arguments that where passed to
+it. This is usually used to find out how many elements an environment
+variable array contains, but this is not the only potential usage for
+the count command.
+
+The count command does not accept any options, not even '-h'. This way
+the user does not have to worry about an array containing elements
+such as dashes. \c fish performs a special check when invoking the
+count program, and if the user uses a help option, this help page is
+displayed, but if a help option is contained inside of a variable or
+is the result of expantion, it will be passed on to the count program.
+
+\subsection count-example Example
+
+<pre>
+count $PATH
+</pre>
+
+returns the number of directories in the users PATH variable.
+
+<pre>
+count *.txt
+</pre>
+
+returns the number of files in the current working directory ending with the suffix '.txt'.
diff --git a/doc_src/dirh.txt b/doc_src/dirh.txt
new file mode 100644
index 00000000..539607dd
--- /dev/null
+++ b/doc_src/dirh.txt
@@ -0,0 +1,8 @@
+\section dirh dirh
+
+\subsection dirh-synopsis Synopsis
+<tt>dirh</tt>
+
+\subsection dirh-description Description
+<tt>dirh</tt> prints the current directory history. The current position in the
+history is highlighted using <tt>$fish_color_history_current</tt>.
diff --git a/doc_src/dirs.txt b/doc_src/dirs.txt
new file mode 100644
index 00000000..90d90574
--- /dev/null
+++ b/doc_src/dirs.txt
@@ -0,0 +1,7 @@
+\section dirs dirs
+
+\subsection dirs-synopsis Synopsis
+<tt>dirs</tt>
+
+\subsection dirs-description Description
+<tt>dirs</tt> prints the current directory stack.
diff --git a/doc_src/doc.hdr b/doc_src/doc.hdr
new file mode 100644
index 00000000..0ba39605
--- /dev/null
+++ b/doc_src/doc.hdr
@@ -0,0 +1,1832 @@
+/** \mainpage fish
+
+\c fish is a user friendly shell intended mostly for interactive use.
+A shell is a program which allows you to execute other programs by
+typing their names. For updates on \c fish, go to the <a
+href="http://roo.no-ip.org/fish/"><tt>fish</tt> homepage</a>.
+
+\section syntax Syntax overview
+
+Shells like \c fish are used by giving them commands. Every \c fish command follows the same simple syntax.
+
+A command is executed by writing the name of the command followed by any arguments.
+
+Example:
+
+<tt>echo hello world</tt>
+
+calls the \c echo command. \c echo is a command which will write its
+arguments to the screen. In the example above, the output will be
+'hello world'. Everything in fish is done with commands. There are
+commonds for performing a set of command multiple times, commands for
+assigning variables, commands for treating a group of commands as a
+single command, etc.. And every single command follows the same simple
+syntax.
+
+If you wish to find out more about the echo command used above, read
+the manual page for the echo command by writing:
+
+<tt>man echo</tt>
+
+\c man is a command for displaying a manual page on a given
+topic. There are manual pages for almost every command on most
+computers. There are also manual pages for many other things, such as
+system libraries and important files.
+
+Every program on a computer can be used as a command in \c fish. If
+the program file is located in one of the directories in the <a
+href="#variables-special">PATH</a>, it is sufficient to type the name
+of the program to use it. Otherwise the whole filename, including the
+directory (like \c /home/me/code/checkers/checkers or \c ../checkers)
+has to be used.
+
+Here is a list of some useful commands:
+
+- \c cd, change the current directory
+- \c ls, list the contents of a directory
+- \c man, print a manual page
+- \c mv, move files
+- \c cp, copy files
+- \c open, open files with the default application associated with each filetype
+- \c less, read the contents of files
+
+Commands and parameters are separated by the space character
+(&nbsp;). Every command ends with either a newline (i.e. by pressing
+the return key) or a semicolon (;). More than one command can be
+written on the same line by separating them with semicolons.
+
+
+\subsection quotes Quotes
+
+Sometimes features such as <a href="#globbing">parameter expansion</a>
+and <a href="#escapes">character escapes</a> get in the way. When that
+happens, the user can write a parameter within quotes, either '
+(single quote) or " (double quote). There is no difference between
+single quoted and double quoted strings. A quoted parameter will not
+be parameter expanded, may contain spaces, and the only escape
+sequences allowed is the corresponding quote character. Single and
+double quotes may be nested.
+
+Example:
+
+<tt>rm "cumbersome filename.txt"</tt>
+
+Will remove the file 'cumbersome filename.txt'.
+
+\subsection escapes Escaping characters
+
+Some characters can not be written directly on the command line. For
+these characters, so called escape sequences are provided. These are:
+
+- <tt>'\\n'</tt>, escapes a newline character
+- <tt>'\\t'</tt>, escapes the tab character
+- <tt>'\\b'</tt>, escapes the backspace character
+- <tt>'\\r'</tt>, escapes the carriage return character
+- <tt>'\\e'</tt>, escapes the escape character
+- <tt>'\\ '</tt>, escapes the space character
+- <tt>'\\$'</tt>, escapes the dollar character
+- <tt>'\\\\'</tt>, escapes the backslash character
+- <tt>'\\*'</tt>, escapes the star character
+- <tt>'\\?'</tt>, escapes the question mark character
+- <tt>'\\~'</tt>, escapes the tilde character
+- <tt>'\\#'</tt>, escapes the hash character
+- <tt>'\\('</tt>, escapes the left parenthesis character
+- <tt>'\\)'</tt>, escapes the right parenthesis character
+- <tt>'\\{'</tt>, escapes the left curly bracket character
+- <tt>'\\}'</tt>, escapes the right curly bracket character
+- <tt>'\\['</tt>, escapes the left bracket character
+- <tt>'\\]'</tt>, escapes the right bracket character
+- <tt>'\\\<'</tt>, escapes the less than character
+- <tt>'\\\>'</tt>, escapes the more than character
+- <tt>'\\^'</tt>, escapes the circumflex character
+- <tt>'\\x<i>xx</i>'</tt>, where <tt><i>xx</i></tt> is a hexadecimal number, escapes the ascii character with the specified value
+- <tt>'\\o<i>ooo</i>'</tt>, where <tt><i>ooo</i></tt> is an octal number, escapes the ascii character with the specified value
+- <tt>'\\u<i>xxxx</i>'</tt>, where <tt><i>xxxx</i></tt> is a hexadecimal number, escapes the unicode character with the specified value
+- <tt>'\\U<i>xxxxxxxx</i>'</tt>, where <tt><i>xxxxxxxx</i></tt> is a hexadecimal number, escapes the unicode character with the specified value
+
+\subsection redirects IO redirection
+
+Most program use three types of input/output (IO), each represented by
+a number called a file descriptor (FD). These are:
+
+- Standard input, FD 0, for reading, defaults to reading from the keyboard.
+- Standard output, FD 1, for writing, defaults to writing to the screen.
+- Standard error, FD 2, for writing, errors and warnings defaults to writing to the screen.
+
+The reason for providing for two methods of output is so errors and
+warnings can be separated from program output.
+
+Any file descriptor can be directed to a different output than it's
+default through a simple mechanism called a redirecton.
+
+An example of a file redirection is <tt> echo hello \>output.txt</tt>,
+which directs the output of the echo command to the file error.txt.
+
+- To redirect standard input, write <tt>\<SOURCE_FILE</tt>
+- To redirect standard output, write <tt>\>DESTINATION</tt>
+- To redirect standard error, write <tt>^DESTINATION</tt>
+- To redirect standard output to a file which will be appended, write <tt>\>\>DESTINATION_FILE</tt>
+- To redirect standard error to a file which will be appended, write <tt>^^DESTINATION_FILE</tt>
+
+<tt>DESTINATION</tt> can be one of the following:
+
+- A filename. The output will be written to the specified file.
+- An ampersand (\&) followed by the number of a file descriptor. The file descriptor will be a duplicate of the specified file descriptor.
+- A minus sign (-). The FD will be closed.
+
+Example:
+
+To redirect both standard output and standard error to the file
+all_output.txt, you can write <tt>echo Hello \>all_output.txt
+^\&1</tt>.
+
+Any FD can be redirected in an arbitrary way by prefixing the
+redirection with the number of the FD.
+
+- To redirect input of FD number N, write <tt>N\<DESTINATION</tt>
+- To redirect output of FD number N, write <tt>N\>DESTINATION</tt>
+- To redirect output of FD number N to a file which will be appended, write <tt>N\>\>DESTINATION_FILE</tt>
+
+Example: <tt>echo Hello 2\>-</tt> and <tt>echo Hello ^-</tt> are
+equivalent.
+
+\subsection piping Piping
+
+The user can string together multiple commands into a so called
+pipeline. This means that the standard output of one command will be read
+in as standard input into the next command. This is done by separating
+the commands by the pipe character (|).
+
+For example
+
+<tt>cat foo.txt | head</tt>
+
+will call the 'cat' program with the parameter 'foo.txt', which will
+print the contents of the file 'foo.txt'. The contents of foo.txt will
+then be filtered through the program 'head', which will pass on the
+first ten lines of the file to the screen. For more information on how
+to combine commands through pipes, read the manual pages of the
+commands you want to use using the 'man' command. If you want to find
+out more about the 'cat' program, type <tt>man cat</tt>.
+
+\subsection syntax-background Background jobs
+
+When you start a job in \c fish, \c fish itself will pause, and give
+control of the terminal to the program just started. Sometimes, you
+want to continue using the commandline, and have the job run in the
+background. To create a background job, append a \& (ampersand) to
+your command. This will tell fish to run the job in the background.
+
+\subsection syntax-job-control Job control
+
+
+Most programs allow you to suspend the programs execution and return
+control to \c fish by Pressing ^Z (Press and hold the Control key and
+press 'z'). Once back at the \c fish commandline, you can start other
+programs and do anything you want. If you then want to go back to the
+suspended command by using the <a href="builtins.html#fg">fg</a>
+command.
+
+If you instead want to put a suspended job into the foreground, use
+the <a href="builtins.html#fg">fg</a> command.
+
+To get a listing of all currently started jobs, use the <a
+href="builtins.html#jobs">jobs</a> command.
+
+
+\subsection syntax-words Some common words
+
+This is a short explanation of some of the commonly used words in fish.
+
+- argument, a parameter given to a command
+- builtin, a command that is implemented as part of the shell
+- command, a program
+- function, a command that is implemented as a set of fish commands
+- job, a running pipeline or command
+- pipeline, a set of commands stringed together so that the output of one command is the input of the next command
+- redirection, a operation that changes one of the input/output streams associated with a job
+
+\section help Help
+
+\c fish has an extensive help system. Use the <a
+href="commands.html#help"><tt>help</tt></a> command to obtain help on
+a specific subject or command. For instance, writing <tt>help
+syntax</tt> displays the <a href="#syntax">syntax section</a> of this
+documentation.
+
+Help on a specific builtin can also be obtained with the <tt>-h</tt>
+parameter. For instance, to obtain help on the \c fg builtin, either
+type <tt>fg -h</tt> or <tt>help fg</tt>.
+
+
+\section completion Tab completion
+
+Tab completion is one of the most time saving features of any modern
+shell. By tapping the tab key, the user asks \c fish to guess the rest
+of the command or parameter that the user is currently typing. If
+there is only one possible completion, \c fish will write it out. If
+there is more than one completion, \c fish will write out the longest
+common prefix that all completions have in common. If all completions
+differ on the first character, a list of all possible completions is
+printed. The list features descriptions of the completions and if the
+list doesn't fit the screen, it is scrollable by using the arrow keys,
+the page up/page down keys or the space bar. Press any other key will
+exit the list and insert the presssed key into the command line.
+
+These are the general purpose tab completions that \c fish provides:
+
+- Completion of commands, both builtins, functions and regular programs.
+- Completion of environment variable names.
+- Completion of usernames for tilde expansion.
+- Completion of filenames, even on strings with wildcards such as '*' and '?'.
+- Completion of job id, job name and process names for <a href="#expand-process">process expansion</a>.
+
+\c fish provides a large number of program specific completions. Most
+of these completions are simple options like the \c -l option for \c
+ls, but some are more advanced. The latter include:
+
+- The programs 'man' and 'whatis' complete using all installed
+manual pages.
+- The 'make' program complete using all targets in the Makefile in
+the current directory.
+- The 'mount' command complete using all mount points specified in fstab.
+- The 'ssh' command complete using all hosts in that are stored
+in the known_hosts file. (see the ssh documentation for more information)
+- The 'su' command complete using all users on the system
+- The \c apt-get, \c rpm and \c tym commands complete using all installed packages.
+
+Specifying your own completions is easy. If the command 'myprog' has
+an option '-o' which can also be written as '--output', which requires
+an additional value of either 'yes' or 'no' and decides if the program
+should write anything, this can be specified by writing:
+
+<tt>complete -c myprog -s o -l output -r -a "yes no" -d "Write output"</tt>
+
+For a more complete description of how to specify your own
+completions, go <a href="builtins.html#complete">here</a> or write 'complete --help' in the \c fish shell.
+
+If you wish to use a completion, you should consider adding it to your
+startup files. When completion has been requested for a command \c
+COMMAND, fish will automatically look for the file
+~/.fish.d/completions/COMMAND.fish. If it exists, it will be
+automatically loaded. For examples of how to write your own complex
+completions, study the completions in /etc/fish.d/completions.
+
+\section expand Parameter expansion (Globbing)
+
+When an argument for a program is given on the commandline, it
+undergoes the process of parameter expantion before it is sent on to
+the command. There are many ways in which the user can specify a
+parameter to be expanded. These include:
+
+\subsection expand-wildcards Wildcards
+
+If a star (*) or a question mark (?) is present in the parameter, \c
+fish attempts to mach the given parameter to any files in such a
+way that '?' can match any character except '/' and '*' can match any
+string of characters not containing '/'.
+
+Example:
+<code>a*</code> matches any files beginning with an 'a' in the current directory.
+
+<code>???</code> matches any file in the current directory whose name is exactly three characters long.
+
+\subsection expand-command-substitution Command substitution
+
+If a parameter contains a set of parenthesis, the text enclosed by the
+parentesis will be interpreted as a list of commands. Om expantion,
+this list is executed, and substituted by the output. If the output is
+more than one line long, each line will be expanded to a new
+parameter.
+
+Example:
+
+The command <code>echo (basename image.jpg .jpg).png</code> will output 'image.png'.
+
+The command <tt>for i in *.jpg; convert $i (basename $i .jpg).png;
+end</tt> will convert all Jpeg files in the current directory to the
+PNG format.
+
+
+\subsection expand-brace Brace expansion
+
+A comma separated list of characters enclosed en curly braces will be
+expanded so each element of the list becomes a new parameter.
+
+Example:
+
+<tt>echo input.{c,h,txt}</tt> outputs 'input.c input.h input.txt'
+
+The command <tt>mv *.{c,h} src/</tt> moves all files with the suffix
+'.c' or '.h' to the subdirectory src.
+
+\subsection expand-variable Variable expansion
+
+A dollar sign followed by a string of characters is expanded into the
+value of the environment variable with the same name. For an
+introduction to the concept of environment variables, read the <a
+href="#variables"> Environment variables</a> section.
+
+Example:
+
+<tt> echo \$HOME</tt> prints the home directory of the current
+user. If you wish to combine environment variables with text, you can
+encase the variables within braces to embed a variable inside running
+text like <tt>echo Konnichiwa {$USER}san</tt>, which will print a
+personalized Japanese greeting.
+
+\subsection expand-home Home directory expansion
+
+The ~ (tilde) character at the beginning of a parameter, followed by a
+username, is expanded into the home directory of the specified user. A
+lone ~, or a ~ followed by a slash, is expanded into the home
+directory of the process owner.
+
+\subsection expand-process Process expansion
+
+The \% (percent) character at the beginning of a parameter followed by
+a string is expanded into a process id. The following expantions are
+performed:
+
+- If the string is the entire word \c self, the shells pid is the result
+- Otherwise, if the string is the id of a job, the result is the process
+group id of the job.
+- Otherwise, if any child processes match the specified string, their
+pids are the result of the expansion.
+- Otherwise, if any processes owned by the user match the specified
+string, their pids are the result of the expansion.
+
+This form of expansion is useful for commands like kill and fg, which
+take the process ids as an argument.
+
+Example:
+
+<tt>fg \%ema</tt> will search for a process whose command line begins
+with the letters 'ema', such as emacs, and if found, put it in the
+foreground.
+
+<tt>kill -s SIGINT \%3</tt> will send the SIGINT signal to the job
+with job id 3.
+
+\subsection combine Combining different expansions
+
+All of the above expansions can be combined. If several expansions
+result in more than one parameter, all possible combinations are
+created.
+
+Example:
+
+If the current directory contains the files 'foo' and 'bar', the command
+<tt>echo a(ls){1,2,3} </tt>
+will output 'abar1 abar2 abar3 afoo1 afoo2 afoo3'.
+
+
+\section variables Environment variables
+
+The concept of environment variables are central to any
+shell. Environment variables are variables, whose values can be set
+and used by the user.
+
+To set a variable value, use the <a href="builtins.html#set"> \c set
+command</a>.
+
+Example:
+
+To set the variable \c smurf to the value \c blue, use the command
+<tt>set smurf blue</tt>.
+
+After a variable has been set, you can use the value of a variable in
+the shell through <a href="expand-variable">variable expansion</a>.
+
+Example:
+
+To use the value of a the variable \c smurf, use the command <tt>echo
+Smurfs are $smurf</tt>, which would print the result 'Smurfs are
+blue'.
+
+\subsection variables-scope Variable scope
+
+There are three kinds of variables in fish, universal, global and
+local variables. Universal variables are shared between all fish
+sessions a user is running on one computer. Global variables are
+specific to the current fish session, and will never be erased unless
+the user explicitly requests it using <tt>set -e</tt>. Local variables
+are specific to the current fish session, and associated with a
+specific block of commands, and is automatically erased when a
+specific block goes out of scope. A block of commands is a series of
+commands that begins with one of the commands \c 'for, \c 'while' , \c
+'if', \c 'function', \c 'begin' or \c 'switch', and ends with the
+command \c 'end'. The user can specify that a variable should have
+either global or local scope using the \c -g/--global or \c -l/--local
+switches.
+
+Variables can be explicitly set to be universal with the \c -U or \c
+--universal switch, global with the \c -g or \c --global switch, or
+local with the \c -l or \c --local switch. The scoping rules when
+creating or updating a variable are:
+
+-# If a variable is explicitly set to either universal, global or local, that setting will be honored
+-# If a variable is not explicitly set to be either universal, global or local, but has been previously defined, the variable scope is not changed
+-# If a variable is not explicitly set to be either universal, global or local and has never befor been defined, the variable will be local to the current scope
+
+When using a variable, the variable scope will be searched from the
+inside out, i.e. a local variable will be used rather than a global
+variable with the same name, a global variable will be used rather
+than a universal variable with the same name.
+
+For example, the following code will not output anything:
+<pre>
+if true
+ # This is a nice local scope where all variables will die
+ set pirate 'There be treasure in them thar hills'
+end
+
+# This will not output anything, since the pirate is dead
+echo $pirate
+</pre>
+
+\subsection variables-universal More on universal variables
+
+Universal variables are variables that are shared between all the
+users fish sessions on the computer. Fish stores many of it's
+configuration options as universal variables. This means that in order
+to change fish settings, all you have to do is change the variable
+value once, and it will be automatically updated for all sessions, and
+preserved across computer reboots and login/logout.
+
+To see universal variables in action, start two fish sessions side by
+side, and issue the following command in one of them <tt>set
+fish_color_cwd blue</tt>. Since \c fish_color_cwd is a universal
+variable, the color of the current working directory listing in the
+prompt will instantly change to blue on both terminals.
+
+\subsection variables-functions Variable scope for functions
+
+When calling a function, all non-global variables temporarily
+dissapear. This shadowing of the local scope is needed since the
+variable namespace would become cluttered, making it very easy to
+accidentaly overwrite variables from another function.
+
+For example, the following code will output 'Avast, mateys':
+
+<pre>
+function shiver
+ set phrase 'Shiver me timbers'
+end
+
+function avast
+ set phrase 'Avast, mateys'
+
+ # Calling the shiver function here can not change any variables
+ # in the local scope
+ shiver
+
+ echo $phrase
+end
+
+avast
+</pre>
+
+\subsection variables-export Exporting variables
+
+Variables in fish can be exported. This means the variable will be
+inherited by any commands started by fish. It is convention that
+exported variables are in uppercase and unexported variables are in
+lowercase.
+
+Variables can be explicitly set to be exportes with the \c -x or \c
+--export switch, or not exported with the \c -u or \c --unexport
+switch. The exporting rules when creating or updating a variable are
+identical to the scoping rules for variables:
+
+-# If a variable is explicitly set to either be exported or not exported, that setting will be honored
+-# If a variable is not explicitly set to be exported or not exported, but has been previously defined, the previous exporting rule for the variable is kept
+-# If a variable is not explicitly set to be either global or local and has never befor been defined, the variable will not be exported
+
+
+\subsection variables-arrays Arrays
+
+\c fish can store a list of multiple strings inside of a variable. To
+access one element of an array, use the index of the element inside of
+square brackets, like this:
+
+<pre>
+echo $PATH[3]
+</pre>
+
+If you do not use any brackets, all the elements of the array will be
+written as separate items. This means you can easily iterate over an
+array using this syntax:
+
+<pre>
+for i in $PATH; echo $i is in the path; end
+</pre>
+
+To create a variable \c smurf, containing the items \c blue and \c
+small, simply write:
+
+<pre>
+set smurf blue small
+</pre>
+
+It is also possible to set or erase individual elements of an array:
+
+<pre>
+\#Set smurf to be an array with the elements 'blue' and 'small'
+set smurf blue small
+
+\#Change the second element of smurf to 'evil'
+set smurf[2] evil
+
+\#Erase the first element
+set -e smurf[1]
+
+\#Output 'evil'
+echo $smurf
+</pre>
+
+\subsection variables-special Special variables
+
+The user can change the settings of \c fish by changing the values of
+certain environment variables.These are:
+
+- \c BROWSER, which is the users preferred web browser. If this variable is set, fish will use the specified browser instead of the system default browser to display the fish documentation.
+- \c CDPATH, which is an array of directories in which to search for the new directory for the \c cd builtin.
+- \c fish_color_normal, \c fish_color_command, \c fish_color_substitution, \c fish_color_redirection, \c fish_color_end, \c fish_color_error, \c fish_color_param, \c fish_color_comment, \c fish_color_match, \c fish_color_search_match, \c fish_color_cwd, \c fish_pager_color_prefix, \c fish_pager_color_completion, \c fish_pager_color_description and \c fish_pager_color_progress are used to change the color of various elements in \c fish. These variables are universal, i.e. when changing them, their new value will be used by all running fish sessions. The new value will also be retained when restarting fish.
+- \c PATH, which is an array of directories in which to search for commands
+
+\c fish also sends additional information to the user through the
+values of certain environment variables. The user can not change the values of these variables. They are:
+
+- \c _, which is the name of the currently running command.
+- \c history, which is an array containing the last commands that where entered
+- \c HOME, which is the users home directory. This variable can be changed by the root user.
+- \c PWD, which is the current working directory.
+- \c status, which is the exit status of the last foreground job to exit. If a job contains pipelines, the status of the last command in the pipeline is the status for the job.
+
+\c fish also uses several variables internally. Such variables are
+prefixed with the string __FISH or __fish. These should be ignored by the user.
+
+\section builtin-overview Builtins
+
+Many other shells have a large library of builtin commands. Most of
+these commands are also available as standalone commands, but have
+been implemented in the shell anyway for whatever reason. To avoid
+code duplication, and to avoid the confusion of subtly differing
+versions of the same command, \c fish only implementing builtins for
+actions which cannot be performed by a regular command.
+
+\section bundle Commands bundled with fish
+
+The following commands are distributed with fish. Many of them are
+builtins or shellscript functions, and can only be used inside fish.
+
+- <a href="builtins.html#source">.</a>, to read and execute the commands in a file
+- <a href="builtins.html#bg">bg</a>, to set a command to the background
+- <a href="builtins.html#begin">begin</a>, to execute a block of commands
+- <a href="builtins.html#bind">bind</a>, to change keyboard bindings
+- <a href="builtins.html#brake">brake</a>, to stop the execution of a loop
+- <a href="builtins.html#builtin">builtin</a>, to execute a builtin command
+- <a href="builtins.html#case">case</a>, to conditionally execute a block of commands
+- <a href="builtins.html#cd">cd</a>, to change the current directory
+- <a href="builtins.html#command">command</a>, to execute an external program
+- <a href="builtins.html#commandline">commandline</a>, to set or get the contents of the commandline buffer
+- <a href="builtins.html#complete">complete</a>, to add and remove completions
+- <a href="builtins.html#continue">continue</a>, to skip the rest of the current lap of a loop
+- <a href="commands.html#count">count</a>, to count the number of arguments
+- <a href="commands.html#dirh">dirh</a>, to view the directory history
+- <a href="commands.html#dirs">dirs</a>, to view the directory stack
+- <a href="builtins.html#end">end</a>, to end a block of commands
+- <a href="builtins.html#else">else</a>, to conditionally execute a block of commands
+- <a href="builtins.html#eval">eval</a>, to evaluate a string as a command
+- <a href="builtins.html#exec">exec</a>, to replace the current process image with a new command
+- <a href="builtins.html#exit">exit</a>, causes \c fish to quit
+- <a href="builtins.html#fg">fg</a>, to set a command to the foreground
+- <a href="builtins.html#for">for</a>, to perform a block of commands once for every element in a list
+- <a href="builtins.html#function">function</a>, to define a new function
+- <a href="builtins.html#functions">functions</a>, to print or erase functions
+- <a href="commands.html#help">help</a>, to show the fish documentation
+- <a href="builtins.html#if">if</a>, to conditionally execute a block of commands
+- <a href="builtins.html#jobs">jobs</a>, to print the currently running jobs
+- <a href="commands.html#mimedb">mimedb</a>, to view mimedata about a file
+- <a href="commands.html#nextd">nextd</a>, to move forward in the directory history
+- <a href="builtins.html#not">not</a>, negates the exit status of any command
+- <a href="commands.html#popd">popd</a>, to move to the topmost directory on the directory stack
+- <a href="commands.html#prevd">prevd</a>, to move backwards in the direcotry stack
+- <a href="commands.html#pushd">pushd</a>, to push the surrent directory onto the directory stack
+- <a href="builtins.html#random">random</a>, to calculate a pseudo-random number
+- <a href="builtins.html#return">return</a>, to return from a function
+- <a href="builtins.html#read">read</a>, to read from a stream into an environment variable
+- <a href="builtins.html#set">set</a>, to set environment variables
+- <a href="commands.html#set_color">set_color</a>, to change the terminal colors
+- <a href="builtins.html#switch">switch</a>, to conditionally execute a block of commands
+- <a href="commands.html#tokenize">tokenize</a>, to split a string up into multiple tokens
+- <a href="builtins.html#while">while</a>, to perform a block of commands while a condition is met
+
+For more information about these commands, use the <tt>--help</tt>
+option of the command to display a longer explanation.
+
+\section editor Command Line editor
+
+The \c fish editor features copy and paste, a searchable history and
+several editor commands. These are some of the commands available in
+the editor:
+
+- Home or Ctrl-a moves to the beginning of the line.
+- End or Ctrl-e moves to the end of line.
+- Left and right moves one character left or right.
+- Alt-left and Alt-right moves one word left or right.
+- Delete and backspace removes one character forwards or backwards.
+- Ctrl-c delete entire line
+- Ctrl-d delete one character to the right of the cursor, unless the buffer is empty, in which case the shell will exit
+- Ctrl-k move contents from cursor to end of line to <a href="#killring">killring</a>.
+- Ctrl-u move contents from beginning of line to cursor <a href="#killring">killring</a>.
+- Ctrl-l clear and repaint screen.
+- Ctrl-r replace a string in the commandline
+- Ctrl-w move previous word to <a href="#killring">killring</a>.
+- Alt-d move next word to <a href="#killring">killring</a>.
+- Alt-w prints a short description of the command on the commandline
+- Alt-x gives a list of possible problems with the current commandline
+- Alt-l lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed
+- Alt-k prints a list of all key bindings
+
+You can change these key bindings making an inputrc file. To do this,
+copy the file /etc/fish_inputrc to your home directory and rename it
+to '.fish_inputrc'. You can do this by running the command <tt>mv
+/etc/fish_inputrc ~/.fish_inputrc</tt>. Now you can edit the file
+.fish_inputrc, to change your key bindings. The fileformat of this file
+is described in the manual page for readline. Use the command <tt>man
+readline</tt> to read up on this syntax. Please note thet the
+key binding support in \c fish is still limited. You can not use the
+set command or the keyname-syntax, and the list functions is
+incomplete. Currently, the following functions are available:
+
+
+- \c backward-char, moves one character to the left
+- \c backward-delete-char, deletes one character of input to the left of the cursor
+- \c backward-kill-line, move everything from the beginning of the line to the cursor to the killring
+- \c backward-kill-word, move the word to the left of the cursor to the killring
+- \c backward-word, move one word to the left
+- \c beginning-of-history, move to the beginning of the history
+- \c beginning-of-line, move to the beginning of the line
+- \c complete, guess the remainder of the current token
+- \c delete-char, delete one character to the right of the cursor
+- \c delete-line, delete the entire line
+- \c dump-functions, print a list of all key-bindings
+- \c end-of-history, move to the end of the history
+- \c end-of-line, move to the end of the line
+- \c explain, print a description of possible problems with the current command
+- \c forward-char, move one character to the right
+- \c forward-word, move one word to the right
+- \c history-search-backward, search the history for the previous match
+- \c history-search-forward, search the history for the next match
+- \c kill-line, move everything from the cursor to the end of the line to the killring
+- \c kill-whole-line, move the line to the killring
+- \c kill-word, move the next word to the killring
+- \c yank, insert the latest entry of the killring into the buffer
+- \c yank-pop, rotate to the previous entry of the killring
+
+
+
+\subsection killring Copy and paste (Kill Ring)
+
+\c fish uses an Emacs style kill ring for copy and paste
+functionality. Use Ctrl-K to cut from the current cursor position to
+the end of the line. The string that is cut (a.k.a. killed) is
+inserted into a linked list of kills, called the kill ring. To paste
+the latest value from the kill ring use Ctrl-Y. After pasting, use
+Meta-Y to rotate to the previous kill.
+
+If the environment variable DISPLAY is set, \c fish will try to
+connect to the X-windows server specified by this variable, and use
+the clipboard on the X server for copying and pasting.
+
+\subsection history Searchable history
+
+After a command has been entered, it is inserted at the end of a
+history list. Any duplicate history items are automatically
+removed. By pressing the up and down keys, the user can search
+forwards and backwards in the history. If the current command line is
+not empty when starting a history search, only the commands starting
+with the string entered into the command line are searched.
+
+The history is stored in the file '.fish_history'. It is automatically
+read on startup and merged on program exit.
+
+Example:
+
+To search for previous entries starting with the letter 'l', type 'l'
+in the console and press the up key.
+
+\section job-control Running multiple programs
+
+Normally when \c fish starts a program, this program will be put
+in the foreground, meaning it will take control of the terminal and
+\c fish will be stopped until the program finishes. Sometimes
+this is not desirable. In such cases, there are several ways in which
+the user can change <tt>fish</tt>'s behaviour.
+
+-# By ending a command with the \& (ampersand) symbol, the user tells \c fish to put the specified command into the background. A background process will be run simultaneous with \c fish. \c fish will retain control of the terminal, so the program will not be able to read from the keyboard.
+-# By pressing ^Z, the user stops a currently running foreground program and returns control to \c fish. Some programs do not support this feature, or remap it to another key. Gnu emacs uses ^X z to stop running.
+-# By using the <a href="builtins.html#fg">fg</a> and <a href="builtins.html#bg">bg</a> builtin commands, the user can send any currently running job into the foreground or background.
+
+\section initialization Initialization files
+
+On startup, \c fish evaluates the file /etc/fish and ~/.fish, in that
+order. If you want to run a command only on starting an interactive
+shell, test if the environment variable fish_interactive is set. If
+you want to run a command only on starting a login shell, test if the
+environment variable fish_login is set.
+
+If you want to run a set of commands when \c fish exits, redefine the
+<a href="#hooks">function hook</a> \c fish_on_exit. If the \c
+fish_on_exit is defined, it will be execute before the shell exits.
+
+<a href="#variables-universal">Universal variables</a> are stored in
+the file .fishd. Do not edit this file directly, edit them through
+fish scripts instead.
+
+\section other Other features
+
+\subsection color Syntax highlighting
+
+\c fish will interprets the command line as it is typed and uses syntax
+highlighting to provide feedback to the user. The most important
+feedback is the detection of potential errors. By default, errors are
+marked red.
+
+Detected errors include:
+
+- Non existing commands.
+- Reading or appending from non existing files.
+- Incorrect use of output redirects
+- Mismatched parenthesis
+
+To customize the syntax highlighting, you can set the environment
+variables \c fish_color_normal, \c fish_color_command, \c
+fish_color_substitution, \c fish_color_redirection, \c fish_color_end,
+\c fish_color_error, \c fish_color_param, \c fish_color_comment, \c
+fish_color_match, \c fish_color_search_match, \c fish_color_cwd, \c
+fish_pager_color_prefix, \c fish_pager_color_completion, \c
+fish_pager_color_description and \c fish_pager_color_progress. Valid
+values are \c black, \c red, \c green, \c brown, \c yellow, \c blue,
+\c magenta, \c purple, \c cyan, \c white or \c normal. Setting one of
+the above variables to normal will mean that the text color will be
+set to the default color for the terminal.
+
+When the cursor is over a parenthesis or a quote, \c fish also
+highlights it's matching quote or parenthesis.
+
+\subsection prompt Programmable prompt
+
+By defining the \c fish_prompt function, the user can choose a custom
+prompt. The \c fish_prompt function is executed and the output is used
+as a prompt.
+
+Example:
+<p>
+The default \c fish prompt is
+</p>
+<p>
+<pre>
+function fish_prompt -d "Write out the prompt"
+ printf '\%s\@\%s\%s\\n\%s\%s\\n> ' (whoami) (hostname|cut -d . -f 1) (set_color \$fish_color_cwd) (prompt_pwd) (set_color normal)
+end
+</pre>
+</p>
+
+If you are using \c set_color or other commands that output escape
+codes to change the font settings of the terminal, you must always and
+every such sequence with a newline. This is needed since fish needs to
+know that exact length of the prompt in order to tetect when the
+cursor reaches the end of the line. Any newlines in the output of the
+\c fish_prompt command are ignored.
+
+\subsection title Programmable title
+
+When running in a virtual terminal, the user define the \c fish_title
+function to print a custom titlebar message. The \c fish_title
+function is executed and the output is used as a titlebar message.
+
+Example:
+<p>
+The default \c fish title is
+</p>
+<p>
+<pre>
+function fish_title
+ echo $_ ' '
+ pwd
+end
+</pre>
+</p>
+
+\subsection hooks Event hooks
+
+There are several special function names in fish. If a function is
+given this name, it will be automatically called when a specific event
+has occured. These functions are:
+
+- \c fish_on_exit, which is called before the shell exits
+- \c fish_on_exec, which is called before interactively executing a command
+- \c fish_on_return, which is called when control returns to the shell after interactively executing a command
+
+\section todo Missing features and bugs
+
+\subsection todo-features Missing features
+
+- Complete vi-mode key bindings
+- '**' wildcard for recursive wildcard matching
+- next-history-complete
+- builtin ulimit command
+- builtin wait command
+- More completions (for example xterm, vim,
+konsole, gnome-terminal, dcop, cdrecord, cron, xargs
+rlogin, telnet, rsync, arch, finger, nice, locate,
+latex, bibtex, patch, aspell, xpdf,
+zip, compress, wine, xmms, dig, wine, batch, cron,
+g++, javac, java, gcj, lpr, doxygen, whois, find)
+- Undo support
+- Multiple input characters should be inserted in one batch whenever possible, to avoid flickering
+- Check keybinding commands for output - if non has happened, don't repaint to reduce flicker
+- the jobs builtin should be able to give information on a specific job, such as the pids of the processes in the job
+- Syntax highlighting should mark cd to non-existing directories as an error
+
+
+\subsection todo-possible Possible features
+
+- Multiline editing
+- tab completion could use smart casing
+- Completions could support options beginning with a plus (like xterm
+ +fbx) and options without dashes (like top p) Do we really want to
+ complicate the code additionally for such a small number of programs?
+- mouse support like zsh has with http://stchaz.free.fr/mouse.zsh
+ installed would be awesome
+- suggest a completion on unique matches by writing it out in an understated color
+- Maybe some functions should only be available from key-bindings. That way one could implement a large part of all the key-binding functions as regular fish functions without worrying about cluttering up the function name space.
+- With a bit of tweakage, quite a few of the readline key-binding functions could be implemented in shellscript.
+- Highlight beginning/end of block when moving over a block command
+- Inclusion guards for the init files to make them evaluate only once, even if the user has instelled fish both in /etc and in $HOME
+- Do not actually load most of the shellscript functions on startup. Only load a tiny wrapper that will load the real function when needed. This should shave of CPU-time spent on parsing 500-1000 lines of code and ~50 kB of memory on startup, and is pretty easy to implement.
+- Do not actually load/parse .fish_history, only mmap it and use some clever string handling. Should save ~150 kB of memory permanently, but is very hard to implement.
+- command specific wildcarding (use case * instead of case '*')
+- show the whole list of commands on using tab on an empty commandline
+- Automatically move cursor to the end of the current token before completing
+- Map variables. (export only the values. When expanding with no key specified, expand to all values.)
+- psub function/builtin to make somthing like process substitution using command substitution
+
+\subsection bugs Known bugs
+
+- Completion for gcc -\#\#\# option doesn't work.
+- Many completions are made specifically for the GNU
+version of a POSIX command
+- Yanking weird characters from clipboard prints Unicode escapes
+- Prefix string in completion display is sometimes incorrect
+- redirecting input from fd:s other than 0 is broken
+- completing the string 'command ' hangs fish
+
+If you think you have found a bug not described here, please send a
+report to <a href="mailto:axel@liljencrantz.se"> axel@liljencrantz.se
+</a>.
+
+\subsection Known issues
+
+Older versions of Doxygen has bugs in the man-page generation which
+cause the builtin help to render incorrectly. Version 1.2.14 is known
+to have this problem.
+
+In version 1.9.2, the installation prefix for fish rpms and debs
+changed from /usr/local to /usr. Packages should automatically change
+any instances of /usr/local/bin/fish in /etc/passwd to /usr/bin/fish,
+but some programs, like screen, may need to be restarted to notice the
+changes when upgrading from pre1.9.2 to 1.9.2 or later. You may also
+run into such problems when switching between using a package and
+personal builds.
+
+*/
+/** \page design Design document
+
+\section design-overview Design document
+
+\subsection design-overview Overview
+
+This is a description of the design principles that have been used to
+design fish. The fish design has three high level goals. These are:
+
+-# Everything that can be done in other shell languages should be
+possible to do in fish, though fish may rely on external commands in
+doing so.
+-# Fish should be user friendly, but not at the expense of expressiveness.
+Most tradeoffs between power and ease of use can be avoided with careful design.
+-# Whenever possible without breaking the above goals, fish should
+follow the Posix syntax.
+
+\subsection ortho The law of orthogonality
+
+The shell language should have a small set of orthogonal features. Any
+situation where two features are related but not identical, one of them
+should be removed, and the other should be made powerful and general
+enough to handle all common use cases of either feature.
+
+Rationale:
+
+Related features make the language larger, which makes it harder to
+learn. It also increases the size of the sourcecode, making the
+program harder to maintain and update.
+
+Examples:
+
+- Here documents are too similar to using echo inside of a pipeline.
+- The different quoting styles are silly. ("", '' and \$'')
+
+\subsection sep The law of minimalism
+
+The shell should only contain features that cannot be implemented in
+a reasonable way outside of the shell. A large performance decrease,
+as well as some program complexity increase is acceptable in order to
+improve separation.
+
+Rationale:
+
+A modular project is easier to maintain since smaller programs are far
+easier to understand than larger ones. A modular project is also more
+future proof since the modules can be individually
+replaced. Modularity also decreases the severity of bugs, since there
+is good hope that a bug, even a serious one, in one module, does not
+take the whole system down.
+
+Examples:
+
+- Builtin commands should only be created when it cannot be
+avoided. \c echo, \c kill, \c printf and \c time are among the commands
+that fish does not implement internally since they can be provided as
+external commands. Several other commands that are commonly implemented
+as builtins and can not be implemented as external commands,
+including \c type, \c vared, \c pushd and \c popd are implemented as shellscript
+functions in fish.
+- Mathematical calculations, regex matching, generating lists of numbers
+and many other funtions can easily be done in external programs. They
+should not be supported internally by the shell.
+
+The law of minimalism does not imply that a large feature set is
+bad. So long as a feature is not part of the language itself, but a
+separate command or at least a shellscript function, bloat is much
+more acceptable.
+
+\subsection conf Configurability is the root of all evil
+
+Every configuration option in a program is a place where the program
+is too stupid to figure out for itself what the user really wants, and
+should be considered a failiure of both the program and the programmer
+who implemented it.
+
+Rationale:
+
+Different configuration options are a nightmare to maintain, since the
+number of potential bugs caused by specific configuration combinations
+quickly becomes an issue. Configuration options often imply
+assumptions about the code which change when reimplementing the code,
+causing issues with backwards compatibility. But mostly, configuration
+options should be avoided since they simply should not exist, as the
+program should be smart enough to do what is best, or at least a good
+enough approximation of it.
+
+Examples:
+
+- Fish allows the user to set various syntax highlighting colors. This is needed because fish does not know what colors the terminal uses by default, which might make some things unreadable. The proper solution would be for text color preferences to be defined centrally by the user for all programs, and for the terminal emulator to send these color properties to fish.
+- Fish does not allow you to set the history filename, the number of history entries, different language substyles or any number of other common cshell configuration options
+
+A special note on the evils of configurability is the long list of
+very useful features found in some shells, that are not turned on by
+default. Both zsh and bash support command specific completions, but
+no such completions are shipped with bash by default, and they are
+turned of by default in zsh. Other features that zsh support that are
+disabled by default include tab-completion of strings containing
+wildcards, a sane completion pager and a history file.
+
+\subsection user The law of user focus
+
+When designing a program, one should first think about how to make a
+intuitive and powerful program. Implementation issues should only be
+considered once a user interface has been designed.
+
+Rationale:
+
+If too much attention is given to what is easy to implement the law of
+orthogonality and the law of minimalism will by necessity be disobeyed.
+
+Examples:
+
+- There should only be one type of input to the shell, lists of commands. Loops, conditionals and variable assignments are all performed through regular commands.
+- The differences between builtin commands, shellscript functions and builtin commands should be made as small as possible. Builtins and shellscript functions should have exactly the same types of argument expantion as other commands, should be possible to use in any position in a pipeline, and should support any io redirection.
+- Instead of forking when performing command substitution to provide a fake variable scope, all fish commands are performed from the same process, and fish instead supports true scoping
+- All blocks end with the \c end builtin
+
+\subsection disc The law of discoverability
+
+The shell should implement it's features in a way that makes them as
+easy as possible for the user to discover for her/himself.
+
+Rationale:
+
+A program whose features are discoverable makes a new user into an
+expert in a shorter span of time, since the user will learn how to use
+the program simply by using it.
+
+The main benefit of a graphical program over a command line-based
+program is discoverability. In a graphical program, one can discover
+all the common features by simply looking at the user interface and
+guessing what the different buttons, menus and other widgets do. The
+traditional way to discover features in commandline programs is
+through manual pages. This requires both that the user starts to use a
+different program, and the she/he then remembers the new information
+until the next time she/he uses the same program.
+
+Examples:
+
+- Everything should be tab-completable, and every tab completion should have a description
+- Every syntax error and error in a builtin command should contain an error message describing what went wrong and a relevant help page. Whenever possible, errors should be flagged red by the syntax highlighter.
+- The help manual should be easy to read, easily available from the shell, complete and contain many examples
+- The language should be uniform, so that once the user understands the command/argument syntax, he will know the whole language, and be able to use tab-completion to discover new featues.
+
+*/
+/** \page about About fish
+
+
+
+\section about-program About the program
+
+\c fish is meant to be used for interactive shell tasks on a modern
+UNIX-like workstation. It is much more important for me to keep the
+code maintainable, readable and bug free than to support esoteric old
+hardware, software or wetware. As such, the program is often wildly
+inefficient in its use of memory and CPU cycles. On my system, \c fish
+uses a little less than half a megabyte of memory, a number that could
+be significantly reduced with a little effort. \c fish performs a lot
+of linear searches of things that could be done in logarithmic time,
+does not usually cache file system data or other search result, and
+uses the fork() call promiscuosly. None of these things matter because
+\c fish is still fast enough to be perceived as instantaneous on a
+semi-modern computer thanks to the miracles of copy-on-write, OS-level
+caching and Moores law, and it only uses a fraction of the memory used
+by most terminal emulators to display it. If this program was anything
+other than an amusing hobby for me, I would of course feel otherwise,
+but since my time is limited, this is the way it must be.
+
+
+\section about-code About the source code
+
+Fish is written using the ellemtel indentation style, using four space
+tabs. \c fish regularly performs a large set of sanity checks to make
+sure it is in a sane state. If not, the program will terminate before
+it can do any harm.
+
+Do not edit the file builtin_help.c, it is automatically generated.
+
+
+\section about-documentation About the documentation
+
+The documentation for \c fish is written for Doxygen. All header files
+are pretty heavily commented.
+
+Since it was desirable to use the same text files for producing the
+HTML documentation as for producing the internal help output, some
+rather ugly kludges had to be used for writing the documentation for
+the builtin commands.
+
+The directory doc_src contains a file called doc.hdr, containing
+various general documentation for \c fish, and a large number of .txt
+files. Each txt file contains the documentation for one \c fish
+builtin. When creating the main doxygen documentation, all these files
+are concatenated into one file, called doc.h. When creating the
+internal documentation, each of the .txt files is converted to a .h
+file by supplying a doxygen header/footer. These headers are then
+converted into man style manuals, which in turn are converted to C
+code by a script called gen_hdr.sh. The resulting C-file,
+builtin_help.c, can then by linked into \c fish. This method is probably
+not the most robust, elegant or clever method for generating
+documentation. If someone has a suggestion of how to do i better,
+please notify me.
+*/
+/** \page difference Why fish?
+\section difference-overview What is different about fish?
+
+This page is a summary of differences between \c fish and other shells.
+
+\subsection difference-completion Tab completion features
+
+\c fish, like many other shells, performs tab completion, i.e. the shell
+tries to guess what the user is typing and complete the users
+sentences whenever the user presses the tab key. If the shell finds
+more than one possible completion, a list of all completions is
+displayed when the users double taps on tab. \c fish extends tab
+completion functionality in several ways:
+
+- \c fish performs file completion on strings containing wildcards
+- When showing a list of possible completions, \c fish adds a
+description to each completion. For files this description is a
+description of the format or filetype, like 'C source code',
+'Character device' or 'Executable'. For variables, if the
+value is short enough, the variable value will be displayed. For
+commands, if there is room and few enough commands, the whatis
+description of the command is used.
+- \c fish has extensive command specific completions, including
+completion of specific options. This is very powerful in combination
+with completion descriptions, as the user can see what each option does
+without consulting the manual. Simply type the command you wish to use,
+type a dash and double tab TAB, and the screen will fill with a list of
+the commands options and a description of what they do.
+- \c fish uses a decent pager when the results won't fit on one
+screen. The pager can scroll up and down, both one row and one page at
+a time, and if any non movement key is pressed the pager exits without
+consuming the character. Therefore, there is no need to press
+'q' to exit before typing your completion.
+
+Some examples of the completions performed by \c fish
+
+- When completing an argument for the man command, the whatis
+database is searched for manual pages as completions.
+- When completing a command name, the whatis database is searched
+for each possible command, and the description returned is used
+as the description of the command.
+- When completing an argument for the make command, the Makefile
+in the current directory is searched for targets.
+
+\subsection difference-killring X-Windows Copy and paste
+
+\c fish supports using the X-Windows clipboard for storing copy and
+paste information. This feature is automatically enabled if the
+DISPLAY environment variable is set. For more information on how to
+use copy and paste in \c fish, read <a href="index.html#killring">
+this section</a>. This means you can easily share commands and strings
+between different shell sessions and applications.
+
+\subsection difference-open Simple launching of default applications
+
+The open command uses the mimetype database (Also used by both Gnome
+or KDE) to launch the default application for a file. Just type
+<tt>open *.html</tt> and all the HTML files in your current directory
+will be opened in your default browser. No longer will you have to
+convert your filenames to URLS, remember clunky Open Office command
+names, worry about absolute paths or any the other common pitfalls when
+opening files from the commandline.
+
+\subsection difference-help Help
+
+\c fish is heavily commented. Both the source code and the
+program in general features a great deal of easily accessible
+documentation. The <tt>help</tt> command is used to display HTML-based
+help files. Just type <tt>help</tt> and a subject, and the help system
+will try to fill your needs. To view the page you are reading right
+now, you could simply type <tt>help difference</tt>. <tt>help</tt>
+also works great together with tab completion. Write \c help and
+double tap on tab, a list of all help sections will be displayed, with
+a description of the content of each section.
+
+Also, all builtin commands have a help option. Passing '-h' or
+'--help' to any builtin will give you the same help as the help
+command, but formated for output on screen.
+
+\subsection difference-highlighting Syntax highlighting
+
+\c fish performs syntax highlighting of commands as they're
+entered. Pretty colors may look nice (or awful, depending on your
+taste), but the real advantage is error flagging. The syntax
+highlighting function does extensive error cheching and will flag many
+common errors such as misspelling a command or option, or reading from a
+non-existent file.
+
+\c fish also highlights matching quotes and parenthesis as the cursor
+moves over them. This is very useful when typing long, complex
+commands.
+
+\subsection difference-terminal Terminal handling
+
+\c fish knows it's terminal. \c fish uses the terminfo database
+to get more information on the current terminal. Some of the terminal
+handling features of \c fish are:
+
+- Backspace and delete work more often in \c fish thanks to the use of
+terminfo. If you've been bitten by this, you'll know what this means.
+- If the screen has been written to when \c fish was in the foreground,
+this is detected and the command line is redrawn.
+- Process notifications, like jobs ending or being stopped by signals,
+are printed to the screen at once, not whenever the user presses the enter key.
+
+\c fish uses wide character strings internally, including double width
+characters, so it should be ready for all your Unicode needs.
+
+\subsection difference-history Smart history
+
+\c fish features an intelligent history that automatically removes any
+duplicate items. Searching is performed by entering a search string
+and using the up/down arrow keys to go to the next/previous match. On
+exit, \c fish performs a merge between the history on file and the
+history in memory history, thus making sure that multiple copies of \c
+fish running concurrently will not erase each others history
+information.
+
+\subsection difference-simple Simplicity
+
+\c fish has a simple syntax. There is only one form of
+alias/function/whatever, accessed through the <tt>function</tt>
+builtin. The are very few builtins, \c fish relies on normal commands
+like <tt>echo</tt>, <tt>kill</tt>, <tt>printf</tt> and <tt>time</tt>
+instead of reimplementing them as builtins.
+
+The globbing in fish is significantly simplified. Since I can never
+remember all the subtle differences between single and double quotes,
+which kind of tick is used for command substitution and all the other
+strange quirks of of the Posix shell language, that aspect of shells
+has been significantly simplified. This makes \c fish unsuitable for
+strange shell scripting, but much more suited to interactive needs
+than regular shells.
+
+There is no difference between double and single quotes. They both
+turn of all globbing and escape sequences. They can be nested.
+
+Token separation is performed before variable expansion. This means
+that even if a variable contains spaces, it will never be separated
+into multiple arguments. If you want to tokenize a string, you can use
+the <a href="commands.html#tokenize">tokenize</a> command.
+
+Command substitution is specified using parenthesis.
+
+There is no math mode, use bc.
+
+The POSIX way of setting variables is <i>lame</i>. Whitespace
+sensitive languages are awful. "foo=bar" and "foo = bar" should not
+mean different things? \c fish uses a builtin, <tt>set</tt> to set and
+remove environment variables. This keeps things consistent. In fish,
+everything, including the switch/case statement is a command.
+
+In \c fish, all block types are ended by the \c end command.
+
+*/
+/** \page license License
+
+\c fish Copyright (C) 2005 Axel Liljencrantz. It is released under the
+GNU General Public License. The license agreement is included
+below. For more information on the GNU project and its goals, visit <a
+href="http://www.gnu.org">the GNU homepage</a>.
+
+\c fish also contains small amounts of code under the BSD
+license, namely versions of the two functions strlcat and strlcpy,
+modified for use with wide character strings. This code is copyrighted
+by Todd C. Miller.
+
+The XSel command, written and copyrighted by Conrad Parker, is
+distributed together with \c fish. It is released under the MIT license.
+
+The xdgmime library, written and copyrighted by Red Hat, Inc, is used
+by the mimedb command, which is a part of fish. It is released under
+the LGPL license.
+
+<H2><A NAME="SEC1" HREF="gpl.html#TOC1">GNU GENERAL PUBLIC LICENSE</A></H2>
+<P>
+Version 2, June 1991
+
+</P>
+
+<PRE>
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+</PRE>
+
+
+<H2><A NAME="SEC2" HREF="gpl.html#TOC2">Preamble</A></H2>
+
+<P>
+The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+</P>
+<P>
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+</P>
+<P>
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+</P>
+<P>
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+</P>
+<P>
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+</P>
+<P>
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+</P>
+<P>
+Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+</P>
+<P>
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+
+</P>
+
+
+<H2><A NAME="SEC3" HREF="gpl.html#TOC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A></H2>
+
+
+<P>
+
+<STRONG>0.</STRONG>
+This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+<P>
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+<P>
+
+<STRONG>1.</STRONG>
+You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+<P>
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+<P>
+
+<STRONG>2.</STRONG>
+You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+<P>
+
+<DL>
+
+<DT>
+<DD>
+<STRONG>a)</STRONG>
+You must cause the modified files to carry prominent notices
+stating that you changed the files and the date of any change.
+</DD>
+</DT>
+</DL>
+<P>
+<DL>
+<DT>
+<DD>
+<STRONG>b)</STRONG>
+You must cause any work that you distribute or publish, that in
+whole or in part contains or is derived from the Program or any
+part thereof, to be licensed as a whole at no charge to all third
+parties under the terms of this License.
+
+</DD>
+</DT>
+</DL>
+<P>
+<DL>
+<DT>
+<DD>
+<STRONG>c)</STRONG>
+If the modified program normally reads commands interactively
+when run, you must cause it, when started running for such
+interactive use in the most ordinary way, to print or display an
+announcement including an appropriate copyright notice and a
+notice that there is no warranty (or else, saying that you provide
+a warranty) and that users may redistribute the program under
+these conditions, and telling the user how to view a copy of this
+License. (Exception: if the Program itself is interactive but
+does not normally print such an announcement, your work based on
+the Program is not required to print an announcement.)
+</DD>
+</DT>
+</DL>
+<P>
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+<P>
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+<P>
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+<P>
+
+<STRONG>3.</STRONG>
+You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+
+<!-- we use this doubled UL to get the sub-sections indented, -->
+<!-- while making the bullets as unobvious as possible. -->
+
+<DL>
+<DT>
+
+<DD>
+<STRONG>a)</STRONG>
+Accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of Sections
+1 and 2 above on a medium customarily used for software interchange; or,
+</DD>
+</DT>
+</DL>
+<P>
+<DL>
+<DT>
+<DD>
+<STRONG>b)</STRONG>
+Accompany it with a written offer, valid for at least three
+years, to give any third party, for a charge no more than your
+cost of physically performing source distribution, a complete
+machine-readable copy of the corresponding source code, to be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+</DD>
+
+</DT>
+</DL>
+<P>
+<DL>
+<DT>
+<DD>
+<STRONG>c)</STRONG>
+Accompany it with the information you received as to the offer
+to distribute corresponding source code. (This alternative is
+allowed only for noncommercial distribution and only if you
+received the program in object code or executable form with such
+an offer, in accord with Subsection b above.)
+</DD>
+</DT>
+</DL>
+<P>
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+<P>
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+<P>
+
+<STRONG>4.</STRONG>
+You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+<P>
+
+<STRONG>5.</STRONG>
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+<P>
+
+<STRONG>6.</STRONG>
+
+Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+<P>
+
+<STRONG>7.</STRONG>
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+<P>
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+<P>
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+<P>
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+<P>
+
+<STRONG>8.</STRONG>
+If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+<P>
+
+<STRONG>9.</STRONG>
+The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+<P>
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+<P>
+
+<STRONG>10.</STRONG>
+If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+
+
+<P><STRONG>NO WARRANTY</STRONG></P>
+
+<P>
+
+<STRONG>11.</STRONG>
+BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+<P>
+
+<STRONG>12.</STRONG>
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+<P>
+
+
+<H2>END OF TERMS AND CONDITIONS</H2>
+
+
+
+<H2><A NAME="SEC4" HREF="gpl.html#TOC4">How to Apply These Terms to Your New Programs</A></H2>
+
+<P>
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+</P>
+
+<P>
+To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+</P>
+
+<PRE>
+<VAR>one line to give the program's name and an idea of what it does.</VAR>
+Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+</PRE>
+
+<P>
+Also add information on how to contact you by electronic and paper mail.
+
+</P>
+<P>
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+</P>
+
+<PRE>
+Gnomovision version 69, Copyright (C) <VAR>year</VAR> <VAR>name of author</VAR>
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+type `show w'. This is free software, and you are welcome
+to redistribute it under certain conditions; type `show c'
+for details.
+</PRE>
+
+<P>
+
+The hypothetical commands <TT>`show w'</TT> and <TT>`show c'</TT> should show
+the appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than <TT>`show w'</TT> and
+<TT>`show c'</tt>; they could even be mouse-clicks or menu items--whatever
+suits your program.
+
+</P>
+<P>
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+</P>
+
+<PRE>
+Yoyodyne, Inc., hereby disclaims all copyright
+interest in the program `Gnomovision'
+(which makes passes at compilers) written
+by James Hacker.
+
+<VAR>signature of Ty Coon</VAR>, 1 April 1989
+Ty Coon, President of Vice
+</PRE>
+
+<P>
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the
+<a href="/licenses/lgpl.html">GNU Lesser General Public License</a>
+instead of this License.
+
+<p>
+
+<HR>
+
+<h2>License for wcslcat and wcslcpy</h2>
+
+\c fish also contains small amounts of code under the BSD
+license, namely versions of the two functions strlcat and strlcpy,
+modified for use with wide character strings. This code is copyrighted
+by Todd C. Miller.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+<h2>License for XSel</h2>
+
+The XSel command, written and copyrighted by Conrad Parker, is
+distributed together with \c fish.
+
+
+It is Copyright (C) 2001 Conrad Parker <conrad@vergenet.net>
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. No representations are made about the
+suitability of this software for any purpose. It is provided "as is"
+without express or implied warranty.
+
+*/
+
diff --git a/doc_src/else.txt b/doc_src/else.txt
new file mode 100644
index 00000000..8f684e3f
--- /dev/null
+++ b/doc_src/else.txt
@@ -0,0 +1,17 @@
+\section else else - execute command if a condition is not met.
+
+\subsection else-synopsis Synopsis
+<tt>if CONDITION; COMMAND_TRUE [else; COMMAND_FALSE] end;</tt>
+
+\subsection else-description Description
+<tt>if</tt> will execute the command CONDITION. If the commands exit
+status is zero, the command COMMAND_TRUE will execute. If it is
+not zero and COMMAND_FALSE is specified, COMMAND_FALSE will be
+executed.
+
+\subsection else-example Example
+
+The command <tt>if test -f foo.txt; echo foo.txt exists; else; echo foo.txt does not exist; end</tt>
+will print <tt>foo.txt exists</tt> if the file foo.txt
+exists and is a regular file, otherwise it will print
+<tt>foo.txt does not exist</tt>.
diff --git a/doc_src/end.txt b/doc_src/end.txt
new file mode 100644
index 00000000..0385982b
--- /dev/null
+++ b/doc_src/end.txt
@@ -0,0 +1,13 @@
+\section end end - end a block of commands.
+
+\subsection end-synopsis Synopsis
+<pre>for VARNAME in [VALUES...]; COMMANDS; end
+if CONDITION; COMMAND_TRUE [else; COMMAND_FALSE] end
+while CONDITION; COMMANDS; end
+switch VALUE; [case [WILDCARD...]; [COMMANDS...];...] end
+</pre>
+
+\subsection end-description Description
+<tt>end</tt> ends a block of commands. For more information, read the
+documentation for the block constructs, such as \c if, \c for and \
+while.
diff --git a/doc_src/eval.txt b/doc_src/eval.txt
new file mode 100644
index 00000000..a662ebd6
--- /dev/null
+++ b/doc_src/eval.txt
@@ -0,0 +1,16 @@
+\section eval eval - eval the specified commands
+
+\subsection eval-synopsis Synopsis
+<tt>eval [COMMANDS...]</tt>
+
+\subsection eval-description Description
+The <tt>eval</tt> builtin causes fish to evaluate the specified parameters as a command. If more than one parameter is specified, all parameters will be joined using a space character as a separator.
+
+\subsection eval-example Example
+
+<pre>
+set cmd ls
+eval $cmd
+</pre>
+
+will call the ls command.
diff --git a/doc_src/exec.txt b/doc_src/exec.txt
new file mode 100644
index 00000000..668d470b
--- /dev/null
+++ b/doc_src/exec.txt
@@ -0,0 +1,16 @@
+
+\section exec exec - Execute command in current process
+
+\subsection exec-synopsis Synopsis
+ <tt>exec COMMAND [OPTIONS...]</tt>
+
+\subsection exec-description Description
+
+The \c exec builtin is used to replace the currently running shells
+process image with a new command. On sucessfull completion, exec never
+returns. exec can not be used inside a pipeline.
+
+\subsection exec-example Example
+
+<tt>exec emacs</tt> starts up the emacs text editor. When emacs exits,
+the session will terminate.
diff --git a/doc_src/exit.txt b/doc_src/exit.txt
new file mode 100644
index 00000000..1cb61015
--- /dev/null
+++ b/doc_src/exit.txt
@@ -0,0 +1,14 @@
+\section exit exit - exit the shell.
+
+\subsection exit-synopsis Synopsis
+<tt>exit [STATUS]</tt>
+
+\subsection exit-description Description
+
+The <tt>exit</tt> builtin causes fish to exit. If <tt>STATUS</tt> is
+supplied, it will be converted to an integer and used as the exit
+code. Otherwise the exit code will be 0.
+
+If exit is called while sourcing a file (using the <a
+href="#source">.</a> builtin) the rest of the file will be skipped,
+but the shell will not exit.
diff --git a/doc_src/fg.txt b/doc_src/fg.txt
new file mode 100644
index 00000000..1ab579ff
--- /dev/null
+++ b/doc_src/fg.txt
@@ -0,0 +1,14 @@
+\section fg fg - send job to foreground
+
+\subsection fg-synopsis Synopsis
+<tt>fg [PID]</tt>
+
+\subsection fg-description Description
+Sends the specified job to the foreground. While a foreground job is
+executed, fish is suspended. If no job is specified, the last job to be used is put in the foreground. If PID is specified, the job with the specified group id is put in the foreground.
+
+The PID of the desired process is usually found by using process globbing.
+
+\subsection fg-example Example
+
+<tt>fg \%0</tt> will put the job with job id 0 in the foreground.
diff --git a/doc_src/fish.1.in b/doc_src/fish.1.in
new file mode 100644
index 00000000..40dbd123
--- /dev/null
+++ b/doc_src/fish.1.in
@@ -0,0 +1,27 @@
+.TH fish 1 "February 25, 2005" "version @PACKAGE_VERSION@" "USER COMMANDS"
+.SH NAME
+fish - friendly interactive shell
+.SH SYNOPSIS
+.B fish
+[\-h] [\-v] [\-c command] [FILE [ARGUMENTS...]]
+.SH DESCRIPTION
+A shell written mainly with interactive use in mind. The complete fish manuals are written in HTML format. You can find them by using the
+.I
+help
+command from inside the fish shell.
+
+.SH OPTIONS
+.TP
+\-h
+display help and exit
+.TP
+\-c
+Evaluate the specified commands instead of reading from the commandline
+.TP
+\-i
+Specify that fish is to run in interactive mode
+.TP
+\-v
+display version and exit
+.SH AUTHOR
+Axel Liljencrantz ( @PACKAGE_BUGREPORT@ )
diff --git a/doc_src/for.txt b/doc_src/for.txt
new file mode 100644
index 00000000..83fee0dc
--- /dev/null
+++ b/doc_src/for.txt
@@ -0,0 +1,23 @@
+
+\section for for - perform a set of commands multiple times.
+
+\subsection for-synopsis Synopsis
+<tt>for VARNAME in [VALUES...]; [COMMANDS...]; end</tt>
+
+\subsection for-description Description
+<tt>for</tt> is a loop construct. It will perform the commands specified
+by <tt>COMMANDS</tt> multiple times. Each time the environment variable
+specified by <tt>VARNAME</tt> is assigned a new value from <tt>VALUES</tt>.
+
+\subsection for-example Example
+
+The command
+
+<tt>for i in foo bar baz; echo $i; end</tt>
+
+would output:
+
+<pre>foo
+bar
+baz</pre>
+
diff --git a/doc_src/function.txt b/doc_src/function.txt
new file mode 100644
index 00000000..aa818493
--- /dev/null
+++ b/doc_src/function.txt
@@ -0,0 +1,48 @@
+\section function function - create a function
+
+\subsection function-synopsis Synopsis
+ <tt>function NAME; BODY; end </tt>
+
+\subsection function-description Description
+
+This builtin command is used to create a new function. A Function is a
+list of commands that will be executed when the name of the function
+is entered. The function
+
+<pre>
+function hi
+ echo hello
+end
+</pre>
+
+will write <tt>hello</tt> whenever the user enters \c hi.
+
+If the user enters any additional arguments after the function, they
+are inserted into the environment variable <a href="index.html#variables-arrays">array</a> argv.
+
+\subsection function-example Example
+
+<pre>function ll
+ ls -l $argv
+</pre>
+
+will run the \c ls command, using the \c -l option, while passing on any additional files and switches to \c ls.
+
+<pre>
+function mkdir -d "Create a directory and set CWD"
+ mkdir $argv
+ if test $status = 0
+ switch $argv[(count $argv)]
+ case '-*'
+
+ case '*'
+ cd $argv[(count $argv)]
+ return
+ end
+ end
+end
+</pre>
+
+will run the mkdir command, and if it is succesfull, change the
+current working directory to the one just created.
+
diff --git a/doc_src/functions.txt b/doc_src/functions.txt
new file mode 100644
index 00000000..5751fb71
--- /dev/null
+++ b/doc_src/functions.txt
@@ -0,0 +1,17 @@
+\section functions functions - print or erase functions
+
+\subsection function-synopsis Synopsis
+<tt>functions [-e] FUNCTIONS...</tt>
+
+\subsection functions-description Description
+
+This builtin command is used to print or erase functions.
+
+- <tt>-e</tt> or <tt>--erase</tt> causes the specified functions to be erased.
+- <tt>-n</tt> or <tt>--names</tt> List only the names of all defined functions
+
+If \c functions is called with no arguments, the names and definition
+of all functions are printed, otherwise, the specified function
+definitions will be printed.
+
+
diff --git a/doc_src/help.txt b/doc_src/help.txt
new file mode 100644
index 00000000..a097a683
--- /dev/null
+++ b/doc_src/help.txt
@@ -0,0 +1,16 @@
+
+\section help help - Display fish documantation
+
+\subsection help-synopsis Synopsis
+ <tt>help [SECTION]</tt>
+
+\subsection help-description Description
+
+The \c help command is used to display a section of the fish help documentation.
+
+If the BROWSER environment variable is set, it will be used to display
+the documentation, otherwise fish will search for a suitable browser.
+
+\subsection help-example Example
+
+<tt>help fg</tt> shows the documentation for the \c fg builtin.
diff --git a/doc_src/if.txt b/doc_src/if.txt
new file mode 100644
index 00000000..f8bd5a65
--- /dev/null
+++ b/doc_src/if.txt
@@ -0,0 +1,23 @@
+\section if if - Conditionally execute a command
+
+\subsection if-synopsis Synopsis
+<tt>if CONDITION; COMMAND_TRUE [else; COMMAND_FALSE] end;</tt>
+
+\subsection if-description Description
+<tt>if</tt> will execute the command CONDITION. If the commands exit
+status is zero, the command COMMAND_TRUE will execute. If it is
+not zero and COMMAND_FALSE is specified, COMMAND_FALSE will be
+executed.
+
+\subsection if-example Example
+
+<pre>
+if test -f foo.txt
+ echo foo.txt exists
+else
+ echo foo.txt does not exist
+end
+</pre>
+will print <tt>foo.txt exists</tt> if the file foo.txt
+exists and is a regular file, otherwise it will print
+<tt>foo.txt does not exist</tt>.
diff --git a/doc_src/jobs.txt b/doc_src/jobs.txt
new file mode 100644
index 00000000..021edd31
--- /dev/null
+++ b/doc_src/jobs.txt
@@ -0,0 +1,13 @@
+\section jobs jobs - print currently running jobs
+
+\subsection jobs-synopsis
+<tt>jobs</tt>
+
+\subsection jobs-description Description
+The <tt>jobs</tt> builtin causes fish to print a list of the currently
+running jobs and their status.
+
+On systems that supports this feature, jobs will also print the CPU
+usage of each job since the last command was executed. The CPU usage
+is expressed as a percentage of full CPU activity. Note that on
+multiprocessor systems, the total activity may be more than 100\%.
diff --git a/doc_src/mimedb.txt b/doc_src/mimedb.txt
new file mode 100644
index 00000000..9ebdc795
--- /dev/null
+++ b/doc_src/mimedb.txt
@@ -0,0 +1,19 @@
+
+\section mimedb mimedb - Lookup file information via the mime database
+
+\subsection mimedb-synopsis Synopsis
+<tt>mimedb [OPTIONS] FILES...</tt>
+
+\subsection mimedb-description Description
+
+- \c FILES is a list of files to analyse
+- \c -t, \c --input-file-data the specified files type should be determined both by their filename and by their contents (Default)
+- \c -f, \c --input-filename the specified files type should be determined by their filename
+- \c -i, \c --input-mime the arguments are not files but mimetypes
+- \c -m, \c --output-mime the output will be the mimetype of each file (Default)
+- \c -f, \c --output-description the output will be the description of each mimetype
+- \c -a, \c --output-action the output will be the default action of each mimetype
+- \c -l, \c --launch launch the default action for the specified file(s)
+- \c -h, \c --help Display a help message and exit
+- \c -v, \c --version Display version number and exit
+
diff --git a/doc_src/nextd.txt b/doc_src/nextd.txt
new file mode 100644
index 00000000..00abc4b2
--- /dev/null
+++ b/doc_src/nextd.txt
@@ -0,0 +1,9 @@
+\section nextd nextd
+
+\subsection nextd-synopsis Synopsis
+<tt>nextd [-l] [pos]</tt>
+
+\subsection nextd-description Description
+<tt>nextd</tt> moves forwards <tt>pos</tt> positions in the history of visited directories;
+if the end of the history has been hit, a warning is printed. If the <tt>-l></tt> flag is
+specified, the current history is also displayed.
diff --git a/doc_src/not.txt b/doc_src/not.txt
new file mode 100644
index 00000000..5fa59d01
--- /dev/null
+++ b/doc_src/not.txt
@@ -0,0 +1,21 @@
+
+\section not not - Negate the exit status of a job
+
+\subsection not-synopsis Synopsis
+ <tt>not COMMAND [OPTIONS...]</tt>
+
+\subsection not-description Description
+
+The \c not builtin is used to negate the exit status of another command.
+
+
+\subsection not-example Example
+
+The following code reports an error and exits if no file named spoon can be found.
+<pre>
+if not test -f spoon
+ echo There is no spoon
+ exit 1
+end
+</pre>
+
diff --git a/doc_src/open.txt b/doc_src/open.txt
new file mode 100644
index 00000000..455fd1ee
--- /dev/null
+++ b/doc_src/open.txt
@@ -0,0 +1,13 @@
+
+\section open open - Open file in it's default application
+
+\subsection open-synopsis Synopsis
+ <tt>open FILES...</tt>
+
+\subsection open-description Description
+
+The \c open command is used to open a file in it's default application. \c open is implemented using the <a href="commands.html#mimedb">mimedb</a> command.
+
+\subsection open-example Example
+
+<tt>open *.txt</tt> opens all the text files in the current directory using your systems default text editor.
diff --git a/doc_src/or.txt b/doc_src/or.txt
new file mode 100644
index 00000000..3fc40f3c
--- /dev/null
+++ b/doc_src/or.txt
@@ -0,0 +1,23 @@
+
+\section or or - Conditionally execute a command
+
+\subsection or-synopsis Synopsis
+ <tt>or COMMAND1; COMMAND2</tt>
+
+\subsection or-description Description
+
+The \c or builtin is used to execute one command, and if it returns
+non-zero status, also execute a second command.
+
+\subsection or-example Example
+
+The following code runs the \c make command to build a program, or if it fails, it runs <tt>make clean</tt>, which removes the files created by the build process
+<pre>
+or make; make clean
+</pre>
+
+\c or and \c and can be nested, as in this example, that attempts to build and install a program, and removed the files created by the build process on failiure
+
+<pre>
+or and make; make install; make clean
+</pre>
diff --git a/doc_src/popd.txt b/doc_src/popd.txt
new file mode 100644
index 00000000..9ecf0ec4
--- /dev/null
+++ b/doc_src/popd.txt
@@ -0,0 +1,8 @@
+\section popd popd
+
+\subsection popd-synopsis Synopsis
+<tt>popd</tt>
+
+\subsection popd-description Description
+<tt>popd</tt> removes the top directory from the directory stack and
+cd's to the new top directory.
diff --git a/doc_src/prevd.txt b/doc_src/prevd.txt
new file mode 100644
index 00000000..afd61f64
--- /dev/null
+++ b/doc_src/prevd.txt
@@ -0,0 +1,9 @@
+\section prevd prevd
+
+\subsection prevd-synopsis Synopsis
+<tt>prevd [-l] [pos]</tt>
+
+\subsection prevd-description Description
+<tt>prevd</tt> moves backwards <tt>pos</tt> positions in the history of visited directories;
+if the beginning of the history has been hit, a warning is printed. If the <tt>-l</tt> flag
+is specified, the current history is also displayed.
diff --git a/doc_src/pushd.txt b/doc_src/pushd.txt
new file mode 100644
index 00000000..1b5ae7ef
--- /dev/null
+++ b/doc_src/pushd.txt
@@ -0,0 +1,9 @@
+\section pushd pushd
+
+\subsection pushd-synopsis Synopsis
+<tt>pushd [DIRECTORY]</tt>
+
+\subsection pushd-description Description
+The <tt>pushd</tt> function adds DIRECTORY to the top of the directory stack
+and makes it the current directory. Use <tt>popd</tt> to pop it off and and
+return to the original directory.
diff --git a/doc_src/random.txt b/doc_src/random.txt
new file mode 100644
index 00000000..5b0713c3
--- /dev/null
+++ b/doc_src/random.txt
@@ -0,0 +1,25 @@
+
+\section random random - Generate random number
+
+\subsection random-synopsis Synopsis
+ <tt>random [SEED]</tt>
+
+\subsection random-description Description
+
+The \c random command is used to generate a random number in the
+interval 0<=N<32767. If an argument is given, it is used to seed the
+random number generator. This can be useful for debugging purposes,
+where it can be desirable to get the same random number sequence
+multiple times. If the random number generator is called without first
+seeding it, the current time will be used as the seed.
+
+\subsection random-example Example
+
+The following code will count down from a random number to 1:
+
+<pre>
+for i in (seq (random) -1 1)
+ echo $i
+ sleep
+end
+</pre>
diff --git a/doc_src/read.txt b/doc_src/read.txt
new file mode 100644
index 00000000..4af02294
--- /dev/null
+++ b/doc_src/read.txt
@@ -0,0 +1,26 @@
+\section read read - read line of input into variables
+
+\subsection read-synopsis Synopsis
+<tt>read [OPTIONS] [VARIABLES...]</tt>
+
+\subsection read-description Description
+
+The <tt>read</tt> builtin causes fish to read one line from standard
+input and store the result in one or more environment variables.
+
+- <tt>-e</tt> or <tt>--export</tt> specifies that the variables will be exported to subshells.
+- <tt>-g</tt> or <tt>--global</tt> specifies that the variables will be made global.
+- <tt>-pPROMPT_CMD</tt> or <tt>--prompt=PROMPT_CMD</tt> specifies that the output of the shell command PROMPT_CMD should be used as the prompt for the interactive mode prompt. The default prompt command is <tt>set_color green; echo read; set_color normal; echo "> "</tt>.
+- <tt>-cCMD</tt> or <tt>--command=CMD</tt> specifies that the initial string in the interactive mode command buffer should be CMD.
+
+Read starts by reading a single line of input from stdin, the line is
+then tokenized using the <tt>IFS</tt> environment variable. Each variable
+specified in <tt>VARIABLES</tt> is then assigned one tokenized string
+element. If there are more tokens than variables, the complete
+remainder is assigned to the last variable.
+
+\subsection read-example Example
+
+<tt>echo hello|read foo</tt>
+
+Will cause the variable \$foo to be assigned the value hello.
diff --git a/doc_src/return.txt b/doc_src/return.txt
new file mode 100644
index 00000000..997d60a3
--- /dev/null
+++ b/doc_src/return.txt
@@ -0,0 +1,22 @@
+
+\section return return - Stop the innermost currently evaluated function
+
+\subsection return-synopsis Synopsis
+ <tt>function NAME; [COMMANDS...] break [STATUS]; [COMMANDS...] end</tt>
+
+\subsection return-description Description The \c return builtin is
+used to halt a currently running function. It is usually added inside
+of a conditional block such as an <a href="#if">if</a> statement or a
+<a href="#switch">switch</a> statement to conditionally stop the
+executing function and return to the caller.
+
+- \c STATUS is the return status of the function. If unspecified, the status is set to 0.
+
+\subsection return-example Example
+The following code is an implementation of the false program as a fish builtin
+<p>
+<pre>function false
+ return 1
+end</pre>
+</p>
+
diff --git a/doc_src/set.txt b/doc_src/set.txt
new file mode 100644
index 00000000..c1d59ba8
--- /dev/null
+++ b/doc_src/set.txt
@@ -0,0 +1,40 @@
+\section set set - Handle environment variables.
+
+\subsection set-synopsis Synopsis
+<tt>set [OPTIONS] VARIABLE_NAME [VALUES...]</tt>
+
+The <tt>set</tt> builtin causes fish to assign the variable <tt>VARIABLE_NAME</tt> the values <tt>VALUES...</tt>.
+
+\subsection set-description Description
+- <tt>-e</tt> or <tt>--erase</tt> causes the specified environment variables to be erased
+- <tt>-U</tt> or <tt>--universal</tt> causes the specified environment variable to be made universal. If this option is supplied, the variable will be shared between all the current users fish instances on the current computer, and will be preserved across restarts of the shell.
+- <tt>-g</tt> or <tt>--global</tt> causes the specified environment variable to be made global. If this option is not supplied, the specified variable will dissapear when the current block ends
+- <tt>-l</tt> or <tt>--local</tt> forces the specified environment variable to be made local to the current block, even if the variable already exists and is non-local
+- <tt>-n</tt> or <tt>--names</tt> List only the names of all defined variables
+- <tt>-x</tt> or <tt>--export</tt> causes the specified environment variable to be exported to child processes
+- <tt>-u</tt> or <tt>--unexport</tt> causes the specified environment not to be exported to child processes
+
+If set is called with no arguments, the names and values of all
+environment variables are printed.
+
+If set is called with only one argument, the scope of the variable
+with the given name will be changed as specified, but it's value will
+remain the same. If the variable did not previously exist, it's value
+will be an empty string.
+
+If the \c -e or \c --erase option is specified, all the variables
+specified by the following arguments will be erased
+
+If a variable is set to more than one value, the variable will be an
+array with the specified elements.
+
+If the variable name is one or more array elements, such as <tt>PATH[1
+3 7]</tt>, only those array elements specified will be changed.
+
+\subsection set-example Example
+
+<tt>set foo hi</tt> sets the value of the variable foo to be hi.
+
+<tt>set -e smurf</tt> removes the variable \c smurf.
+
+<tt>set PATH[4] ~/bin</tt> changes the fourth element of the \c PATH array to \c ~/bin
diff --git a/doc_src/set_color.txt b/doc_src/set_color.txt
new file mode 100644
index 00000000..36bcd304
--- /dev/null
+++ b/doc_src/set_color.txt
@@ -0,0 +1,19 @@
+
+\section set_color set_color - Set the terminal color
+
+\subsection set_color-synopsis Synopsis
+ <tt>set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]</tt>
+
+\subsection set_color-description Description
+
+Change the foreground and/or background color of the terminal.
+COLOR is one of black, red, green, brown, yellow, blue, magenta,
+purple, cyan, white and normal.
+
+- \c -b, \c --background Set the background color
+- \c -h, \c --help Display help message and exit
+- \c -v, \c --version Display version and exit
+
+Calling <tt>set_color normal</tt> will set the terminal color to
+whatever is the default color of the terminal.
+
diff --git a/doc_src/source.txt b/doc_src/source.txt
new file mode 100644
index 00000000..e94e38f3
--- /dev/null
+++ b/doc_src/source.txt
@@ -0,0 +1,19 @@
+\section source . - Evaluate contents of file.
+
+\subsection source-synopsis Synopsis
+<tt>. FILENAME</tt>
+
+\subsection source-description Description
+
+Evaluates the commands of the specified file in the current
+shell. This is different from starting a new process to perform the
+commands (i.e. <tt>fish < FILENAME</tt>) since the commands will be
+evaluated by the current shell, which means that changes in
+environment variables, etc., will remain.
+
+\subsection source-example Example
+
+<tt>. ~/.fish</tt>
+
+causes fish to reread its initialization file.
+
diff --git a/doc_src/switch.txt b/doc_src/switch.txt
new file mode 100644
index 00000000..06a32450
--- /dev/null
+++ b/doc_src/switch.txt
@@ -0,0 +1,37 @@
+
+\section switch switch - conditionally execute a block of commands
+
+\subsection switch-synopsis Synopsis
+ <tt>switch VALUE; [case [WILDCARD...]; [COMMANDS...];...] end</tt>
+
+\subsection switch-description Description
+
+The \c switch statement is used to perform one of several blocks of
+commands depending on whether a specified value equals one of several
+wildcarded values.
+
+\subsection switch-example Example
+
+If the variable \$animal contins the name of an animal, the
+following code would attempt to classify it:
+
+<p>
+<pre>
+switch $animal
+ case cat
+ echo evil
+ case wolf dog human moose dolphin whale
+ echo mammal
+ case duck goose albatros
+ echo bird
+ case shark trout stingray
+ echo fish
+end
+</pre>
+</p>
+<p>
+
+If the above code was run with \$animal set to \c whale, the output
+would be \c mammal.
+
+</p>
diff --git a/doc_src/tokenize.txt b/doc_src/tokenize.txt
new file mode 100644
index 00000000..d0a07465
--- /dev/null
+++ b/doc_src/tokenize.txt
@@ -0,0 +1,14 @@
+
+\section tokenize tokenize - tokenize a string
+
+\subsection tokenize-synopsis Synopsis
+ <tt>tokenize [STRING...]</tt>
+
+\subsection tokenize-description Description
+- STRING is the string or list of strings to tokenize. Each token will be printed on a line by itself
+- \c -e, \c --with-empty allow empty tokens
+- \c -n, \c --no-empty ignore empty tokens (Default)
+- <tt>-d DELIMITER</tt>, <tt>--delimiter=DELIMITER</tt> is the list of characters that will be used as delimiters. If unspecified, the IFS environment variable will be used as the delimiter string,
+- \c -h, \c --help Display help message and exit
+- \c -v, \c --version Display version and exit
+
diff --git a/doc_src/while.txt b/doc_src/while.txt
new file mode 100644
index 00000000..3a59afc5
--- /dev/null
+++ b/doc_src/while.txt
@@ -0,0 +1,13 @@
+\section while while - perform a command multiple times
+
+\subsection while-synopsis Synopsis
+<tt>while CONDITION; COMMANDS; end</tt>
+
+\subsection while-synopsis Synopsis
+The <tt>while</tt> builtin causes fish to continually execute the command COMMANDS while the command CONDITION returns with status 0.
+
+\subsection while-example Example
+
+<tt>while test -f foo.txt; echo file exists; sleep 10; end</tt>
+
+causes fish to print the line 'file exists' at 10 second intervals as long as the file foo.txt exists.
diff --git a/init/completions/apm.fish b/init/completions/apm.fish
new file mode 100644
index 00000000..ed7a32fd
--- /dev/null
+++ b/init/completions/apm.fish
@@ -0,0 +1,8 @@
+#apm
+complete -f -c apm -s V -l version -d "print version"
+complete -f -c apm -s v -l verbose -d "print APM info"
+complete -f -c apm -s m -l minutes -d "print time remaining"
+complete -f -c apm -s M -l monitor -d "monitor status info"
+complete -f -c apm -s S -l standby -d "request APM standby mode"
+complete -f -c apm -s s -l suspend -d "request APM suspend mode"
+complete -f -c apm -s d -l debug -d "APM status debuggin info"
diff --git a/init/completions/apropos.fish b/init/completions/apropos.fish
new file mode 100644
index 00000000..fed1336e
--- /dev/null
+++ b/init/completions/apropos.fish
@@ -0,0 +1,20 @@
+function __fish_complete_apropos
+ if test (commandline -ct)
+ set str (commandline -ct)
+ apropos $str|sed -e 's/^\(.*'$str'\([^ ]*\).*\)$/'$str'\2\t\1/'
+ end
+end
+
+complete -xc apropos -a "(__fish_complete_apropos)" -d "Whatis entry"
+
+complete -c apropos -s h -l help -d "apropos command help"
+complete -f -c apropos -s d -l debug -d "print debugging info"
+complete -f -c apropos -s v -l verbose -d "print verbose warning"
+complete -f -c apropos -s r -l regex -d "keyword as regex"
+complete -f -c apropos -s w -l wildcard -d "keyword as wildwards"
+complete -f -c apropos -s e -l exact -d "keyword as exactly match"
+complete -x -c apropos -s m -l system -d "search for other system"
+complete -x -c apropos -s M -l manpath -a "(echo $MANPATH)" -d "specify man path"
+complete -x -c apropos -s C -l config-file -d "specify a conf file"
+complete -f -c apropos -s V -l version -d "Display version"
+
diff --git a/init/completions/apt-build.fish b/init/completions/apt-build.fish
new file mode 100644
index 00000000..370474c2
--- /dev/null
+++ b/init/completions/apt-build.fish
@@ -0,0 +1,29 @@
+
+#apt-build
+complete -c apt-build -l help -d "apt-build command help"
+complete -f -c apt-build -a update -d "update list of packages"
+complete -f -c apt-build -a upgrade -d "upgrade packages"
+complete -f -c apt-bulid -a world -d "rebuild your system"
+complete -x -c apt-build -a install -d "build and install a new pkg"
+complete -x -c apt-build -a source -d "download and extract a src"
+complete -x -c apt-build -a info -d "info on a pkg"
+complete -x -c apt-build -a remove -d "remove packages"
+complete -x -c apt-build -a clean-build -d "erase built pkgs"
+complete -x -c apt-build -a build-source -d "build src without install"
+complete -x -c apt-build -a clean-sources -d "clean src dirs"
+complete -x -c apt-build -a update-source -d "update src and rebuild them"
+complete -x -c apt-build -a update-repository -d "update the repository"
+complete -f -c apt-build -l nowrapper -d "do not use gcc wrapper"
+complete -f -c apt-build -l remove-builddep -d "remove build-dep"
+complete -f -c apt-build -l no-source -d "do not download source"
+complete -f -c apt-build -l build-dir -d "specify build-dir"
+complete -f -c apt-build -l rebuild -d "rebuild a package"
+complete -f -c apt-build -l reinstall -d "rebuild and install an installed pkg"
+complete -r -f -c apt-build -l build-command -d "use <command> to build"
+complete -r -c apt-build -l patch -d "apply <file> patch"
+complete -c apt-build -s p -l patch-strip -d "prefix to strip on patch"
+complete -c apt-build -s y -l yes -d "assume yes"
+complete -c apt-build -l purge -d "use purge instead of remove"
+complete -c apt-build -l noupdate -d "do not run update"
+complete -r -c apt-build -l source-list -d "specify sources.list file"
+complete -f -c apt-build -s v -l version -d "show version"
diff --git a/init/completions/apt-cache.fish b/init/completions/apt-cache.fish
new file mode 100644
index 00000000..5e755af6
--- /dev/null
+++ b/init/completions/apt-cache.fish
@@ -0,0 +1,33 @@
+#apt-cache
+complete -c apt-cache -s h -l help -d "apt-cache command help"
+complete -c apt-cache -a add -d "add index files Debug only"
+complete -f -c apt-cache -a gencaches -d "build apt cache"
+complete -x -c apt-cache -a showpkg -d "show package info"
+complete -f -c apt-cache -a stats -d "show cache statistics"
+complete -x -c apt-cache -a showsrc -d "show source package"
+complete -f -c apt-cache -a dump -d "show packages in cache"
+complete -f -c apt-cache -a dumpavail -d "print available list"
+complete -f -c apt-cache -a unmet -d "list unmet dep in cache"
+complete -x -c apt-cache -a show -d "display package record"
+complete -x -c apt-cache -a search -d "search pkgname by REGEX"
+complete -c apt-cache -l full -a search -d "search full package name"
+complete -x -c apt-cache -l names-only -a search -d "search pkgname only"
+complete -x -c apt-cache -a depends -d "list dep for the package"
+complete -x -c apt-cache -a rdepends -d "list reverse dep for the package"
+complete -x -c apt-cache -a pkgnames -d "print package name by prefix"
+complete -x -c apt-cache -a dotty -d "generate dotty output for packages"
+complete -x -c apt-cache -a policy -d "debug preferences file"
+complete -x -c apt-cache -a madison -d "mimic madison"
+complete -r -c apt-cache -s p -l pkg-cache -d "select file to store pkg cache"
+complete -r -c apt-cache -s s -l src-cache -d "select file to store src cache"
+complete -f -c apt-cache -s q -l quiet -d "quiet output"
+complete -f -c apt-cache -s i -l important -d "print important deps"
+complete -f -c apt-cache -s a -l all-versions -d "print full records"
+complete -f -c apt-cache -s g -l generate -d "auto-gen package cache"
+complete -f -c apt-cache -l all-names -d "print all names"
+complete -f -c apt-cache -l recurse -d "dep and rdep recursive"
+complete -f -c apt-cache -l installed -d "limit to installed"
+complete -f -c apt-cache -s v -l version -d "show version"
+complete -r -c apt-cache -s c -l config-file -d "specify config file"
+complete -x -c apt-cache -s o -l option -d "specify options"
+
diff --git a/init/completions/apt-cdrom.fish b/init/completions/apt-cdrom.fish
new file mode 100644
index 00000000..12d9dab3
--- /dev/null
+++ b/init/completions/apt-cdrom.fish
@@ -0,0 +1,13 @@
+#apt-cdrom
+complete -c apt-cdrom -s h -l help -d "apt-cdrom command help"
+complete -r -c apt-cdrom -a add -d "add new disc to source list"
+complete -x -c apt-cdrom -a ident -d "report identity of disc"
+complete -r -c apt-cdrom -s d -l cdrom -d "mount point"
+complete -f -c apt-cdrom -s r -l rename -d "rename a disc"
+complete -f -c apt-cdrom -s m -l no-mount -d "no mounting"
+complete -f -c apt-cdrom -s f -l fast -d "fast copy"
+complete -f -c apt-cdrom -s a -l thorough -d "thorough pkg scan"
+complete -f -c apt-cdrom -s n -l no-act -d "no changes"
+complete -f -c apt-cdrom -s v -l version -d "show version"
+complete -r -c apt-cdrom -s c -l config-file -d "specify config file"
+complete -x -c apt-cdrom -s o -l option -d "specify options"
diff --git a/init/completions/apt-config.fish b/init/completions/apt-config.fish
new file mode 100644
index 00000000..6bc72c35
--- /dev/null
+++ b/init/completions/apt-config.fish
@@ -0,0 +1,7 @@
+#apt-config
+complete -c apt-config -s h -l help -d "apt-config command help"
+complete -c apt-config -a shell -d "access config file from shell"
+complete -f -c apt-config -a dump -d "dump contents of config file"
+complete -f -c apt-config -s v -l version -d "show version"
+complete -r -c apt-config -s c -l config-file -d "specify config file"
+complete -x -c apt-config -s o -l option -d "specify options"
diff --git a/init/completions/apt-extracttemplates.fish b/init/completions/apt-extracttemplates.fish
new file mode 100644
index 00000000..23bcff86
--- /dev/null
+++ b/init/completions/apt-extracttemplates.fish
@@ -0,0 +1,7 @@
+
+#apt-extracttemplates
+complete -c apt-extracttemplates -s h -l help -d "apt-extracttemplates command help"
+complete -r -c apt-extracttemplates -s t -d "set temp dir"
+complete -r -c apt-extracttemplates -s c -d "specifiy config file"
+complete -r -c apt-extracttemplates -s o -d "specify options"
+
diff --git a/init/completions/apt-file.fish b/init/completions/apt-file.fish
new file mode 100644
index 00000000..3a4ce193
--- /dev/null
+++ b/init/completions/apt-file.fish
@@ -0,0 +1,17 @@
+#apt-file
+complete -c apt-file -s h -l help -d "apt-file command help"
+complete -x -c apt-file -a update -d "resync pkg contents from source"
+complete -r -c apt-file -a search -d "search pkg containing pattern"
+complete -r -c apt-file -a list -d "list contents of a pkg matching pattern"
+complete -x -c apt-file -a purge -d "remove all gz files from cache"
+complete -r -c apt-file -s c -l cache -d "set cache dir"
+complete -f -c apt-file -s v -l verbose -d "run in verbose"
+complete -c apt-file -s d -l cdrom-mount -d "use cdrom-mount-point"
+complete -f -c apt-file -s i -l ignore-case -d "do not expand pattern"
+complete -f -c apt-file -s x -l regexp -d "pattern is regexp"
+complete -f -c apt-file -s V -l version -d "show version"
+complete -f -c apt-file -s a -l architecture -d "set arch"
+complete -r -c apt-file -s s -l sources-list -a "(ls /etc/apt)" -d "set sources.list file"
+complete -f -c apt-file -s l -l package-only -d "only display pkg name"
+complete -f -c apt-file -s F -l fixed-string -d "do not expand pattern"
+complete -f -c apt-file -s y -l dummy -d "run in dummy mode"
diff --git a/init/completions/apt-ftparchive.fish b/init/completions/apt-ftparchive.fish
new file mode 100644
index 00000000..cf6a49c2
--- /dev/null
+++ b/init/completions/apt-ftparchive.fish
@@ -0,0 +1,17 @@
+#apt-ftparchive
+complete -c apt-ftparchive -s h -l help -d "apt-ftparchive command help"
+complete -f -c apt-ftparchive -a packages -d "generate pkg from source"
+complete -f -c apt-ftparchive -a sources -d "generate source index file"
+complete -f -c apt-ftparchive -a contents -d "generate contents file"
+complete -f -c apt-ftparchive -a release -d "generate release file"
+complete -f -c apt-ftparchive -a clean -d "remove records"
+complete -f -c apt-ftparchive -l md5 -d "generate MD5 sums"
+complete -f -c apt-ftparchive -s d -l db -d "use a binary db"
+complete -f -c apt-ftparchive -s q -l quiet -d "quiet mode"
+complete -f -c apt-ftparchive -l delink -d "perform delinking"
+complete -f -c apt-ftparchive -l contents -d "perform contents generation"
+complete -c apt-ftparchive -s s -l source-override -d "use source override"
+complete -f -c apt-ftparchive -l readonly -d "make caching db readonly"
+complete -f -c apt-ftparchive -s v -l version -d "show version"
+complete -r -c apt-ftparchive -s c -l config-file -d "use config file"
+complete -r -c apt-ftparchive -s o -l option -d "set config options"
diff --git a/init/completions/apt-get.fish b/init/completions/apt-get.fish
new file mode 100644
index 00000000..ee253a7a
--- /dev/null
+++ b/init/completions/apt-get.fish
@@ -0,0 +1,64 @@
+#completion for apt-get
+
+function __fish_apt_no_subcommand -d "test if apt has yet to be given the subcommand"
+ for i in (commandline -opc)
+ if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove source build-dep check clean autoclean
+ return 1
+ end
+ end
+ return 0
+end
+
+function __fish_apt_use_package -d "Test if apt command should have packages as potential completion"
+ for i in (commandline -opc)
+ if contains -- $i contains install remove build-dep
+ return 0
+ end
+ end
+ return 1
+end
+
+complete -c apt-get -n "__fish_apt_use_package" -a "(__fish_print_packages)" -d "Package"
+
+complete -c apt-get -s h -l help -d "apt-get command help"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "update" -d "update sources"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "upgrade" -d "upgrade or install newest packages"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "dselect-upgrade" -d "use with dselect front-end"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "dist-upgrade" -d "distro upgrade"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "install" -d "install one or more packages"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "remove" -d "remove one or more packages"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "source" -d "fetch source packages"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "build-dep" -d "install/remove packages for dependencies"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "check" -d "update cache and check dep"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "clean" -d "clean local caches and packages"
+complete -f -n "__fish_apt_no_subcommand" -c apt-get -a "autoclean" -d "clean packages no longer be downloaded"
+complete -c apt-get -s d -l download-only -d "Download Only"
+complete -c apt-get -s f -l fix-broken -d "correct broken deps"
+complete -c apt-get -s m -l fix-missing -d "ignore missing packages"
+complete -c apt-get -l no-download -d "Disable downloading packages"
+complete -c apt-get -s q -l quiet -d "quiet output"
+complete -c apt-get -s s -l simulate -d "perform a siulation"
+complete -c apt-get -s y -l assume-yes -d "automatic yes to prompts"
+complete -c apt-get -s u -l show-upgraded -d "show upgraded packages"
+complete -c apt-get -s V -l verbose-versions -d "show full versions for packages"
+complete -c apt-get -s b -l compile -d "compile source packages"
+complete -c apt-get -s b -l build -d "compile source packages"
+complete -c apt-get -l ignore-hold -d "ignore package Holds"
+complete -c apt-get -l no-upgrade -d "Do not upgrade packages"
+complete -c apt-get -l force-yes -d "Force yes"
+complete -c apt-get -l print-uris -d "print the URIs"
+complete -c apt-get -l purge -d "use purge instead of remove"
+complete -c apt-get -l reinstall -d "reinstall packages"
+complete -c apt-get -l list-cleanup -d "erase obsolete files"
+complete -c apt-get -s t -l target-release -d "control default input to the policy engine"
+complete -c apt-get -l trivial-only -d "only perform operations that are trivial"
+complete -c apt-get -l no-remove -d "abort if any packages are to be removed"
+complete -c apt-get -l only-source -d "only accept source packages"
+complete -c apt-get -l diff-only -d "download only diff file"
+complete -c apt-get -l tar-only -d "download only tar file"
+complete -c apt-get -l arch-only -d "only process arch-dep build-deps"
+complete -c apt-get -l allow-unauthenticated -d "ignore non-authenticated packages"
+complete -c apt-get -s v -l version -d "show program version"
+complete -r -c apt-get -s c -l config-file -d "specify a config file"
+complete -r -c apt-get -s o -l option -d "set a config option"
+
diff --git a/init/completions/apt-key.fish b/init/completions/apt-key.fish
new file mode 100644
index 00000000..391ff635
--- /dev/null
+++ b/init/completions/apt-key.fish
@@ -0,0 +1,5 @@
+#apt-key
+complete -r -c apt-key -a add -d "add a new key"
+complete -f -c apt-key -a del -d "remove a key"
+complete -f -c apt-key -a list -d "list trusted keys"
+
diff --git a/init/completions/apt-listbugs.fish b/init/completions/apt-listbugs.fish
new file mode 100644
index 00000000..eec950e3
--- /dev/null
+++ b/init/completions/apt-listbugs.fish
@@ -0,0 +1,25 @@
+#apt-listbugs
+complete -c apt-listbugs -s h -l help -d "apt-listbugs command help"
+complete -f -c apt-listbugs -s s -l severity -a "critical grave" -d "set severity"
+complete -f -c apt-listbugs -s T -l tag -d "Targs you want to see"
+complete -f -c apt-listbugs -s S -l stats -d "outstanding 'pending upload' resolved done open" -d "status you want to see"
+complete -f -c apt-listbugs -s l -l showless -d "ignore bugs in your system"
+complete -f -c apt-listbugs -s g -l showgreater -d "ignore newer bugs than upgrade pkgs"
+complete -f -c apt-listbugs -s D -l show-downgrade -d "bugs for downgrade pkgs"
+complete -f -c apt-listbugs -s H -l hostname -a "osdn.debian.or.jp" -d "Bug Tracking system"
+complete -f -c apt-listbugs -s p -l port -d "specify port for web interface"
+complete -f -c apt-listbugs -s R -l release-critical -d "use daily bug report"
+complete -f -c apt-listbugs -s I -l index -d "use the raw index.db"
+complete -f -c apt-listbugs -s X -l indexdir -d "specify index dir"
+complete -f -c apt-listbugs -s P -l pin-priority -d "specify Pin-Priority value"
+complete -f -c apt-listbugs -l title -d "specify the title of rss"
+complete -f -c apt-listbugs -s f -l force-download -d "retrieve fresh bugs"
+complete -f -c apt-listbugs -s q -l quiet -d "do not display progress bar"
+complete -f -c apt-listbugs -s c -l cache-dir -a "/var/cache/apt-listbugs/" -d "specify local cache dir"
+complete -f -c apt-listbugs -s t -l timer -d "specify the expire cache timer"
+complete -c apt-listbugs -s C -l aptconf -d "specify apt config file"
+complete -f -c apt-listbugs -s y -l force-yes -d "assume all yes"
+complete -f -c apt-listbugs -s n -l force-no -d "assume all no"
+complete -c apt-listbugs -a list -d "list bugs from pkgs"
+complete -c apt-listbugs -a rss -d "list bugs in rss format"
+
diff --git a/init/completions/apt-listchanges.fish b/init/completions/apt-listchanges.fish
new file mode 100644
index 00000000..c02cb1af
--- /dev/null
+++ b/init/completions/apt-listchanges.fish
@@ -0,0 +1,13 @@
+#apt-listchanges
+complete -c apt-listchanges -l help -d "apt-listchanges command help"
+complete -c apt-listchanges -l apt -d "read filenames from pipe"
+complete -f -c apt-listchanges -s v -l verbose -d "verbose info"
+complete -f -c apt-listchanges -s f -l frontend -a "pager browser xterm-pager xterm-browser text mail none" -d "select fronend interface"
+complete -r -f -c apt-listchanges -l email-address -d "specify email address"
+complete -f -c apt-listchanges -s c -l confirm -d "ask confirmation"
+complete -f -c apt-listchanges -s a -l all -d "display all changelogs"
+complete -r -c apt-listchanges -l save_seen -d "avoid changelogs from db in named file"
+complete -r -f -c apt-listchanges -l which -a "news changelogs both" -d "select display"
+complete -f -c apt-listchanges -s h -l headers -d "insert header"
+complete -f -c apt-listchanges -l debug -d "display debug info"
+complete -r -c apt-listchanges -l profile -d "select an option profile"
diff --git a/init/completions/apt-move.fish b/init/completions/apt-move.fish
new file mode 100644
index 00000000..62b53bbc
--- /dev/null
+++ b/init/completions/apt-move.fish
@@ -0,0 +1,23 @@
+#apt-move
+complete -c apt-move -a get -d "generate master file"
+complete -c apt-move -a getlocal -d "alias of get"
+complete -f -c apt-move -a move -d "move pkgs to local tree"
+complete -f -c apt-move -a delete -d "delete obsolete pkg files"
+complete -f -c apt-move -a packages -d "build new local files"
+complete -f -c apt-move -a fsck -d "rebuild index files"
+complete -f -c apt-move -a update -d "move pkgs from cache to local mirror"
+complete -f -c apt-move -a local -d "alias to move delete packages"
+complete -f -c apt-move -a localupdate -d "alias for update"
+complete -f -c apt-move -a mirror -d "download pkg missing from mirror"
+complete -f -c apt-move -a sync -d "sync pkgs installed"
+complete -f -c apt-move -a exclude -d 'test $LOCALDIR/.exclude file'
+complete -c apt-move -a movefile -d "move file from CLI"
+complete -f -c apt-move -a listbin -d "mirror|sync|repo"
+complete -f -c apt-move -a mirrorbin -d "fetch pkg from STDIN"
+complete -f -c apt-move -a mirrorsrc -d "fetch src pkg from STDIN"
+complete -f -c apt-move -s a -d "process all pkgs"
+complete -c apt-move -s c -d "use specific conffile"
+complete -f -c apt-move -s d -d "use specific dist"
+complete -f -c apt-move -s f -d "force deletion"
+complete -f -c apt-move -s q -d "suppresses normal output"
+complete -f -c apt-move -s t -d "test run"
diff --git a/init/completions/apt-proxy-import.fish b/init/completions/apt-proxy-import.fish
new file mode 100644
index 00000000..0c2965e3
--- /dev/null
+++ b/init/completions/apt-proxy-import.fish
@@ -0,0 +1,10 @@
+#apt-proxy-import
+complete -c apt-proxy-import -s h -l help -d "apt-proxy-import command help"
+complete -f -c apt-proxy-import -s V -l version -d "print version"
+complete -f -c apt-proxy-import -s v -l verbose -d "verbose info"
+complete -f -c apt-proxy-import -s q -l quiet -d "no message to STDOUT"
+complete -f -c apt-proxy-import -s r -l recursive -d "recurse into subdir"
+complete -r -c apt-proxy-import -s i -l import-dir -a "(ls -Fp|grep /$)" -d "dir to import"
+complete -r -c apt-proxy-import -s u -l user -a "(__fish_complete_users)" -d "change to user"
+complete -r -c apt-proxy-import -s d -l debug -d "debug level[default 0]"
+
diff --git a/init/completions/apt-rdepends.fish b/init/completions/apt-rdepends.fish
new file mode 100644
index 00000000..30cd6482
--- /dev/null
+++ b/init/completions/apt-rdepends.fish
@@ -0,0 +1,13 @@
+#apt-rdepends
+complete -c apt-rdepends -l help -d "apt-rdepends command help"
+complete -f -c apt-rdepends -s b -l build-depends -d "show bulid deps"
+complete -f -c apt-rdepends -s d -l dotty -d "generate a dotty graph"
+complete -f -c apt-rdepends -s p -l print-state -d "show state of deps"
+complete -f -c apt-rdepends -s r -l reverse -d "list pkgs depending on"
+complete -r -f -c apt-rdepends -s f -l follow -d "only follow DEPENDS recursively"
+complete -r -f -c apt-rdepends -s s -l show -d "only show DEPENDS"
+complete -r -f -c apt-rdepends -l state-follow -d "only follow STATES recursively"
+complete -r -f -c apt-rdepends -l state-show -d "only show STATES"
+complete -f -c apt-rdepends -l man -d "display man page"
+complete -f -c apt-rdepends -l version -d "print version"
+
diff --git a/init/completions/apt-setup.fish b/init/completions/apt-setup.fish
new file mode 100644
index 00000000..715d0f35
--- /dev/null
+++ b/init/completions/apt-setup.fish
@@ -0,0 +1,4 @@
+#apt-setup
+complete -c apt-setup -a probe -d "probe a CD"
+complete -c apt-setup -s N -d "run in noninteractive mode"
+
diff --git a/init/completions/apt-show-source.fish b/init/completions/apt-show-source.fish
new file mode 100644
index 00000000..08016185
--- /dev/null
+++ b/init/completions/apt-show-source.fish
@@ -0,0 +1,10 @@
+#apt-show-source
+complete -c apt-show-source -s h -l help -d "apt-show-source command help"
+complete -r -c apt-show-source -l status-file -d "read pkg from FILE" -f
+complete -r -c apt-show-source -o stf -d "read pkg from FILE" -f
+complete -r -c apt-show-source -l list-dir -a "(ls -Fp .|grep /$) /var/lib/apt/lists" -d "specify APT list dir"
+complete -r -c apt-show-source -o ld -a "(ls -Fp .|grep /$) /var/lib/apt/lists" -d "specify APT list dir"
+complete -r -c apt-show-source -s p -l package -a "(apt-cache pkgnames)" -d "list PKG info"
+complete -f -c apt-show-source -l version-only -d "print version only"
+complete -f -c apt-show-source -s a -l all -d "print all src pkgs with version"
+complete -f -c apt-show-source -s v -l verbose -d "verbose message"
diff --git a/init/completions/apt-show-versions.fish b/init/completions/apt-show-versions.fish
new file mode 100644
index 00000000..47abe1ba
--- /dev/null
+++ b/init/completions/apt-show-versions.fish
@@ -0,0 +1,14 @@
+#apt-show-versions
+complete -c apt-show-source -s h -l help -d "apt-show-versions command help"
+complete -r -c apt-show-versions -s p -l packages -a "(apt-cache pkgnames)" -d "print PKG versions"
+complete -f -c apt-show-versions -s r -l regex -d "using regex"
+complete -f -c apt-show-versions -s u -l upgradeable -d "print only upgradeable pkgs"
+complete -f -c apt-show-versions -s a -l allversions -d "print all versions"
+complete -f -c apt-show-versions -s b -l brief -d "print pkg name/distro"
+complete -f -c apt-show-versions -s v -l verbose -d "print verbose info"
+complete -f -c apt-show-versions -s i -l initialize -d "init or update cache only"
+complete -r -c apt-show-versions -l status-file -d "read pkg from FILE"
+complete -r -c apt-show-versions -o stf -d "read pkg from FILE"
+complete -r -c apt-show-versions -l list-dir -a "(ls -Fp .|grep /$) /var/lib/apt/lists /var/state/apt/lists" -d "specify APT list dir"
+complete -r -c apt-show-versions -o ld -a "(ls -Fp .|grep /$) /var/lib/apt/lists /var/state/apt/lists" -d "specify APT list dir"
+
diff --git a/init/completions/apt-sortpkgs.fish b/init/completions/apt-sortpkgs.fish
new file mode 100644
index 00000000..86c3cfbe
--- /dev/null
+++ b/init/completions/apt-sortpkgs.fish
@@ -0,0 +1,7 @@
+#apt-sortpkgs
+complete -c apt-sortpkgs -s h -l help -d "apt-sortpkgs command help"
+complete -f -c apt-sortpkgs -s s -l source -d "use source index field"
+complete -f -c apt-sortpkgs -s v -l version -d "show version"
+complete -r -c apt-sortpkgs -s c -l conf-file -d "specify conffile"
+complete -r -f -c apt-sortpkgs -s o -l option -d "set config options"
+
diff --git a/init/completions/apt-spy.fish b/init/completions/apt-spy.fish
new file mode 100644
index 00000000..ab9471c4
--- /dev/null
+++ b/init/completions/apt-spy.fish
@@ -0,0 +1,20 @@
+#apt-spy
+complete -c apt-spy -s h -d "apt-spy command help"
+complete -f -c apt-spy -s d -a "stable testing unstable" -d "Debian distribtion"
+complete -f -c apt-spy -s a -a "Africa Asia Europe North-America Oceania South-America" -d "servers in the areas"
+complete -c apt-spy -s c -d "conf file"
+complete -f -c apt-spy -s e -d "finish after number of servers"
+complete -c apt-spy -s f -d "file to grab servers"
+complete -c apt-spy -s i -d "file as input"
+complete -c apt-spy -s m -d "mirror-list file"
+complete -c apt-spy -s o -d "output sources.list file"
+complete -f -c apt-spy -s p -d "use proxy server"
+complete -f -c apt-spy -s s -d "comma separated country list"
+complete -f -c apt-spy -s t -d "how long in sec to download"
+complete -f -c apt-spy -s u -d "custom URL to get mirror list"
+complete -c apt-spy -s w -d "write top servers to file"
+complete -f -c apt-spy -s n -d "number of top servers"
+complete -f -c apt-spy -a "update" -d "update mirror list"
+complete -f -c apt-spy -s v -d "version number"
+
+
diff --git a/init/completions/apt-src.fish b/init/completions/apt-src.fish
new file mode 100644
index 00000000..bbea22a0
--- /dev/null
+++ b/init/completions/apt-src.fish
@@ -0,0 +1,24 @@
+#apt-src
+complete -c apt-src -s h -l help -d "apt-src command help"
+complete -f -c apt-src -a "update" -d "update list of src pkgs"
+complete -f -c apt-src -a "install" -d "install src pkgs"
+complete -f -c apt-src -a "upgrade" -d "upgrade src pkgs"
+complete -f -c apt-src -a "remove" -d "remove src pkgs"
+complete -f -c apt-src -a "build" -d "build src pkgs"
+complete -f -c apt-src -a "clean" -d "clean src pkgs"
+complete -f -c apt-src -a "import" -d "detect known src tree"
+complete -f -c apt-src -a "list" -d "list installed src pkg\(s\)"
+complete -f -c apt-src -a "location" -d "root src tree"
+complete -f -c apt-src -a "version" -d "version of src pkg"
+complete -f -c apt-src -a "name" -d "name of the src pkg"
+complete -f -c apt-src -s b -l build -d "build src pkgs"
+complete -f -c apt-src -s i -l installdebs -d "install after build"
+complete -f -c apt-src -s p -l patch -d "patch local changes"
+complete -r -c apt-src -s l -l location -d "specify a dir"
+complete -c apt-src -s c -l here -d "run on current dir"
+complete -f -c apt-src -l upstream-version -d "omit debian version"
+complete -f -c apt-src -s k -l keep-built -d "do not del built files"
+complete -f -c apt-src -s n -l no-delete-source -d "do not del source files"
+complete -f -c apt-src -l version -d "source tree version"
+complete -f -c apt-src -s q -l quiet -d "output to /dev/null"
+complete -f -c apt-src -s t -l trace -d "output trace"
diff --git a/init/completions/apt-zip-inst.fish b/init/completions/apt-zip-inst.fish
new file mode 100644
index 00000000..8fe7bb3d
--- /dev/null
+++ b/init/completions/apt-zip-inst.fish
@@ -0,0 +1,10 @@
+#apt-zip-inst
+complete -c apt-zip-inst -s h -l help -d "apt-zip-inst command help"
+complete -f -c apt-zip-inst -s V -l version -d "show version"
+complete -c apt-zip-inst -s m -l medium -d "removable medium"
+complete -f -c apt-zip-inst -s a -l aptgetaction -a "dselect-upgrade upgrade dist-upgrade" -d "select an action"
+complete -c apt-zip-inst -s p -l packages -d "list of pkgs to install"
+complete -f -c apt-zip-inst -s f -l fix-broken -d "fix broken option"
+complete -c apt-zip-inst -l skip-mount -d "specify a non-mountpoint dir"
+
+
diff --git a/init/completions/apt-zip-list.fish b/init/completions/apt-zip-list.fish
new file mode 100644
index 00000000..ee91bd82
--- /dev/null
+++ b/init/completions/apt-zip-list.fish
@@ -0,0 +1,13 @@
+#apt-zip-list
+complete -c apt-zip-list -s h -l help -d "apt-zip-list command help"
+complete -f -c apt-zip-list -s V -l version -d "show version"
+complete -c apt-zip-list -s m -l medium -d "removable medium"
+complete -f -c apt-zip-list -s a -l aptgetaction -a "dselect-upgrade upgrade dist-upgrade" -d "select an action"
+complete -c apt-zip-list -s p -l packages -d "list of pkgs to install"
+complete -f -c apt-zip-list -s f -l fix-broken -d "fix broken option"
+complete -c apt-zip-list -l skip-mount -d "specify a non-mountpoint dir"
+complete -c apt-zip-list -s M -l method -d "select a method"
+complete -c apt-zip-list -s o -l options -a "tar restart" -d "specify options"
+complete -c apt-zip-list -s A -l accept -a "http ftp" -d "accept protocols"
+complete -c apt-zip-list -s R -l reject -a "http ftp" -d "reject protocols"
+
diff --git a/init/completions/arp.fish b/init/completions/arp.fish
new file mode 100644
index 00000000..27195e71
--- /dev/null
+++ b/init/completions/arp.fish
@@ -0,0 +1,11 @@
+#completion for arp
+complete -c arp -s v -l verbose -d "verbose mode"
+complete -c arp -s n -l numeric -d "numerical address"
+complete -x -c arp -s H -l tw-type -a "ether arcnet pronet ax25 netrom" -d "class of hw type"
+complete -c arp -s a -l display -x -a "(__fish_print_hostnames)" -d "show arp entries"
+complete -x -c arp -s d -l delete -a "(__fish_print_hostnames)" -d "remove an entry for hostname"
+complete -c arp -s D -l use-device -d "use hardware address"
+complete -x -c arp -s i -l device -a "(__fish_print_interfaces)" -d "select interface"
+complete -x -c arp -s s -l set -d "Manually create ARP address" -a "(__fish_print_hostnames)"
+complete -f -c arp -s f -l file -d "taken addr from filename, default /etc/ethers"
+
diff --git a/init/completions/at.fish b/init/completions/at.fish
new file mode 100644
index 00000000..c4243b55
--- /dev/null
+++ b/init/completions/at.fish
@@ -0,0 +1,10 @@
+#at
+complete -f -c at -s V -d "print version"
+complete -f -c at -s q -d "use specified queue"
+complete -f -c at -s m -d "send mail to user"
+complete -c at -s f -x -a "(__fish_complete_suffix (commandline -ct) '' 'At job')" -d "Read job from file"
+complete -f -c at -s l -d "alias for atq"
+complete -f -c at -s d -d "alias for atrm"
+complete -f -c at -s v -d "show the time"
+complete -f -c at -s c -d "cat the jobs listed"
+
diff --git a/init/completions/atd.fish b/init/completions/atd.fish
new file mode 100644
index 00000000..0360a267
--- /dev/null
+++ b/init/completions/atd.fish
@@ -0,0 +1,6 @@
+#atd
+complete -f -c atd -s l -d "limiting load factor"
+complete -f -c atd -s b -d "minimum interval in seconds"
+complete -f -c atd -s d -d "Debug mode"
+complete -f -c atd -s s -d "process at queue only once"
+
diff --git a/init/completions/atq.fish b/init/completions/atq.fish
new file mode 100644
index 00000000..c018d703
--- /dev/null
+++ b/init/completions/atq.fish
@@ -0,0 +1,4 @@
+#atq
+complete -f -c atq -s V -d "print version"
+complete -f -c atq -s q -d "use specified queue"
+
diff --git a/init/completions/atrm.fish b/init/completions/atrm.fish
new file mode 100644
index 00000000..2834d0d6
--- /dev/null
+++ b/init/completions/atrm.fish
@@ -0,0 +1,2 @@
+#atrm
+complete -f -c atrm -s V -d "print version"
diff --git a/init/completions/bc.fish b/init/completions/bc.fish
new file mode 100644
index 00000000..c783e54f
--- /dev/null
+++ b/init/completions/bc.fish
@@ -0,0 +1,9 @@
+# Completions for the binary calculator
+
+complete -c bc -s i -l interactive -d "Force interactive mode"
+complete -c bc -s l -l math-lib -d "Define math library"
+complete -c bc -s w -l warn -d "Give warnings for extensions to POSIX bc"
+complete -c bc -s s -l standard -d "Process exactly POSIX bc"
+complete -c bc -s q -l quiet -d "Do not print the GNU welcome"
+complete -c bc -s v -l version -d "Display version and exit"
+complete -c bc -s h -l help -d "Display help and exit"
diff --git a/init/completions/btdownloadcurses.py.fish b/init/completions/btdownloadcurses.py.fish
new file mode 100644
index 00000000..b92ddca5
--- /dev/null
+++ b/init/completions/btdownloadcurses.py.fish
@@ -0,0 +1,2 @@
+
+complete -y btdownloadheadless.py
diff --git a/init/completions/btdownloadheadless.py.fish b/init/completions/btdownloadheadless.py.fish
new file mode 100644
index 00000000..366cd640
--- /dev/null
+++ b/init/completions/btdownloadheadless.py.fish
@@ -0,0 +1,34 @@
+# Bittorrent commands
+
+for i in btdownloadcurses.py btdownloadheadless.py;
+ complete -c $i -l max_uploads -x -d "Maximum uploads at once"
+ complete -c $i -l keepalive_interval -x -d "Number of seconds between keepalives"
+ complete -c $i -l download_slice_size -x -d "Bytes per request"
+ complete -c $i -l request_backlog -x -d "Requests per pipe"
+ complete -c $i -l max_message_length -x -d "Maximum length prefix encoding"
+ complete -c $i -l ip -d "IP to report to the tracker" -x -a "(__fish_print_addresses)"
+ complete -c $i -l minport -d "Minimum port to listen to"
+ complete -c $i -l maxport -d "Maximum port to listen to"
+ complete -c $i -l responsefile -r -d "File for server response"
+ complete -c $i -l url -x -d "URL to get file from"
+ complete -c $i -l saveas -r -d "Local file target"
+ complete -c $i -l timeout -x -d "Time to close inactive socket"
+ complete -c $i -l timeout_check_interval -x -d "Time between checking timeouts"
+ complete -c $i -l max_slice_length -x -d "Maximum outgoing slice length"
+ complete -c $i -l max_rate_period -x -d "Maximum time to guess rate"
+ complete -c $i -l bind -x -d "IP to bind to locally" -a "(__fish_print_addresses)"
+ complete -c $i -l upload_rate_fudge -x -d "time equivalent of writing to kernel-level TCP buffer"
+ complete -c $i -l display_interval -x -d "Time between screen updates"
+ complete -c $i -l rerequest_interval -x -d "Time to wait between requesting more peers"
+ complete -c $i -l min_peers -x -d "Minimum number of peers to not do requesting"
+ complete -c $i -l http_timeout -x -d "Number of seconds before assuming http timeout"
+ complete -c $i -l max_initiate -x -d "Number of peers at which to stop initiating new connections"
+ complete -c $i -l max_allow_in -x -d "Maximum number of connections to allow"
+ complete -c $i -l check_hashes -x -d "Whether to check hashes on disk"
+ complete -c $i -l max_upload_rate -x -d "Maximum kB/s to upload at"
+ complete -c $i -l snub_time -x -d "Seconds to wait for data to come in before assuming choking"
+ complete -c $i -l spew -x -d "Whether to display diagnostic info"
+ complete -c $i -l rarest_first_cutoff -x -d "Number of downloads at which to switch from random to rarest first"
+ complete -c $i -l min_uploads -x -d "Number of uploads to fill out to with optimistic unchokes"
+ complete -c $i -l report_hash_failiures -x -d "Whether to inform the user that hash failures occur"
+end;
diff --git a/init/completions/bunzip2.fish b/init/completions/bunzip2.fish
new file mode 100644
index 00000000..53e5625d
--- /dev/null
+++ b/init/completions/bunzip2.fish
@@ -0,0 +1,15 @@
+complete -c bunzip2 -x -a "(
+ __fish_complete_suffix (commandline -ct) .bz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .bz2 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tbz 'Compressed archive'
+ __fish_complete_suffix (commandline -ct) .tbz2 'Compressed archive'
+)
+"
+
+complete -c bunzip2 -s c -l stdout -d "Decompress to stdout"
+complete -c bunzip2 -s f -l force -d "Overwrite"
+complete -c bunzip2 -s k -l keep -d "Do not overwrite"
+complete -c bunzip2 -s s -l small -d "Reduce memory usage"
+complete -c bunzip2 -s v -l verbose -d "Print compression ratios"
+complete -c bunzip2 -s L -l license -d "Print license"
+complete -c bunzip2 -s V -l version -d "Print version"
diff --git a/init/completions/bzcat.fish b/init/completions/bzcat.fish
new file mode 100644
index 00000000..9ec6f1ff
--- /dev/null
+++ b/init/completions/bzcat.fish
@@ -0,0 +1,8 @@
+complete -c bzcat -x -a "(
+ __fish_complete_suffix (commandline -ct) .bz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .bz2 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tbz 'Compressed archive'
+ __fish_complete_suffix (commandline -ct) .tbz2 'Compressed archive'
+)
+"
+complete -c bzcat -s s -l small -d "Reduce memory usage"
diff --git a/init/completions/bzip2.fish b/init/completions/bzip2.fish
new file mode 100644
index 00000000..d0d3de7e
--- /dev/null
+++ b/init/completions/bzip2.fish
@@ -0,0 +1,19 @@
+complete -c bzip2 -s c -l stdout -d "Compress to stdout"
+complete -c bzip2 -s d -l decompress -x -a "(
+ __fish_complete_suffix (commandline -ct) .bz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .bz2 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tbz 'Compressed archive'
+ __fish_complete_suffix (commandline -ct) .tbz2 'Compressed archive'
+)
+"
+complete -c bzip2 -s z -l compress -d "Compress file"
+complete -c bzip2 -s t -l test -d "Check integrity"
+complete -c bzip2 -s f -l force -d "Overwrite"
+complete -c bzip2 -s k -l keep -d "Do not overwrite"
+complete -c bzip2 -s s -l small -d "Reduce memory usage"
+complete -c bzip2 -s q -l quiet -d "Supress errors"
+complete -c bzip2 -s v -l verbose -d "Print compression ratios"
+complete -c bzip2 -s L -l license -d "Print license"
+complete -c bzip2 -s V -l version -d "Print version"
+complete -c bzip2 -s 1 -l fast -d "Small block size"
+complete -c bzip2 -s 9 -l best -d "Large block size"
diff --git a/init/completions/bzip2recover.fish b/init/completions/bzip2recover.fish
new file mode 100644
index 00000000..2ac17f46
--- /dev/null
+++ b/init/completions/bzip2recover.fish
@@ -0,0 +1,8 @@
+complete -c bzip2recover -x -a "(
+ __fish_complete_suffix (commandline -ct) .bz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .bz2 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tbz 'Compressed archive'
+ __fish_complete_suffix (commandline -ct) .tbz2 'Compressed archive'
+)
+"
+
diff --git a/init/completions/cat.fish b/init/completions/cat.fish
new file mode 100644
index 00000000..67066177
--- /dev/null
+++ b/init/completions/cat.fish
@@ -0,0 +1,12 @@
+complete -c cat -s A -l show-all -d "Escape all non-printing characters"
+complete -c cat -s b -l number-nonblank -d "Number nonblank lines"
+complete -c cat -s e -d "Escape non-printing characters except tab"
+complete -c cat -s E -l show-ends -d "Display $ at end of line"
+complete -c cat -s n -l number -d "Number all lines"
+complete -c cat -s s -l squeeze-blank -d "Never more than single blank line"
+complete -c cat -s t -d "Escape non-printing characters except newline"
+complete -c cat -s T -l show-tabs -d "Escape tab"
+complete -c cat -s v -d "Escape non-printing except newline and tab"
+complete -c cat -l help -d "Display help and exit"
+complete -c cat -l version -d "Display version and exit"
+
diff --git a/init/completions/cd.fish b/init/completions/cd.fish
new file mode 100644
index 00000000..ea5eed01
--- /dev/null
+++ b/init/completions/cd.fish
@@ -0,0 +1,39 @@
+
+function __fish_complete_cd -d "Completions for the cd command"
+
+ #
+ # We can't simply use __fish_complete_directory because of the CDPATH
+ #
+
+ set -- wd $PWD
+ set -- owd $OLDPWD
+
+ # Check if CDPATH is set
+
+ set -l mycdpath
+
+ if test -z $CDPATH[1]
+ set mycdpath .
+ else
+ set mycdpath $CDPATH
+ end
+
+ if echo (commandline -ct)|grep '^/' >/dev/null
+ # This is an absolute search path
+ eval printf '\%s\\tDirectory\\n' (commandline -ct)\*/
+ else
+ # This is a relative search path
+ # Iterate over every directory in CDPATH and check for possible completions
+ for i in $mycdpath
+ # Move to the initial directory first, in case the CDPATH directory is relative
+ builtin cd $wd
+ builtin cd $i
+ eval printf '"%s\tDirectory in "'$i'"\n"' (commandline -ct)\*/
+ end
+ end
+
+ builtin cd $wd
+ set -- OLDPWD $owd
+end
+
+complete -x -c cd -a "(__fish_complete_cd)"
diff --git a/init/completions/chgrp.fish b/init/completions/chgrp.fish
new file mode 100644
index 00000000..d1bdfb98
--- /dev/null
+++ b/init/completions/chgrp.fish
@@ -0,0 +1,12 @@
+
+complete -c chgrp -s c -l changes -d "Output diagnostic for changed files"
+complete -c chgrp -l dereference -d "Dereferense symbolic links"
+complete -c chgrp -s h -l no-dereference -d "Do not dereference symbolic links"
+complete -c chgrp -l from -d "Change from owner/group"
+complete -c chgrp -s f -l silent -d "Supress errors"
+complete -c chgrp -l reference -d "Use same owner/group as file" -r
+complete -c chgrp -s R -l recursive -d "Operate recursively"
+complete -c chgrp -s v -l verbose -d "Output diagnostic for every file"
+complete -c chgrp -s h -l help -d "Display help and exit"
+complete -c chgrp -l version -d "Display version and exit"
+complete -c chgrp -d Group -a "(__fish_complete_groups)"
diff --git a/init/completions/chown.fish b/init/completions/chown.fish
new file mode 100644
index 00000000..4de98e24
--- /dev/null
+++ b/init/completions/chown.fish
@@ -0,0 +1,12 @@
+complete -c chown -s c -l changes -d "Output diagnostic for changed files"
+complete -c chown -l dereference -d "Dereferense symbolic links"
+complete -c chown -s h -l no-dereference -d "Do not dereference symbolic links"
+complete -c chown -l from -d "Change from owner/group"
+complete -c chown -s f -l silent -d "Supress errors"
+complete -c chown -l reference -d "Use same owner/group as file" -r
+complete -c chown -s R -l recursive -d "Operate recursively"
+complete -c chown -s v -l verbose -d "Output diagnostic for every file"
+complete -c chown -s h -l help -d "Display help and exit"
+complete -c chown -l version -d "Display version and exit"
+complete -c chown -d "Username" -a "(__fish_print_users):"
+complete -c chown -d "Username" -a "(echo (commandline -ct)|grep -o '.*:')(cat /etc/group |cut -d : -f 1)"
diff --git a/init/completions/commandline.fish b/init/completions/commandline.fish
new file mode 100644
index 00000000..442a00b7
--- /dev/null
+++ b/init/completions/commandline.fish
@@ -0,0 +1,12 @@
+complete -c commandline -s a -l append -d "Add text to the end of commandline"
+complete -c commandline -s i -l insert -d "Add text at cursor"
+complete -c commandline -s r -l replace -d "Replace selected part of buffer (replace)"
+
+complete -c commandline -s j -l current-job -d "Operate only on job under cursor"
+complete -c commandline -s p -l current-process -d "Operate only on process under cursor"
+complete -c commandline -s t -l current-token -d "Operate only on tokenizer token under cursor"
+complete -c commandline -s b -l current-buffer -d "Operate on entire buffer (default)"
+
+complete -c commandline -s c -l cut-at-cursor -d "Only return part of commandline before the cursor"
+complete -c commandline -s f -l function -d "Inject readline functions to reader"
+
diff --git a/init/completions/complete.fish b/init/completions/complete.fish
new file mode 100644
index 00000000..937777b2
--- /dev/null
+++ b/init/completions/complete.fish
@@ -0,0 +1,13 @@
+complete -c complete -s c -l command -d "Command to add completion to" -r
+complete -c complete -s p -l path -d "Path to add completion to"
+complete -c complete -s s -l short-option -d "Posix-style option to complete"
+complete -c complete -s l -l long-option -d "GNU-style option to complete"
+complete -c complete -s o -l old-option -d "Old style long option to complete"
+complete -c complete -s f -l no-files -d "Do not use file completion"
+complete -c complete -s r -l require-parameter -d "Require parameter"
+complete -c complete -s x -l exclusive -d "Require parameter and do not use file completion"
+complete -c complete -s a -l arguments -d "A list of possible arguments"
+complete -c complete -s d -l description -d "Description of this completions"
+complete -c complete -s u -l unauthorative -d "Option list is not complete"
+complete -c complete -s e -l erase -d "Remove completion"
+complete -c complete -s h -l help -d "Display help and exit"
diff --git a/init/completions/configure.fish b/init/completions/configure.fish
new file mode 100644
index 00000000..d3c25eb1
--- /dev/null
+++ b/init/completions/configure.fish
@@ -0,0 +1,12 @@
+complete -c configure -s h -l help -x -a "short recursive" -d "Display help and exit"
+complete -c configure -s V -l version -d "Display version and exit"
+complete -c configure -s q -l quiet -d "Be less verbose"
+complete -c configure -l cache-file -f -d "Cache test results in specified file"
+complete -c configure -s C -l config-cache -d "Cache test results in file config.cache"
+complete -c configure -s n -l no-create -d "Do not create output files"
+complete -c configure -l srcdir -d "Set source directory" -a "__fish_complete_directory (commandline -ct)" -x
+complete -c configure -l prefix -d "Architecture-independent install directory" -a "__fish_complete_directory (commandline -ct)" -x
+complete -c configure -l exec-prefix -d "Architecture-dependent install directory" -a "__fish_complete_directory (commandline -ct)" -x
+complete -c configure -l build -d "configure for building on BUILD" -x
+complete -c configure -l host -d "cross-compile to build programs to run on HOST" -x
+complete -c configure -l target -d "configure for building compilers for TARGET" -x -u
diff --git a/init/completions/cut.fish b/init/completions/cut.fish
new file mode 100644
index 00000000..a5015d8e
--- /dev/null
+++ b/init/completions/cut.fish
@@ -0,0 +1,10 @@
+complete -c cut -s b -l bytes -x -d "Ouput byte range"
+complete -c cut -s c -l characters -x -d "Output character range"
+complete -c cut -s d -l delimiter -x -d "Select field delimiter"
+complete -c cut -s d -l fields -x -d "Select fields"
+complete -c cut -s n -d "Dont split mutibyte characters"
+complete -c cut -s s -l only-delimited -d "Do not print lines without delimiter"
+complete -c cut -l output-delimiter -d "Select output delimiter"
+complete -c cut -l help -d "Display help and exit"
+complete -c cut -l version -d "Display version and exit"
+
diff --git a/init/completions/cvs.fish b/init/completions/cvs.fish
new file mode 100644
index 00000000..d0834f9c
--- /dev/null
+++ b/init/completions/cvs.fish
@@ -0,0 +1,53 @@
+#
+# I don't use CVS, so these completions are probably not all that good.
+#
+
+complete -c cvs -x -a "add" -d "Add a new file/directory to the repository"
+complete -c cvs -x -a "admin" -d "Administration front end for rcs"
+complete -c cvs -x -a "annotate" -d "Show last revision where each line was modified"
+complete -c cvs -x -a "checkout" -d "Checkout sources for editing"
+complete -c cvs -x -a "commit" -d "Check files into the repository"
+complete -c cvs -x -a "diff" -d "Show differences between revisions"
+complete -c cvs -x -a "edit" -d "Get ready to edit a watched file"
+complete -c cvs -x -a "editors" -d "See who is editing a watched file"
+complete -c cvs -x -a "export" -d "Export sources from CVS, similar to checkout"
+complete -c cvs -x -a "history" -d "Show repository access history"
+complete -c cvs -x -a "import" -d "Import sources into CVS, using vendor branches"
+complete -c cvs -x -a "init" -d "Create a CVS repository if it doesnt exist"
+complete -c cvs -x -a "kserver" -d "Kerberos server mode"
+complete -c cvs -x -a "log" -d "Print out history information for files"
+complete -c cvs -x -a "login" -d "Prompt for password for authenticating server"
+complete -c cvs -x -a "logout" -d "Removes entry in .cvspass for remote repository"
+complete -c cvs -x -a "pserver" -d "Password server mode"
+complete -c cvs -x -a "rannotate" -d "Show last revision where each line of module was modified"
+complete -c cvs -x -a "rdiff" -d "Create 'patch' format diffs between releases"
+complete -c cvs -x -a "release" -d "Indicate that a Module is no longer in use"
+complete -c cvs -x -a "remove" -d "Remove an entry from the repository"
+complete -c cvs -x -a "rlog" -d "Print out history information for a module"
+complete -c cvs -x -a "rtag" -d "Add a symbolic tag to a module"
+complete -c cvs -x -a "server" -d "Server mode"
+complete -c cvs -x -a "status" -d "Display status information on checked out files"
+complete -c cvs -x -a "tag" -d "Add a symbolic tag to checked out version of files"
+complete -c cvs -x -a "unedit" -d "Undo an edit command"
+complete -c cvs -x -a "update" -d "Bring work tree in sync with repository"
+complete -c cvs -x -a "version" -d "Show current CVS version(s)"
+complete -c cvs -x -a "watch" -d "Set watches"
+complete -c cvs -x -a "watchers" -d "See who is watching a file"
+
+complete -c cvs -x -s H -d "Displays usage information for command"
+complete -c cvs -x -s Q -d "Cause CVS to be really quiet"
+complete -c cvs -x -s q -d "Cause CVS to be somewhat quiet"
+complete -c cvs -x -s r -d "Make checked-out files read-only"
+complete -c cvs -x -s w -d "Make checked-out files read-write (default)"
+complete -c cvs -x -s n -d "Do not execute anything that will change the disk"
+complete -c cvs -x -s t -d "Show trace of program execution -- try with -n"
+complete -c cvs -x -s v -d "CVS version and copyright"
+complete -c cvs -x -s T -r -d "Use 'tmpdir' for temporary files"
+complete -c cvs -x -s e -r -d "Use 'editor' for editing log information"
+complete -c cvs -x -s d -r -d "Overrides $CVSROOT as the root of the CVS tree"
+complete -c cvs -x -s f -d "Do not use the ~/.cvsrc file"
+complete -c cvs -x -s z -d "Compression level for net traffic" -x -a "1 2 3 4 5 6 7 8 9"
+complete -c cvs -x -s x -d "Encrypt all net traffic"
+complete -c cvs -x -s a -d "Authenticate all net traffic"
+complete -c cvs -x -s s -d "Set CVS user variable" -x
+
diff --git a/init/completions/date.fish b/init/completions/date.fish
new file mode 100644
index 00000000..dc07030b
--- /dev/null
+++ b/init/completions/date.fish
@@ -0,0 +1,11 @@
+complete -c date -s d -l date -d "Display date described by string" -x
+complete -c date -s f -l file -d "Display date for each line in file" -r
+complete -c date -s I -l iso-8601 -d "Output in ISO 8601 format" -x -a "date hours minutes seconds"
+complete -c date -s s -l set -d "Set time" -x
+complete -c date -s R -l rfc-2822 -d "Output RFC-2822 compliant date string"
+complete -c date -s r -l reference -d "display the last modification time of file" -r
+complete -c date -s u -l utc -d "print or set Coordinated Universal Time"
+complete -c date -l universal -d "print or set Coordinated Universal Time"
+complete -c date -s h -l help -d "Display help and exit"
+complete -c date -s v -l version -d "Display version and exit"
+
diff --git a/init/completions/df.fish b/init/completions/df.fish
new file mode 100644
index 00000000..9257f429
--- /dev/null
+++ b/init/completions/df.fish
@@ -0,0 +1,18 @@
+complete -y mount
+
+complete -c df -s a -l all -d "Include empty filesystems"
+complete -c df -s B -l block-size -r -d "Block size"
+complete -c df -s h -l human-readable -d "Human readable sizes"
+complete -c df -s H -l si -d "Human readable sizes, powers of 1000"
+complete -c df -s i -l inodes -d "List inode information"
+complete -c df -s k -d "Use 1KB block size"
+complete -c df -s l -l local -d "List only local filesystems"
+complete -c df -l no-sync -d "Do not sync before getting usage info"
+complete -c df -s P -l portability -d "Use Posix format"
+complete -c df -l sync -d "Sync before getting usage info"
+complete -c df -s t -l type -r -d "Filesystem type" -x -a $__fish_filesystems
+complete -c df -s T -l print-type -d "Print filesystem type"
+complete -c df -s x -l exclude-type -d "Excluded filesystem type" -r -x -a $__fish_filesystems
+complete -c df -l help -d "Display help and exit"
+complete -c df -l version -d "Display version and exit"
+
diff --git a/init/completions/diff.fish b/init/completions/diff.fish
new file mode 100644
index 00000000..d62c9a00
--- /dev/null
+++ b/init/completions/diff.fish
@@ -0,0 +1,26 @@
+# Completions for diff
+complete -c diff -s i -l ignore-case -d "Ignore case differences"
+complete -c diff -l ignore-file-name-case -d "Ignore case when comparing file names"
+complete -c diff -l no-ignore-file-name-case -d "Consider case when comparing file names"
+complete -c diff -s E -l ignore-tab-expansion -d "Ignore changes due to tab expansion"
+complete -c diff -s b -l ignore-space-change -d "Ignore changes in the amount of white space"
+complete -c diff -s w -l ignore-all-space -d "Ignore all white space"
+complete -c diff -s B -l ignore-blank-lines -d "Ignore changes whose lines are all blank"
+complete -c diff -s I -l ignore-matching-lines -x -d "Ignore changes whose lines match the RE"
+complete -c diff -s a -l text -d "Treat all files as text"
+complete -c diff -s r -l recursive -d "Recursively compare subdirectories"
+complete -c diff -s N -l new-file -d "Treat absent files as empty"
+complete -c diff -s C -l context -x -d "Output NUM lines of copied context"
+complete -c diff -s c -d "Output 3 lines of copied context"
+complete -c diff -s U -l unified -x -d "Output NUM lines of unified context"
+complete -c diff -s u -d "Output 3 lines of unified context"
+complete -c diff -s q -l brief -d "Output only whether the files differ"
+complete -c diff -l normal -d "Output a normal diff"
+complete -c diff -s y -l side-by-side -d "Output in two columns"
+complete -c diff -s W -l width -x -d "Output at most NUM print columns"
+complete -c diff -s d -l minimal -d "Try to find a smaller set of changes"
+complete -c diff -l from-file -r -d "Compare FILE1 to all operands"
+complete -c diff -l to-file -r -d "Compare FILE2 to all operands"
+complete -c diff -s l -l paginate -d "Pass the output through 'pr'"
+complete -c diff -s v -l version -d "Output version info"
+complete -c diff -l help -d "Output usage information"
diff --git a/init/completions/du.fish b/init/completions/du.fish
new file mode 100644
index 00000000..f48930e2
--- /dev/null
+++ b/init/completions/du.fish
@@ -0,0 +1,20 @@
+complete -c du -s a -l all -d "Write size for all files"
+complete -c du -l apparent-size -d "Print file size, not disk usage"
+complete -c du -s B -l block-size -d "Block size"
+complete -c du -s b -l bytes -d "Use 1B block size"
+complete -c du -s c -l total -d "Produce grand total"
+complete -c du -s D -l dereference-args -d "Dereference file symlinks"
+complete -c du -s h -l human-readable -d "Human readable sizes"
+complete -c du -s H -l si -d "Human readable sizes, powers of 1000"
+complete -c du -s k -d "Use iKB block size"
+complete -c du -s l -l count-links -d "Count hard links multiple times"
+complete -c du -s L -l dereference -d "Dereference all symlinks"
+complete -c du -s S -l separate-dirs -d "Do not include subdirectory size"
+complete -c du -s s -l summarize -d "Display only a total for each argument"
+complete -c du -s x -l one-file-system -d "Skip other filesystems"
+complete -c du -s X -l exclude-from -r -d "Exclude files thet match pattern in file"
+complete -c du -l exclude -r -d "Exclude files that match pattern"
+complete -c du -l max-depth -r -d "Recursion limit"
+complete -c du -l help -d "Display help and exit"
+complete -c du -l version -d "Display version and exit"
+
diff --git a/init/completions/echo.fish b/init/completions/echo.fish
new file mode 100644
index 00000000..d9548497
--- /dev/null
+++ b/init/completions/echo.fish
@@ -0,0 +1,5 @@
+complete -c echo -s n -d "No newline"
+complete -c echo -s e -d "Use backslashe-escaped characters"
+complete -c echo -s E -d "Do not use backslash escaped characters"
+complete -c echo -l help -d "Display help and exit"
+complete -c echo -l version -d "Display version and exit"
diff --git a/init/completions/emacs.fish b/init/completions/emacs.fish
new file mode 100644
index 00000000..1ad23b0e
--- /dev/null
+++ b/init/completions/emacs.fish
@@ -0,0 +1,10 @@
+#
+# These completions are uncomplete
+#
+complete -c emacs -s q -d "Do not load init files"
+complete -c emacs -s u -d "Load users init file" -xa "(__fish_complete_users)"
+complete -c emacs -s t -d "Use file as terminal" -r
+complete -c emacs -s f -d "Execute Lisp function" -x
+complete -c emacs -s l -d "Load Lisp code from file" -r
+complete -c emacs -o nw -d "Do not use X interface"
+complete -uc emacs -s d -o display -d "Create window on the specified display" -x
diff --git a/init/completions/fish.fish b/init/completions/fish.fish
new file mode 100644
index 00000000..c244a15b
--- /dev/null
+++ b/init/completions/fish.fish
@@ -0,0 +1,5 @@
+complete -c fish -s c -l "command" -d "Run fish with this command"
+complete -c fish -s h -l help -d "Display help and exit"
+complete -c fish -l version -d "Display version and exit"
+complete -c fish -s i -l interactive -d "Run in interactive mode"
+complete -c fish -s p -l profile -d "Output profiling information to specified file" -f
diff --git a/init/completions/function.fish b/init/completions/function.fish
new file mode 100644
index 00000000..c8baba31
--- /dev/null
+++ b/init/completions/function.fish
@@ -0,0 +1,4 @@
+complete -c function -s d -l description -d "Set function description" -x
+complete -c function -xa "(functions -n)" -d "Function"
+complete -c function -xa "(builtin -n)" -d "Builtin"
+
diff --git a/init/completions/functions.fish b/init/completions/functions.fish
new file mode 100644
index 00000000..3a2c0bed
--- /dev/null
+++ b/init/completions/functions.fish
@@ -0,0 +1,6 @@
+complete -c functions -s e -l erase -d "Erase function" -x -a "(functions -n)"
+complete -c functions -xa "(functions -n)" -d "Function"
+complete -c functions -s a -l all -d "Show hidden functions"
+complete -c functions -s h -l help -d "Display help and exit"
+complete -c functions -s d -l description -d "Set function description" -x
+
diff --git a/init/completions/gcc.fish b/init/completions/gcc.fish
new file mode 100644
index 00000000..f02c525d
--- /dev/null
+++ b/init/completions/gcc.fish
@@ -0,0 +1,96 @@
+#
+# The gcc completion list is incomplete. There are just so many of them...
+#
+
+complete -c gcc -s x -d "Language" -x -a "
+ c
+ c-header
+ cpp-output
+ c++
+ c++-cpp-output
+ objective-c
+ objc-cpp-output
+ assembler
+ assembler-with-cpp
+ ada
+ f77
+ f77-cpp-input
+ ratfor
+ java
+ treelang
+ none
+"
+complete -c gcc -o pass-exit-codes -d "Pass program exit codes"
+complete -c gcc -s c -d "Stop after assembler"
+complete -c gcc -s S -d "Stop after compile"
+complete -c gcc -s E -d "Stop after preprocesswor"
+complete -c gcc -s o -r -d "Output file"
+complete -c gcc -s v -d "Print commands to stderr"
+complete -c gcc -o \#\#\# -d "Print quoted commands to stderr, do not run"
+complete -c gcc -o pipe -d "Use pipes"
+complete -c gcc -o ansi -d "Use ansi mode"
+complete -c gcc -o std -d "Standard mode" -x -a '
+ c89\t"ISO C90"
+ iso9899:1990\t"ISO C90"
+ iso9899:199409\t"ISO C90 as modified in amendment 1"
+ c99\t"ISO C99"
+ c9x \t"ISO C99"
+ iso9899:1999\t"ISO C99"
+ iso9899:199x\t"ISO C99"
+ gnu89\t"ISO C90 plus GNU extentions"
+ gnu99\t"ISO C99 plus GNU extentions"
+ gnu9x\t"ISO C99 plus GNU extentions"
+ c++98\t"ISO C++98"
+ gnu++98\t"ISO C++98 plus GNU extentions"
+'
+complete -c gcc -o aux-info -r -d "Write prototypes to file"
+complete -c gcc -o fno-asm -d "Do not recognize asm, inline or typeof keywords"
+complete -c gcc -o fno-builtin -d "Do not use builtin functions"
+complete -c gcc -o fhosted -d "Assert hosted environment"
+complete -c gcc -o ffreestanding -d "Assert freestanding environment"
+complete -c gcc -o fms-extensions -d "Use Microsoft extensions"
+complete -c gcc -o trigraphs -d "Use ANSI trigraphs"
+complete -c gcc -o no-integrated-cpp -d "Do not use integrated preprocessor"
+complete -c gcc -o funsigned-char -d "char is unsigned"
+complete -c gcc -o fsigned-char -d "char is signed"
+complete -c gcc -o funsigned-bitfields -d "bifield is unsigned"
+complete -c gcc -o fsigned-bitfields -d "bifield is signed"
+complete -c gcc -o fno-unsigned-bitfields -d "All bifields are signed"
+complete -c gcc -o fno-signed-bitfields -d "All bifield are signed"
+complete -c gcc -o fwritable-strings -d "String constants are not const"
+complete -c gcc -o fabi-version -d "C++ ABI version" -r -x -a "1 0"
+complete -c gcc -o fno-access-control -d "Turn off access checking"
+complete -c gcc -o fcheck-new -d "Check pointer returned by new"
+complete -c gcc -o fconserve-space -d "Put globals in the common segment"
+complete -c gcc -o fno-const-strings -d "String constants are not const"
+complete -c gcc -o fdollars-in-identifiers -d "Accept $ in identifiers"
+complete -c gcc -o fno-dollars-in-identifiers -d "Reject $ in identifiers"
+complete -c gcc -o fno-elide-constructors -d "Do not omit unneeded temporarys"
+complete -c gcc -o fno-enforce-eh-specs -d "Allow exception violations"
+complete -c gcc -o ffor-scope -d "Do not extend for-loop scope"
+complete -c gcc -o fno-for-scope -d "Extend for-loop scope"
+complete -c gcc -o fno-gnu-keywords -d "Do not recognize typeof as keyword"
+complete -c gcc -o fno-implicit-templates -d "Do not emit code for implicit templates"
+complete -c gcc -o fno-implicit-inline-templates -d "Do not emit code for implicit inline templates"
+complete -c gcc -o fno-implement-inlines -d "Do not emit out-of-line code for inline functions"
+complete -c gcc -o fms-extensions -d "Disable warnings about MFC"
+complete -c gcc -o fno-nonansi-builtins -d "Disable some built-in functions"
+complete -c gcc -o fno-operator-names -d "Disable operator keywords"
+complete -c gcc -o fno-optional-diags -d "Disable optional diagnostics"
+complete -c gcc -o fpermissive -d "Downgrade some errors to warnings"
+complete -c gcc -o frepo -d "Enable automatic template instantiation at link time"
+complete -c gcc -o fno-rtti -d "Disable generation of C++ runtime type information"
+#complete -c gcc -o fstats -d "Emit front-end usage statistics"
+
+for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;
+ complete -c gcc -o ftemplate-depth-1 -d Set\ maximum\ template\ depth\ to\ $i;
+end;
+
+complete -c gcc -o fno-threadsafe-statistics -d "Do not emit code for thread-safe initialization of local statics"
+complete -c gcc -o fuse-cxa-atexit -d "Use __cxa_atexit for destructors"
+complete -c gcc -o fvisibility-inlines-hidden -d "Hides inline methods from export table"
+complete -c gcc -o fno-weak -d "Do not use weak symbol support"
+# gcc completion listing is incomplete.
+#complete -c gcc -o -d ""
+
+
diff --git a/init/completions/gprof.fish b/init/completions/gprof.fish
new file mode 100644
index 00000000..ae2a72ee
--- /dev/null
+++ b/init/completions/gprof.fish
@@ -0,0 +1,34 @@
+complete -c gprof -s A -l annoted-source -d "Print annotated source"
+complete -c gprof -s b -l brief -d "Do not print explanations"
+complete -c gprof -s C -l exec-counts -d "Print tally"
+complete -c gprof -s i -l file-info -d "Display summary"
+complete -c gprof -s I -l directory-path -d "Search directories for source"
+complete -c gprof -s J -l no-annotated-source -d "No annotated source"
+complete -c gprof -s L -l print-path -d "Print full path of source"
+complete -c gprof -s p -l flat-profile -d "Print flat profile"
+complete -c gprof -s P -l no-flat-profile -d "No flat profile"
+complete -c gprof -s q -l graph -d "Print call graph"
+complete -c gprof -s Q -l no-graph -d "No call graph"
+complete -c gprof -s y -l separate-files -d "Annotate to file"
+complete -c gprof -s Z -l no-exec-counts -d "No tally"
+complete -c gprof -l function-ordering -d "Suggest function ordering"
+complete -rc gprof -l file-ordering -d "Suggest file ordering"
+complete -c gprof -s T -l traditional -d "Traditional mode"
+complete -xc gprof -s w -l width -d "Set width of output"
+complete -c gprof -s x -l all-lines -d "Anotate every line"
+complete -xc gprof -l demangle -d "Set demangling style"
+complete -c gprof -l no-demangle -d "Turn of demangling"
+complete -xc gprof -s a -l no-static -d "Supress static functions"
+complete -xc gprof -s c -l static-call-graph -d ""
+complete -xc gprof -s D -l ignore-non-functions -d "Ignore symbols not known to be functions"
+complete -xc gprof -s k -r -d "Delete arcs from callgraph"
+complete -xc gprof -s l -l line -d "Line by line profiling"
+complete -xc gprof -s m -l min-count -r -d "Supress output when executed less than specified times"
+complete -xc gprof -s n -l time -d "Only propagate times for matching symbols"
+complete -xc gprof -s N -l no-time -d "Do not propagate times for matching symbols"
+complete -xc gprof -s z -l display-unused-functions -d "Mention unused functions in flat profile"
+complete -xc gprof -s d -l debug -d "Specify debugging options"
+complete -xc gprof -s h -l help -d "Print help and exit"
+complete -xc gprof -s v -l version -d "Print version and exit"
+complete -xc gprof -s O -l file-format -x -a "auto bsd 4.4bsd magic prof" -d "Profile data format"
+complete -xc gprof -s s -l sum -d "Print summary"
diff --git a/init/completions/grep.fish b/init/completions/grep.fish
new file mode 100644
index 00000000..cb4d54de
--- /dev/null
+++ b/init/completions/grep.fish
@@ -0,0 +1,47 @@
+
+complete -c grep -s A -l after-context -d "Print NUM lines of trailing context"
+complete -c grep -s a -l text -d "Process binary file as text"
+complete -c grep -s B -l before-context -d "Print NUM lines of leading context"
+complete -c grep -s C -l context -d "Print NUM lines of context"
+complete -c grep -s b -l byte-offset -d "Print byte offset of matches"
+complete -c grep -l binary-files -d "Assume data type for binary files" -x -a "binary text"
+complete -c grep -l colour -x -a "never always auto"
+complete -c grep -l color -x -a "never always auto"
+complete -c grep -s c -l count -d "Only print number of matches"
+complete -c grep -s D -l devices -x -a "read skip" -d "Action for devices"
+complete -c grep -s d -l directories -x -a "read skip recurse" -d "Action for directories"
+complete -c grep -s E -l extended-regexp -d "Pattern is extended regexp"
+complete -xc grep -s e -l regexp -d "Pattern is a regexp"
+complete -c grep -s F -l fixed -d "Pattern is a fixed string"
+complete -c grep -s f -l file -r -d "Use pattern from file"
+complete -c grep -s G -l basic-regexp -d "Pattern is basic regex"
+complete -c grep -s H -l with-filename -d "Print filename"
+complete -c grep -s h -l no-filename -d "Supress printing filename"
+complete -c grep -l help -d "Display help and exit"
+complete -c grep -s I -d "Skip binary files"
+complete -c grep -s i -l ignore-case -d "Ignore case"
+complete -c grep -s L -l files-without-match -d "Print first non-matching file"
+complete -c grep -s l -l files-with-match -d "Print first matching file"
+complete -c grep -s m -l max-count -d "Stop reading after NUM matches"
+complete -c grep -l mmap -d "Use the mmap system call to read input"
+complete -c grep -s n -l line-number -d "Print linenumber"
+complete -c grep -s o -l only-matching -d "Show only matching part"
+complete -c grep -l label -d "Rename stdin"
+complete -c grep -l line-buffered -d "Use line buffering"
+complete -c grep -s q -l quiet -d "Do not write anything"
+complete -c grep -l silent -d "Do not write anything"
+complete -c grep -s R -l recursive -d "Read files under each directory"
+complete -c grep -s r -d "Read files under each directory"
+complete -c grep -l include -d "Recurse, search file matching PATTERN"
+complete -c grep -l exclude -d "Recurse, skip file matching PATTERN"
+complete -c grep -s s -l no-messages -d "Suppress error messages"
+complete -c grep -s U -l binary -d "Treat files as binary"
+complete -c grep -s u -l unix-byte-offsets -d "Report Unix-style byte offsets"
+complete -c grep -s V -l version -d "Print the version number"
+complete -c grep -s v -l invert-match -d "Invert the sense of matching"
+complete -c grep -s w -l word-regexp -d "Only whole matching words"
+complete -c grep -s x -l line-regexp -d "Only whole matching lines"
+complete -c grep -s y -d "Synonym for -i"
+complete -c grep -s Z -l null -d "Output a zero byte after filename"
+
+
diff --git a/init/completions/gunzip.fish b/init/completions/gunzip.fish
new file mode 100644
index 00000000..b1bdf158
--- /dev/null
+++ b/init/completions/gunzip.fish
@@ -0,0 +1,25 @@
+complete -c gunzip -s c -l stdout -d "Compress to stdout"
+complete -c gunzip -x -a "(
+ __fish_complete_suffix (commandline -ct) .gz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tgz 'Compressed archive'
+)
+"
+complete -c gunzip -s f -l force -d "Overwrite"
+complete -c gunzip -s h -l help -d "Display help"
+complete -c gunzip -s l -l list -d "List compression information"
+complete -c gunzip -s L -l license -d "Print license"
+complete -c gunzip -s n -l no-name -d "Do not save/restore filename"
+complete -c gunzip -s N -l name -d "Save/restore filename"
+complete -c gunzip -s q -l quiet -d "Supress warnings"
+complete -c gunzip -s r -l recursive -d "Recurse directories"
+complete -c gunzip -s S -l suffix -r -d "Suffix"
+complete -c gunzip -s t -l test -d "Check integrity"
+complete -c gunzip -s v -l verbose -d "Display compression ratios"
+complete -c gunzip -s V -l version -d "Display version"
+
+complete -c gunzip -x -a "(
+ __fish_complete_suffix (commandline -ct) .gz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tgz 'Compressed archive'
+)
+"
+
diff --git a/init/completions/gzip.fish b/init/completions/gzip.fish
new file mode 100644
index 00000000..889dd9f8
--- /dev/null
+++ b/init/completions/gzip.fish
@@ -0,0 +1,23 @@
+complete -c gzip -s c -l stdout -d "Compress to stdout"
+complete -c gzip -s d -l decompress -x -a "
+(
+ __fish_complete_suffix (commandline -ct) .gz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tgz 'Compressed archive'
+)
+"
+
+complete -c gzip -s f -l force -d "Overwrite"
+complete -c gzip -s h -l help -d "Display help"
+complete -c gzip -s l -l list -d "List compression information"
+complete -c gzip -s L -l license -d "Print license"
+complete -c gzip -s n -l no-name -d "Do not save/restore filename"
+complete -c gzip -s N -l name -d "Save/restore filename"
+complete -c gzip -s q -l quiet -d "Supress warnings"
+complete -c gzip -s r -l recursive -d "Recurse directories"
+complete -c gzip -s S -l suffix -r -d "Suffix"
+complete -c gzip -s t -l test -d "Check integrity"
+complete -c gzip -s v -l verbose -d "Display compression ratios"
+complete -c gzip -s V -l version -d "Display version"
+complete -c gzip -s 1 -l fast -d "Use fast setting"
+complete -c gzip -s 9 -l best -d "Use high compression setting"
+
diff --git a/init/completions/help.fish b/init/completions/help.fish
new file mode 100644
index 00000000..ca2748f3
--- /dev/null
+++ b/init/completions/help.fish
@@ -0,0 +1,29 @@
+#
+# Completions for the help command
+#
+
+for i in (builtin -n)
+ complete -c help -x -a $i -d 'Help for the '$i' builtin'
+end
+
+for i in syntax todo bugs history;
+ complete -c help -x -a $i -d 'Help section on '$i
+end
+
+complete -c help -x -a completion -d "Help on how tab-completion works"
+complete -c help -x -a job-control -d "Help on how job control works"
+complete -c help -x -a difference -d "Summary on how fish differs from other shells"
+
+complete -c help -x -a prompt -d "Help on how to set the prompt"
+complete -c help -x -a title -d "Help on how to set the titlebar message"
+complete -c help -x -a killring -d "Help on how to copy and paste"
+complete -c help -x -a editor -d "Help on editor shortcuts"
+complete -c help -x -a expand -d "Help on parameter expantion (Globbing)"
+complete -c help -x -a globbing -d "Help on parameter expantion (Globbing)"
+complete -c help -x -a variables -d "Help on environment variables"
+complete -c help -x -a color -d "Help on setting syntax highlighting colors"
+complete -c help -x -a prompt -d "Help on changing the prompt"
+complete -c help -x -a title -d "Help on changing the titlebar messages"
+complete -c help -x -a builtin-overview -d "A short summary of all builtin commands"
+complete -c help -x -a changes -d "The changelog"
+
diff --git a/init/completions/id.fish b/init/completions/id.fish
new file mode 100644
index 00000000..9b015eb8
--- /dev/null
+++ b/init/completions/id.fish
@@ -0,0 +1,8 @@
+complete -c id -s g -l group -d "Print effective group id"
+complete -c id -s G -l groups -d "Print all group ids"
+complete -c id -s n -l name -d "Print name, not number"
+complete -c id -s r -l real -d "Print real ID, not effective"
+complete -c id -s u -l user -d "Print effective user ID"
+complete -c id -l help -d "Display help and exit"
+complete -c id -l version -d "Display version and exit"
+
diff --git a/init/completions/ifconfig.fish b/init/completions/ifconfig.fish
new file mode 100644
index 00000000..7f8f3346
--- /dev/null
+++ b/init/completions/ifconfig.fish
@@ -0,0 +1,25 @@
+complete -x -c ifconfig -a down -d "Stop interface"
+complete -x -c ifconfig -a up -d "Start interface"
+complete -x -c ifconfig -a "
+ {,-}arp
+ {,-}promisc
+ {,-}allmulti
+ metric
+ mtu
+ dstaddr
+ netmask
+ add
+ del
+ tunnel
+ irq
+ io_addr
+ mem_start
+ media
+ {,-}broadcast
+ {,-}pointopoint
+ hw
+ multicast
+ address
+ txqueuelen
+"
+complete -x -c ifconfig -a "(__fish_print_interfaces)" -d "Network interface"
diff --git a/init/completions/kill.fish b/init/completions/kill.fish
new file mode 100644
index 00000000..7cd108d6
--- /dev/null
+++ b/init/completions/kill.fish
@@ -0,0 +1,35 @@
+# Completions for the kill command
+
+if kill -L ^/dev/null >/dev/null
+
+ # Debian and some related systems use 'kill -L' to write out a numbered list
+ # of signals. Use this to complete on both number _and_ on signal name.
+
+ complete -c kill -s L -d "List codes and names of available signals"
+
+ set -- signals (kill -L | sed -r 's/([0-9]+) +([A-Z,0-9]+)/\1 \2\n/g;s/ +/ /g' | sed 's/^ //' | grep -E '^[^ ]+')
+ for i in $signals
+ set -- number (echo $i | cut -d " " -f 1)
+ set -- name (echo $i | cut -d " " -f 2)
+ complete -c kill -o $number -d $name
+ complete -c kill -o $name -d $name
+ complete -c kill -o s -x -a \"$number\tSend\ $name\ signal\" -d "Send specified signal"
+ complete -c kill -o s -x -a \"$name\tSend\ $name\ signal\" -d "Send specified signal"
+ end
+
+else
+
+ # Other systems print out a list of signals in an unspecified way on
+ # 'kill -l'. We complete with anything that looks like a signal name.
+
+ complete -c kill -s l -d "List codes and names of available signals"
+
+ for i in (kill -l|tr \ \t \n|grep "^[A-Z][A-Z0-9]*$")
+ complete -c kill -o $i -d Send\ $i\ signal
+ complete -c kill -o s -x -a $i\tSend\ $i\ signal -d "Send specified signal"
+ end
+end
+
+complete -c kill -xa "(__fish_complete_pids)"
+complete -c kill -s l -d "List names of available signals"
+
diff --git a/init/completions/less.fish b/init/completions/less.fish
new file mode 100644
index 00000000..f5413ec9
--- /dev/null
+++ b/init/completions/less.fish
@@ -0,0 +1,52 @@
+complete -c less -s \? -l help -d "Display help and exit"
+complete -c less -s a -l search-skip-screen -d "Search after end of screen"
+complete -c less -s b -l buffers -r -d "Buffer space"
+complete -c less -s B -l auto-buffers -d "Disable automtic buffer allocation"
+complete -c less -s c -l clear-screen -d "Repaint from top"
+complete -c less -s C -l CLEAR-SCREEN -d "Clear and repaint from top"
+complete -c less -s d -l dumb -d "Supress error for lacking terminal capability"
+complete -c less -s e -l quit-at-eof -d "Exit on second EOF"
+complete -c less -s E -l QUIT-AT-EOF -d "Exit on EOF"
+complete -c less -s f -l force -d "Open non-regular files"
+complete -c less -s F -l quit-if-one-screen -d "Quit if file shorter than one screen"
+complete -c less -s g -l hilite-search -d "Hilight one search target"
+complete -c less -s G -l HILITE-SEARCH -d "No search highlighting"
+complete -c less -s h -l max-back-scroll -d "Maximum backward scroll" -r -a "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19"
+complete -c less -s i -l ignore-case -d "Search ignores lowercase case"
+complete -c less -s I -l IGNORE-CASE -d "Search ignores all case"
+complete -c less -s j -l jump-target -d "Target line" -r -a "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19"
+complete -c less -s J -l status-column -d "Display status column"
+complete -c less -s k -l lesskey-file -d "Specify key bindings file" -r
+complete -c less -s L -l no-lessopen -d "Ignore $LESSOPEN"
+complete -c less -s m -l long-prompt -d "Prompt with percentage"
+complete -c less -s M -l LONG-PROMPT -d "Verbose prompt"
+complete -c less -s n -l line-numbers -d "Display line number"
+complete -c less -s N -l LINE-NUMBERS -d "Display line number for each line"
+complete -c less -s o -l log-file -d "Log input to file" -r
+complete -c less -s O -l LOG-FILE -d "Log to file, overwrite" -r
+complete -c less -s p -l pattern -d "Start at first occorance of pattern" -r
+complete -c less -s P -l prompt -d "Prompt string" -r
+complete -c less -s q -l quiet -d "Silent mode"
+complete -c less -l silent -d "Silent mode"
+complete -c less -s Q -l QUIET -d "Completly silent mode"
+complete -c less -l SILENT -d "Completly silent mode"
+complete -c less -s r -l raw-control-chars -d "Display control chars"
+complete -c less -s R -l RAW-CONTROL-CHARS -d "Display control chars, guess screen appearance"
+complete -c less -s s -l squeeze-blank-lines -d "Miltiple blank lines sqeezed"
+complete -c less -s S -l chop-long-lines -d "Do not fold long lines"
+complete -c less -s t -l tag -d "Edit tag" -r
+complete -c less -s T -l tag-file -d "Set tag file" -r
+complete -c less -s u -l underline-special -d "Allow backspace and carriage return"
+complete -c less -s U -l UNDERLINE-SPECIAL -d "Allow backspace, tab and carriage return"
+complete -c less -s V -l version -d "Display version and exit"
+complete -c less -s w -l hilite-unread -d "Flash first unread line on new page"
+complete -c less -s W -l HILITE-UNREAD -d "Flash first unread line on any movement"
+complete -c less -s x -l tabs -d "set tab stops" -r -a "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"
+complete -c less -s X -l no-init -d "No termcap init"
+complete -c less -l no-keypad -d "No keypad init"
+complete -c less -s y -l max-forw-scroll -d "Maximum forward scroll" -r -a "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19"
+complete -c less -s z -l window -d "Max scroll window" -r -d "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19"
+complete -c less -s \" -l quotes -d "Set quote char" -r
+complete -c less -s \~ -l tilde -d "Lines after EOF are blank"
+complete -c less -s \# -l shift -d "Scroll on arrows" -a "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19"
+
diff --git a/init/completions/ls.fish b/init/completions/ls.fish
new file mode 100644
index 00000000..5653ccfc
--- /dev/null
+++ b/init/completions/ls.fish
@@ -0,0 +1,71 @@
+complete -c ls -s a -l all -d "Show hidden"
+complete -c ls -s A -l almost-all -d "Show hidden except . and .."
+complete -c ls -l author -d "Print author"
+complete -c ls -s b -l escape -d "Octal escapes for non graphic"
+complete -c ls -l blocksize -x -d "Use SIZE-byte blocks"
+complete -c ls -s B -l ignore-backups -d "Ignore files ending with ~"
+complete -c ls -s c -d "Show and sort by ctime"
+complete -c ls -s C -d "List by columns"
+complete -c ls -l color -f -a "never always auto" -d "Show colors"
+complete -c ls -s d -l directory -d "List directories"
+complete -c ls -s D -l dired -d "Generate dired output"
+complete -c ls -s f -d "Do not sort"
+complete -c ls -s F -l classify -d "Append filetype indicator"
+complete -c ls -l format -x -a "across commas horizontal long single-column verbose vertical" -d "List format"
+complete -c ls -l full-time -d "Long forma, full-iso time"
+complete -c ls -s g -d "Long format without owner"
+complete -c ls -s G -l no-group -d "Do not print group information"
+complete -c ls -s h -l human-readable -d "Human readable size"
+complete -c ls -l si -d "Human readable size, base 1000"
+complete -c ls -s H -l dereference-command-line -d "Follow symlinks"
+complete -c ls -l dereference-command-line-symlink-to-dir #-d "Follow directory symlinks from command line"
+complete -c ls -l indicator-style -x -a "none classify file-type" -d "Append indicator to entry"
+complete -c ls -s i -l inode -d "Print index number of files"
+complete -c ls -s I -l ignore -r -d "Skip entries matching pattern"
+complete -c ls -s k -d "like --block-size=1K"
+complete -c ls -s l -d "Long format"
+complete -c ls -s L -l dereference -d "Follow symlinks"
+complete -c ls -s m -d "Comma separated format"
+complete -c ls -s n -l numeric-uid-gid -d "Long format, numeric IDs"
+complete -c ls -s N -l literal -d "Print raw entry names"
+complete -c ls -s o -d "Long format without groups"
+complete -c ls -s p -l file-type -d "Append indicator"
+complete -c ls -s q -l hide-control-chars -d "? fo non graphic"
+complete -c ls -l show-control-chars -d "Non graphic as-is"
+complete -c ls -s Q -l quote-name -d "Enclose entry in quotes"
+complete -c ls -l quoting-style -x -a "literal locale shell shell-always c escape" -d "Select quoting style"
+complete -c ls -s r -l reverse -d "Reverse sort order"
+complete -c ls -s R -l recursive -d "List subdirectory recursively"
+complete -c ls -s s -l size -d "Print size of files"
+complete -c ls -s S -d "Sort by size"
+complete -c ls -l sort -x -d "Sort criteria" -a "
+ extension\t'Sort by file extension'
+ none\t'Do not sort'
+ size\t'Sort by size'
+ time\t'Sort by modification time'
+ version\t'Sort by version'
+ status\t'Sort by file status modification time'
+ atime\t'Sort by access time'
+ access\t'Sort by access time'
+ use\t'Sort by access time'
+"
+complete -c ls -l time -x -d "Show time type" -a "
+ time\t'Sort by modification time'
+ access\t'Sort by access time'
+ use\t'Sort by use time'
+ ctime\t'Sort by file status modification time'
+ status\t'Sort by status time'
+"
+complete -c ls -l time-style -x -a "full-iso long-iso iso locale" -d "Select time style"
+complete -c ls -s t -d "Sort by modification time"
+complete -c ls -s T -l tabsize -x -a "1 2 3 4 5 6 7 8 9 10 11 12" -d "Assume tab stops at each COLS"
+complete -c ls -s u -d "Show access time"
+complete -c ls -s U -d "Do not sort"
+complete -c ls -s v -d "Sort by version"
+complete -c ls -s w -l width -x -d "Assume screen width"
+complete -c ls -s x -d "List entries by lines"
+complete -c ls -s X -d "sort by extension"
+complete -c ls -s 1 -d "List one file per line"
+complete -c ls -l help -d "Display help and exit"
+complete -c ls -l version -d "Output version and exit"
+
diff --git a/init/completions/make.fish b/init/completions/make.fish
new file mode 100644
index 00000000..fc83c11d
--- /dev/null
+++ b/init/completions/make.fish
@@ -0,0 +1,23 @@
+#Completions for make
+complete -x -c make -a "(grep -h -E '^[^#%=\t$][^#%=$]*:([^=]|$)' Makefile makefile GNUmakefile | cut -d ":" -f 1 | sed -r 's/^ *//;s/ *$//;s/ +/\n/g' ^/dev/null)" -d "Target"
+complete -r -c make -s f -d "Use file as makefile" -r
+complete -x -c make -s C -x -a "(__fish_complete_directory (commandline -ct))" -d "Change directory"
+complete -c make -s d -d "Debug"
+complete -c make -s e -d "Environment before makefile"
+complete -c make -s i -d "Ignore errors"
+complete -x -c make -s I -d "Search directory for Makefile" -a "(__fish_complete_directory (commandline -ct))"
+complete -x -c make -s j -d "Number of jobs"
+complete -c make -s k -d "Continue after an error"
+complete -c make -s l -d "Start when load drops"
+complete -c make -s n -d "Do not execute commands"
+complete -c make -s o -r -d "Ignore specified file"
+complete -c make -s p -d "Print database"
+complete -c make -s q -d "Question mode"
+complete -c make -s r -d "Eliminate implicit rules"
+complete -c make -s s -d "Silent operation"
+complete -c make -s S -d "Cancel the effect of -k"
+complete -c make -s t -d "Touch files, dont run commands"
+complete -c make -s v -d "Print version"
+complete -c make -s w -d "Print working directory"
+complete -c make -s W -r -d "Pretend file is modified"
+
diff --git a/init/completions/makedepend.fish b/init/completions/makedepend.fish
new file mode 100644
index 00000000..f5455b8e
--- /dev/null
+++ b/init/completions/makedepend.fish
@@ -0,0 +1,13 @@
+complete -c makedepend -s D -r -d "Define"
+complete -c makedepend -s I -r -d "Include directory"
+complete -c makedepend -s Y -r -d "Replace include directories"
+complete -c makedepend -s a -d "Append dependencies to makefile"
+complete -c makedepend -s f -r -d "Specify makefile"
+complete -c makedepend -o include -r -d "Prepend file to input"
+complete -c makedepend -s o -r -d "Object file suffix"
+complete -c makedepend -s p -r -d "Object file prefix"
+complete -c makedepend -s s -r -d "Starting string delimiter"
+complete -c makedepend -s w -r -d "Line width"
+complete -c makedepend -s v -d "Verbose mode"
+complete -c makedepend -s m -d "Warn about multiple inclusion"
+
diff --git a/init/completions/man.fish b/init/completions/man.fish
new file mode 100644
index 00000000..6c7a9779
--- /dev/null
+++ b/init/completions/man.fish
@@ -0,0 +1,64 @@
+
+function __fish_complete_man
+ if test (commandline -ct)
+
+ # Try to guess what section to search in. If we don't know, we
+ # use [^)]*, which should match any section
+
+ set section ""
+ set prev (commandline -poc)
+ set -e prev[1]
+ while count $prev
+ switch $prev[1]
+ case '-**'
+
+ case '*'
+ set section $prev[1]
+ end
+ set -e prev[1]
+ end
+
+ set section $section"[^)]*"
+
+ # Do the actual search
+ apropos (commandline -ct) | grep \^(commandline -ct) | sed -n -e 's/\([^ ]*\).*(\('$section'\)) *- */\1\t\2: /p'
+ end
+end
+
+
+
+complete -xc man -a "(__fish_complete_man)"
+
+complete -xc man -a 1 -d "Program section"
+complete -xc man -a 2 -d "Syscall section"
+complete -xc man -a 3 -d "Library section"
+complete -xc man -a 4 -d "Device section"
+complete -xc man -a 5 -d "File format section"
+complete -xc man -a 6 -d "Games section"
+complete -xc man -a 7 -d "Misc section"
+complete -xc man -a 8 -d "Admin section"
+complete -xc man -a 9 -d "Kernel section"
+complete -xc man -a tcl -d "Tcl section"
+complete -xc man -a n -d "New section"
+complete -xc man -a l -d "Local section"
+complete -xc man -a p
+complete -xc man -a o -d "Old section"
+complete -rc man -s C -d "Configuration file"
+complete -xc man -s M -a "(__fish_complete_directory (commandline -ct))" -d "Manpath"
+complete -rc man -s P -d "Pager"
+complete -xc man -s S -d "Manual sections"
+complete -c man -s a -d "Display all matches"
+complete -c man -s c -d "Always reformat"
+complete -c man -s d -d "Debug"
+complete -c man -s D -d "Debug and run"
+complete -c man -s f -d "Whatis"
+complete -c man -s F -l preformat -d "Format only"
+complete -c man -s h -d "Display help and exit"
+complete -c man -s k -d "Apropos"
+complete -c man -s K -d "Search in all man pages"
+complete -xc man -s m -d "Set system"
+complete -xc man -s p -d "Preprocessors"
+complete -c man -s t -d "Format for printing"
+complete -c man -s w -l path -d "Only print locations"
+complete -c man -s W -d "Only print locations"
+
diff --git a/init/completions/mimedb.fish b/init/completions/mimedb.fish
new file mode 100644
index 00000000..a7bc6930
--- /dev/null
+++ b/init/completions/mimedb.fish
@@ -0,0 +1,9 @@
+complete -c mimedb -s t -l input-file-data -d "Input is a file, use name and contents to determine mimetype"
+complete -c mimedb -s f -l input-filename -d "Input is a file, use name to determine mimetype"
+complete -c mimedb -s i -l input-mime -d "Input is a mimetype"
+complete -c mimedb -s m -l output-mime -d "Output mimetype"
+complete -c mimedb -s d -l output-description -d "Output description of mimetype"
+complete -c mimedb -s a -l output-action -d "Output default action for mimetype"
+complete -c mimedb -s l -l launch -d "Launch default action for each file"
+complete -c mimedb -s h -l help -d "Display help and exit"
+complete -c mimedb -s v -l version -d "Display version and exit"
diff --git a/init/completions/modprobe.fish b/init/completions/modprobe.fish
new file mode 100644
index 00000000..af0e35d2
--- /dev/null
+++ b/init/completions/modprobe.fish
@@ -0,0 +1,23 @@
+
+complete -c modprobe -d Module -a "/sbin/modprobe -l|sed -re 's/\/.*\/([^\/.]*).*/\1/'"
+complete -c modprobe -s v -l verbose -d "Print messages about what the program is doing"
+complete -c modprobe -s C -l config -d "Configuration file" -r
+complete -c modprobe -s c -l showconfig -d "Dump configuration file"
+complete -c modprobe -s n -l dry-run -d "Do not actually insert/remove module"
+complete -c modprobe -s i -l ingnore-install -d "Ignore install and remove commands in configuration file"
+complete -c modprobe -l ingnore-remove -d "Ignore install and remove commands in configuration file"
+complete -c modprobe -s q -l quiet -d "Ignore bogus module names"
+complete -c modprobe -s r -l remove -d "Remove modules"
+complete -c modprobe -s V -l version -d "Display version and exit"
+complete -c modprobe -s f -l force -d "Ignore all version information"
+complete -c modprobe -l force-vermagic -d "Ignore version magic information"
+complete -c modprobe -l force-modversion -d "Ignore module interface version"
+complete -c modprobe -s l -l list -d "List all modules matching the given wildcard"
+complete -c modprobe -s a -l all -d "Insert modules matching the given wildcard"
+complete -c modprobe -s t -l type -d "Restrict wildcards to specified directory"
+complete -c modprobe -s s -l syslog -d "Send error messages through syslog"
+complete -c modprobe -l set-version -d "Specify kernel version"
+complete -c modprobe -l show-depends -d "List dependencies of module"
+complete -c modprobe -s o -l name -d "Rename module"
+complete -c modprobe -l first-time -d "Fail if inserting already loaded module"
+
diff --git a/init/completions/mount.fish b/init/completions/mount.fish
new file mode 100644
index 00000000..26adc8ba
--- /dev/null
+++ b/init/completions/mount.fish
@@ -0,0 +1,68 @@
+
+
+# A list of all known filesystem types, used by various completions,
+# including mount and df
+
+set -g __fish_filesystems "
+ adfs
+ affs
+ autofs
+ coda
+ coherent
+ cramfs
+ devpts
+ efs
+ ext
+ ext2
+ ext3
+ hfs
+ hpfs
+ iso9660
+ jfs
+ minix
+ msdos
+ ncpfs
+ nfs
+ ntfs
+ proc
+ qnx4
+ ramfs
+ reiserfs
+ romfs
+ smbfs
+ sysv
+ tmpfs
+ udf
+ ufs
+ umsdos
+ vfat
+ xenix
+ xfs
+ xiafs
+"
+
+# Completions for mount
+complete -x -c mount -a "(cat /etc/fstab|sed -e 's/^\([^ \t]*\)[ \t]*\([^ \t]*\).*/\1\n\2/'|grep '^/')" -d "Mount point"
+complete -c mount -s V -d "Display version and exit"
+complete -c mount -s h -d "Display help and exit"
+complete -c mount -s v -d "Verbose mode"
+complete -c mount -s a -d "Mount filesystems in fstab"
+complete -c mount -s F -d "Fork process for each mount"
+complete -c mount -s f -d "Fake mounting"
+complete -c mount -s l -d "Add label to output"
+complete -c mount -s n -d "Do not write mtab"
+complete -c mount -s s -d "Tolerate sloppy mount options"
+complete -c mount -s r -d "Read only"
+complete -c mount -s w -d "Read/Write mode"
+complete -x -c mount -s L -d "Mount partition with specified label"
+complete -x -c mount -s U -d "Mount partition with specified UID"
+complete -c mount -s O -x -d "Exclude filesystems"
+complete -c mount -l bind -f -d "Remount a subtree to a second position"
+complete -c mount -l move -f -d "Move a subtree to a new position"
+complete -c mount -x -s t -d "Filesystem" -a $__fish_filesystems
+
+complete -c mount -x -s o -d "Mount option" -a "(__fish_append ',' $__fish_mount_opts)"
+
+set -g __fish_mount_opts async\tUse\ asynchronous\ I/O atime\tUpdate\ time\ on\ each\ access auto\tMounted\ with\ -a defaults\tUse\ default\ options dev\tInterpret\ character/block\ special\ devices exec\tPermit\ executables _netdev\tFilesystem\ uses\network noatime\tDo\ not\ update\ time\ on\ each\ access noauto\tNot\ mounted\ by\ -a nodev\tDo\ not\ interpret\ character/block\ special\ devices noexec\tDo\ not\ permit\ executables nosuid\tIgnore\ suid\ bits nouser\tOnly\ root\ may\ mount remount\tRemount\ read-only\ filesystem ro\tMount\ read-only rw\tMount\ read-write suid\tAllow\ suid\ bits sync\tUse\ synchronous\ I/O dirsync\tUse\ synchronous\ directory\ operations user\tAny\ user\ may\ mount users\tAny\ user\ may\ mount\ and\ unmount
+
+
diff --git a/init/completions/mplayer.fish b/init/completions/mplayer.fish
new file mode 100644
index 00000000..ace11432
--- /dev/null
+++ b/init/completions/mplayer.fish
@@ -0,0 +1,85 @@
+# Completions for mplayer (Incomplete, there are too many options and
+# I am too lazy. Please send in suggested additions)
+
+#
+# List of two letter language codes for dvd audio, etc. Very
+# incomplete. Please send in additions.
+#
+
+set mplayer_lang "
+ de\tGerman
+ dk\tDanish
+ en\tEnglish
+ es\tSpanish
+ fi\tFinnish
+ fr\tFrench
+ gr\tGreek
+ hu\tHungarian
+ it\tItalian
+ jp\tJapanese
+ no\tNorwegian
+ hu\tHungarian
+ pl\tPolish
+ pt\tPortugese
+ se\Swedish
+"
+
+complete -c mplayer -o autoq -d "Dynamically change postprocessing" -x
+complete -c mplayer -o autosync -x -d "A/V sync speed"
+complete -c mplayer -o framedrop -d "Skip frames to maintain A/V sync"
+complete -c mplayer -s h -o help -d "Show help and exit"
+complete -c mplayer -o hardframedrop -d "Skip frames to maintain A/V sync"
+complete -c mplayer -o loop -x -d "Loop playback" -r -a "0 1 2 3 4 5 6 7 8 9"
+complete -c mplayer -o shuffle -d "Play in random order"
+
+complete -c mplayer -s h -o help -d "Display help and exit"
+complete -c mplayer -o fs -d "Full screen"
+complete -c mplayer -o playlist -d "Set playlist"-r
+complete -c mplayer -o alang -d "Audio language" -x -a $mplayer_lang
+complete -c mplayer -o audiofile -d "Play audio from file" -r
+complete -c mplayer -o cdrom-device -d "Set default CD-ROM drive"
+complete -c mplayer -o channels -d "Set number of audio channels" -x -a "2 4 6"
+complete -c mplayer -o chapter -d "Set start chapter" -x
+complete -c mplayer -o dvd-device -d "Set default DVD-ROM drive"
+complete -c mplayer -o dvdangle -d "Set dvd viewing angle" -x -a "1 2 3 4 5 6 7 8"
+complete -c mplayer -o forceidx -d "Force rebuilding index"
+complete -c mplayer -o fps -d "Override framerate" -x -a "24 25 30"
+complete -c mplayer -o idx -d "Rebuild index if unavailable"
+complete -c mplayer -o loadidx -d "Load index from file" -r
+complete -c mplayer -o ni -d "Force non-interleaved AVI parser"
+complete -c mplayer -o saveidx -d "Rebuild index and save to file" -r
+complete -c mplayer -o ss -d "Seek to give time position" -x
+complete -c mplayer -o tv -d "TV capture mode"
+complete -c mplayer -o slang -d "Subtitle language" -x -a $mplayer_lang
+complete -c mplayer -o sub -d "Subtitle file" -r
+complete -c mplayer -o unicode -d "Handle subtitlefile as unicode"
+complete -c mplayer -o utf8 -d "Handle subtitlefile as utf8"
+
+complete -c mplayer -o vo -x -d "Video output" -a "
+(
+ mplayer -vo help|grep \t.\*\t'\|^ *[a-zA-Z0-9][a-zA-Z0-9]* '|sed -e 's/[\t ]*\([a-zA-Z0-9]*\)[\t ]*\(.*\)/\1\t\2/'
+)
+"
+
+complete -c mplayer -o ao -x -d "Audio output" -a "
+(
+ mplayer -ao help|grep \t.\*\t'\|^ *[a-zA-Z0-9][a-zA-Z0-9]* '|sed -e 's/[\t ]*\([a-zA-Z0-9]*\)[\t ]*\(.*\)/\1\t\2/'
+)
+"
+
+complete -c mplayer -o afm -x -d "Audio output" -a "
+(
+ __fish_append ',' (mplayer -afm help|grep \t.\*\t'\|^ *[a-zA-Z0-9][a-zA-Z0-9]* '|sed -e 's/[\t ]*\([a-zA-Z0-9]*\)[\t ]*\(.*\)/\1\t\2/')
+)
+"
+
+complete -c mplayer -o vfm -x -d "Video output" -a "
+(
+ __fish_append ',' (mplayer -vfm help|grep \t.\*\t'\|^ *[a-zA-Z0-9][a-zA-Z0-9]* '|sed -e 's/[\t ]*\([a-zA-Z0-9]*\)[\t ]*\(.*\)/\1\t\2/')
+)
+"
+
+complete -c mplayer -l help -d "Display help and exit"
+complete -c mplayer -l version -d "Display version and exit"
+
+set -e mplayer_lang
diff --git a/init/completions/mv.fish b/init/completions/mv.fish
new file mode 100644
index 00000000..dbb6aed2
--- /dev/null
+++ b/init/completions/mv.fish
@@ -0,0 +1,12 @@
+complete -c mv -s b -l backup -d "Make backup of each existing destination file"
+complete -c mv -s f -l force -d "Do not prompt before overwriting"
+complete -c mv -s i -l interactive -d "Prompt before overwrite"
+complete -c mv -l reply -x -a "yes no query" -d "Answer for overwrite questions"
+complete -c mv -l strip-trailing-slashes -d "Remove trailing slashes from source"
+complete -c mv -s S -l suffix -r -d "Backup suffix"
+complete -c mv -l target-directory -d "Target directory" -x -a "(__fish_complete_directory (commandline -ct) 'Target directory')"
+complete -c mv -s u -l update -d "Do not overwrite newer files"
+complete -c mv -s v -l vervose -d "Explain what is done"
+complete -c mv -l help -d "Display help and exit"
+complete -c mv -l version -d "Display version and exit"
+
diff --git a/init/completions/nextd.fish b/init/completions/nextd.fish
new file mode 100644
index 00000000..be515cc5
--- /dev/null
+++ b/init/completions/nextd.fish
@@ -0,0 +1 @@
+complete -c nextd -s l -d "Also print directory history"
diff --git a/init/completions/perl.fish b/init/completions/perl.fish
new file mode 100644
index 00000000..d17e82c1
--- /dev/null
+++ b/init/completions/perl.fish
@@ -0,0 +1,20 @@
+complete -c perl -s 0 -d "Specify record separator"
+complete -c perl -s a -d "Feed input to split"
+complete -c perl -s c -d "Check syntax"
+complete -c perl -s d -d "Debugger"
+complete -c perl -s D -x -d "Debug option"
+complete -c perl -s e -x -d "Execute command"
+complete -c perl -s F -d "Set regexp used to split input"
+complete -c perl -s i -d "Edit files in-place"
+complete -c perl -s I -d "Include path"
+complete -c perl -s l -d "Line ending processing"
+complete -c perl -s n -d "Loop script"
+complete -c perl -s p -d "Loop script, print $_"
+complete -c perl -s P -d "Invoke CPP"
+complete -c perl -s s -d "Define custom switches"
+complete -c perl -s S -d "Search $PATH for script"
+complete -c perl -s T -d "Taint checking"
+complete -c perl -s U -d "Unsafe mode"
+complete -c perl -s v -d "Display version"
+complete -c perl -s x -d "Extract script"
+
diff --git a/init/completions/pine.fish b/init/completions/pine.fish
new file mode 100644
index 00000000..655804ea
--- /dev/null
+++ b/init/completions/pine.fish
@@ -0,0 +1,26 @@
+complete -c pine -s f -d "Open folder" -a "(cd ~/.Mail; ls -d *)"
+complete -c pine -s F -d "Open file" -r
+complete -c pine -s h -d "Display help and exit"
+complete -c pine -s i -d "Start in folder index"
+complete -c pine -s I -d "Initial set of keystrokes" -x
+complete -c pine -s k -d "Use function keys for commands"
+complete -c pine -s l -d "Expand collections in FOLDER LIST display"
+complete -c pine -s n -d "Start with specified current message number" -x
+complete -c pine -s o -d "Open folder read-only"
+complete -c pine -s p -d "Set configuration file" -r
+complete -c pine -s P -d "Set global configuration file"
+complete -c pine -s r -d "Restricted mode"
+complete -c pine -s z -d "Enable suspention support"
+complete -c pine -o conf -d "Produce a sample global configuration file"
+complete -c pine -o pinerc -d "Produce sample configuration file" -r
+complete -c pine -o sort -d "Set mail sort order" -a "
+ arrival
+ subject
+ from
+ date
+ size
+ orderedsubj
+ reverse
+"
+
+complete -c pine -o option -d "Config option" -x
diff --git a/init/completions/ping.fish b/init/completions/ping.fish
new file mode 100644
index 00000000..13c80e7e
--- /dev/null
+++ b/init/completions/ping.fish
@@ -0,0 +1,30 @@
+complete -c ping -a "(__fish_print_hostnames)" -x
+complete -c ping -s a -d "Audible ping"
+complete -c ping -s A -d "Adaptive ping"
+complete -c ping -s b -d "Allow pinging a broadcast address"
+complete -c ping -s B -d "Do not allow ping to change source address of probes"
+complete -c ping -s c -d "Stop after sending count ECHO_REQUEST packets" -x
+complete -c ping -s d -d "Set the SO_DEBUG option on the socket being used"
+complete -c ping -s F -d "Allocate and set 20 bit flow label on echo request packets" -x
+complete -c ping -s f -d "Flood ping"
+complete -c ping -s i -d "Wait interval seconds between sending each packet" -x
+complete -c ping -s I -d "Set source address to specified interface address" -x -a "(__fish_print_interfaces; fish_print_addresses)"
+complete -c ping -s l -d "If preload is specified, ping sends that many packets not waiting for reply" -x
+complete -c ping -s L -d "Suppress loopback of multicast packets"
+complete -c ping -s n -d "Numeric output only"
+complete -c ping -s p -d "You may specify up to 16 ‘‘pad’’ bytes to fill out the packet you send" -x
+complete -c ping -s Q -d "Set Quality of Service -related bits in ICMP datagrams" -x
+complete -c ping -s q -d "Quiet output"
+complete -c ping -s R -d "Record route"
+complete -c ping -s r -d "Bypass the normal routing tables and send directly to a host on an attached interface"
+complete -c ping -s s -d "Specifies the number of data bytes to be sent" -x
+complete -c ping -s S -d "Set socket sndbuf" -x
+complete -c ping -s t -d "Set the IP Time to Live" -x
+complete -c ping -s T -d "Set special IP timestamp options" -x
+complete -c ping -s M -d "Select Path MTU Discovery strategy" -x -a "do want dont"
+complete -c ping -s U -d "Print full user-to-user latency"
+complete -c ping -s v -d "Verbose output"
+complete -c ping -s V -d "Show version and exit"
+complete -c ping -s w -d "Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received" -x
+complete -c ping -s W -d "Time to wait for a response, in seconds" -x
+
diff --git a/init/completions/prevd.fish b/init/completions/prevd.fish
new file mode 100644
index 00000000..96cad294
--- /dev/null
+++ b/init/completions/prevd.fish
@@ -0,0 +1 @@
+complete -c prevd -s l -d "Also print directory history"
diff --git a/init/completions/ps.fish b/init/completions/ps.fish
new file mode 100644
index 00000000..02ca0bfa
--- /dev/null
+++ b/init/completions/ps.fish
@@ -0,0 +1,37 @@
+# Completions for ps
+
+complete -c ps -s A -d "Select all"
+complete -c ps -s N -d "Invert selection"
+complete -c ps -s a -d "Select all processes except session leaders and terminal-less"
+complete -c ps -s d -d "Select all processes except session leaders"
+complete -c ps -s e -d "Select all"
+complete -c ps -l deselect -d "Deselect all processes that do not fulfill conditions"
+
+complete -c ps -s C -d "Select by command" -r
+complete -c ps -s G -l Group -d "Select by group" -x -a "(__fish_complete_groups)"
+
+complete -c ps -s U -l User -d "Select by user" -x -a "(__fish_complete_users)"
+complete -c ps -s u -l user -d "Select by user" -x -a "(__fish_complete_users)"
+complete -c ps -s g -l group -d "Select by group/session" -x -a "(__fish_complete_groups)"
+complete -c ps -s p -l pid -d "Select by PID" -x -a "(__fish_complete_pids)"
+complete -c ps -l ppid -d "Select by parent PID" -x -a "(__fish_complete_pids)"
+complete -c ps -s s -l sid -d "Select by session ID" -x -a "(__fish_complete_pids)"
+complete -c ps -s t -l tty -d "Select by tty" -r
+complete -c ps -s F -d "Extra full format"
+complete -c ps -s O -d "User defined format" -x
+complete -c ps -s M -d "Add column for security data"
+complete -c ps -s f -d "Full format"
+complete -c ps -s j -d "Jobs format"
+complete -c ps -s l -d "Long format"
+complete -c ps -s o -l format -d "User defined format" -x
+complete -c ps -s y -d "Do not show flags"
+complete -c ps -s Z -l context -d "Display security context format"
+complete -c ps -s H -l forest -d "Show hierarchy"
+complete -c ps -s n -d "Set namelist file" -r
+complete -c ps -s w -d "Wide output"
+complete -c ps -s L -d "Show threads"
+complete -c ps -s T -d "Show threads"
+complete -c ps -s V -l version -d "Display vesrion and exit"
+complete -c ps -l help -d "Display help and exit"
+complete -c ps -l info -d "Display debugging info"
+
diff --git a/init/completions/pushd.fish b/init/completions/pushd.fish
new file mode 100644
index 00000000..49958bf8
--- /dev/null
+++ b/init/completions/pushd.fish
@@ -0,0 +1 @@
+complete -c pushd -x -a "(__fish_complete_cd)"
diff --git a/init/completions/python.fish b/init/completions/python.fish
new file mode 100644
index 00000000..198efb6d
--- /dev/null
+++ b/init/completions/python.fish
@@ -0,0 +1,14 @@
+complete -c python -s c -x -d "Execute argument as command"
+complete -c python -s d -d "Debug on"
+complete -c python -s E -d "Ignore environment variables"
+complete -c python -s h -d "Display help and exit"
+complete -c python -s i -d "Interactive mode after executing commands"
+complete -c python -s O -d "Enable optimizations"
+complete -c python -s Q -x -a "old new" -d "Division control"
+complete -c python -s S -d "Disable import of site module"
+complete -c python -s t -d "Warn on mixed tabs and spaces"
+complete -c python -s u -d "Unbuffered inputg and output"
+complete -c python -s v -d "Verbose mode"
+complete -c python -s V -d "Display version and exit"
+complete -c python -s W -x -d "Warning control" -a "ignore default all module once error"
+complete -c python -s x -d "Skip first line of input"
diff --git a/init/completions/read.fish b/init/completions/read.fish
new file mode 100644
index 00000000..c37d01c2
--- /dev/null
+++ b/init/completions/read.fish
@@ -0,0 +1,7 @@
+complete -c read -s h -l help -d "Display help and exit"
+complete -c read -s p -l prompt -d "Set prompt command" -x
+complete -c read -s x -l export -d "Export variable to subprocess"
+complete -c read -s g -l global -d "Make variable scope global"
+complete -c read -s l -l local -d "Make variable scope local"
+complete -c read -s u -l unexport -d "Do not export variable to subprocess"
+
diff --git a/init/completions/rm.fish b/init/completions/rm.fish
new file mode 100644
index 00000000..a8f8a94c
--- /dev/null
+++ b/init/completions/rm.fish
@@ -0,0 +1,11 @@
+#Completions for rm
+complete -c rm -s d -l directory -d "Unlink directory (Only by superuser)"
+complete -c rm -s f -l force -d "Never prompt before removal"
+complete -c rm -s i -l interactive -d "Prompt before removal"
+complete -c rm -s r -l recursive -d "Remove content of subdirectories"
+complete -c rm -s R -d "Remove content of subdirectories"
+complete -c rm -s v -l verbose -d "Explain what is done"
+complete -c rm -s h -l help -d "Display help and exit"
+complete -c rm -l version -d "Display version and exit"
+
+
diff --git a/init/completions/rmdir.fish b/init/completions/rmdir.fish
new file mode 100644
index 00000000..fcbd6c27
--- /dev/null
+++ b/init/completions/rmdir.fish
@@ -0,0 +1,8 @@
+#Completions for rmdir
+complete -x -c rmdir -a "(__fish_complete_directory (commandline -ct))"
+complete -c rmdir -l ignore-fail-on-non-empty -d "Ignore errors from non-empty directories"
+complete -c rmdir -s p -l parents -d "Remove each component of path"
+complete -c rmdir -s v -l verbose -d "Explain what is done"
+complete -c rmdir -l help -d "Display help and exit"
+complete -c rmdir -l version -d "Display version and exit"
+
diff --git a/init/completions/rpm.fish b/init/completions/rpm.fish
new file mode 100644
index 00000000..fb5ada28
--- /dev/null
+++ b/init/completions/rpm.fish
@@ -0,0 +1,135 @@
+# Completions for the rpm command. Insanely complicated,
+# since rpm has multiple operation modes, and a perverse number of switches.
+
+complete -c rpm -s "?" -l help -d "Print help and exit"
+complete -c rpm -l version -d "Print version and exit"
+complete -c rpm -l quiet -d "Be less verbose"
+complete -c rpm -s v -d "Be more verbose"
+complete -c rpm -l rcfile -d "List of rpm configuration files" -f
+complete -c rpm -l pipe -d "Pipe output through specified command" -r
+complete -c rpm -l dbpath -d "Specify directory for rpm database" -a "
+(
+ __fish_complete_directory (commandline -ct) 'Rpm database directory'
+)
+"
+complete -c rpm -l root -d "Specify root directory for rpm operations" -a "
+(
+ __fish_complete_directory (commandline -ct) 'Root directory for rpm operations'
+)
+"
+
+set -- rpm_install -c rpm -n "__fish_contains_opt -s i -s U -s F install upgrade freshen"
+complete $rpm_install -l aid -d "Add suggested packages to the transaction set when needed"
+complete $rpm_install -l allfiles -d "Installs or upgrades all the missing ok files in the package, regardless if they exist"
+complete $rpm_install -l badreloc -d "Used with --relocate, permit relocations on all file paths, not just those OLD-PATH’s included in the binary package relocation hint(s)"
+complete $rpm_install -l aid -d 'Add suggested packages to the transaction set when needed'
+complete $rpm_install -l allfiles -d 'Installs or upgrades all the missingok files in the package, regardless if they exist'
+complete $rpm_install -l badreloc -d 'Used with --relocate, permit relocations on all file paths, not just those OLD-PATH’s included in the binary package relocation hint(s)'
+complete $rpm_install -l excludepath -d 'Dont install files whose name begins with OLDPATH' -xa "(__fish_complete_directory (commandline -ct) 'Skip installation of files in this directory')"
+complete $rpm_install -l excludedocs -d 'Dont install any files which are marked as documentation (which includes man pages and texinfo documents)'
+complete $rpm_install -l force -d 'Same as using --replacepkgs, --replacefiles, and --oldpackage'
+complete $rpm_install -s h -l hash -d 'Print 50 hash marks as the package archive is unpacked. Use with -v or --verbose for a nicer display'
+complete $rpm_install -l ignoresize -d 'Dont check mount file systems for sufficient disk space before installing this package'
+complete $rpm_install -l ignorearch -d 'Allow installation or upgrading even if the architectures of the binary package and host dont match'
+complete $rpm_install -l ignoreos -d 'Allow installation or upgrading even if the operating systems of the binary package and host dont match'
+complete $rpm_install -l includedocs -d 'Install documentation files. This is the default behavior'
+complete $rpm_install -l justdb -d 'Update only the database, not the filesystem'
+complete $rpm_install -l nodigest -d 'Dont verify package or header digests when reading'
+complete $rpm_install -l nosignature -d 'Dont verify package or header signatures when reading'
+complete $rpm_install -l nodeps -d 'Dont do a dependency check before installing or upgrading a package'
+complete $rpm_install -l nosuggest -d 'Dont suggest package(s) that provide a missing dependency'
+complete $rpm_install -l noorder -d 'Dont reorder the packages for an install. The list of packages would normally be reordered to satisfy dependencies'
+complete $rpm_install -l noscripts -d 'Dont execute scripts'
+complete $rpm_install -l nopre -d 'Dont execute pre scripts'
+complete $rpm_install -l nopost -d 'Dont execute post scripts'
+complete $rpm_install -l nopreun -d 'Dont execute preun scripts'
+complete $rpm_install -l nopostun -d 'Dont execute postun scripts'
+complete $rpm_install -l notriggers -d 'Dont execute trigger scriptlets'
+complete $rpm_install -l notriggerin -d 'Dont execute triggerin scriptlets'
+complete $rpm_install -l notriggerun -d 'Dont execute triggerun scriptlets'
+complete $rpm_install -l notriggerpostun -d 'Dont execute triggerpostun scriptlets'
+complete $rpm_install -l oldpackage -d 'Allow an upgrade to replace a newer package with an older one'
+complete $rpm_install -l percent -d 'Print percentages as files are unpacked from the package archive. This is intended to make rpm easy to run from other tools'
+complete $rpm_install -l prefix -d 'For relocatable binary packages, translate all file paths that start with the installation prefix in the package relocation hint(s) to NEWPATH' -xa "(__fish_complete_directory (commandline -ct) 'Directory prefix for relocatable packages')"
+complete $rpm_install -l relocate -x -d 'For relocatable binary packages, translate all file paths that start with OLDPATH in the package relocation hint(s) to NEWPATH. This option can be used repeatedly if several OLDPATH’s in the package are to be relocated'
+complete $rpm_install -l repackage -d 'Re-package the files before erasing. The previously installed package will be named according to the macro %_repackage_name_fmt and will be created in the directory named by the macro %_repackage_dir (default value is /var/spool/repackage)'
+complete $rpm_install -l replacefiles -d 'Install the packages even if they replace files from other, already installed, packages'
+complete $rpm_install -l replacepkgs -d 'Install the packages even if some of them are already installed on this system'
+complete $rpm_install -l test -d 'Do not install the package, simply check for and report potential conflicts'
+set -e rpm_install
+
+set -- rpm_query -c rpm -n "__fish_contains_opt -s q query"
+complete $rpm_query -l changelog -d 'Display change information for the package'
+complete $rpm_query -s c -l configfiles -d 'List only configuration files (implies -l)'
+complete $rpm_query -s d -l docfiles -d 'List only documentation files (implies -l)'
+complete $rpm_query -l dump -d 'Dump file information. Must be used with at least one of -l, -c, -d'
+complete $rpm_query -l filesbypkg -d 'List all the files in each selected package'
+complete $rpm_query -s i -l info -d 'Display package information, including name, version, and description. This uses the --queryformat if one was specified'
+complete $rpm_query -l last -d 'Orders the package listing by install time such that the latest packages are at the top'
+complete $rpm_query -s l -l list -d 'List files in package'
+complete $rpm_query -l provides -d 'List capabilities this package provides'
+complete $rpm_query -s R -l requires -d 'List packages on which this package depends'
+complete $rpm_query -l scripts -d 'List the package specific scriptlet(s) that are used as part of the installation and uninstallation processes'
+complete $rpm_query -s s -l state -d 'Display the states of files in the package (implies -l). The state of each file is one of normal, not installed, or replaced'
+complete $rpm_query -l triggers -d 'Display the trigger scripts, if any, which are contained in the package'
+complete $rpm_query -l triggerscripts -d 'Display the trigger scripts, if any, which are contained in the package'
+set -e rpm_query
+
+set -- rpm_select -c rpm -n "__fish_contains_opt -s q -s V query verify"
+
+complete $rpm_select -a "(__fish_print_packages)"
+complete $rpm_select -s a -l all -d 'Query all installed packages'
+complete $rpm_select -s f -l file -d 'Query package owning FILE' -r
+complete $rpm_select -l fileid -d 'Query package that contains a given file identifier, i.e. the MD5 digest of the file contents' -x
+complete $rpm_select -s g -l group -d 'Query packages with the group of GROUP' -x
+complete $rpm_select -l hdrid -d 'Query package that contains a given header identifier, i.e. the SHA1 digest of the immutable header region' -x
+complete $rpm_select -s p -l package -d 'Query an (uninstalled) package PACKAGE_FILE' -xa "(__fish_complete_suffix (commandline -ct) .rpm 'Query package file')"
+complete $rpm_select -l pkgid -d 'Query package that contains a given package identifier, i.e. the MD5 digest of the combined header and payload contents' -x
+complete $rpm_select -l specfile -d 'Parse and query SPECFILE as if it were a package' -xa "(__fish_complete_suffix (commandline -ct) .spec 'Query package spec file')"
+complete $rpm_select -l tid -d 'Query package(s) that have a given TID transaction identifier' -x
+complete $rpm_select -l triggeredby -d 'Query packages that are triggered by package(s) PACKAGE_NAME' -x -a "(__fish_print_packages)"
+complete $rpm_select -l whatprovides -d 'Query all packages that provide the CAPABILITY capability' -x
+complete $rpm_select -l whatrequires -d 'Query all packages that requires CAPABILITY for proper functioning' -x
+set -e rpm_select
+
+set -- rpm_verify -c rpm -n "__fish_contains_opt -s V verify"
+complete $rpm_verify -l nodeps -d 'Dont verify dependencies of packages'
+complete $rpm_verify -l nodigest -d 'Dont verify package or header digests when reading'
+complete $rpm_verify -l nofiles -d 'Dont verify any attributes of package files'
+complete $rpm_verify -l noscripts -d 'Dont execute the %verifyscript scriptlet (if any)'
+complete $rpm_verify -l nosignature -d 'Don’t verify package or header signatures when reading'
+complete $rpm_verify -l nolinkto -d 'Dont verify linkto attribute'
+complete $rpm_verify -l nomd5 -d 'Dont verify md5 attribute'
+complete $rpm_verify -l nosize -d 'Dont verify size attribute'
+complete $rpm_verify -l nouser -d 'Dont verify user attribute'
+complete $rpm_verify -l nogroup -d 'Dont verify group attribute'
+complete $rpm_verify -l nomtime -d 'Dont verify time attribute'
+complete $rpm_verify -l nomode -d 'Dont verify mode attribute'
+complete $rpm_verify -l nordev -d 'Dont verify dev attribute'
+set -e rpm_verify
+
+set -- rpm_erase -c rpm -n "__fish_contains_opt -s e erase"
+complete $rpm_erase -a "(__fish_print_packages)"
+complete $rpm_erase -l allmatches -d 'Remove all versions of the package which match PACKAGE_NAME. Normally an error is issued if PACKAGE_NAME matches multiple packages'
+complete $rpm_erase -l nodeps -d 'Don’t check dependencies before uninstalling the packages'
+complete $rpm_erase -l noscripts -d 'Dont execute scriplets'
+complete $rpm_erase -l nopreun -d 'Dont execute preun scriptlet'
+complete $rpm_erase -l nopostun -d 'Dont execute postun scriptlet'
+complete $rpm_erase -l notriggers -d 'Dont execute trigger scriptlets'
+complete $rpm_erase -l notriggerun -d 'Dont execute triggerun scriptlets'
+complete $rpm_erase -l notriggerpostun -d 'Dont execute triggerpostun scriptlets'
+complete $rpm_erase -l repackage -d 'Re-package the files before erasing'
+complete $rpm_erase -l test -d 'Dont really uninstall anything, just go through the motions'
+set -e rpm_erase
+
+set -- rpm_mode -c rpm -n "__fish_contains_opt -s e -s i -s F -s V -s U -s q erase install freshen verify upgrade query; if test $status = 0; false; else; true; end"
+complete $rpm_mode -s i -l install -d 'Install new package'
+complete $rpm_mode -s U -l upgrade -d 'Upgrade existing package'
+complete $rpm_mode -s F -l freshen -d 'Upgrade package if already installed'
+complete $rpm_mode -s q -l query -d 'Query installed packages'
+complete $rpm_mode -s V -l verify -d 'Verify package integrety'
+complete $rpm_mode -s e -l erase -d 'Erase package'
+set -e rpm_mode
+
+complete -c rpm -xa '(__fish_complete_suffix (commandline -ct) .rpm "RPM package")'
+
diff --git a/init/completions/ruby.fish b/init/completions/ruby.fish
new file mode 100644
index 00000000..1fc43a01
--- /dev/null
+++ b/init/completions/ruby.fish
@@ -0,0 +1,25 @@
+#Completions for ruby
+complete -c ruby -s 0 -d "Specify record separator"
+complete -c ruby -s a -d "Feed input to split"
+complete -c ruby -s c -d "Check syntax"
+complete -c ruby -s K -d "Kanji code-set"
+complete -c ruby -s d -l debug -d "Debugger"
+complete -c ruby -s e -x -d "Execute command"
+complete -c ruby -s h -l help -d "Display help"
+complete -c ruby -s F -d "Set regexp used to split input"
+complete -c ruby -s i -d "Edit files in-place"
+complete -c ruby -s I -d "Include path"
+complete -c ruby -s l -d "Line ending processing"
+complete -c ruby -s n -d "Loop script"
+complete -c ruby -s p -d "Loop script, print $_"
+complete -c ruby -s r -r -d "Require file"
+complete -c ruby -s s -d "Define custom switches"
+complete -c ruby -s S -d "Search $PATH for script"
+complete -c ruby -s T -d "Taint checking"
+complete -c ruby -s v -l verbose -d "Verbose mode"
+complete -c ruby -s w -d "Verbose mode without message"
+complete -c ruby -l version -d "Display version"
+complete -c ruby -s x -d "Extract script"
+complete -c ruby -s X -x -a "(__fish_complete_directory (commandline -ct))" -d "Directory"
+complete -c ruby -s y -l yydebug -d "Compiler debug mode"
+
diff --git a/init/completions/scp.fish b/init/completions/scp.fish
new file mode 100644
index 00000000..6585bb40
--- /dev/null
+++ b/init/completions/scp.fish
@@ -0,0 +1,35 @@
+#
+# Load common ssh options
+#
+
+complete -y ssh
+
+#
+# scp specific completions
+#
+
+complete -c scp -d Hostname -a "
+
+(
+ #Find a suitable hostname from the knownhosts files
+ cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
+):
+
+(
+ #Prepend any username specified in the completion to the hostname
+ echo (commandline -ct)|grep -o '.*@'
+)(
+ cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
+):
+
+(__fish_print_users)@
+
+"
+complete -c scp -s B -d "Batch mode"
+complete -c scp -s l -x -d "Bandwidth limit"
+complete -c scp -s P -x -d "Port"
+complete -c scp -s p -d "Preserves modification times, access times, and modes from the original file"
+complete -c scp -s q -d "Disable progress meter"
+complete -c scp -s r -d "Recursively copy"
+complete -c scp -s S -d "Encyption program"
+
diff --git a/init/completions/screen.fish b/init/completions/screen.fish
new file mode 100644
index 00000000..416121b3
--- /dev/null
+++ b/init/completions/screen.fish
@@ -0,0 +1,37 @@
+function __fish_complete_screen -d "Print a list of running screen sessions"
+ screen -list |grep \^\t.\*\(.\*\)|sed -e 's/\t\(.*\)\t(\(.*\))/\1\tScreen: \2/'
+end
+
+complete -c screen -x
+complete -c screen -s a -d "Include all capabilitys"
+complete -c screen -s A -d "Adapt window size"
+complete -c screen -s c -r -d "Specify init file"
+complete -c screen -s d -d "Detach screen" -a "(__fish_complete_screen)"
+complete -c screen -s D -d "Detach screen" -a "(__fish_complete_screen)"
+complete -c screen -s r -d "Reattach session" -a "(__fish_complete_screen)"
+complete -c screen -s R -d "Reattach/create session"
+complete -c screen -o RR -d "Reattach/create any session"
+complete -c screen -s e -x -d "Escape character"
+complete -c screen -s f -d "Flow control on"
+complete -c screen -o fn -d "Flow control off"
+complete -c screen -o fa -d "Flow control automatic"
+complete -c screen -s h -x -d "History length"
+complete -c screen -s i -d "Interrupt display on C-c"
+complete -c screen -s l -d "Login on"
+complete -c screen -o ln -d "Login off"
+complete -c screen -o ls -d "List sessions"
+complete -c screen -o list -d "List sessions"
+complete -c screen -s L -d "Log on"
+complete -c screen -s m -d "Ignore $STY"
+complete -c screen -s O -d "Optimal output"
+complete -c screen -s p -d "Preselect window"
+complete -c screen -s q -d "Quiet mode"
+complete -c screen -s s -r -d "Set shell"
+complete -c screen -s S -x -d "Session name"
+complete -c screen -s t -x -d "Session title"
+complete -c screen -s U -d "UTF-8 mode"
+complete -c screen -s v -d "Display version"
+complete -c screen -o wipe -d "Wipe dead sessions"
+complete -c screen -s x -d "Multi attach"
+complete -c screen -s X -r -d "Send command"
+
diff --git a/init/completions/sed.fish b/init/completions/sed.fish
new file mode 100644
index 00000000..27ee7d6c
--- /dev/null
+++ b/init/completions/sed.fish
@@ -0,0 +1,12 @@
+complete -c sed -s n -l quiet -d "Silent mode"
+complete -c sed -l silent -d "Silent mode"
+complete -c sed -s e -l expression -x -d "Evaluate expression"
+complete -c sed -s f -l file -r -d "Evalute file"
+complete -c sed -s i -l in-place -d "Edit files in place"
+complete -c sed -s l -l line-length -x -d "Specify line-length"
+complete -c sed -l posix -d "Disable all GNU extensions"
+complete -c sed -s r -l regexp-extended -d "Use extended regexp"
+complete -c sed -s s -l separate -d "Consider files as separate"
+complete -c sed -s u -l unbuffered -d "Use minimal IO buffers"
+complete -c sed -l help -d "Display help and exit"
+complete -c sed -s V -l version -d "Display version and exit"
diff --git a/init/completions/service.fish b/init/completions/service.fish
new file mode 100644
index 00000000..878b6aab
--- /dev/null
+++ b/init/completions/service.fish
@@ -0,0 +1,7 @@
+
+# Fist argument is the names of the service, i.e. a file in /etc/init.d
+complete -c service -n "test (count (commandline -poc)) = 1" -xa "(command ls /etc/init.d)" -d "Service name"
+
+#The second argument is what action to take with the service
+complete -c service -n "test (count (commandline -poc)) -gt 1" -xa '$__fish_service_commands'
+
diff --git a/init/completions/set.fish b/init/completions/set.fish
new file mode 100644
index 00000000..57e860ab
--- /dev/null
+++ b/init/completions/set.fish
@@ -0,0 +1,45 @@
+
+complete -y set_color
+
+complete -c set -s e -l erase -d "Erase variable"
+complete -c set -s x -l export -d "Export variable to subprocess"
+complete -c set -s u -l unexport -d "Do not export variable to subprocess"
+complete -c set -s g -l global -d "Make variable scope global"
+complete -c set -s l -l local -d "Make variable scope local"
+complete -c set -s U -l universal -d "Make variable scope universal, i.e. shared between all fish terminals"
+complete -c set -s h -l help -d "Display help and exit"
+
+function __fish_set_is_first -d 'Test if no non-switch argument has been specified yet'
+ set -- cmd (commandline -poc)
+ set -e -- cmd[1]
+ for i in $cmd
+ switch $i
+ case '-*'
+
+ case '*'
+ return 1;
+ end
+ end
+ return 0
+end
+
+complete -c set -n '__fish_set_is_first' -x -a "(set|sed -e 's/ /\tVariable: /')"
+
+function __fish_set_is_color -d 'Test if We are specifying a color value for the prompt'
+ set -- cmd (commandline -poc)
+ set -e -- cmd[1]
+ for i in $cmd
+ switch $i
+
+ case 'fish_color_*' 'fish_pager_color_*'
+ return 0
+
+ case '-*'
+
+ case '*'
+ return 1
+ end
+ end
+end
+
+complete -c set -n '__fish_set_is_color' -x -a '$__fish_colors' -d Color
diff --git a/init/completions/set_color.fish b/init/completions/set_color.fish
new file mode 100644
index 00000000..76754dc5
--- /dev/null
+++ b/init/completions/set_color.fish
@@ -0,0 +1,5 @@
+set -g __fish_colors black red green brown blue magenta cyan white normal
+
+complete -c set_color -x -d "Color" -a '$__fish_colors'
+complete -c set_color -s b -l background -x -a '$__fish_colors'
+
diff --git a/init/completions/sort.fish b/init/completions/sort.fish
new file mode 100644
index 00000000..d4145562
--- /dev/null
+++ b/init/completions/sort.fish
@@ -0,0 +1,21 @@
+complete -c sort -s b -l ignore-leading-blanks -d "Ignore leading blanks"
+complete -c sort -s d -l dictionary-order -d "Consider only blanks and alphanumerics"
+complete -c sort -s f -l ignore-case -d "Ignore case"
+complete -c sort -s g -l general-numeric-sort -d "Compare general numeric value"
+complete -c sort -s i -l ignore-nonprinting -d "Consider only printable"
+complete -c sort -s M -l month-sort -d "Compare month names"
+complete -c sort -s n -l numeric-sort -d "Compare string numerical value"
+complete -c sort -s r -l reverse -d "Reverse results"
+complete -c sort -s c -l check -d "Only check if sorted"
+complete -c sort -s k -l key -d "Define key"
+complete -c sort -s m -l merge -d "Merge sorted files"
+complete -c sort -s o -l output -f -d "Write to file"
+complete -c sort -s s -l stable -d "Stabilize sort"
+complete -c sort -s S -l buffer-size -r -d "Set main memory buffer"
+complete -c sort -s t -l field-separator -d "Field separator"
+complete -c sort -s T -l temporary-directory -r -d "Set temporary directory"
+complete -c sort -s u -l unique -d "Output only first of equal lines"
+complete -c sort -s z -l zero-terminated -d "Lines end with 0 byte"
+complete -c sort -l help -d "Display help and exit"
+complete -c sort -l version -d "Display version and exit"
+
diff --git a/init/completions/ssh.fish b/init/completions/ssh.fish
new file mode 100644
index 00000000..e48f921a
--- /dev/null
+++ b/init/completions/ssh.fish
@@ -0,0 +1,106 @@
+#
+# Common completions for all ssh commands
+#
+
+for i in ssh scp
+ complete -c $i -s 1 -d "Protocall version 1 only"
+ complete -c $i -s 2 -d "Protocall version 2 only"
+ complete -c $i -s 4 -d "IPv4 addresses only"
+ complete -c $i -s 6 -d "IPv6 addresses only"
+ complete -c $i -s C -d "Compress all data"
+ complete -xc $i -s c -d "Encryption algorithm" -a "blowfish 3des des"
+ complete -r -c $i -s F -d "Configuration file"
+ complete -r -c $i -s i -d "Identity file"
+ complete -x -c $i -s o -d "Options" -a "
+ AddressFamily
+ BatchMode
+ BindAddress
+ ChallengeResponseAuthentication
+ CheckHostIP
+ Cipher
+ Ciphers
+ Compression
+ CompressionLevel
+ ConnectionAttempts
+ ConnectTimeout
+ ControlMaster
+ ControlPath
+ GlobalKnownHostsFile
+ GSSAPIAuthentication
+ GSSAPIDelegateCredentials
+ Host
+ HostbasedAuthentication
+ HostKeyAlgorithms
+ HostKeyAlias
+ HostName
+ IdentityFile
+ IdentitiesOnly
+ LogLevel
+ MACs
+ NoHostAuthenticationForLocalhost
+ NumberOfPasswordPrompts
+ PasswordAuthentication
+ Port
+ PreferredAuthentications
+ Protocol
+ ProxyCommand
+ PubkeyAuthentication
+ RhostsRSAAuthentication
+ RSAAuthentication
+ SendEnv
+ ServerAliveInterval
+ ServerAliveCountMax
+ SmartcardDevice
+ StrictHostKeyChecking
+ TCPKeepAlive
+ UsePrivilegedPort
+ User
+ UserKnownHostsFile
+ VerifyHostKeyDNS
+ "
+ complete -c $i -s v -d "Verbose mode"
+end;
+
+#
+# ssh specific completions
+#
+
+complete -x -c ssh -d Hostname -a "
+
+(__fish_print_hostnames)
+
+(
+ #Prepend any username specified in the completion to the hostname
+ echo (commandline -ct)|grep -o '.*@'
+)(__fish_print_hostnames)
+
+(__fish_print_users)@
+"
+
+complete -c ssh -s a -d "Disables forwarding of the authentication agent"
+complete -c ssh -s A -d "Enables forwarding of the authentication agent"
+complete -x -c ssh -s b -d "Interface to transmit from" -a "
+(
+ cat /proc/net/arp ^/dev/null| grep -v '^IP'|cut -d ' ' -f 1 ^/dev/null
+)
+"
+
+complete -x -c ssh -s e -d "Escape character" -a "^ none"
+complete -c ssh -s f -d "Go to background"
+complete -c ssh -s g -d "Allow remote host to connect to local forwarded ports"
+complete -c ssh -s I -d "Smartcard device"
+complete -c ssh -s k -d "Disable forwarding of Kerberos tickets"
+complete -c ssh -s l -x -a "(__fish_complete_users)" -d "User"
+complete -c ssh -s m -d "MAC algorithm"
+complete -c ssh -s n -d "Prevent reading from stdin"
+complete -c ssh -s N -d "Do not execute remote command"
+complete -c ssh -s p -x -d "Port"
+complete -c ssh -s q -d "Quiet mode"
+complete -c ssh -s s -d "Subsystem"
+complete -c ssh -s t -d "Force pseudo-tty allocation"
+complete -c ssh -s T -d "Disable pseudo-tty allocation"
+complete -c ssh -s x -d "Disable X11 forwarding"
+complete -c ssh -s X -d "Enable X11 forwarding"
+complete -c ssh -s L -d "Locally forwarded ports"
+complete -c ssh -s R -d "Remotely forwarded ports"
+complete -c ssh -s D -d "Dynamic port forwarding"
diff --git a/init/completions/su.fish b/init/completions/su.fish
new file mode 100644
index 00000000..6f89c18c
--- /dev/null
+++ b/init/completions/su.fish
@@ -0,0 +1,12 @@
+# Completions for su
+
+complete -x -c su -a "(__fish_complete_users)"
+complete -c su -s l -l login -d "Make login shell"
+complete -r -c su -s c -l command -d "Pass command to shell"
+complete -c su -s f -l fast -d "Pass -f to the shell"
+complete -c su -s m -l preserve_environment -d "Preserve environment"
+complete -c su -s p -d "Preserve environment"
+complete -x -c su -s s -l shell -a "(cat /etc/shells)"
+complete -c su -l help -d "Display help and exit"
+complete -c su -l version -d "Display version and exit"
+
diff --git a/init/completions/tar.fish b/init/completions/tar.fish
new file mode 100644
index 00000000..adce7b40
--- /dev/null
+++ b/init/completions/tar.fish
@@ -0,0 +1,62 @@
+complete -c tar -s A -l catenate -d "Append archive to archive"
+complete -c tar -l concatenate -d "Append archive to archive"
+complete -c tar -s c -l create -d "Create archive"
+complete -c tar -s d -l diff -d "Compare archive and filesystem"
+complete -c tar -l compare -d "Compare archive and filesystem"
+complete -c tar -l delete -d "Delete from archive"
+complete -c tar -s r -l append -d "Append files to archive"
+complete -c tar -s t -l list -d "List archive"
+complete -c tar -s u -l update -d "Append new files"
+complete -c tar -s x -l extract -d "Extract from archive"
+complete -c tar -l get -d "Extract from archive"
+complete -c tar -l atime-preserve -d "Keep access time"
+complete -c tar -s b -l block-size -d "Block size"
+complete -c tar -s B -l read-full-blocks -d "Reblock while reading"
+complete -c tar -s C -l directory -r -d "Change directory"
+complete -c tar -l checkpoint -d "Print directory names"
+complete -c tar -s f -l file -r -d "Archive file"
+complete -c tar -l force-local -d "Archive is local"
+complete -c tar -s F -l info-script -d "Run script at end of tape"
+complete -c tar -s G -l incremental -d "Use old incremental GNU format"
+complete -c tar -s g -l listed-incremental -d "Use new incremental GNU format"
+complete -c tar -s h -l dereference -d "Derefrerence symlinks"
+complete -c tar -s i -l ignore-zeros -d "Ignore zero bloch in archive"
+complete -c tar -s j -l bzip -d "Filter through bzip2"
+complete -c tar -l ignore-failed-read -d "Dont exit on unreadable files"
+complete -c tar -s k -l keep-old-files -d "Do not overwrite"
+complete -c tar -s K -l starting-file -r -d "Starting file in archive"
+complete -c tar -s l -l one-file-system -d "Stay in local filesystem"
+complete -c tar -s L -l tape-length -r -d "Tape length"
+complete -c tar -s m -l modification-time -d "Dont extract modification time"
+complete -c tar -s M -l multi-volume -d "Multi volume archive"
+complete -c tar -s N -l after-date -r -d "Only store newer files"
+complete -c tar -s o -l old-archive -d "Use V7 format"
+complete -c tar -l portability -d "Use V7 format"
+complete -c tar -s O -l to-stdout -d "Extract to stdout"
+complete -c tar -s p -l same-permissions -d "Extract all permissions"
+complete -c tar -l preserve-permissions -d "Extract all permissions"
+complete -c tar -s P -l absolute-paths -d "Dont strip leading /"
+complete -c tar -l preserve -d "Preserve all permissions and do not sort file arguments"
+complete -c tar -s R -l record-number -d "Show record number"
+complete -c tar -l remove-files -d "Remove files after adding to archive"
+complete -c tar -s s -l same-order -d "Do not sort file arguments"
+complete -c tar -l preserve-order -d "Do not sort file arguments"
+complete -c tar -l same-owner -d "Preserve file ownership"
+complete -c tar -s S -l sparse -d "Handle sparse files"
+complete -c tar -s T -l files-from -r -d "Extract file from file"
+complete -c tar -l null -d "-T has null-terminated names"
+complete -c tar -l totals -d "Print total bytes written"
+complete -c tar -s v -l verbose -d "Vorbose mode"
+complete -c tar -s V -l label -r -d "Set volume name"
+complete -c tar -l version -d "Display version and exit"
+complete -c tar -s w -l interactive -d "Ask for confirmation"
+complete -c tar -l confirmation -d "Ask for confirmation"
+complete -c tar -s W -l vevrify -d "Verify archive"
+complete -c tar -l exclude -r -d "Exclude file"
+complete -c tar -s X -l exclude-from -r -d "Exclude files listed in specified file"
+complete -c tar -s Z -l compress -d "Filter through compress"
+complete -c tar -l uncompress -d "Filter through compress"
+complete -c tar -s z -l gzip -d "Filter through gzip"
+complete -c tar -l gunzip -d "Filter through gzip"
+complete -c tar -l use-compress-program -r -d "Filter through specified program"
+
diff --git a/init/completions/test.fish b/init/completions/test.fish
new file mode 100644
index 00000000..2039fce5
--- /dev/null
+++ b/init/completions/test.fish
@@ -0,0 +1,39 @@
+
+complete -c test -l help -d "Display help and exit"
+complete -c test -l version -d "Display version and exit"
+complete -c test -a ! -d "Negate expression"
+complete -c test -s a -d "Logical and"
+complete -c test -s o -d "Logical or"
+complete -c test -s n -d "String length is non-zero"
+complete -c test -s z -d "String length is zero"
+complete -c test -a = -d "Strings are equal"
+complete -c test -a != -d "Strings are not equal"
+complete -c test -o eq -d "Integers are equal"
+complete -c test -o ge -d "Left integer larger than or equal to right integer"
+complete -c test -o gt -d "Left integer larger than right integer"
+complete -c test -o le -d "Left integer less than or equal to right integer"
+complete -c test -o lt -d "Left integer less than right integer"
+complete -c test -o ne -d "Left integer not equal to right integer"
+complete -c test -o ef -d "Left file equal to right file"
+complete -c test -o nt -d "Left file newer than right file"
+complete -c test -o ot -d "Left file older than right file"
+complete -c test -s b -d "File is block device"
+complete -c test -s c -d "File is character device"
+complete -c test -s d -d "File is directory"
+complete -c test -s e -d "File exists"
+complete -c test -s f -d "File is regular"
+complete -c test -s g -d "File is set-group-ID"
+complete -c test -s h -d "File is symlink"
+complete -c test -s G -d "File owned by effective group ID"
+complete -c test -s k -d "File has sticky bit set"
+complete -c test -s L -d "File is symlink"
+complete -c test -s O -d "File owned by effective user ID"
+complete -c test -s p -d "File is named pipe"
+complete -c test -s r -d "File is readable"
+complete -c test -s s -d "File size is non-zero"
+complete -c test -s S -d "File is socket"
+complete -c test -s t -d "FD is terminal"
+complete -c test -s u -d "File set-user-ID bit is set"
+complete -c test -s w -d "File is writable"
+complete -c test -s x -d "File is executable"
+
diff --git a/init/completions/tokenize.fish b/init/completions/tokenize.fish
new file mode 100644
index 00000000..242f434c
--- /dev/null
+++ b/init/completions/tokenize.fish
@@ -0,0 +1,3 @@
+complete -c tokenize -s e -l with-empty -d "Allow empty tokens"
+complete -c tokenize -s n -l no-empty -d "Ignore empty tokens"
+complete -c tokenize -s d -l delimiter -d "Delimiters for tokenization"
diff --git a/init/completions/top.fish b/init/completions/top.fish
new file mode 100644
index 00000000..e19d45ee
--- /dev/null
+++ b/init/completions/top.fish
@@ -0,0 +1,14 @@
+# Completions for top
+complete -c top -s b -d "Batch mode"
+complete -c top -s c -d "Toggle command line/program name"
+complete -c top -s d -d "Update interval" -x
+complete -c top -s h -d "Display help and exit"
+complete -c top -s i -d "Toggle idle processes"
+complete -c top -s n -d "Maximium iterations" -x
+complete -c top -s u -d "Monitor effective UID" -x -a "(__fish_complete_users)"
+complete -c top -s U -d "Monitor user" -x -a "(__fish_complete_users)"
+complete -c top -s p -d "Monitor PID" -x -a "(__fish_complete_pids)"
+complete -c top -s s -d "Secure mode"
+complete -c top -s S -d "Cumulative mode"
+complete -c top -s v -d "Display version and exit"
+
diff --git a/init/completions/touch.fish b/init/completions/touch.fish
new file mode 100644
index 00000000..383ce6ba
--- /dev/null
+++ b/init/completions/touch.fish
@@ -0,0 +1,11 @@
+complete -c touch -s a -d "Change access time"
+complete -c touch -s B -l backward -x -d "Set date back"
+complete -c touch -s c -l no-create -d "Do not create file"
+complete -c touch -s d -l date -x -d "Set date"
+complete -c touch -s f -l forward -x -d "Set date forward"
+complete -c touch -s m -d "Change modification time"
+complete -c touch -s r -l reference -d "Use this files times"
+complete -c touch -s t -d "Set date"
+complete -c touch -l time -x -d "Set time"
+complete -c touch -l help -d "Display help and exit"
+complete -c touch -l version -d "Display version nd exit"
diff --git a/init/completions/uname.fish b/init/completions/uname.fish
new file mode 100644
index 00000000..3193b177
--- /dev/null
+++ b/init/completions/uname.fish
@@ -0,0 +1,11 @@
+complete -c uname -s a -l all -d "Print all"
+complete -c uname -s s -l kernel-name -d "Print kernel name"
+complete -c uname -s n -l nodename -d "Print network node hostname"
+complete -c uname -s r -l kernel-release -d "Print kernel release"
+complete -c uname -s v -l kernel-version -d "Print kernel version"
+complete -c uname -s m -l machine -d "Print machine name"
+complete -c uname -s p -l processor -d "Print procssor"
+complete -c uname -s i -l hardware-platform -d "Print harware platform"
+complete -c uname -s o -l operating-system -d "Print operating system"
+complete -c uname -l help -d "Print help"
+complete -c uname -l verion -d "Print version"
diff --git a/init/completions/uniq.fish b/init/completions/uniq.fish
new file mode 100644
index 00000000..a574212a
--- /dev/null
+++ b/init/completions/uniq.fish
@@ -0,0 +1,15 @@
+complete -c uniq -s c -l count -d "Print number of occurences"
+complete -c uniq -s d -l repeated -d "Only print duplicates"
+complete -c uniq -s D -l all-repeated -d "Remove non-suplicate lines" -f -x -a "
+ none\t'Remove none-duplicate lines'
+ prepend\t'Remove non-duplicate lines and print an empty line before each non-duplicate'
+ separate\t'Remove non-duplicate lines and print an empty line between each non-duplicate'
+"
+complete -c uniq -s f -l skip-fields -d "Avoid comparing first N fields" -r
+complete -c uniq -s i -l ignore-case -d "Case insensitive"
+complete -c uniq -s s -l skip-chars -d "Avoid comparing first N characters" -r
+complete -c uniq -s u -l unique -d "Only print unique lines"
+complete -c uniq -s w -l check-chars -d "Compare only N characters" -r
+complete -c uniq -l help -d "Display help and exit"
+complete -c uniq -l version -d "Display version and exit"
+
diff --git a/init/completions/valgrind.fish b/init/completions/valgrind.fish
new file mode 100644
index 00000000..e95d3d30
--- /dev/null
+++ b/init/completions/valgrind.fish
@@ -0,0 +1,72 @@
+
+if valgrind --version | grep -- '-2\.[012]\.' >/dev/null ^/dev/null
+ # In older versions of Valgrind, the skin selection option was
+ # '--skin'
+ set -g skin skin
+else
+ # But someone decided that it would be fun to change this to
+ # '--tool' for no good reason
+ set -g skin tool
+end
+
+complete -xc valgrind -l $skin -d "Skin" -a "
+ memcheck\tHeavyweight\ memory\ checker
+ cachegrind\tCache-miss\ profiler
+ addrcheck\tLightweight\ memory\ checker
+ helgrind\tData-race\ detector
+ massif\tHeap\ profiler
+"
+set -e $skin
+
+complete -c valgrind -l help -d "Display help and exit"
+complete -c valgrind -l help-debug -d "Display help and debug options"
+complete -c valgrind -l version -d "Print version"
+complete -c valgrind -s q -l quiet -d "Run silently"
+complete -c valgrind -s v -l verbose -d "Verbose mode"
+complete -xc valgrind -l trace-children -d "Valgrind-ise children" -a "yes no"
+complete -xc valgrind -l track-fds -d "Track file descriptors" -a "yes no"
+complete -xc valgrind -l logfile-fd -d "Log to file descriptor" -a "0 1 2 3 4 5 6 7 8 9"
+complete -rc valgrind -l logfile -d "Log to file"
+complete -xc valgrind -l logsocket -d "Log to socket"
+complete -c valgrind -l demangle -xd "Demangle C++ names" -a "yes no"
+complete -xc valgrind -l num-callers -d "Callers in stack trace"
+complete -xc valgrind -l error-limit -d "Stop showing errors if too many" -a "yes no"
+complete -xc valgrind -l show-below-main -d "Continue trace below main()" -a "yes no"
+complete -rc valgrind -l supressions -d "Supress errors from file"
+complete -c valgrind -l gen-supressions -d "Print suppressions for detected errors"
+complete -xc valgrind -l db-attach -d "Start debugger on error" -a "yes no"
+complete -rc valgrind -l db-command -d "Debugger command"
+complete -xc valgrind -l input-fd -d "File descriptor for input" -a "0 1 2 3 4 5 6 7 8 9"
+
+
+# Memcheck-specific options
+complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l leak-check -d "Check for memory leaks" -a "no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'"
+complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l show-reachable -d "Show reachable leaked memory" -a "yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'"
+complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l leak-resolution -d "Determines how willing Memcheck is to consider different backtraces to be the same" -a "low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'"
+complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l freelist-vol -d "Set size of freed memory pool"
+complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l partial-loads-ok -d 'How to handle loads of words that are partially addressible' -a 'yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads"'
+complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l avoid-strlen-errors -d 'Whether to skip error reporting for the strlen function' -a 'yes no'
+
+
+# Addrcheck-specific options
+complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l leak-check -d "Check for memory leaks" -a "no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'"
+complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l show-reachable -d "Show reachable leaked memory" -a "yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'"
+complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l leak-resolution -d "Determines how willing Addrcheck is to consider different backtraces to be the same" -a "low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'"
+complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l freelist-vol -d "Set size of freed memory pool"
+complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l partial-loads-ok -d 'How to handle loads of words that are partially addressible' -a 'yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads"'
+complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l avoid-strlen-errors -d 'Whether to skip error reporting for the strlen function' -a 'yes no'
+
+# Cachegrind-specific options
+complete -n "contains -- --skin=cachegrind (commandline -cpo)" -xc valgrind -l I1 -d "Type of L1 instruction cache"
+complete -n "contains -- --skin=cachegrind (commandline -cpo)" -xc valgrind -l D1 -d "Type of L1 data cache"
+complete -n "contains -- --skin=cachegrind (commandline -cpo)" -xc valgrind -l L2 -d "Type of L2 cache"
+
+
+# Massif-specific options
+complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -l alloc-fn -d "Specify a function that allocates memory"
+complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l heap -d 'Profile heap usage' -a 'yes\t"Profile heap usage" no\t"Do not profile heap usage"'
+complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l heap-admin -d "The number of bytes of heap overhead per allocation"
+complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l stacks -d "Profile stack usage" -a 'yes\t"Profile stack usage" no\t"Do not profile stack usage"'
+complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l depth -d "Depth of call chain"
+complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l format -d "Profiling output format" -a "html\t'Produce html output' text\t'Produce text output'"
+
diff --git a/init/completions/vared.fish b/init/completions/vared.fish
new file mode 100644
index 00000000..fea93201
--- /dev/null
+++ b/init/completions/vared.fish
@@ -0,0 +1,3 @@
+complete -c vared -x -a "(set|sed -e 's/ /\tVariable: /')"
+complete -c vared -s h -l help -d "Display help and exit"
+
diff --git a/init/completions/w.fish b/init/completions/w.fish
new file mode 100644
index 00000000..54abe5d1
--- /dev/null
+++ b/init/completions/w.fish
@@ -0,0 +1,6 @@
+complete -c w -s h -d "Dont print header"
+complete -c w -s u -d "Ignore username for time calculations"
+complete -c w -s s -d "Short format"
+complete -c w -s f -d "Toggle printing of remote hostname"
+complete -c w -s V -d "Display version and exit"
+complete -c w -x -a "(__fish_complete_users)" -d "Username"
diff --git a/init/completions/wc.fish b/init/completions/wc.fish
new file mode 100644
index 00000000..a9c2dcc3
--- /dev/null
+++ b/init/completions/wc.fish
@@ -0,0 +1,7 @@
+complete -c wc -s c -l bytes -d "Print byte counts"
+complete -c wc -s m -l chars -d "Print character counts"
+complete -c wc -s l -l lines -d "Print newline counts"
+complete -c wc -s L -l max-line-length -d "Print length of longest line"
+complete -c wc -s w -l words -d "Print word counts"
+complete -c wc -l help -d "Display help and exit"
+complete -c wc -l version -d "Display version and exit"
diff --git a/init/completions/wget.fish b/init/completions/wget.fish
new file mode 100644
index 00000000..42bb4cea
--- /dev/null
+++ b/init/completions/wget.fish
@@ -0,0 +1,110 @@
+
+complete -c wget -s V -l version -d "Display version and exit"
+complete -c wget -s h -l help -d "Display help and exit"
+complete -c wget -s b -l background -d "Go to background immediately after startup"
+complete -c wget -s e -l execute -d "Execute command as if part of .wgetrc" -x
+complete -c wget -s o -l output-file -d "Log all messages to logfile" -f
+complete -c wget -s a -l append-output -d "Append all messages to logfile"
+complete -c wget -s d -l debug -d "Turn on debug output"
+complete -c wget -s q -l quiet -d "Turn off Wget"\’"s output"
+complete -c wget -s v -l verbose -d "Turn on verbose output"
+complete -c wget -l non-verbose -d "Turn off verbose without being completely quiet"
+complete -c wget -o nv -d "Turn off verbose without being completely quiet"
+complete -c wget -s i -l input-file -d "Read URLs from file" -f
+complete -c wget -s F -l force-html -d "Force input to be treated as HTML"
+complete -c wget -s B -l base -d "Prepend string to relative links" -x
+complete -c wget -l bind-adress -d "Bind address on local machine" -xa "(__fish_print_addresses; __fish_print_hostnames)"
+complete -c wget -s t -l tries -d "Set number of retries to number" -xa "0 1 2 4 8 16 32 64 128"
+complete -c wget -s O -l output-document -d "Concatenate output to file" -f
+complete -c wget -l no-clobber -d "Never overwrite files with same name"
+complete -c wget -o nc -d "Never overwrite files with same name"
+complete -c wget -s c -l continue -d "Continue getting a partially-downloaded file"
+complete -c wget -l progress -d "Select progress meter type" -a "
+dot\t'Print one dot for every kB of data, 50 dots per line'
+dot:default\t'Print one dot for every kB of data, 50 dots per line'
+dot:binary\t'Print one dot for every 8 kB of data, 48 dots per line'
+dot:mega\t'Print one dot for every 64 kB of data, 48 dots per line'
+bar\t'Print progress bar'
+"
+complete -c wget -s N -l timestamping -d "Turn on time-stamping"
+complete -c wget -s S -l server-response -d "Print the headers/responses sent by servers"
+complete -c wget -l spider -d "Do not download the pages, just check that they are there"
+complete -c wget -s T -l timeout -d "Set the network timeout" -x
+complete -c wget -l dns-timeout -d "Set the DNS lookup timeout" -x
+complete -c wget -l connect-timeout -d "Set the connect timeout" -x
+complete -c wget -l read-timeout -d "Set the read (and write) timeout" -x
+complete -c wget -l limit-rate -d "Limit the download speed" -x
+complete -c wget -s w -l wait -d "Wait the specified number of seconds between the retrievals" -x
+complete -c wget -l waitretry -d "Wait time between retries" -x
+complete -c wget -l random-wait -d "Wait random amount of time between retrievals"
+complete -c wget -s Y -l proxy -d "Toggle proxy support" -xa "on off"
+complete -c wget -s Q -l quota -d "Specify download quota for automatic retrievals" -x
+complete -c wget -l dns-cache -d "Turn off caching of DNS lookups" -xa "off"
+complete -c wget -l restrict-file-names -d "Change which characters found in remote URLs may show up in local file names" -a "
+unix\t'Escape slash and non-printing characters'
+windows\t'Escape most non-alphabetical characters'
+"
+
+# HTTP options
+
+complete -c wget -l no-directories -d "Do not create a hierarchy of directories"
+complete -c wget -o nd -d "Do not create a hierarchy of directories"
+complete -c wget -s x -l force-directories -d "Force creation of a hierarchy of directories"
+complete -c wget -l no-host-directories -d "Disable generation of host-prefixed directories"
+complete -c wget -o nH -d "Disable generation of host-prefixed directories"
+complete -c wget -l protocal-directories -d "Use the protocol name as a directory component"
+complete -c wget -l cut-dirs -d "Ignore specified number of directory components" -xa "1 2 3 4 5"
+complete -c wget -s P -l directory-prefix -d "Set directory prefix" -f
+complete -c wget -s E -l html-extension -d "Force html files to have html extension"
+complete -c wget -l http-user -d "Specify the http username" -xa "(__fish_complete_users)"
+complete -c wget -l http-passwd -d "Specify the http password" -x
+complete -c wget -l no-cache -d "Disable server-side cache"
+complete -c wget -l no-cookies -d "Disable the use of cookies"
+complete -c wget -l load-cookies -d "Load cookies from file" -f
+complete -c wget -l save-cookies -d "Save cookies to file"
+complete -c wget -l keep-session-cookies -d "Save session cookies"
+complete -c wget -l ignore-length -d "Ignore 'Content-Length' header"
+complete -c wget -l header -d "Define an additional-header to be passed to the HTTP servers" -x
+complete -c wget -l proxy-user -d "Specify the proxy username" -xa "(__fish_complete_users)"
+complete -c wget -l proxy-password -d "Specify the proxy password" -x
+complete -c wget -l referer -d "Set referer URL" -x
+complete -c wget -l save-headers -d "Save the headers sent by the HTTP server"
+complete -c wget -s U -l user-agent -d "Identify as agent-string" -x
+complete -c wget -l post-data -d "Use POST as the method for all HTTP requests and send the specified data in the request body" -x
+complete -c wget -l post-file -d "Use POST as the method for all HTTP requests and send the specified data in the request body" -f
+complete -c wget -l no-http-keep-alive -d "Turn off keep-alive for http downloads"
+
+#FTP options
+
+complete -c wget -l no-remove-listing -d "Don"\’"t remove the temporary .listing files generated"
+complete -c wget -l no-glob -d "Turn off FTP globbing"
+complete -c wget -l passive-ftp -d "Use the passive FTP retrieval scheme"
+complete -c wget -l retr-symlinks -d "Traverse symlinks and retrive pointed-to files"
+
+# Recursive options
+
+complete -c wget -s r -l recursive -d "Turn on recursive retrieving"
+complete -c wget -n '__fish_contains_opt -s r recursive' -s l -l level -d "Specify recursion maximum depth" -x
+complete -c wget -l delete-after -d "delete every single file downloaded"
+complete -c wget -s k -l convert-links -d "convert the links in the document to make them suitable for local viewing"
+complete -c wget -s K -l backup-converted -d "Back up the original version"
+complete -c wget -s m -l mirror -d "Turn on options suitable for mirroring"
+complete -c wget -s p -l page-requisites -d "download all the files that are necessary to properly display a given HTML page"
+complete -c wget -l strict-comments -d "Turn on strict parsing of HTML comments"
+
+#Recursive accept/reject options
+
+complete -c wget -s A -l accept -d "comma-separated lists of file name suffixes or patterns to accept" -x
+complete -c wget -s R -l reject -d "comma-separated lists of file name suffixes or patterns to reject" -x
+complete -c wget -s D -l domains -d "Set domains to be followed" -x
+complete -c wget -l exclude-domains -d "Specify the domains that are not to be followed" -x
+complete -c wget -l follow-ftp -d "Follow FTP links from HTML documents"
+complete -c wget -l follow-tags -d "HTML tags to follow" -x
+complete -c wget -l ignore-tags -d "HTML tags to ignore" -x
+complete -c wget -s H -l span-hosts -d "Enable spanning across hosts"
+complete -c wget -s L -l relative -d "Follow relative links only"
+complete -c wget -s I -l include-directories -d "Specify a comma-separated list of directories you wish to follow" -x
+complete -c wget -s X -l exclude-directories -d "Specify a comma-separated list of directories you wish to exclude" -x
+complete -c wget -l no-parent -d "Do not ever ascend to the parent directory"
+complete -c wget -o np -d "Do not ever ascend to the parent directory"
+
diff --git a/init/completions/whatis.fish b/init/completions/whatis.fish
new file mode 100644
index 00000000..17a8f626
--- /dev/null
+++ b/init/completions/whatis.fish
@@ -0,0 +1,3 @@
+complete -y man
+
+complete -xc whatis -a "(__fish_complete_man)"
diff --git a/init/completions/who.fish b/init/completions/who.fish
new file mode 100644
index 00000000..1d788453
--- /dev/null
+++ b/init/completions/who.fish
@@ -0,0 +1,20 @@
+complete -c who -s a -l all -d "Same as -b -d --login -p -r -t -T -u"
+complete -c who -s b -l boot -d "Print time of last boot"
+complete -c who -s d -l dead -d "Print dead processes"
+complete -c who -s H -l heading -d "Print line of headings"
+complete -c who -s i -l idle -d "Print idle time"
+complete -c who -s l -l login -d "Print login process"
+complete -c who -l lookup -d "Canonicalize hostnames via DNS"
+complete -c who -s m -d "Print hostname and user for stdin"
+complete -c who -s p -l process -d "Print active processes spawned by init"
+complete -c who -s q -l count -d "Print all login names and number of users logged on"
+complete -c who -s r -l runlevel -d "Print current runlevel"
+complete -c who -s s -l short -d "Print name, line, and time"
+complete -c who -s t -l time -d "Print last system clock change"
+complete -c who -s T -l mesg -d "Print users message status as +, - or ?"
+complete -c who -s w -l writable -d "Print users message status as +, - or ?"
+complete -c who -l message -d "Print users message status as +, - or ?"
+complete -c who -s u -l users -d "List users logged in"
+complete -c who -l help -d "Print help and exit"
+complete -c who -l version -d "Print version and exit"
+
diff --git a/init/completions/xprop.fish b/init/completions/xprop.fish
new file mode 100644
index 00000000..058d20c7
--- /dev/null
+++ b/init/completions/xprop.fish
@@ -0,0 +1,32 @@
+
+complete -c xprop -o help -d "Display help and exit"
+complete -c xprop -o grammar -d "Display grammar and exit"
+complete -c xprop -o id -x -d "Select window by id"
+complete -c xprop -o name -d "Select window by name"
+complete -c xprop -o font -x -d "Display font properties"
+complete -c xprop -o root -d "Select root window"
+complete -c xprop -o display -d "Specify X server"
+complete -c xprop -o len -x -d "Maximum display length"
+complete -c xprop -o notype -d "Do not show property type"
+complete -c xprop -o fs -r -d "Set format file"
+complete -c xprop -o frame -d "Select window manager frame"
+complete -c xprop -o remove -d "Remove property" -x -a "
+(
+ xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1
+)
+"
+
+complete -c xprop -o set -d "Set property" -x -a "
+(
+ xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1
+)
+"
+
+complete -c xprop -o spy -d "Examine property updates forever"
+complete -c xprop -o f -d "Set format"
+complete -c xprop -d Property -x -a "
+(
+ xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1
+)
+"
+
diff --git a/init/completions/xsel.fish b/init/completions/xsel.fish
new file mode 100644
index 00000000..958c4f87
--- /dev/null
+++ b/init/completions/xsel.fish
@@ -0,0 +1,18 @@
+complete -c xsel -s a -l append -d "Append input to selection"
+complete -c xsel -s f -l follow -d "Append to selection as input grows"
+complete -c xsel -s i -l input -d "Read into selection"
+complete -c xsel -s o -l output -d "Write selection"
+complete -c xsel -s c -l clear -d "Clear selection"
+complete -c xsel -s d -l delete -d "Delete selection"
+complete -c xsel -s p -l primary -d "Use primary selection"
+complete -c xsel -s s -l secondary -d "Use secondary selection"
+complete -c xsel -s b -l clipboard -d "Use clipboard selection"
+complete -c xsel -s k -l keep -d "Make current selections persistent after program exit"
+complete -c xsel -s x -l exchange -d "Exchange primary and secondary selections"
+complete -c xsel -l display -x -d "X server display"
+complete -c xsel -s t -l selectionTimeout -d "Timeout for retrieving selection"
+complete -c xsel -s l -l logfile -f -d "Error log"
+complete -c xsel -s n -l nodetach -d "Do not detach from the controlling terminal"
+complete -c xsel -s h -l help -d "Display help and exit"
+complete -c xsel -s v -l verbose -d "Print informative messages"
+complete -c xsel -l version -d "Display version and exit"
diff --git a/init/completions/yum.fish b/init/completions/yum.fish
new file mode 100644
index 00000000..07731251
--- /dev/null
+++ b/init/completions/yum.fish
@@ -0,0 +1,75 @@
+
+#Load rpm completions, since that is where the package completion function is defined
+complete -y rpm
+
+#All yum commands
+
+#Test if the yum command has been specified
+function __fish_yum_has_command
+ set modes install update check-update upgrade remove erase list provides whatprovides search info clean generate-rss
+ for i in (commandline -poc);
+ if contains $i $modes
+ return 1
+ end
+ end
+ return 0;
+end
+
+#Test if completing using package names is appropriate
+function __fish_yum_package_ok
+ for i in (commandline -poc)
+ if contains $i update upgrade remove erase
+ return 0
+ end
+ end
+ return 1
+end
+
+complete -c yum -n '__fish_yum_has_command' -xa "
+ install\t'Install the latest version of a package'
+ update\t'Update specified packages (defaults to all packages)'
+ check-update\t'Print list of available updates'
+ upgrade\t'Update specified packages including obsoletes (defaults to all packages)'
+ remove\t'remove the specified packages and packages that depend on them'
+ erase\t'remove the specified packages and packages that depend on them'
+ list\t'List information about avaialble packages'
+ provides\t'Find package providing a feature or file'
+ whatprovides\t'Find package providing a feature or file'
+ search\t'find packages matching description regexp'
+ info\t'List information about available packages'
+ clean\t'Clean up cache directory'
+ generate-rss\t'Generate rss changelog'
+"
+
+complete -c yum -n '__fish_yum_package_ok' -a "(__fish_print_packages)"
+
+complete -c yum -s h -l help -d "Display help and exit"
+complete -c yum -s y -d "Assume yes to all questions"
+complete -c yum -s c -d "Configuration file" -r
+complete -c yum -s d -d "Set debug level" -x
+complete -c yum -s e -d "Set error level" -x
+complete -c yum -s t -l tolerant -d "Be tolerant of errors in commandline"
+complete -c yum -s R -d "Set maximum delay between commands" -x
+complete -c yum -s c -d "Run commands from cache"
+complete -c yum -l version -d "Display version and exit"
+complete -c yum -l installroot -d "Specify installroot" -r
+complete -c yum -l enablerepo -d "Enable repository" -r
+complete -c yum -l disablerepo -d "Disable repository" -r
+complete -c yum -l obsoletes -d "Enables obsolets processing logic"
+complete -c yum -l rss-filename -d "Output rss-data to file" -r
+complete -c yum -l exclude -d "Exclude specified package from updates" -a "(__fish_print_packages)"
+
+complete -c yum -n 'contains list (commandline -poc)' -a "
+ all\t'List all packages'
+ available\t'List packages available for installation'
+ updates\t'List packages with updates available'
+ installed\t'List installed packages'
+ extras\t'List packages not available in repositories'
+ obsoletes\t'List packages that are obsoleted by packages in repositories'
+"
+
+complete -c yum -n 'contains clean (commandline -poc)' -x -a "
+ packages\t'Delete cached package files'
+ headers\t'Delete cached header files'
+ all\t'Delete all cache contents'
+" \ No newline at end of file
diff --git a/init/completions/zcat.fish b/init/completions/zcat.fish
new file mode 100644
index 00000000..7cab174f
--- /dev/null
+++ b/init/completions/zcat.fish
@@ -0,0 +1,10 @@
+complete -c zcat -x -a "(
+ __fish_complete_suffix (commandline -ct) .gz 'Compressed file'
+ __fish_complete_suffix (commandline -ct) .tgz 'Compressed archive'
+)
+"
+complete -c zcat -s f -l force -d "Overwrite"
+complete -c zcat -s h -l help -d "Display help"
+complete -c zcat -s L -l license -d "Print license"
+complete -c zcat -s V -l version -d "Display version"
+
diff --git a/init/completions/zip.fish b/init/completions/zip.fish
new file mode 100644
index 00000000..f00298e1
--- /dev/null
+++ b/init/completions/zip.fish
@@ -0,0 +1,32 @@
+# Completions for zip
+complete -c zip -s f -d "Freshen: only changed files"
+complete -c zip -s d -d "Delete entries in zipfile"
+complete -c zip -s u -d "Update: only changed or newer files"
+complete -c zip -s m -d "Move into zipfile (delete files)"
+complete -c zip -s r -d "Recurse into directories"
+complete -c zip -s j -d "Junk directory names"
+complete -c zip -s 0 -d "Store only"
+complete -c zip -s l -d "Convert LF to CR LF"
+complete -c zip -o ll -d "Convert CR LF to LF"
+complete -c zip -s 1 -d "Compress faster"
+complete -c zip -s 9 -d "Compress better"
+complete -c zip -s q -d "Quiet operation"
+complete -c zip -s v -d "Verbose operation"
+complete -c zip -s c -d "Add one-line comments"
+complete -c zip -s z -d "Add zipfile comments"
+complete -c zip -s @ -d "Read names from stdin"
+complete -c zip -s o -d "Make zipfile as old as the latest entry"
+complete -c zip -s x -r -d "Exclude the following names"
+complete -c zip -s i -r -d "Include only the following names"
+complete -c zip -s F -d "Fix zipfile"
+complete -c zip -o FF -d "Fix zipfile (try harder)"
+complete -c zip -s A -d "Adjust self-extracting exe"
+complete -c zip -s J -d "Junk zipfile prefix"
+complete -c zip -s T -d "Test zipfile integrity"
+complete -c zip -s X -d "Exclude extra file attributes"
+complete -c zip -s y -d "Store symbolic links as links"
+complete -c zip -s R -d "PKZIP recursion"
+complete -c zip -s e -d "Encrypt"
+complete -c zip -s n -r -d "Don\'t compress these suffixes"
+complete -c zip -s h -d "Usage"
+
diff --git a/init/fish.in b/init/fish.in
new file mode 100644
index 00000000..39677f04
--- /dev/null
+++ b/init/fish.in
@@ -0,0 +1,84 @@
+#
+# Init file for fish
+#
+
+
+#
+# Set default field separators
+#
+
+set IFS \ \t\n
+
+
+#
+# Add a few common directories to path, if they exists. Note that pure
+# console programs like makedep sometimes live in /usr/X11R6/bin, so we
+# want this even for text-only terminals.
+#
+
+for i in /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
+ if test -d $i
+ if echo $PATH|grep $i >/dev/null
+ else
+ set PATH $PATH $i
+ end
+ end
+end
+
+
+#
+# Set some value for LANG if nothing was set before
+#
+
+if status --is-login
+ if not count $LANG >/dev/null
+ set -gx LANG en_US.UTF-8
+ end
+end
+
+
+#
+# Put linux console in unicode mode. Should this be done in any other
+# situation as well?
+#
+
+if count $LANG >/dev/null
+ if test (expr match $LANG ".*UTF") -gt 0
+ if count $TERM >/dev/null
+ if test linux = $TERM
+ unicode_start ^/dev/null
+ end
+ end
+ end
+end
+
+
+#
+# Load additional initialization files
+#
+
+if test -d fish.d
+# If this file is installed in /etc, the subdirectory is called fish.d
+ for i in fish.d/*.fish
+ . $i
+ end
+else
+ if test -d .fish.d
+ # If this file is installed in ~, the subdirectory is called .fish.d
+ for i in .fish.d/*.fish
+ . $i
+ end
+ end
+end
+
+
+#
+# There are variables that contain colons that are not arrays. This
+# reverts them back to regular strings.
+#
+
+for i in DISPLAY
+ if test (count $$i) -gt 1
+ set -- $i (printf ":%s" $$i|cut -c 2-)
+ end
+end \ No newline at end of file
diff --git a/init/fish_complete.fish b/init/fish_complete.fish
new file mode 100644
index 00000000..07714217
--- /dev/null
+++ b/init/fish_complete.fish
@@ -0,0 +1,249 @@
+# Main file for fish command completions. This file contains various
+# common helper functions for the command completions. All actual
+# completions are located in the completions subdirectory.
+
+#
+# Don't need completions in non-interactive mode
+#
+
+if not status --is-interactive
+ exit
+end
+
+set -g fish_complete_path /etc/fish.d/completions ~/.fish.d/completions
+
+# Knowing the location of the whatis database speeds up command
+# description lookup.
+
+for i in /var/cache/man/{whatis,windex} /usr{,/local}{,/share}/man/{whatis,windex}
+ if test -f $i
+ set -g __fish_whatis_path $i
+ break
+ end
+end
+
+#
+# Convenience functions
+#
+# The naming heuristic is that __fish_complete_* prints completions
+# and descriptions, while __fish_print_* only prints the completion,
+# without the description
+#
+
+# Find files that complete $argv[1], has the suffix $argv[2], and
+# output them as completions with description $argv[3]
+
+function __fish_complete_suffix -d "Complete using files"
+
+ set -- comp $argv[1]
+ set -- suff $argv[2]
+ set -- desc $argv[3]
+
+ set -- base (echo $comp |sed -e 's/\.[a-zA-Z0-9]*$//')
+ eval "set -- files "$base"*"$suff
+
+ if test $files[1]
+ printf "%s\t"$desc"\n" $files
+ end
+
+ #
+ # Also do directory completion, since there might be files
+ # with the correct suffix in a subdirectory
+ #
+
+ __fish_complete_directory $comp
+
+end
+
+#
+# Find directories that complete $argv[1], output them as completions with description $argv[2] if defined, otherwise use 'Directory'
+#
+
+function __fish_complete_directory -d "Complete using directories"
+
+ set -- comp $argv[1]
+ set -- desc Directory
+
+ if test (count $argv) -gt 1
+ set desc $argv[2]
+ end
+
+ eval "set -- dirs "$comp"*/"
+
+ if test $dirs[1]
+ printf "%s\t"$desc"\n" $dirs
+ end
+
+end
+
+function __fish_complete_users -d "Print a list of local users, with the real user name as a description"
+ cat /etc/passwd | sed -e "s/^\([^:]*\):[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1\t\2/"
+end
+
+function __fish_complete_groups -d "Print a list of local groups, with group members as the description"
+ cat /etc/group | sed -e "s/^\([^:]*\):[^:]*:[^:]*:\(.*\)/\1\tMembers: \2/"
+end
+
+function __fish_complete_pids -d "Print a list of process identifiers along with brief descriptions"
+ # This may be a bit slower, but it's nice - having the tty displayed is really handy
+ ps --no-heading -o pid,comm,tty --ppid %self -N | sed -r 's/ *([0-9]+) +([^ ].*[^ ]|[^ ]) +([^ ]+)$/\1\t\2 [\3]/' ^/dev/null
+
+ # If the above is too slow, this is faster but a little less useful
+ # pgrep -l -v -P %self | sed 's/ /\t/'
+end
+
+function __fish_print_hostnames -d "Print a list of known hostnames"
+
+ # Print all hosts from /etc/hosts
+ cat /etc/hosts|sed -e 's/[0-9.]*\( \|\t\)*\(.*\)/\2/'|sed -e 's/\#.*//'|sed -e 'y/\t/\n/'|grep -v '^$'
+
+ # Print nfs servers from /etc/fstab
+ cat /etc/fstab| grep "^\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\|[a-zA-Z.]*\):"|cut -d : -f 1
+
+ # Print hosts with known ssh keys
+ cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
+end
+
+function __fish_print_interfaces -d "Print a list of known network interfaces"
+ netstat -i -n -a | awk 'NR>2'|awk '{print $1}'
+end
+
+function __fish_print_addresses -d "Print a list of known network addresses"
+ /sbin/ifconfig |grep 'inet addr'|cut -d : -f 2|cut -d ' ' -f 1
+end
+
+function __fish_print_users -d "Print a list of local users"
+ cat /etc/passwd | cut -d : -f 1
+end
+
+
+function __fish_contains_opt -d "Checks if a specific option has been given in the current commandline"
+ set -l next_short ""
+
+ set -e short_opt
+ set -e long_opt
+
+ for i in $argv
+ if test $next_short = 1
+ set next_short ""
+ set -g short_opt $short_opt $i
+ else
+ switch $i
+ case -s
+ set next_short 1
+ case '-*'
+ echo __fish_contains_opt: Unknown option $i
+ return 1
+
+ case '**'
+ set -g -- long_opt $long_opt $i
+ end
+ end
+ end
+
+ set -l short_opt
+ set -l long_opt
+
+ for i in $short_opt
+
+# echo >&2 Test short option \'$i\'
+
+ if test -z $i
+ continue
+ end
+
+ if commandline -cpo | grep -- "^-"$i"\|^-[^-]*"$i >/dev/null
+ return 0
+ end
+
+ if commandline -ct | grep -- "^-"$i"\|^-[^-]*"$i >/dev/null
+ return 0
+ end
+ end
+
+ for i in $long_opt
+ if test -z $i
+ continue
+ end
+
+# echo >&2 Test long option $i
+
+ if contains -- --$i (commandline -cpo)
+ return 0
+ end
+ end
+
+ return 1
+end
+
+#
+# Completions for the shell and it's builtin commands and functions
+#
+
+for i in (builtin -n|grep -ve '(while|for|if|function|switch)' )
+ complete -c $i -s h -l help -d "Display help and exit"
+end
+
+
+function __fish_print_packages
+
+ # apt-cache is much, much faster than rpm, and can do this in real
+ # time. We use it if available.
+
+ switch (commandline -tc)
+ case '-**'
+ return
+ end
+
+ if which apt-cache >/dev/null ^/dev/null
+ # Apply the following filters to output of apt-cache:
+ # 1) Remove package names with parentesis in them, since these seem to not correspond to actual packages as reported by rpm
+ # 2) Remove package names that are .so files, since these seem to not correspond to actual packages as reported by rpm
+ # 3) Remove path information such as /usr/bin/, as rpm packages do not have paths
+
+ apt-cache --no-generate pkgnames (commandline -tc)|grep -v \( |grep -v '\.so\(\.[0-9]\)*$'|sed -e 's/\/.*\///'|sed -e 's/$/\tPackage/'
+ return
+ end
+
+ # Rpm is too slow for this job, so we set it up to do completions
+ # as a background job and cache the results.
+
+ if which rpm >/dev/null ^/dev/null
+
+ # If the cache is less than five minutes old, we do not recalculate it
+
+ set cache_file /tmp/.rpm-cache.$USER
+ if test -f $cache_file
+ cat $cache_file
+ set age (echo (date +%s) - (stat -c '%Y' $cache_file) | bc)
+ set max_age 250
+ if test $age -lt $max_age
+ return
+ end
+ end
+
+ # Remove package version information from output and pipe into cache file
+ rpm -qa >$cache_file |sed -e 's/-[^-]*-[^-]*$//' | sed -e 's/$/\tPackage/' &
+ end
+end
+
+
+function __fish_append -d "Internal completion function for appending string to the commandline"
+ set separator $argv[1]
+ set -e argv[1]
+ set str (commandline -tc| sed -re 's/(.*'$separator')[^'$separator']*/\1/')
+ printf "%s\n" $str$argv $str$argv,
+end
+
+
+#Completions for SysV startup scripts
+
+set -g __fish_service_commands '
+ start\t"Start service"
+ stop\t"Stop service"
+ status\t"Print service status"
+ restart\t"Stop and then start service"
+ reload\t"Reload service configuration"
+'
+
+complete -x -p "/etc/init.d/*" -a '$__fish_service_commands'
diff --git a/init/fish_function.fish b/init/fish_function.fish
new file mode 100644
index 00000000..8c218a30
--- /dev/null
+++ b/init/fish_function.fish
@@ -0,0 +1,674 @@
+#
+# This file defines various functions for fish
+#
+
+
+function _contains_help -d "Helper function for contains"
+ echo "SYNOPSIS"
+ echo \tcontains \[OPTION] KEY [VALUES...]
+ echo
+ echo DESCRIPTION
+ echo \t-h, --help
+ echo \t\tdisplay help and exit
+ echo \tTest if the set VALUES contains the string KEY.
+ echo \tReturn 0 if yes, 1 otherwise.
+end
+
+function contains -d "Test if a key is contained in a set of values"
+ while count $argv >/dev/null
+ switch $argv[1]
+ case '-h' '--h' '--he' '--hel' '--help'
+ _contains_help
+ return
+
+ case '--'
+ # End the loop, the next argument is the key
+ set -e argv[1]
+ break
+
+ case '-*'
+ echo Unknown option $argv[$i]
+ _contains_help
+ return 1
+
+ case '*'
+ # End the loop, we found the key
+ break
+
+ end
+ set -e argv[1]
+ end
+
+ if count $argv >/dev/null
+ else
+ echo "contains: Key not specified"
+ return 1
+ end
+
+ set -- key $argv[1]
+ set -e argv[1]
+
+ #
+ # Loop through values
+ #
+
+ printf "%s\n" $argv|grep -Fx -- $key >/dev/null
+ return $status
+end
+
+#
+# help should use 'open' to find a suitable browser, but only
+# if there is a mime database _and_ DISPLAY is set, since the
+# browser will most likely be graphical. Since most systems which
+# have a mime databe also have the htmlview program, this is mostly a
+# theoretical problem.
+#
+
+function help -d "Show help for the fish shell"
+
+ # Declare variables to set correct scope
+
+ set fish_browser
+ set fish_browser_bg
+
+ #
+ # Find a suitable browser for viewing the help pages. This is needed
+ # by the help function defined below.
+ #
+
+ set graphical_browsers htmlview x-www-browser firefox galeon mozilla konqueror epiphany opera netscape
+ set text_browsers htmlview www-browser links elinks lynx w3m
+
+ if test $BROWSER
+
+ # User has manualy set a preferred browser, so we respect that
+ set fish_browser $BROWSER
+
+ # If browser is known to be graphical, put into background
+ if contains -- $BROWSER $graphical_browsers
+ set fish_browser_bg 1
+ end
+
+ else
+
+ # Check for a text-based browser.
+ for i in $text_browsers
+ if which $i 2>/dev/null >/dev/null
+ set fish_browser $i
+ break
+ end
+ end
+
+ # If we are in a graphical environment, we check if there is a
+ # graphical browser to use instead.
+ if test (echo $DISPLAY)
+ for i in $graphical_browsers
+ if which $i 2>/dev/null >/dev/null
+ set fish_browser $i
+ set fish_browser_bg 1
+ break
+ end
+ end
+ end
+ end
+
+ if test -z $fish_browser
+ printf "help: Could not find a web browser.\n"
+ printf "Please set the variable $BROWSER to a suitable browser and try again\n\n"
+ return 1
+ end
+
+ set fish_help_item $argv[1]
+ set fish_help_page ""
+
+ if test $fish_help_item = .
+ set fish_help_page "builtins.html\#source"
+ end
+
+ if test $fish_help_item = difference
+ set fish_help_page difference.html
+ end
+
+ if test $fish_help_item = globbing
+ set fish_help_page "index.html\#expand"
+ end
+
+ if contains -- $fish_help_item (builtin -n)
+ set fish_help_page "builtins.html\#"$fish_help_item
+ end
+
+ if contains -- $fish_help_item count dirh dirs help mimedb nextd open popd prevd pushd set_color tokenize
+ set fish_help_page "commands.html\#"$fish_help_item
+ end
+
+ set idx_subj syntax completion editor job-control todo bugs history
+ set idx_subj $idx_subj killring help color prompt title expand variables
+ set idx_subj $idx_subj builtin-overview changes
+
+ if contains -- $fish_help_item $idx_subj
+ set fish_help_page "index.html\#"$fish_help_item
+ end
+
+ if not test $fish_help_page
+ if which $fish_help_item >/dev/null ^/dev/null
+ man $fish_help_item
+ return
+ end
+ set fish_help_page "index.html"
+ end
+
+ if test $fish_browser_bg
+ eval $fish_browser file://$__fish_help_dir/$fish_help_page \&
+ else
+ eval $fish_browser file://$__fish_help_dir/$fish_help_page
+ end
+
+end
+
+#
+# Make ls use colors if we are on a system that supports this
+#
+if ls --help 1>/dev/null 2>/dev/null
+ function ls -d "List contents of directory"
+ command ls --color=auto --indicator-style=classify $argv
+ end
+end
+
+#
+# These are very common and useful
+#
+function ll -d "List contents of directory using long format"
+ ls -lh $argv
+end
+
+function la -d "List contents of directory using long format, showing hidden files"
+ ls -lha $argv
+end
+
+#
+# This allows us to use 'open FILENAME' to open a given file in the default
+# application for the file.
+#
+
+function open -d "Open file in default application"
+ mimedb -l -- $argv
+end
+
+#
+# Print the current working directory. If it is too long, it will be
+# ellipsised. This function is used by the default prompt command.
+#
+
+function prompt_pwd -d "Print the current working directory, ellipsise it if it is longer than 1/4 of the terminal width"
+ set wd (pwd)
+ set len (echo $wd|wc -c)
+ set max_width (echo $COLUMNS/4|bc)
+ if test $len -gt $max_width
+ #Write ellipsis character if known to be using UTF
+ #else use $
+ set -l ellipsis "$" #default
+ if count $LANG >/dev/null
+ if test (expr match $LANG ".*UTF") -gt 0
+ set ellipsis \u2026
+ end
+ end
+ printf %s%s $ellipsis (echo $wd|cut -c (echo $len-$max_width-1|bc)-)
+ else
+ echo $wd
+ end
+end
+
+#
+# Make pwd print out the home directory as a tilde.
+#
+
+function pwd -d "Print working directory"
+ set out (command pwd $argv)
+ if echo $out| grep \^$HOME >/dev/null
+ printf \~
+ echo $out |cut -b (echo $HOME|wc -c)-
+ else
+ printf "%s\n" $out
+ end
+end
+
+#
+# This is a neat function, stolen from zsh. It allows you to edit the
+# value of a variable interactively.
+#
+
+function vared -d "Edit variable value"
+ if test (count $argv) = 1
+ switch $argv
+
+ case '-h' '--h' '--he' '--hel' '--help'
+ printf "Synopsis\n\t%svared%s VARIABLE\n\n" (set_color $FISH_COLOR_COMMAND) (set_color $FISH_COLOR_NORMAL)
+ printf "\tInteractively edit the value of an environment variable\n\n"
+
+ case '-*'
+ printf "vared: Unknown option %s\n" $argv
+
+ case '*'
+ if test (count $$argv ) -lt 2
+ set init ''
+ if test $$argv
+ set init -- $$argv
+ end
+ set prompt 'set_color green; echo '$argv'; set_color normal; echo "> "'
+ read -p $prompt -c $init tmp
+
+ # If variable already exists, do not add any
+ # switches, so we don't change export rules. But
+ # if it does not exist, we make the variable
+ # global, so that it will not die when this
+ # function dies
+
+ if test $$argv
+ set -- $argv $tmp
+ else
+ set -g -- $argv $tmp
+ end
+
+ else
+
+ printf "vared: %s is an array variable. Use " $argv
+ set_color $FISH_COLOR_COMMAND
+ printf vared
+ set_color $FISH_COLOR_NORMAL
+ printf " %s[n] to edit the n:th element of %s\n" $argv $argv
+
+ end
+ end
+ else
+ printf "vared: Expected exactly one argument, got %s.\n\nSynopsis:\n\t" (count $argv)
+ set_color $FISH_COLOR_COMMAND
+ printf vared
+ set_color $FISH_COLOR_NORMAL
+ printf " VARIABLE\n"
+ end
+end
+
+#
+# This function deletes a character from the commandline if it is
+# non-empty, and exits the shell otherwise. Implementing this
+# functionality has been a longstanding request from various
+# fish-users.
+#
+
+function __fish_delete_or_exit -d "Exit the shell if the commandline is empty, delete a character otherwise"
+ if test (commandline)
+ commandline -f delete-char
+ else
+ exit
+ end
+end
+
+#
+# This function is bound to Alt-L, it is used to list the contents of
+# the directory under the cursor
+#
+
+function __fish_list_current_token -d "List contents of token under the cursor if it is a directory, otherwise list the contents of the current directory"
+ set val (eval echo (commandline -t))
+ if test -d $val
+ ls $val
+ else
+ set dir (dirname $val)
+ if test $dir != . -a -d $dir
+ ls $dir
+ else
+ ls
+ end
+ end
+end
+
+
+function pushd -d "Push directory to stack"
+ # Comment to avoid set completions
+ set -g dirstack (command pwd) $dirstack
+ cd $argv[1]
+end
+
+
+function popd -d "Pop dir from stack"
+ if test $dirstack[1]
+ cd $dirstack[1]
+ else
+ echo Directory stack is empty...
+ return 1
+ end
+
+ set -e dirstack[1]
+
+end
+
+
+function dirs -d "Print directory stack"
+ echo -n (command pwd)" "
+ for i in $dirstack
+ echo -n $i" "
+ end
+ echo
+end
+
+
+#
+# The following functions add support for a directory history
+#
+
+function cd -d "Change directory"
+
+ # Skip history in subshells
+ if status --is-command-substitution
+ builtin cd $argv
+ return $status
+ end
+
+ # Avoid set completions
+ set -- previous (command pwd)
+
+ if test $argv[1] = - ^/dev/null
+ if test $__fish_cd_direction = next ^/dev/null
+ nextd
+ else
+ prevd
+ end
+ return $status
+ end
+
+ builtin cd $argv[1]
+
+ if test $status = 0 -a (command pwd) != $previous
+ set -g dirprev $dirprev $previous
+ set -e dirnext
+ set -g __fish_cd_direction prev
+ end
+
+ return $status
+end
+
+
+function __fish_move_last -d "Move the last element of a directory history from src to dest"
+ set src $argv[1]
+ set dest $argv[2]
+
+ set size_src (count $$src)
+
+ if test $size_src = 0
+ # Cannot make this step
+ echo "Hit end of history..."
+ return 1
+ end
+
+ # Append current dir to the end of the destination
+ set -g (echo $dest) $$dest (command pwd)
+
+ set ssrc $$src
+
+ # Change dir to the last entry in the source dir-hist
+ builtin cd $ssrc[$size_src]
+
+ # Keep all but the last from the source dir-hist
+ set -e (echo $src)[$size_src]
+
+ # All ok, return success
+ return 0
+end
+
+
+function prevd -d "Move back in the directory history"
+ # Parse arguments
+ set show_hist 0
+ set times 1
+ for i in (seq (count $argv))
+ switch $argv[$i]
+ case '-l'
+ set show_hist 1
+ continue
+ case '-*'
+ echo Uknown option $argv[$i]
+ return 1
+ case '*'
+ if test $argv[$i] -ge 0 ^/dev/null
+ set times $argv[$i]
+ else
+ echo "The number of positions to skip must be a non-negative integer"
+ return 1
+ end
+ continue
+ end
+ end
+
+ # Traverse history
+ set code 1
+ for i in (seq $times)
+ # Try one step backward
+ if __fish_move_last dirprev dirnext;
+ # We consider it a success if we were able to do at least 1 step
+ # (low expectations are the key to happiness ;)
+ set code 0
+ else
+ break
+ end
+ end
+
+ # Show history if needed
+ if test $show_hist = 1
+ dirh
+ end
+
+ # Set direction for 'cd -'
+ if test $code = 0 ^/dev/null
+ set -g __fish_cd_direction next
+ end
+
+ # All done
+ return $code
+end
+
+
+function nextd -d "Move forward in the directory history"
+ # Parse arguments
+ set show_hist 0
+ set times 1
+ for i in (seq (count $argv))
+ switch $argv[$i]
+ case '-l'
+ set show_hist 1
+ continue
+ case '-*'
+ echo Uknown option $argv[$i]
+ return 1
+ case '*'
+ if test $argv[$i] -ge 0 ^/dev/null
+ set times $argv[$i]
+ else
+ echo "The number of positions to skip must be a non-negative integer"
+ return 1
+ end
+ continue
+ end
+ end
+
+ # Traverse history
+ set code 1
+ for i in (seq $times)
+ # Try one step backward
+ if __fish_move_last dirnext dirprev;
+ # We consider it a success if we were able to do at least 1 step
+ # (low expectations are the key to happiness ;)
+ set code 0
+ else
+ break
+ end
+ end
+
+ # Show history if needed
+ if test $show_hist = 1
+ dirh
+ end
+
+ # Set direction for 'cd -'
+ if test $code = 0 ^/dev/null
+ set -g __fish_cd_direction prev
+ end
+
+ # All done
+ return $code
+end
+
+
+function dirh -d "Print the current directory history (the back- and fwd- lists)"
+ # Avoid set comment
+ set current (command pwd)
+ set -- separator " "
+ set -- line_len (echo (count $dirprev) + (echo $dirprev $current $dirnext | wc -m) | bc)
+ if test $line_len -gt $COLUMNS
+ # Print one entry per line if history is long
+ set separator "\n"
+ end
+
+ for i in $dirprev
+ echo -n -e $i$separator
+ end
+
+ set_color $fish_color_history_current
+ echo -n -e $current$separator
+ set_color normal
+
+ for i in (seq (echo (count $dirnext)) -1 1)
+ echo -n -e $dirnext[$i]$separator
+ end
+
+ echo
+end
+
+
+function type -d "Print the type of a command"
+
+ set status 0
+ set mode normal
+
+ for i in $argv
+ switch $i
+ case -t --t --ty --typ --type
+ set mode type
+
+ case -p --p --pa --pat --path
+ set mode path
+
+ case -a --a --al --all
+ set mode all
+
+ case --
+ break
+
+ case '-*'
+ echo Unknown option $i
+ return 1
+ end
+ end
+
+ switch $mode
+
+ case normal
+ for i in $argv
+
+ switch $i
+ case '-*'
+ continue;
+ end
+
+ if contains -- $i (functions -n)
+ echo $i is a function with definition
+ functions $i
+ continue
+ end
+
+ if contains -- $i (builtin -n)
+ echo $i is a shell builtin
+ continue
+ end
+
+ if which $i ^/dev/null >/dev/null
+ echo $i is (which $i)
+ continue
+ end
+ echo type: $i: not found
+ set status 1
+ end
+
+ case path
+ for i in $argv
+
+ switch $i
+ case '-*'
+ continue;
+ end
+
+ if which $i ^/dev/null >/dev/null
+ echo $i is (which $i)
+ continue
+ end
+ set status 1
+ end
+
+ case all
+ for i in $argv
+ set found ""
+ switch $i
+ case '-*'
+ continue;
+ end
+
+ if contains -- $i (functions -n)
+ echo $i is a function with definition
+ functions $i
+ set found 1
+ end
+
+ if contains -- $i (builtin -n)
+ echo $i is a shell builtin
+ set found 1
+ end
+
+ if which $i ^/dev/null >/dev/null
+ echo $i is (which $i)
+ set found 1
+ end
+
+ if test -z $found
+ echo type: $i: not found
+ set status 1
+ end
+ end
+
+
+ case type
+ for i in $argv
+
+ switch $i
+ case '-*'
+ continue;
+ end
+
+ if contains -- $i (functions -n)
+ echo function
+ continue
+ end
+
+ if contains -- $i (builtin -n)
+ echo builtin
+ continue
+ end
+
+ if which $i ^/dev/null >/dev/null
+ echo file
+ continue
+ end
+ set status 1
+ end
+ end
+
+ return $status
+end
diff --git a/init/fish_inputrc b/init/fish_inputrc
new file mode 100644
index 00000000..70996919
--- /dev/null
+++ b/init/fish_inputrc
@@ -0,0 +1,36 @@
+#
+# This file contains key bindings for fish
+#
+
+# Include system-wide inputrc file before including fish-specific key
+# bindings if it exists
+
+$include /etc/inputrc
+
+$if fish
+ "\M-l": __fish_list_current_token
+ "\M-w": set tok (commandline -pt); if test $tok[1]; whatis $tok[1]; end
+ "\C-l": clear
+ "\C-c": delete-line
+ "\C-u": backward-kill-line
+ "\M-d": kill-word
+ "\C-w": backward-kill-word
+ "\M-k": dump-functions
+ "\C-d": __fish_delete_or_exit
+ "\M-d": if test -z (commandline); dirh; else; commandline -f kill-word; end
+
+ "\e\eOD": if test -z (commandline); prevd; else; commandline -f backward-word; end
+ "\e\eOC": if test -z (commandline); nextd; else; commandline -f forward-word; end
+
+ "\eO3D": if test -z (commandline); prevd; else; commandline -f backward-word; end
+ "\eO3C": if test -z (commandline); nextd; else; commandline -f forward-word; end
+
+ "\e[3D": if test -z (commandline); prevd; else; commandline -f backward-word; end
+ "\e[3C": if test -z (commandline); nextd; else; commandline -f forward-word; end
+
+$endif
+
+# Include user-specific inputrc file after including fish-specific
+# bindings so that they will override fish defaults
+
+$include ~/.inputrc
diff --git a/init/fish_interactive.fish b/init/fish_interactive.fish
new file mode 100644
index 00000000..14b389a9
--- /dev/null
+++ b/init/fish_interactive.fish
@@ -0,0 +1,110 @@
+#
+# Initializations that should only be performed when in interactive mode
+#
+
+if not status --is-interactive
+ exit
+end
+
+#
+# Print a greeting
+#
+
+printf 'Welcome to fish, the friendly interactive shell\nType '
+set_color green
+printf 'help '
+set_color normal
+printf 'for instructions on how to use fish\n'
+
+#
+# Set exit message
+#
+
+function fish_on_exit -d "Commands to execute when fish exits"
+ echo Good bye
+end
+
+# Set the default prompt command. Make sure that every terminal escape
+# string has a newline before and after, so that fish will know how
+# long it is.
+
+function fish_prompt -d "Write out the prompt"
+ printf '%s@%s \n%s\n%s\n%s\n> ' (whoami) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+end
+
+#
+# Set INPUTRC to something nice
+#
+# We override INPUTRC if already set, since it may be set by a shell
+# other than fish, which may use a different file. The new value should
+# be exported, since the fish inputrc file plays nice with other files
+# by including them when found.
+#
+
+for i in ~/.fish_inputrc /etc/fish_inputrc ~/.inputrc /etc/inputrc
+ if test -f $i
+ set -xg INPUTRC $i
+ break
+ end
+end
+
+
+#
+# Set various color values
+#
+
+function set_default -d "Set a universal variable, unless it has already been set"
+ if not test $$argv[1]
+ set -U -- $argv
+ end
+end
+
+# Regular syntax highlighting colors
+set_default fish_color_normal normal
+set_default fish_color_command green
+set_default fish_color_redirection normal
+set_default fish_color_comment brown
+set_default fish_color_error red
+
+set_default fish_color_cwd green
+
+# Background color for matching quotes and parenthesis
+set_default fish_color_match cyan
+
+# Background color for search matches
+set_default fish_color_search_match purple
+
+# Pager colors
+set_default fish_pager_color_prefix cyan
+set_default fish_pager_color_completion normal
+set_default fish_pager_color_description normal
+set_default fish_pager_color_progress cyan
+
+# Directory history colors
+set_default fish_color_history_current cyan
+
+functions -e set_default
+
+#
+# Setup the CDPATH variable
+#
+
+set -gx CDPATH . ~
+
+#
+# Match colors for grep, if supported
+#
+
+if grep --color=auto --help 1>/dev/null 2>/dev/null
+ set -gx GREP_COLOR '97;45'
+ set -gx -- GREP_OPTIONS '--color=auto'
+end
+
+#
+# Color definitions for ls, if supported
+#
+
+if command ls --color=auto --help 1>/dev/null 2>/dev/null
+ set -gx LS_COLORS $LS_COLORS '*.jar=01;31' '*.doc=35' '*.pdf=35' '*.ps=35' '*.xls=35' '*.swf=35' '*~=37'
+end
+
diff --git a/tests/gen_output.fish b/tests/gen_output.fish
new file mode 100755
index 00000000..91db67b0
--- /dev/null
+++ b/tests/gen_output.fish
@@ -0,0 +1,17 @@
+#!/usr/bin/fish
+
+#
+# Generate output for a test script
+#
+# It is important that you verify that the generated
+# output is correct!
+#
+
+for i in $argv
+ set template_out (basename $i .in).out
+ set template_err (basename $i .in).err
+ set template_status (basename $i .in).status
+
+ fish <$i >$template_out ^$template_err
+ echo $status >$template_status
+end \ No newline at end of file
diff --git a/tests/test.fish b/tests/test.fish
new file mode 100755
index 00000000..082db468
--- /dev/null
+++ b/tests/test.fish
@@ -0,0 +1,42 @@
+#!/usr/local/bin/fish
+#
+# Main loop of the test suite. I wrote this
+# instad of using autotest to provide additional
+# testing for fish. :-)
+
+echo Testing high level script functionality
+
+for i in *.in
+ set template_out (basename $i .in).out
+ set template_err (basename $i .in).err
+ set template_status (basename $i .in).status
+
+ ../fish <$i >tmp.out ^tmp.err
+ echo $status >tmp.status
+ set res ok
+ if diff tmp.out $template_out >/dev/null
+ else
+ set res fail
+ echo Output differs for file $i
+ end
+
+ if diff tmp.err $template_err >/dev/null
+ else
+ set res fail
+ echo Error output differs for file $i
+ end
+
+ if test (cat tmp.status) = (cat $template_status)
+ else
+ set res fail
+ echo Exit status differs for file $i
+ end
+
+ if test $res = ok;
+ echo File $i tested ok
+ else
+ echo File $i failed tests
+ end;
+
+end
+
diff --git a/tests/test1.err b/tests/test1.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test1.err
diff --git a/tests/test1.in b/tests/test1.in
new file mode 100644
index 00000000..5b87fb71
--- /dev/null
+++ b/tests/test1.in
@@ -0,0 +1,53 @@
+#
+#Test aliases loops and conditionals
+#
+
+for i in 1 2 #Comment on same line as command
+#Comment inside loop
+ for j in a b
+ #Double loop
+ echo $i$j
+ end;
+end
+
+# Simple alias tests
+
+function foo
+ echo >foo.txt $argv
+end
+
+foo hello
+
+cat foo.txt |read foo
+
+if test $foo = hello;
+ echo Test 2 pass
+else
+ echo Test 2 fail
+end
+
+function foo
+ printf 'Test %s' $1; echo ' pass'
+end
+
+foo 3
+
+for i in Test for continue break and switch builtins problems;
+ switch $i
+ case Test
+ printf "%s " $i
+ case "f??"
+ printf "%s " 3
+ case "c*"
+ echo pass
+ case break
+ continue
+ echo fail
+ case and
+ break
+ echo fail
+ case "*"
+ echo fail
+ end
+end
+
diff --git a/tests/test1.out b/tests/test1.out
new file mode 100644
index 00000000..64b65faa
--- /dev/null
+++ b/tests/test1.out
@@ -0,0 +1,7 @@
+1a
+1b
+2a
+2b
+Test 2 pass
+Test pass
+Test 3 pass
diff --git a/tests/test1.status b/tests/test1.status
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/tests/test1.status
@@ -0,0 +1 @@
+0
diff --git a/tests/test2.err b/tests/test2.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test2.err
diff --git a/tests/test2.in b/tests/test2.in
new file mode 100644
index 00000000..a0c7ecbd
--- /dev/null
+++ b/tests/test2.in
@@ -0,0 +1,6 @@
+#Tests complex parameter expantions
+
+set a A
+set aa AA
+set aaa AAA
+echo {$aa}a{1,2,3}(for a in 1 2 3; echo $a; end)
diff --git a/tests/test2.out b/tests/test2.out
new file mode 100644
index 00000000..e1af6063
--- /dev/null
+++ b/tests/test2.out
@@ -0,0 +1 @@
+AAa11 AAa21 AAa31 AAa12 AAa22 AAa32 AAa13 AAa23 AAa33
diff --git a/tests/test2.status b/tests/test2.status
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/tests/test2.status
@@ -0,0 +1 @@
+0
diff --git a/tests/test3.err b/tests/test3.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test3.err
diff --git a/tests/test3.in b/tests/test3.in
new file mode 100644
index 00000000..3fccaa03
--- /dev/null
+++ b/tests/test3.in
@@ -0,0 +1,113 @@
+# Environment variable tests
+
+#Test if variables can be properly set
+
+set smurf blue
+
+if test $smurf = blue
+ echo Test 1 pass
+else
+ echo Test 1 fail
+end
+
+# Test if variables can be erased
+
+set -e smurf
+
+if test $smurf
+ echo Test 2 fail
+else
+ echo Test 2 pass
+end
+
+# Test if local variables go out of scope
+
+if true
+ set t3 bar
+end
+
+if test $t3
+ echo Test 3 fail
+else
+ echo Test 3 pass
+end
+
+# Test if globals can be set in block scope
+
+if true
+ set -g baz qux
+end
+
+if test $baz = qux
+ echo Test 4 pass
+else
+ echo Test 4 fail
+end
+
+
+#Test that scope is preserved when setting a new value
+
+set t5 a
+
+if true
+ set t5 b
+end
+
+if test $t5 = b
+ echo Test 5 pass
+else
+ echo Test 5 fail
+end
+
+# Test that scope is preserved in double blocks
+
+for i in 1
+ set t6 $i
+ for j in a
+ if test $t6$j = 1a
+ echo Test 6 pass
+ else
+ echo Test 6 fail
+ end
+ end
+end
+
+
+# Test if variables in for loop blocks do not go out of scope on new laps
+
+set res fail
+
+for i in 1 2
+ set t7
+ if test $i = 1
+ set t7 b
+ else
+ if test $t7 = b
+ set res pass
+ end
+ end
+end
+
+echo Test 7 $res
+
+# Test if variables are properly exported
+
+if true
+ set -x t8 foo
+ if test (fish -c "echo $t8") = foo
+ echo Test 8 pass
+ else
+ echo Test 8 fail
+ end
+end
+
+# Test if exported variables go out of scope
+
+if test (fish -c "echo $t8") = foo
+ echo Test 9 fail
+else
+ echo Test 9 pass
+end
+
+
+
diff --git a/tests/test3.out b/tests/test3.out
new file mode 100644
index 00000000..9ae93fd4
--- /dev/null
+++ b/tests/test3.out
@@ -0,0 +1,9 @@
+Test 1 pass
+Test 2 pass
+Test 3 pass
+Test 4 pass
+Test 5 pass
+Test 6 pass
+Test 7 pass
+Test 8 pass
+Test 9 pass
diff --git a/tests/test3.status b/tests/test3.status
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/tests/test3.status
@@ -0,0 +1 @@
+0
diff --git a/tests/test4.err b/tests/test4.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test4.err
diff --git a/tests/test4.in b/tests/test4.in
new file mode 100644
index 00000000..75c2c7ec
--- /dev/null
+++ b/tests/test4.in
@@ -0,0 +1,35 @@
+#Test scoping rules for functions
+
+set -e smurf
+
+function setter
+set smurf green
+end
+
+function unsetter
+set -e smurf
+end
+
+function call1
+set smurf blue; setter; if test $smurf = blue; echo Test 1 pass; else; echo Test 1 fail; end
+end
+
+function call2
+set smurf blue; unsetter; if test $smurf = blue; echo Test 2 pass; else; echo Test 2 fail; end
+end
+
+call1
+call2
+
+function call3
+setter; if test $smurf = green; echo Test 3 pass; else; echo Test 3 fail; end
+end
+
+function call4
+unsetter; if test !$smurf; echo Test 4 pass; else; echo Test 4 fail; end
+end
+
+set -g smurf yellow
+call3
+call4
+
diff --git a/tests/test4.out b/tests/test4.out
new file mode 100644
index 00000000..3c2d17b6
--- /dev/null
+++ b/tests/test4.out
@@ -0,0 +1,4 @@
+Test 1 pass
+Test 2 pass
+Test 3 pass
+Test 4 fail
diff --git a/tests/test4.status b/tests/test4.status
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/tests/test4.status
@@ -0,0 +1 @@
+0
diff --git a/tests/test5.err b/tests/test5.err
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/test5.err
diff --git a/tests/test5.in b/tests/test5.in
new file mode 100644
index 00000000..a3e2256c
--- /dev/null
+++ b/tests/test5.in
@@ -0,0 +1,25 @@
+
+set smurf green
+
+switch $smurf;
+ case "*ee*"
+ echo Test 1 pass
+ case "*"
+ echo Test 1 fail
+end;
+
+switch $smurf
+ case *ee*
+ echo Test 2 fail
+ case red green blue
+ echo Test 2 pass
+ case "*"
+ echo Test 2 fail
+end
+
+switch $smurf
+ case cyan magenta yellow
+ echo Test 3 fail
+ case "?????"
+ echo Test 3 pass
+end
diff --git a/tests/test5.out b/tests/test5.out
new file mode 100644
index 00000000..66343bb8
--- /dev/null
+++ b/tests/test5.out
@@ -0,0 +1,3 @@
+Test 1 pass
+Test 2 pass
+Test 3 pass
diff --git a/tests/test5.status b/tests/test5.status
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/tests/test5.status
@@ -0,0 +1 @@
+0