Compare commits

...

418 Commits

Author SHA1 Message Date
David Adam
f12164f7c7 Bump version for 2.7.0 2017-11-23 13:45:49 +08:00
David Adam
e8f0ec0009 CHANGELOG: update for 2.7.0 2017-11-23 13:45:49 +08:00
Aaron Gyes
c67d9195eb Fix fish_opt --help showing nextd manpage. 2017-11-14 01:57:58 -08:00
ridiculousfish
8dc26ba8b9 Add missing builtin_argparse.cpp to fish_key_reader
Fixes #4510
2017-11-07 21:28:09 -08:00
David Adam
f5514543e4 Bump version for 2.7b1 2017-10-31 20:27:03 +08:00
David Adam
6a878e45e7 CHANGELOG: updates to 2.7b1 2017-10-31 20:24:03 +08:00
David Adam
3bd2caf682 Update tests to match behaviour from 848db48af5
(cherry picked from commit d5e5878f6d)
2017-10-31 20:17:06 +08:00
David Adam
1f51bdbb0c Improve warning message when exiting with active jobs
Work on #4303.

(cherry picked from commit 848db48af5)
2017-10-31 19:19:52 +08:00
David Adam
007a62cab6 warning message when exiting with active jobs uses PID of first process, not PGID
Work on #4303.

(cherry picked from commit eb081481c6)
2017-10-31 19:19:52 +08:00
David Adam
da2201d69a docs: fish_history can be set to the empty string 2017-10-31 18:27:20 +08:00
David Adam
f9eb826d5b Restore previous output of status current-{filename,function}
Closes #4499.

Partial reversion of 30368d5526.

(cherry picked from commit b34b0cf1e3)
2017-10-31 18:13:32 +08:00
David Adam
dbc15f8046 docs: move fish_history entry to correct section and reword
(cherry picked from commit 7fe7582329)
2017-10-31 18:13:31 +08:00
Laurent Pireyn
adcf192c25 Fix typo in gradle completion (#4500)
(cherry picked from commit 3781862346)
2017-10-31 18:13:31 +08:00
payasrelekar
62fc06d9ac Fix a typo
(cherry picked from commit 3f76cccded)
2017-10-31 18:13:31 +08:00
Mahmoud Al-Qudsi
7a49583f27 Add instructions on appending to /etc/shells
Print the command to append safely to /etc/shells with sudo and tee upon
completion of `make install`.

(cherry picked from commit 47993b48b6)
2017-10-25 16:35:21 -05:00
David Adam
805e4b31a1 only call ioctl to export new termsize if process is in the foreground
Closes #4477.

(cherry picked from commit 216c4b811a)
2017-10-21 07:21:52 +08:00
evuez
ac79a6b0c7 Add --follow-tags completion for git push (#4462)
(cherry picked from commit 6d350409b3)
2017-10-15 12:22:18 +08:00
ridiculousfish
99b72c0972 Stop passing NULL for realpath()'s second param
macOS 10.5 and earlier do not support the convention of returning
a dynamically allocated string, plus this seems like an unnecessary
malloc. Always allocate a buffer for realpath() to write into.

(cherry picked from commit 05c0cb713d)
2017-10-13 20:28:44 +08:00
Mahmoud Al-Qudsi
0836a5b9b4 Silence directory change messages when calling gmake from BSD make
These messages are automatically generated as if `-w` were specified
at the gmake command line. The `--no-print-directory` option supresses
these messages.

(cherry picked from commit b7f1103088)
2017-10-12 12:51:26 -05:00
Mahmoud Al-Qudsi
30a74dcf2d Update BSDMakefile to force build of targets
.DEFAULT or .DONE cannot be set as .PHONY so this hack was required.

(cherry picked from commit 40a90f1b2f)
2017-10-12 12:51:26 -05:00
Mahmoud Al-Qudsi
03366333b2 Include flatpak improvements in Changelog for 2.7.0b1 2017-10-11 06:27:15 +02:00
Mahmoud Al-Qudsi
56abb1750b Coalesce string trim and string match in flatpak completions
(cherry picked from commit 1a3adf086d)
2017-10-11 06:25:25 +02:00
Mahmoud Al-Qudsi
f6bb384a46 Update flatpak completions to work with latest flatpak
Closes #4456

(cherry picked from commit 21473b20ec)
2017-10-11 06:25:25 +02:00
Amitava Bhattacharyya
7bacc57e4f Remove extraneous reference in FAQ (#4459)
"Use the fish_update_completions command.", the answer to "How do I update man page completions?", was also found at the end of the answer to "How do I get the exit status of a command?"
(cherry picked from commit 48797974d3)
2017-10-10 17:04:45 +08:00
Mahmoud Al-Qudsi
04c69932e2 Add more test examples, including expression negation
Closes #4383

(cherry picked from commit ff66d2f3c1)
2017-10-08 02:07:49 +02:00
Mahmoud Al-Qudsi
d4ed2ca447 Correct string replace usage in pip2/3 completions
\b does not match "end of spaces" but rather "start of a-z/0-9" and so
does not match the start of string '-c'. Match (and then re-insert) a
literal ' ' as part of the pattern instead.

(cherry picked from commit b61c4f1cbc)
2017-10-05 13:56:24 +02:00
Mahmoud Al-Qudsi
429bdce4f1 Document reasons for commmand name replacement in pip2/3 completions 2017-10-05 13:32:56 +02:00
Mahmoud Al-Qudsi
de45232a37 Fix copy-and-paste pip3 -> pip2 typo
Thanks @floam. See #4448

(cherry picked from commit 78fe53406e)
2017-10-05 13:28:35 +02:00
Mahmoud Al-Qudsi
d74d3f2ca4 Use string replace instead of sed with better regex for pip completions 2017-10-05 13:21:26 +02:00
Mahmoud Al-Qudsi
0c21efea55 fixup! Force correct names for pip2/pip3 command in completions
(cherry picked from commit af12bcb117)
2017-10-05 13:12:15 +02:00
Mahmoud Al-Qudsi
3f9273cc32 Force correct names for pip2/pip3 command in completions
Work around bug pypa/pip#4755
Don't expect all users to be running a version of pip2/3 that includes
the fix (once it's upstreamed). Will continue to work if/when pip2/3
emit the correct output. pip is already very slow at printing the
completions (see #4448) so the `sed` call overhead is neglible.
2017-10-05 13:07:11 +02:00
Aaron Gyes
df6a86913c pip completions: use builtin source rather than eval function. 2017-10-04 21:56:28 -07:00
Cristian Prieto
835a40bf56 Python's pip and pipenv completions (#4448)
* Add pip completion

 * We call native pip completion for fish if pip is installed

* Add pipenv completion

 * We call pipenv native completion if pipenv is installed

* Applied changes as requested by @floam

 * Changed usage of `test (command -v)` for just `command -sq`

* Add completions for pip2/3

 * In some systems pip is not aliased and we have pip2 and pip3
 * In those cases, we just load the completions for those commands

* Separate pip2/3 completions in their own file as requested by @floam
2017-10-04 21:16:12 -07:00
PenegalECI
2193ddbb6b Globally improved french translations (#4372)
* Globally improved french translations

* Corrected translations following comments
2017-10-01 21:22:41 -07:00
Aaron Gyes
417be25c69 Fix export returning 1 on success
Fixes #4435

(cherry picked from commit 1ef310c3a8)
2017-10-01 21:46:33 +08:00
Aaron Gyes
7b5f1f018b Revert "Make italics/dim work on MacOS"
This reverts commit c6fe65bad3.
2017-09-29 15:42:11 -07:00
Aaron Gyes
73b4efb65b install linx.lss with Xcode project 2017-09-29 15:13:14 -07:00
Aaron Gyes
c6fe65bad3 Make italics/dim work on MacOS
Work around ancient terminfo on MacOS by hard-coding the correct escapes.
Fixes #4436.
2017-09-29 15:12:52 -07:00
Mahmoud Al-Qudsi
fb252e6e10 CHANGELOG.md: kdeconnect-cli, not kdecomplete 2017-09-26 15:52:32 -05:00
Mahmoud Al-Qudsi
e031d91c19 fixup! Updated changelog with info about all new and updated completions since 2.6.0 2017-09-26 15:49:59 -05:00
Mahmoud Al-Qudsi
6366a67c21 fixup! Updated changelog with info about all new and updated completions since 2.6.0 2017-09-26 15:36:37 -05:00
Mahmoud Al-Qudsi
281be31eb3 Updated changelog with info about all new and updated completions since 2.6.0 2017-09-26 15:21:01 -05:00
Mahmoud Al-Qudsi
8fcbe1a105 Install custom LSS script to /usr/local/share/fish on make install
Decided to move doc_src/fish.lss to share/lynx.lss, which just makes
more sense all around. Accordingly, now using {$__fish_datadir} instead
of {$__fish_help_dir} in help.fish.

Makefile now installs the custom lss on make install

(cherry picked from commit 338311af1e)
2017-09-26 15:00:32 -05:00
Mahmoud Al-Qudsi
8692489326 Use a custom Lynx style sheet (LSS file) to work around Lynx bug
Lynx uses a very naïve method of applying styles to HTML elements by
hashing the element type and the class name to generate a map of
hash:style. After the hash is calculated, Lynx does not go back and
check whether or not the actual string values match the LSS properties.

See the following links on the Links mailing list:
 * http://lists.gnu.org/archive/html/lynx-dev/2015-12/msg00037.html
 * http://lists.gnu.org/archive/html/lynx-dev/2015-12/msg00039.html

This patch copies the default Lynx stylesheet but removes highlighting
and other styles that would result in unreadable text (due to not enough
contrast with the background color), and if the `help` builtin detects
that the best web browser to use is Lynx, it instructs it to use this
modified stylesheet.

(cherry picked from commit 8b858f2fcc)
2017-09-26 15:00:18 -05:00
Mahmoud Al-Qudsi
c7771bb0dd Don't use xdg-open if running in terminal mode (i.e. no Xorg)
If the $DISPLAY environment variable is not set, xdg-open should not be
used to load the web browser. Just because it is installed does not mean
that the user exclusively runs in an X session.

Needed for Lynx detection to work around #4170

(cherry picked from commit 2b425ad221)
2017-09-26 14:52:18 -05:00
Mahmoud Al-Qudsi
e1281754fe Since cwd is a path, use PATH_MAX and not NAME_MAX
(cherry picked from commit c40188e40e)
2017-09-26 10:00:45 -05:00
Mahmoud Al-Qudsi
c8425f832c Fix non-standard getcwd() invocation
The POSIX standard specifies that a buffer should be supplied to
getcwd(), not doing so is undefined (or rather, platform-defined)
behavior. This was causing the getcwd errors on illumos (though not seen
on Solaris 11) reported in #3340

Closes #3340

(cherry picked from commit b495c68f28)
2017-09-26 09:54:36 -05:00
Mahmoud Al-Qudsi
67e3bac583 Speed up __fish_print_hostnames for faster completions
Thanks to @ThomasAH, as per #4378. Tested on many platforms (OS X,
FreeBSD, Linux, and Solaris). Works with IPv4 and IPv6 as well as
host names and loopback addresses.

(cherry picked from commit 3b3bcc998e)
2017-09-26 09:27:58 -05:00
Mahmoud Al-Qudsi
73282c9c4d Ignore muparser src directory
When switching between fish3 and fish2 for development, the muparser
directory is always left over and doesn't represent anything that
concerns fish2.
2017-09-26 08:58:30 -05:00
Mahmoud Al-Qudsi
fc80505ecc Support colored ls output on Solaris 11
Closes #1223

(cherry picked from commit 6513db35c1)
2017-09-26 08:56:17 -05:00
Mahmoud Al-Qudsi
d1472532d3 Support building on Solaris 11
Took care of remaining issues preventing fish from building on Solaris.
Mainly caused by some assumptions that certain defines are POSIX when
they are not (`NAME_MAX`).

Moved `NAME_MAX` defines to common.h - for some reason, it was being
defined in a cpp file (`env_universal_common.cpp`) even though it is used
in multiple source files.

Now compiles on Solaris 11 with GNU Make. Still some warnings because
fish was written with GNU getopt in mind and the Solaris version doesn't
use `const char *` but rather just `char *` for getopt values, but it
builds nevertheless.

Assuming this closes #3340

(cherry picked from commit ffebe74885)
2017-09-26 08:29:14 -05:00
Mahmoud Al-Qudsi
01c5f6eaa8 Removed gmake disclaimer from BSD build instructions
After cc35241a6e, BSD users can just call
make normally and have it redirect the build/install/test/whatever to
GNU Make.

(cherry picked from commit 3604522bf2)
2017-09-24 15:07:50 -05:00
Mahmoud Al-Qudsi
19b89983a1 Automatically pass build through to gmake on BSD
Smarter BSDmakefile that automatically calls gmake to build the targets,
even including `-j` if provided. README.md can be simplified to remove
`gmake` references from build instructions for BSD users.

(cherry picked from commit cc35241a6e)
2017-09-24 15:07:50 -05:00
Mahmoud Al-Qudsi
92a6906e6a Update README to include syntax highlighting
Use bash syntax highlighting to make comments appear in gray
(cherry picked from commit 22a4ead36e)
2017-09-24 14:03:35 -05:00
Mahmoud Al-Qudsi
661d96c336 Make instructions after make install more uniformly formatted
Fixed indentation and quoting to match between all three commands
printed after `make install`

(cherry picked from commit 50f8ff1bc5)
2017-09-24 13:59:51 -05:00
Mahmoud Al-Qudsi
93d352b809 Work around WSL access(2) EINVAL bug
See Microsoft/BashOnWindows#2522, Microsoft/BashOnWindows#2448

(cherry picked from commit 56c041b889)
2017-09-24 13:45:54 -05:00
David Adam
bcd9c39509 Rename FISH_HISTORY to fish_history
Work on #4414.

(cherry picked and edited from commit
472e186c2b)
2017-09-24 14:30:50 +08:00
ridiculousfish
43d0016125 Correct prefix length calculation in completion measurement
A completion may have zero length; in this case the length of the
prefix was omitted and the completion was not visible. Correct the
calculation to account for zero-width completions.

Fixes #4424
2017-09-23 13:08:06 -07:00
Mahmoud Al-Qudsi
0d93125664 Merge pull request #4421 from krader1961/consistent-unicode
Use \uXXXX consistently for unicode code points
(cherry picked from commit 6b2e84be0e)

Backporting to 2.7.0 branch just to try and keep changes between master
and this branch as minimal as possible.
2017-09-22 21:19:11 -05:00
Mahmoud Al-Qudsi
ace7903bc3 Make build code snippets copy-and-paste friendly
(cherry picked from commit 46cf8c6bb7)
2017-09-16 15:52:08 -05:00
Mahmoud Al-Qudsi
f14fde2373 Use inline code for paths and commands
(cherry picked from commit 14e23749a6)
2017-09-16 15:52:07 -05:00
Mahmoud Al-Qudsi
4d31a13fb2 Lined up instructions output in make install
(cherry picked from commit eac8158110)
2017-09-16 15:38:12 -05:00
Ed Brannin
3a2b836f0e Fix smurf_color variable name
(cherry picked from commit 9ac7da28bd)
2017-09-16 07:03:14 +08:00
Mahmoud Al-Qudsi
215f731498 fixup! Include make [test|all|install] in BSDmakefile 2017-09-14 14:35:38 -05:00
Mahmoud Al-Qudsi
0d8caeec34 Include make [test|all|install] in BSDmakefile
If a build takes a long time, it's entirely possible to run `gmake` and
then forget to use GNU make and run `make install` after.
2017-09-14 14:31:45 -05:00
Mahmoud Al-Qudsi
d7628a4d29 Emit error and GNU Make directions when compiled with BSD Make
On BSD platforms, a BSD-specific BSDmakefile is searched for and used
before any generic Makefile. We can use this to emit an informational
message directing the user to use GNU Make instead of relying on the
user's recognizing of random build failures on syntax errors as a sign
to switch to GNU Make.

(Random fact: this same trick also applies to GNU Make, which searches
for a GNUmakefile before using Makefile)
2017-09-14 14:31:45 -05:00
Mahmoud Al-Qudsi
9d7a0de4c1 Squashed commit of the following:
commit e07f1d59c06094846db8ce59f65d4790b222fffa
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 21:54:45 2017 -0500

    Use git branch and git branch --remote for checkout completions

commit 9e1632236be065e051e306b11082ca4e9c7a0ee1
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 11:27:30 2017 -0500

    Correct classification of remote and local branches

    To prevent any breakage, no changes were made to __fish_git_branches,
    instead its output was filtered into __fish_git_remote_branches and
    __fish_git_local_branches, the two of which are now used to provide
    completions for "git checkout ..."

    Fixes #4395

Closes #4396
2017-09-14 13:46:03 -05:00
Mahmoud Al-Qudsi
7113cc33f1 Make s3cmd completions compatible with python3 environment
It seems that under python3, s3cmd emits its output as a long list (like
ls -l) with or without the --long parameter to "s3cmd ls s3://...".

This patch includes only s3://* paths from that output as completions.
2017-09-14 13:44:31 -05:00
David Adam
e7b0327e08 Makefile: unbreak uninstall target
Closes #4401.

(cherry picked from commit 00d44599c4)
2017-09-13 22:30:23 +08:00
Moritz
248de41d70 Add completions for git checkout --ours/--theirs (#4380)
* Add completions for git checkout --ours/--theirs

* Change description for `git checkout --ours/--theirs´ completions

(cherry picked from commit 6145b4a770)
2017-09-10 00:07:40 +08:00
Fabian Homborg
c5b7cc070e Fix string match -en error typo
Fixes #4386.
2017-09-08 16:31:41 +02:00
Fabian Homborg
bcdc6bb46b Clarify string match without -r partial match
Fixes #4388.
2017-09-08 16:26:43 +02:00
Fabian Homborg
32e65ed301 __fish_print_hostnames: Improve ssh known_hosts extraction
This now includes hosts with custom ports (and other hosts with the
same key), and explicitly excludes negated hosts, those with a
wildcard and those with an `@`-marker (e.g. `@revoked`)

It's also possibly a bit quicker because the ordering is better,
especially for files with many comments.
2017-09-07 16:24:36 +02:00
Fabian Homborg
57753c7303 __fish_print_hostnames: Use source instead of eval
Since this doesn't need stdin, we can skip eval's overhead.
2017-09-07 16:24:36 +02:00
Fabian Homborg
4437e8d8d6 __fish_print_hostnames: Use string replace -f
Saves one `string match` invocation.

Also removes a useless-use-of-cat.
2017-09-07 16:24:36 +02:00
Fabian Homborg
a4c03e3d7b ssh completions: Don't call __fish_print_hostnames twice
Saves about 40% of the time in this completion.
2017-09-07 16:24:36 +02:00
Fabian Homborg
2137e197fc git completions: Use modified files in the index for reset
Fixes #4329.

(cherry picked from commit c2f0a45d60)
2017-09-06 18:14:09 +08:00
Marcel Bischoff
7669c14274 Add basic ezjail-admin completion
(cherry picked from commit c0c33b3605)
2017-09-06 18:14:09 +08:00
Sam Yu
8eca1b0f13 Add repo completion for zypper (#4325)
* Add repo completion for zypper

* Replace sed with string in __fish_print_zypp_repos

* Move function into completion script

* Update zypper completion

add subcommand packages to __fish_zypper_repo_commands

(cherry picked from commit 81becc5f6b)
2017-09-06 18:14:09 +08:00
Fabian Homborg
908063d830 pacman-ish completions: Complete files for -Qo and -Qp
These were explicitly suppressed, which was wrong.
2017-09-05 16:55:06 +02:00
Benjamin Reitzammer
7d46c78082 add --force-with-lease completion for git push (#4368)
(cherry picked from commit 72244dee5b)
2017-09-01 23:31:03 +08:00
Alexey Alekhin
6368bebf12 Added sbt to the list of new completions
Also fixed sublist indentation and removed periods for formtatting consistency

(cherry picked from commit 75dd852340)
2017-09-01 23:30:59 +08:00
modula t. worm
3905c3355b Add completions for kdeconnect-cli (KDE Connect)
(cherry picked from commit fa3ca4dc3d)
2017-09-01 23:28:13 +08:00
Alexey Alekhin
d2c0cafeb7 Added sbt completions
(cherry picked from commit a43da0163a)
2017-09-01 23:28:13 +08:00
David Adam
737da73dd6 CONTRIBUTING.md: add note about dependencies
(cherry picked from commit 6cff72b226)
2017-09-01 23:28:13 +08:00
David Adam
f3142a7d91 README.md: rearrange and rewrite
Closes #2062

(cherry picked from commit 1183505695)
2017-09-01 23:26:50 +08:00
David Adam
e892c51b9c builtin_read: pickup MB_CUR_MAX from stdlib not xlocale
Fixes building on OpenBSD; work on #4184.

(cherry picked from commit 874a675e7f)
2017-08-28 12:24:42 +08:00
Mahmoud Al-Qudsi
e67ab57ca3 Fix uninitialized sigaction.sa_flags valgrind error
Valgrind warns that the sometimes uninitialized sigaction.sa_flags field
is sometimes used when passed to the signal handler.

This patch explicitly zeros out the sigaction.sa_flags field at creation
time.
2017-08-26 19:11:39 -05:00
David Adam
2d08da79e9 fish.spec: depend on system pcre2 libraries where available
(cherry picked from commit 1872fb4ea9)
2017-08-26 00:17:57 +08:00
Radek SPRTA
27d7feaf95 Fix apt subcommand option completions 2017-08-22 21:46:28 -07:00
David Adam
240bb25dbe Makefile: improve build reproducibilty by using LC_ALL=C in sort
Based on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791648

(cherry picked from commit a311f49eda)
2017-08-19 23:11:53 +08:00
Phidica Veia
9a092ec015 Add vertical bar escape \| to documentation
Fixes #3794

(cherry picked from commit 84b59ae0be)
2017-08-19 15:23:58 +08:00
Mahmoud Al-Qudsi
f706081ea4 Replace custom s3cmd completion functions with standard __fish_* functions
Per the discussion with @faho in #4332, replaced some custom completion
state detection functions with standard __fish_* functions used in other
completion sources.
2017-08-18 11:55:16 -05:00
Mahmoud Al-Qudsi
7fe3cb7b29 fixup! Provide completions for s3cmd 2017-08-18 11:55:16 -05:00
Mahmoud Al-Qudsi
539acd9fc5 Provide completions for s3cmd
No longer auto-generated. Everything has been summarized. Supressing
file completions for initial command, providing list of valid initial
commands, filtering --options by subcommand.
2017-08-18 11:55:16 -05:00
Kurtis Rader
4b51e0f935 Fix typo in xdg-mime completion functions 2017-08-17 10:56:18 -07:00
MoritzKn
2761cf1bf5 Update xdg-mime helper
This will respect the `/usr/local/share/applications/` directory when
fetching mime infos.

Update xdg-mime helper to comply with the xdg spec.

This also makes sure __fish_print_xdg_applications_directories only prints
directories that exist.

Relevant specs:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
https://specifications.freedesktop.org/desktop-entry-spec/latest/ape.html
2017-08-17 10:55:42 -07:00
Kurtis Rader
bf3731bed4 Update changelog 2017-08-17 10:31:48 -07:00
Matus Goljer
3fe561bc93 Add completion for packages in update subcommand
This patch adds completion for the update subcommand, that is, when the
user types in `composer update <tab>`.

The code depends on python for the json parsing.  I'm not sure if this
is appropriate or if there is a fish-native way to parse json data.

Use suggestions for remove subcommand.

Add suggestions for why, why-not and depends.

Add why/why-not suggestion.
2017-08-17 10:28:14 -07:00
Georgy Yakovlev
277db1c1af Do not redirect to / in status.in/err test. 2017-08-17 10:27:36 -07:00
Kurtis Rader
dbb07bc3f5 fix set --show of semi-empty var
A semi-empty var is one with a single empty string element. The
`env_var_t::empty()` method returns true for such vars but we want
`set --show` to report that it has a single empty element.
2017-08-16 13:19:17 -07:00
David Adam
64eaf7ca5a Revert "Enable support for custom versioning"
This reverts functional changes in commit
ea3e9698df.

 * Annotated tags only should be used for releases - see #3572 for
   examples of where we want to use lightweight tags.

   See also git-tag(1) on the purpose of annotated and lightweight tags.

 * Version numbers are numbers and should not start with a branch name.

   The commit ID is embedded in the version and uniquely identifies the
   history. `fish --version` and `echo $FISH_VERSION` contain this
   information.

(cherry picked from commit dcb39bfa86)
2017-08-16 20:56:29 +08:00
Kurtis Rader
ea3e9698df Enable support for custom versioning
Now that we're working on the 3.0.0 major release it is more important
than ever that fish binaries built by developers have version strings
which clearly communicate where they came from.
2017-08-15 12:46:20 -07:00
Andrew Toskin
d407c22ee7 getopt isn't used anymore, and getent itself is optional.
getopt doesn't work very well in the BSDs, and getent has plenty of
fallbacks to replace it when it's not available.

<https://github.com/terrycloth/fish-shell/commit/
47a768ceeaef1d702624802d83338edbcc0f377c#commitcomment-23613921>
2017-08-14 18:02:55 -07:00
Mahmoud Al-Qudsi
4fd458900b Silence unused result warnings on newer compilers
Newer versions of GCC and Clang are not satisfied by a cast to void,
this fix is adapted from glibc's solution.

New wrapper function ignore_result should be used when a function with
explicit _unused_attribute_ wrapper is called whose result will not be
handled.
2017-08-14 18:02:42 -07:00
Andrew Toskin
3f6ed72a6b Really spell out the last of the required UNIX utilities.
Finishing the job started in Pull Request #4301

<https://github.com/fish-shell/fish-shell/pull/4301>

Thanks to @faho for filtering and sorting my giant list of detected
possible commands.

<https://github.com/fish-shell/fish-shell/issues/2062#issuecomment-321788080>
2017-08-14 18:02:04 -07:00
David Adam
3a6ec68a32 Revert "configure: check that errno is threadsafe"
This reverts commit ee15f1b987.

The test relies on undefined behaviour (checking for errno in the
absence of an error condition) and was broken on OpenBSD.

Closes #4184.
2017-08-14 18:01:51 -07:00
David Adam
7b7bb5803f docs: update language in read documentation 2017-08-14 17:59:50 -07:00
Kurtis Rader
263cdc50db document special value zero for FISH_READ_BYTE_LIMIT 2017-08-14 17:58:13 -07:00
sentriz
c59e221bf1 Accept return as a valid answer to 'Edit the file again?'
Also, check for affirmative answer so a random string isn't taken as a
"yes" response.
2017-08-14 17:54:30 -07:00
Mahmoud Al-Qudsi
67f7e53237 Ignore more invalid arguments from parsed man pages
Specifically closes #4313.
Not being as agressive in what we ignore/blacklist, but can be revisited
easily in the future to add more characters to the argument blacklist.
2017-08-11 13:54:41 -05:00
Fabian Homborg
219c7ec812 help: Fix error if no argument is given 2017-08-11 18:27:58 +02:00
Fabian Homborg
4dbb274d8a Clarify docs on $status with and/or/begin/end
See #4311.
2017-08-11 15:06:03 +02:00
Andrew Toskin
e27855b225 Clarify dependencies: required vs optional, and build vs runtime. (#4301)
* Clarify dependencies: required vs optional, and build vs runtime.

A first pass at updating the dependency documentation, based on the
discussion in this thread:
https://github.com/fish-shell/fish-shell/issues/2062

* Clarify notes on dependency errors, tests, and VCS integration.

An optional feature that suggests you install Python is okay;
core-dumping is not.

The note on tests was about fish development tests, not the `test`
builtin for conditional syntax.

Specifically mention git, hg, and svn in the VCS section.
2017-08-11 12:52:38 +02:00
peoro
7f1bdc5541 Improved warning message when exiting with jobs still active
Fixes #4303
2017-08-10 16:57:14 -07:00
David Adam
9b6256d0fc docs: improve set -Ux language and example
By far the most common problem with universal variables being overridden
by global variables is other values being imported from the environment;
the `set -q; or set -gx` is much more of an edge case.
2017-08-10 13:20:25 +08:00
Kurtis Rader
781a6b118a overlooked reference to . completion script in makefile 2017-08-09 19:54:52 -07:00
Fabian Homborg
d84a859f4f Revert "Fix clearing abandoned line with VTE (#4243)"
Unfortunately, this breaks the expect tests.

So, until I can figure out how to unbreak them:

This reverts commit 09cb31a172.
2017-08-10 02:24:13 +02:00
Fabian Homborg
09cb31a172 Fix clearing abandoned line with VTE (#4243)
* Fix clearing abandoned line with VTE

With VTE-based terminals, resizing currently causes multi-line prompts
to go weird.

This changes the sequence we use to clear the line to one suggested by
a VTE
developer (https://bugzilla.gnome.org/show_bug.cgi?id=763390#c4).

It changes nothing in konsole 17.04.3 and urxvt 9.22, but they already
work.

Note that this does not fix the case where output did not end in a
newline, but that doesn't seem to be up to us. Also, it only affects
those lines.

Fixes #2320.

* Use terminfo definition instead of hardcoding

Thanks to @ixjlyons.
2017-08-10 00:37:32 +02:00
Kurtis Rader
11f5bbf83d remove completions for . and source
These completions never actually worked and always fell back to the
builtin path completion. But a recent fix means that these now keep the
fallback from happening resulting in no completions for these commands.
2017-08-09 11:15:20 -07:00
David Adam
5d2a806ac6 set: update language of warning message 2017-08-09 14:23:00 +08:00
Radek SPRTA
74cac0f86f completions for snap command 2017-08-07 18:47:37 -07:00
Alexey Alekhin
326f2affa4 Fixed functions -D/--details completion 2017-08-07 17:43:05 -07:00
Elliott Beach
9fa0edcbc9 document bind behavior when mixing command types
Fixes 3683
2017-08-06 20:49:30 -07:00
Kurtis Rader
4f5bd08b20 improve set -U warning
Doing `set -U var` when a global named `var` exists can result in
confusing behavior. Try to limit the confusion by improving the warning
we write. Also, only write the warning if interactive.

Fixes #4267
2017-08-06 19:57:25 -07:00
Sam Yu
0988f53c70 Speedup git prompt
Fix __fish_git_prompt too slow under repo with lots of untracked
files when __fish_git_prompt_showuntrackedfiles enabled.
2017-08-04 20:43:07 -07:00
Kurtis Rader
ff09b8c1ee fix set --show output
I realized I was printing individual var entries using zero based
indexing (like C++) when the indexes should be one based.
2017-08-04 17:13:43 -07:00
Kurtis Rader
2b2057a56b update changelog re set --show 2017-08-03 19:01:12 -07:00
Kurtis Rader
38024a50dc backport set --show from fish 3.0
I decided this was just too useful not to include in our final fish 2.x
release. And since it does not modify any existing behavior it is safe
to include at this late date in the process of creating 2.7.
2017-08-03 18:56:25 -07:00
Kurtis Rader
067892c4f1 update changelog to document sublime completions 2017-07-31 22:14:22 -07:00
Raoul Wols
8e3a9c9585 Add Sublime Text 3 completions 2017-07-31 22:09:06 -07:00
Kurtis Rader
f4414a0631 implement complete -k as a no-op
Fixes #4270
2017-07-29 21:50:39 -07:00
Kurtis Rader
550e2c0d08 Merge branch 'fish-history' 2017-07-29 21:21:06 -07:00
Daniel K
d68b631919 fix check for existing variable 2017-07-29 21:18:44 -07:00
Kurtis Rader
96fca8b4ec fix how fish behaves when FISH_HISTORY is set
Without this change setting `FISH_HISTORY` causes interactive input to
no longer provide autosuggestions, completions, etc.

Fixes #4234
2017-07-27 21:32:49 -07:00
Mahmoud Al-Qudsi
7a18c37b39 Using write_ignore instead of write where the result is not checked
This silences warnings from the compiler about ignoring return value of
‘ssize_t write(int, const void*, size_t)’, declared with attribute
warn_unused_result [-Wunused-result].
2017-07-27 18:07:58 -07:00
Mahmoud Al-Qudsi
a1c4475c0d Silenced (wrong) -Wmaybe-uninitialized warnings 2017-07-27 17:52:33 -07:00
Jon Eyolfson
18219646a0 Remove completer_t::complete_special_cd
The class `completer_t` declares `complete_special_cd`, an unused method. I searched the entire source tree and this declaration seems to be the only instance of `complete_special_cd`. There is no definition or uses which likely means this is dead code.
2017-07-27 17:31:06 -07:00
Kurtis Rader
4e026588f4 modify prev commit to use builtin cd
Using the `cd` function can have undesirable side effects like mucking
with the directory history. So force the use of the builtin cd.
2017-07-27 14:36:32 -07:00
Kurtis Rader
defdc92b57 fix ssh config Include file handling
Fixes #4253
2017-07-27 14:36:32 -07:00
Thales Mello
a071deaf61 Make npm run-script completion faster with jq (#4241)
* Make npm run-script completion faster with `jq`

When jq is available, it's actually faster to invoke jq and parse the `package.json`
invoking the `npm` command.

Also, prior to this commit, both `__fish_complete_npm` and `__fish_npm_run` were being run
whenever completions for `npm run` subcommand was being used, which was actually making
repetitive work (invoking npm command twice). This pull request is supposed to make completion
without `jq` faster as well

* Refactor npm.fish for code reutilization

Created function to handle both cases of npm run completion parse, with or without `jq` completion.

* Remove unecessary blank line
2017-07-26 13:31:35 +02:00
Kurtis Rader
8e2d165756 document need for double-quotes around test args 2017-07-25 17:04:41 -07:00
Kurtis Rader
92f39f7b89 fix bug introduced by commit 86af63cd3 2017-07-25 14:03:40 -07:00
Mohamed Akram
d2d707a6fa Ignore comments when creating man page completion 2017-07-22 21:32:56 -07:00
Rabah Meradi
f8fa69f817 Document how to erase a path from $PATH variable
Fixes #3161
2017-07-22 21:29:41 -07:00
Fabian Homborg
7304d82416 Fix file completion for tail 2017-07-22 14:09:34 +02:00
Raphael P
3fc0faaebb Update completions for heroku pg:backups
heroku pgbackups has been deprecated and replaced by heroku pg:backups command.
See: https://devcenter.heroku.com/changelog-items/623

Completion for new subcommand has been added as well.
2017-07-22 11:08:15 +02:00
Kurtis Rader
d068f846e8 simplify history function
The fix for #4232 allows us to simplify the `history` function slightly.
2017-07-21 16:26:15 -07:00
Kurtis Rader
f3130ce70b fix argparse handling of short flag only specs
@faho noticed that option specs which don't have a long flag name are
not handled correctly. This fixes that and adds unit tests.

Fixes #4232
2017-07-21 15:55:52 -07:00
Kurtis Rader
9ef47a43a4 change how argparse handles boolean flags
When reporting whether a boolean flag was seen report the actual flags
rather than a summary count. For example, if you have option spec `h/help`
and we parse `-h --help -h` don't do the equivalent of `set _flag_h 3`
do `set _flag_h -h --help -h`.

Partial fix for #4226
2017-07-20 17:54:06 -07:00
Kurtis Rader
2c77b24ced modify show test helper to work around BSD quirk
The BSD `seq` command handles `seq 0` weird.
2017-07-20 12:44:19 -07:00
Fabian Homborg
627ce4ea34 Fix segfault related to getting the uvar pipe path
This tried setting $USER (again), but did it wrong.

Fixes #4229 TO THE MAXXX.
2017-07-20 20:18:07 +02:00
Fabian Homborg
e0f0164b16 Quote $USER when used with switch or test
Common in prompts, this would fail if $USER is empty.

See #4229.
2017-07-20 19:45:32 +02:00
Fabian Homborg
3b92d99277 Handle setting $HOME with missing $USER
Fixes #4229 harder.
2017-07-20 19:45:03 +02:00
Fabian Homborg
529ba30b1a Don't assert out if $HOME really cannot be found
In the rare case that we don't inherit $HOME _and_ can't read it from
/etc/passwd, this makes it so instead of triggering an assert() $HOME
is set to the empty list.

Tilde-expansion expands to nothing in such a case (and a string-empty
$HOME), `cd` errors out.

Fixes #4229.
2017-07-20 16:09:34 +02:00
Kurtis Rader
bb344bbd8f replace another custom show with the util func
Replace the `show_ary` function with the `show` test utility function.
2017-07-19 22:42:52 -07:00
Kurtis Rader
dc33c1afe1 change show test utility function
Due to how various tests show the status of variables I decided to
modify the `show` test utility function I recently added.
2017-07-19 22:28:24 -07:00
Kurtis Rader
8f548962b7 fix regression how fish_escape_delay_ms is handled
Fish 2.6.0 introduced a regression that keeps setting
`fish_escape_delay_ms` as a uvar from working. This also fixes a related
problem: callbacks generated from the initial loading of universal vars
were not being acted on.

Fixes #4196
2017-07-19 19:09:55 -07:00
Kurtis Rader
2d5b698f0b add entry about set -Ux to the FAQ
This was inspired by this stackoverflow question:
https://stackoverflow.com/questions/45119425/how-can-i-set-environment-variables-in-fish/
2017-07-19 13:21:56 -07:00
Kurtis Rader
9e08609f85 fix argparse --help
Also stop special-casing `printf` as if it were a syntactical keyword
with respect to handling `printf --help`. It should use the same pattern
as every other builtin command.
2017-07-19 12:19:40 -07:00
Kurtis Rader
f78ab085b5 Revert "argparse: let builtin_run() handle help."
This reverts commit bbc6bda843.
2017-07-19 11:13:59 -07:00
Aaron Gyes
bbc6bda843 argparse: let builtin_run() handle help.
Fixes #4228 and simplifies code a little. Most builtins shouldn't
need to do any work for -h/--help.
2017-07-19 07:23:40 -07:00
Kurtis Rader
0dc92fbb2d a make style-all cleanup 2017-07-18 22:40:25 -07:00
Kurtis Rader
5e2c14e7be fix a regression involving parser error output
The code for reporting parser errors needs a major overhaul. But rather
than do that I'm going to add another hack in the hope that this doesn't
introduce yet another problem.

Fixes #4221
2017-07-18 20:50:54 -07:00
Kurtis Rader
ed38db3370 refactor builtin_argparse to remove lint 2017-07-18 20:22:09 -07:00
Kurtis Rader
69ecda5082 update math to use the new argparse validation 2017-07-18 15:03:08 -07:00
Kurtis Rader
4e1303823b add ability for argparse to validate args
Fixes #4211
2017-07-18 14:42:50 -07:00
Fabian Homborg
2dfb615d7b Fix typo
Fixes #4225.
2017-07-18 23:37:14 +02:00
Kurtis Rader
403d9691cb fix handling of ssh aliases
Fixes #4213
2017-07-17 21:13:21 -07:00
Kurtis Rader
71af1a9566 don't die if read is invoked with no var names
Partial fix for #4220 by restoring the old behavior if no var name was
provided. But we still set an empty var if a var name was provided.
2017-07-17 14:54:43 -07:00
Kurtis Rader
8f22def8f7 return to psub --file being the default
The recent change to switch `psub` to use `argparse` caused it to use
a fifo by default because it inadvertently fixed a long standing bug in
the fish script. This changes the behavior back to `psub --file` being
the default behavior and introduces a `--fifo` flag. It also updates the
documentation to make it clearer when and why `--fifo` mode should not
be used.

Fixes #4222
2017-07-17 14:33:51 -07:00
Kurtis Rader
3e226f0a5e implement a new implicit int option spec
While updating the `history` function to use `argparse` I realized it is
useful to define an option that can be used in three ways. First by
using the short flag; e.g., `-n NNN`. Second by using the long flag;
e.g., `--max NNN`. Third, as an implicit int flag; e.g., `-NNN`. This
use case is now supported by a spec of the form `n#max`.
2017-07-16 18:27:41 -07:00
Kurtis Rader
06d071dd94 clarify argparse documentation 2017-07-16 15:33:04 -07:00
Kurtis Rader
c22df3b823 update history to use argparse 2017-07-16 15:13:39 -07:00
Kurtis Rader
5dc78dd858 fix regression involving read from scripts
Fixes #4206
2017-07-15 21:21:24 -07:00
Kurtis Rader
f2c8e73891 add more alias unit tests
A recent regression to the `alias` command points out the need for more
unit tests of its behavior. I also decided to use it as an opportunity
to normalize the output of just `alias` to list aliases.
2017-07-15 17:36:36 -07:00
Kurtis Rader
98449fec51 fix math regression
The previous change to use `argparse` for parity with every other
builtin and function introduced a regression. Invocations that start
with a negative number can fail because the negative value looks like an
invalid flag.
2017-07-14 16:03:31 -07:00
Kurtis Rader
ff4d275f22 remove left over debug statement 2017-07-14 08:18:41 -07:00
Kurtis Rader
63d601610d implement -nnn style flags in argparse
This implements support for numeric flags without an associated short or
long flag name. This pattern is used by many commands. For example `head
-3 /a/file` to emit the first three lines of the file.

Fixes #4214
2017-07-13 20:36:59 -07:00
Kurtis Rader
49a0841533 update type to use argparse 2017-07-13 15:19:02 -07:00
Kurtis Rader
51bbecc419 update realpath to use argparse 2017-07-13 14:33:11 -07:00
Kurtis Rader
3e6c57d5d3 update psub to use argparse 2017-07-13 14:12:51 -07:00
Kurtis Rader
30940916bd update prompt_pwd to use argparse 2017-07-13 14:12:51 -07:00
Kurtis Rader
51a52a7286 update open to use argparse 2017-07-13 14:12:51 -07:00
Kurtis Rader
e8243af20b update math to use argparse 2017-07-13 14:12:47 -07:00
Kurtis Rader
140e6204be update help to use argparse 2017-07-13 13:49:15 -07:00
Kurtis Rader
86af63cd39 update funcsave to use argparse 2017-07-13 13:35:26 -07:00
Kurtis Rader
6ecd0bcb32 update funced to use argparse 2017-07-13 13:29:35 -07:00
Kurtis Rader
df65ed8696 update dirs to use argparse 2017-07-13 11:53:29 -07:00
Kurtis Rader
30baf8d101 convert dirh to use argparse 2017-07-13 11:50:57 -07:00
Kurtis Rader
f156bea1b7 convert alias to use argparse 2017-07-13 11:47:41 -07:00
Kurtis Rader
05aae4764b convert popd and pushd to use argparse 2017-07-13 11:31:08 -07:00
Kurtis Rader
5ac8c42fad convert nextd to use argparse
Also fix a bug I introduce in `prevd` when I converted it to use `argparse`.
2017-07-13 11:30:48 -07:00
Kurtis Rader
c149f4f301 add argparse unit tests and fix some bugs
This implements some unit tests for the new `argparse` command and fixes
a couple of bugs those tests brought to light.

Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
3a782003ed have argparse report the proper command name 2017-07-12 22:38:32 -07:00
Kurtis Rader
abef2cc422 convert nextd to use argparse 2017-07-12 22:38:32 -07:00
Kurtis Rader
5cf2a50269 convert isatty to use argparse 2017-07-12 22:38:32 -07:00
Kurtis Rader
3c4e3035fd switch from getopt to argparse
Convert our two functions that use `getopt` to use our new `argparse`
builtin.

Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
0d08bfd6ff document new argparse command
Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
28454cb57d SIZE_T_MAX => SIZE_MAX
macOS happens to have a non-standard SIZE_T_MAX which is why I didn't
notice it should be SIZE_MAX for portability.
2017-07-12 22:38:32 -07:00
Kurtis Rader
8754f776d8 fix oclint NPATH_COMPLEXITY custom threshold 2017-07-12 22:38:32 -07:00
Kurtis Rader
b3d3e07c55 changes based on feedback 2017-07-12 22:38:32 -07:00
Kurtis Rader
a4dc2b872b implement fish_opt helper command
This implements a `fish_opt` command that provides a way for people
to create option specs for the `argparse` command as an alternative to
creating such strings by hand.

Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
9adf500cf3 implement argparse --max-args N --min-args N
Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
e260c42a13 implement argparse --exclusive
Fixes #4190
2017-07-12 22:38:31 -07:00
Kurtis Rader
277999adef implement argparse builtin
We've needed a fishy way to parse flags and arguments given to scripts
and functions for a very long time. In particular a manner that provides
the same behavior implemented by builtin commands. The long term goal is
to support DocOpt. But since it is unclear when that will happen so this
implements a `argparse` command. So named as homage to the excellent
Python module of the same name.

Fixes #4190
2017-07-12 22:38:24 -07:00
Kurtis Rader
b88cacf03e fix some documentation errors 2017-07-11 22:50:55 -07:00
David Marchal
bd5c98298c Added completions for passwd 2017-07-11 17:10:24 +02:00
David Marchal
e1951a32bb Fixed __fish_complete_users to better format GECOS 2017-07-11 17:00:08 +02:00
Kurtis Rader
875a9c4c2e properly document --init-command addition 2017-07-10 20:59:42 -07:00
PenegalECI
c577d01207 Add completions for mdadm (#4198)
* Added completions for mdadm

* Applied changes requested by @faho and @krader1961
2017-07-10 17:13:35 +02:00
Kurtis Rader
2c582fbc4e document some 2.7.0 changes 2017-07-09 21:54:28 -07:00
Kurtis Rader
1e6bd2d968 use the UNUSED(); pattern for the prev change 2017-07-09 19:55:04 -07:00
ridiculousfish
a4eec25447 Fix unused varibale warning 2017-07-09 18:17:20 -07:00
David Adam
798f1a7050 docs: tighten language in FAQ 2017-07-09 14:11:15 +08:00
David Adam
285af8c4b4 docs: add FAQ for error caused by empty braces in find
See #95, #1109, #1468, #2206, #2840, #4202, etc.
2017-07-09 14:10:10 +08:00
Kurtis Rader
cf808674bf fix stupid bug in previous commit
This fixes a stupid bug in my previous commit to standardize on a new
`list_to_array_val()` function. This adds a unit test to keep this from
regressing.
2017-07-08 20:41:11 -07:00
Kurtis Rader
873cbc3c64 add #include inadvertently removed 2017-07-08 14:17:35 -07:00
Kurtis Rader
a9aa234a64 implement helper functions for fish script vars
This is the first step in implementing a better abstraction for handling
fish script vars in the C++ code. It implements a new function (with two
signatures) to provide a standard method for construct the flag string
representation of a fish script array.

Partial fix for #4200
2017-07-08 13:14:30 -07:00
Kurtis Rader
899b5ec6cf implement helper functions to construct array val 2017-07-07 15:20:28 -07:00
Kurtis Rader
80df9053b3 count -h should report 1
The count command should not treat any flag specially. Not even `-h` and
`--help`. It should simply return a count of the number of arguments it
received.

Fixes #4189
2017-07-05 17:24:34 -07:00
Kurtis Rader
8cc4639ea6 implement cdh command
Fixes #2847
2017-07-05 13:25:18 -07:00
tamanugi
6b92f830ff Use __fish_complete_user_at_hosts 2017-07-05 16:24:45 +02:00
tamanugi
170f11771b Add function __fish_complete_user_at_hosts
This function list hostnames;
if commandline hoge@~ , it list hoge@(hostname)
2017-07-05 16:24:45 +02:00
tamanugi
70c9d78536 Add fab completions 2017-07-05 16:24:39 +02:00
Fabian Homborg
d6a9d6c59e git completions: Add missing quote
Fixes #4187.
2017-07-05 15:04:44 +02:00
Kurtis Rader
83ecf84392 harden git completion against an undef var 2017-07-04 17:34:52 -07:00
Kurtis Rader
4853ec0281 harden psub again an undef TMPDIR 2017-07-04 16:35:32 -07:00
Fabian Homborg
bdee54bd10 expand_brackets: Always break
This shouldn't change anything (since we just end up printing an error
later), but it silences a gcc warning.
2017-07-04 23:52:39 +02:00
Fabian Homborg
c8252e7e0b Silence fallthrough-warning on gcc 2017-07-04 23:52:39 +02:00
Fabian Homborg
bb90a4e4a9 Always initalize "success" in unescape_string
gcc warns about this.
2017-07-04 23:52:39 +02:00
Kurtis Rader
8caab103d8 harden man against undef vars 2017-07-04 13:56:35 -07:00
Kurtis Rader
2df89f4b0f check if $fish_color_cancel is set before using it 2017-07-04 13:56:35 -07:00
Kurtis Rader
e4aedcd22c check that TMPDIR is set before using it 2017-07-04 13:56:35 -07:00
Fabian Homborg
9fb7037174 fish_key_reader: Add --version option
This should be there anyway, and we try to find fish_key_reader for
.app bundles, so this stops us from defining aliases to the command.

See #4179.
2017-07-04 22:55:47 +02:00
Kurtis Rader
4152bdc698 deal with fish_wcswidth() returning -1
Completion strings, especially the description, might contain characters,
such as backspace, which make it impossible to calculate the width of
the string.

Fixes #4179
2017-07-04 13:03:25 -07:00
Kurtis Rader
f3d025bd75 always define argv for scripts
Found when testing what breaks when dereferencing undefined vars is an
errors (#4163).

Fixes #4181
2017-07-03 16:58:14 -07:00
Kurtis Rader
f6d101e7ad fix undef var reference in history
The change for issue #4163 brought to light the pointless attempt to use
`$_` in the `history` function.
2017-07-03 16:26:27 -07:00
Kurtis Rader
d383e3b92c define the var when the read limit is exceeded
This problem was found when testing the change for issue #4163 to make
dereferencing an undefined variable an error.

Fixes #4180
2017-07-03 16:14:28 -07:00
Kurtis Rader
d51f82d1b5 fix bug in test3
The change for issue #4163 brought to light a bug in tests/test.in.
2017-07-03 15:36:38 -07:00
Kurtis Rader
b759ba8a3d harden test3 against undef vars
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-03 15:21:42 -07:00
Kurtis Rader
0ec9acf0f0 harden abbr against undef vars
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-03 13:05:50 -07:00
Kurtis Rader
763063e741 more changes to better handle undef vars
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-03 10:16:31 -07:00
Kurtis Rader
4f345fdee7 harden *share/config.fish* against an unset var
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-02 21:16:48 -07:00
Kurtis Rader
ea38519a12 fix var name in __fish_git_prompt
Var `___git_ps_color_suffix_done` is supposed to be
`___fish_git_prompt_color_suffix_done`. This bug was found by an
experimental change to detect the use of undefined variables (#4163).

Similarly, we should simply test whether `__fish_git_prompt_showcolorhints`
is set rather than set to a non-empty string.
2017-07-02 20:49:40 -07:00
Kurtis Rader
85b42b22f4 define __fish_active_key_bindings before using it 2017-07-02 13:41:40 -07:00
Kurtis Rader
3284393aba cleanup some undefined var references
Testing a fix for #4163 revealed some questionable dereferencing of
variables that are not certain to be defined.
2017-07-02 13:41:40 -07:00
radek-sprta
7904f92c9e Update CONTRIBUTING.md
Add 'Configure Vim for Fish scripts' section.
2017-07-02 12:56:43 +02:00
Kurtis Rader
ec1e9ac98d standardize on builtin_missing_argument() 2017-07-01 14:03:47 -07:00
Kurtis Rader
68f4e005e4 fix handling of empty read history session ID 2017-07-01 13:23:24 -07:00
Kurtis Rader
c6093ad782 make read honor FISH_HISTORY
The `read` command `-m` and `--mode-name` vars are now deprecated and do
nothing other than result in a warning message. The `read` command now
honors the `FISH_HISTORY` var that is used to control where commands are
read from and written to. You can set that var to the empty string to
suppress the use of both history files. Or you can set it to a history
session ID in which case that will limit the `read` history that is
available.

Fixes #1504
2017-06-30 21:03:05 -07:00
Kurtis Rader
ec14527545 don't import bash history if not default fish hist
Don't import the bash history if the user has specified that a non-default
fish history file should be used. Also, rename the var that specifies
the fish history session ID from `FISH_HISTFILE` to `FISH_HISTORY`.

Fixes #4172
2017-06-30 20:24:55 -07:00
Kurtis Rader
2cc0107dbf document new FISH_HISTORY var in changelog 2017-06-30 17:24:24 -07:00
tomassedovic
aec0973196 Make the history session configurable
Using the FISH_HISTFILE variable will let people customise the session
to use for the history file. The resulting history file is:

    `$XDG_DATA_HOME/fish/name_history`

Where `name` is the name of the session. The default value is `fish`
which results in the current history file.

If it's set to an empty string, the history will not be stored to a
file.

Fixes #102
2017-06-30 17:13:02 -07:00
Sam Yu
6f6a4a842c Fix typo in zypper.fish 2017-06-30 14:46:43 +02:00
Nick Tzaperas
eaa0fdaeba fish_bind_mode variable documentation 2017-06-29 22:11:31 -07:00
Kurtis Rader
dd191a9d4b more wgetopt_long() normalization 2017-06-29 21:49:57 -07:00
Charles Ferguson
bf2a9f3835 Fix for bad-switch test failing on Darwin; system-specific output.
Because the 'getopt' library differs between systems, it's likely
that there will be different output. This is the case between the
GNU-based Linux and the BSD-based Darwin, for the 'getopt' library,
it seems. It causes the tests to produce different results.

To allow us to test, and check for regressions, on the different
platforms, the invocation code has been updated to allow a
system-specific suffix to be used on the test files. If this suffix
is found, the test will also be flagged as being system-specific
which should ensure the change in behaviour is noted.
2017-06-29 21:00:08 -07:00
Charles Ferguson
8d83c967d3 Support reporting diffs even when colordiff is not present.
The Travis macOS test systems do not appear to have colordiff present, so any
failures would mean that no output would be shown. This may also be a
problem for the other test scripts as well, but the invocation tests are
the ones being affected here.

We change our behaviour to downgrade to the plain diff tool if colordiff is
not present.
2017-06-29 21:00:08 -07:00
Charles Ferguson
b48cfbefba Updated CHANGELOG.md to reflect new -C/--init-command. 2017-06-29 21:00:08 -07:00
Charles Ferguson
cc24485503 Add documentation into the 'tests/invocation.sh' script.
The invocation tests were not especially clear on how they should be
used, without reading the code. And who really wants to do that? So,
a description of what the test does (and thus what each file is) is
now present in the file prologue comment.
2017-06-29 21:00:08 -07:00
Charles Ferguson
eb8b92fce7 Add tests for some other command line option invocations.
Some more of the invocations are tested in this change:

  - bad switches
  - errors in configuration files
  - regular command, configuration and init command ordering
  - persistence of variables over command invocation.
  - interactive and login switch use
  - terminal exit code return
  - version request

There are sure to be other invocations that should be tested, but
these give a fair number of them a go.
2017-06-29 21:00:08 -07:00
Charles Ferguson
3f129b570c Add test harness for fish command invocation, and tests for init command.
The new '-C' initial command needs some tests, and as there are no
tests just yet for the command invocation, this change adds a harness
and calls it from the high-level tests in the Makefile.

The tests are similar in style to the other high level tests, in that
we capture the output and compare it to that which we expect. The
harness itself is written in bash - sorry - because we're testing the
fish shell's invocation, and trying to do that with the fish we've
just built wouldn't actually make for a very useful test when things
go wrong.

The 'tests/invocation.sh' script can be executed manually, or as part
of the 'make test' target, to make it easy to use both as part of the
development and as part of automation.

The harness has only been tested on linux with bash 4.3.11, and requires
grep and sed. Although not tested with OS X, I believe I have avoided
the syntax which is inconsistent.

The tests added here cover just the initial command's basic execution,
and when it is mixed with the regular '-c' command.
2017-06-29 21:00:08 -07:00
Charles Ferguson
053d940d0a Add '--init-command', '-C' to the command line switches.
In order to allow the execution of commands before dropping to an
interactive prompt, a new switch, '-C' or '--init-command' has been
added to those switches that we accept.

The documentation has been updated correspondingly.

The original code only supported a single command list to be executed,
and this command list terminates the shell when it completes. To allow
the new command list to preceed the original one, both have been
wrapped in a new container class 'command_line_switches_t'. This is
then passed around in place of the list of strings we used previously.

I had considered moving the interactive, login and other command line
switch states into this container, but doing so would change far more
of the code, moving the structure to be available globally, and I
wasn't confident of the impact. However, this might be a useful thing
to do in the future.

A new function, run_command_list, was lifted from the prior execution
code, and re-used for both the initial command and the regular command
execution.
2017-06-29 20:59:58 -07:00
Fabian Homborg
3b5fdc3fb0 git completions: Fix aliases with weird characters
A use for the new `string escape --style=var`.

Fixes #4147.
2017-06-28 23:21:33 +02:00
Fabian Homborg
db529f06b8 type: Use command -a 2017-06-28 23:13:36 +02:00
ridiculousfish
502deda376 Use DWARF instead of dSYM files in Debug Xcode builds
This allows symbols to embed in the executable, so they don't get
lost if the executable is copied.
2017-06-28 10:21:32 -07:00
ridiculousfish
08dd04c527 Update Xcode project to reflect new builtin sources 2017-06-28 10:20:51 -07:00
Kurtis Rader
4ef14ea6e2 another make style-all cleanup 2017-06-23 23:19:09 -07:00
Kurtis Rader
bb29f9f990 replace __fish_urlencode with string escape
We now have a builtin that can do URL escaping so use it. I can't find
any uses of our private `__fish_urlencode` function in any Oh-My-Fish or
Fisherman code so remove it.
2017-06-23 22:46:36 -07:00
Kurtis Rader
f3cb625802 implement string unescape
Fixes #3543
2017-06-23 22:23:01 -07:00
Kurtis Rader
60bca14b37 implement string escape --style=xxx
We need a way to encode arbitrary strings into valid fish variable
names. It would also be nice if we could convert strings to valid URLs
without using the slow and hard to understand `__fish_urlencode` function.
In particular, eliminating the need to manipulate the locale.

Fixes #4150
2017-06-23 22:23:01 -07:00
Kurtis Rader
30368d5526 implement status function when in a breakpoint
Another step to fixing #1310. This changes means that `status -L0
function` reports the correct function when inside a breakpoint.
2017-06-23 22:14:21 -07:00
Kurtis Rader
1bee66548a don't mangle empty elements in MANPATH
Fixes #4158
2017-06-23 17:31:28 -07:00
Kurtis Rader
c31b9f430f implement command -a
Fixes #2778
2017-06-23 15:43:37 -07:00
Hector Sanjuan
2d42baac35 Fix last status report (it's always 0)
It seems something is overwriting the status before it is
saved to a variable. Fixed by setting the last_status variable
at the very beginning.
2017-06-22 14:01:19 +02:00
Kurtis Rader
e26f7aacc4 provide shorter status subcommands
As part of addressing #1310 I decided it makes more sense to replace
`current-function` with just `function`, etc., because I'm going to add
flags to let the user specify which stack level they are interested in.
With the default being zero or the "current" level.
2017-06-20 21:10:15 -07:00
Kurtis Rader
0ffc2899dc document previous two changes 2017-06-20 17:59:50 -07:00
Fabian Homborg
897dba9f07 Ignore too large indices in parse_slice
Fixes #4127.
2017-06-20 17:52:31 -07:00
Fabian Homborg
44f2f37bd4 Remove "Array index out of bounds" errors
This just removes every invalid index.

That means with `set foo a b c` and the "show" function from tests/expand.in:

- `show $foo[-5..-1]` prints "3 a b c"
- `show $foo[-10..1]` prints "1 a"
- `show $foo[2..5]` prints "2 b c"
- `show $foo[1 3 7 2]` prints "3 a c b"

and similar for command substitutions.

Fixes #826.
2017-06-20 17:52:23 -07:00
Kurtis Rader
df01547eab implement the fish_breakpoint_prompt function
This is another step to resolving issue #1310. It makes
`fish_breakpoint_prompt` a replacement for `fish_prompt` if it is defined
and we're presenting a prompt in the context of a `breakpoint` command.
2017-06-20 17:18:59 -07:00
Kurtis Rader
bd299e96b2 implement status is-breakpoint
This implements `status is-breakpoint` that returns true if the current
shell prompt is displayed in the context of a `breakpoint` command.

This also fixes several bugs. Most notably making `breakpoint` a no-op if
the shell isn't interactive. Also, typing `breakpoint` at an interactive
prompt should be an error rather than creating a new nested debugging
context.

Partial fix for #1310
2017-06-20 17:18:59 -07:00
Rabah Meradi
d234a1870b Aucompletion for jest CLI 2017-06-19 23:27:22 -07:00
Fabian Homborg
1a135aa0b0 git completions: Make checking aliases faster
See #4117.
2017-06-19 11:04:40 +02:00
Kurtis Rader
0ed2af464c document new as completion 2017-06-18 23:33:30 -07:00
Clément Martinez
d5e1405cbe Add as completions 2017-06-18 23:10:23 -07:00
Kurtis Rader
2302db4dc7 add unit test for echo -h 2017-06-18 22:25:00 -07:00
Kurtis Rader
82f5fb507d fix echo -h
In addition to fixing `echo -h` this includes some debugging related
cleanups I made while investigating the issue.

Fixes #4120
2017-06-18 22:10:19 -07:00
Kurtis Rader
59a11188df fixes for previous commit
Turns out the Travis environments are less forgiving than my system. Add
missing include. Change subsystem init order in fkr.
2017-06-18 16:42:26 -07:00
Kurtis Rader
93dad29ec6 set COLUMNS and LINES earlier
Fixes #4141
2017-06-18 15:38:52 -07:00
Kurtis Rader
385e40540c fix issues with builtin_function()
This does several things. It fixes `builtin_function()` so that errors it
emits are displayed. As part of doing that I've removed the unnecessary
`out_err` parameter to make the interface like every other builtin.

This also fixes a regression introduced by #4000 which was attempting to
fix a bug introduced by #3649.

Fixes #4139
2017-06-18 12:55:14 -07:00
Alan Somers
0e954e4764 Fix the build on FreeBSD with Clang
NULL expands to nullptr which cannot be cast to an int.  Replace it with
0 in wcsfilecmp.

Fixes issue #4136
2017-06-17 22:51:25 -07:00
Alan Somers
652faa1a13 Rename __assert to __fish_assert
FreeBSD and possibly other platforms define __assert in their C
libraries.

Fixes #4133
2017-06-17 22:41:24 -07:00
Kurtis Rader
e44934cf87 remove leftover debug printf 2017-06-17 18:39:16 -07:00
Kurtis Rader
1e9c9e01e5 refactor wgetopt.cpp to reduce complexity 2017-06-17 17:09:01 -07:00
Kurtis Rader
a312abdeb8 fix wgetopt_long() handling of short opts
Fixes #4131
2017-06-17 16:00:33 -07:00
Kurtis Rader
af22bf3501 style cleanups (make style-all) 2017-06-16 21:01:57 -07:00
Kurtis Rader
d22743dad0 change help only cmd opts interface 2017-06-16 21:01:57 -07:00
Kurtis Rader
37b8cfaeba avoid struct name clashes
Running the tests on travis revealed that some compilers (or at least
with some options) call the wrong struct constructor if there is more
than one struct with the same name but differing definitions.
2017-06-16 21:01:57 -07:00
Kurtis Rader
a114492223 more builtin refactoring 2017-06-16 21:01:57 -07:00
Kurtis Rader
69e823d612 customize some oclint thresholds 2017-06-16 21:01:57 -07:00
Kurtis Rader
d910b7af7d fix some lint warnings 2017-06-16 21:01:57 -07:00
Kurtis Rader
ffdabace5e more builtin style cleanup 2017-06-16 21:01:57 -07:00
Kurtis Rader
b480b117a9 split builtin realpath into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
a665d532c3 split builtin exit into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
b530d175e7 split builtin return into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
422b1bd066 split builtin bg into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
79e74d0ebb split builtin fg into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
070d204d9b split builtin pwd into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
175570b7ed lint cleanup 2017-06-16 21:01:56 -07:00
Kurtis Rader
a1744b5822 run make depend 2017-06-16 21:01:56 -07:00
Kurtis Rader
a6d6ded9a5 split builtin contains into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
bda6426bf7 split builtin builtin into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
551bd39889 split builtin command into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
fded427c6a split builtin cd into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
7840d53ecf split builtin source into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
52709e8051 split builtin disown into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
1d4a0fb091 split builtin echo into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
59e90123ea change naming convention for parsing opts 2017-06-16 21:01:56 -07:00
Kurtis Rader
044f5512e2 split builtin function into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
1c91ec9dfa split builtin random into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
e7f87c08e1 split builtin status and read into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
ef8a0c93ea split builtin history into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
2079b4292e fix minor bug introduced by previous refactoring 2017-06-16 21:01:56 -07:00
Kurtis Rader
00ed221b5a split builtin functions into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
1b9824ae46 split builtin emit into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
b20ffca3e2 split builtin block into its own module 2017-06-16 21:01:56 -07:00
Kurtis Rader
7a6a766e0a remove dead code
Remove code for the `__fish_parse` builin that has been commented out
for three years. Add a call to `parse_dump_tree()` to fish_indent.
2017-06-16 21:01:56 -07:00
Kurtis Rader
a6227f6c3a split builtin bind into its own module
As part of putting the `bind` command code into its own module refactor
how it parses its flags.
2017-06-16 21:01:56 -07:00
Kurtis Rader
ed6c8a95d7 improve debugger documentation
Fixes #4125
2017-06-15 16:53:56 -07:00
rolag
ac2c38735d Add max_line_length to .editorconfig 2017-06-16 01:32:55 +02:00
Fabian Homborg
cec2999983 Allow help to open the tutorial
This is unambiguous because all the anchors in tutorial.html begin
with "tut".
2017-06-14 13:52:24 +02:00
Fabian Homborg
82359ceb22 Update help completions
- More topics
- Some non-existent topics (todo/bugs) removed
- Some rewording (no more "Help on")
2017-06-14 13:40:14 +02:00
Clément Martinez
be1d32cade Add grub-install completions 2017-06-14 12:41:38 +02:00
Clément Martinez
a69537ea13 Add grub-file completions 2017-06-14 12:41:38 +02:00
Kurtis Rader
59a2e1bcbc refactor string flag parsing
Hoist the code for parsing flags out of each individual subcommand and
into a function shared by all the subcommands. This reduces duplication
and potential for error. More importantly it makes the code that
actually implements the subcommand more prominent.
2017-06-11 20:29:11 -07:00
Kurtis Rader
d71c4d129c customize some oclint thresholds
Allow functions to be slightly longer than oclint thinks is appropriate
by default.
2017-06-11 17:14:02 -07:00
Kurtis Rader
955ae76cb3 minor fix to string man page 2017-06-11 11:59:36 -07:00
Fabian Homborg
65b80da60b tutorial: Mention combiners in conditionals section
See #4116.
2017-06-11 13:58:43 +02:00
Fabian Homborg
7bdcbc1775 tutorial: Add section on the semicolon
See #4116.
2017-06-11 13:58:39 +02:00
Kurtis Rader
f6c9bfc0e8 implement string lower and string upper
Fixes #4080
2017-06-10 17:35:25 -07:00
Kurtis Rader
5e94650645 more wgetopt cleanup 2017-06-10 12:30:36 -07:00
Kurtis Rader
cbae738882 don't use wgetopt_long_only()
Fixes #4114
2017-06-10 12:30:36 -07:00
Kurtis Rader
75e9c863f6 normalize flag parsing 2017-06-10 12:30:36 -07:00
Dale Eidd
2b4f61f294 Fix echo "no wildcard match" complaints for ssh completions etc 2017-06-10 14:06:20 +02:00
Dale Eidd
5b3904e66b Fix not including main ssh config in host names search 2017-06-10 14:06:20 +02:00
Clément Martinez
6161f54111 Add dhcpcd completions 2017-06-10 14:05:38 +02:00
Kurtis Rader
c75c6b4204 fix typo in unit test 2017-06-09 13:35:00 -07:00
Kurtis Rader
1f24432172 fix typo in error message 2017-06-09 12:12:36 -07:00
Daryl Roberts
a0c8a9e8ed update the node options for __fish_not_contain_opt to not have the "--" in front of their flags 2017-06-09 12:11:10 -07:00
Kurtis Rader
57184a8ed9 normalize string option parsing code 2017-06-08 20:56:24 -07:00
Kurtis Rader
238a49b6f0 document that setenv is now strict
When 2.6.0 was released some people reported that the third-party `rbenv`
and `pyenv` commands were incorrectly depending on our `setenv` function
not behaving exactly like the csh command of the same name. Specifically,
our version had a bug. It allowed more than one value. It no longer
does so after it was rewritten so that the three auto-split vars were
correctly handled.

See issue #4103
2017-06-07 17:05:50 -07:00
Kurtis Rader
a520d97752 there is no "undo" key binding 2017-06-07 17:04:17 -07:00
Fabian Homborg
edaef4e6b0 Fix stray quote in magento completions
Fixes #4108.
2017-06-07 11:35:12 +02:00
Fabian Homborg
822ee634c4 docs: Mention command-substitution splitting in tutorial
See #4097.
2017-06-06 22:06:09 +02:00
Kurtis Rader
352cea1659 disable/enable bracketed paste by edit cmd buf
We need to disable/enable bracketed paste mode around running the editor
from within the `edit_command_buffer` function.
2017-06-05 11:32:06 -07:00
Kurtis Rader
6841de5e4b work around Haiku stdio bug
The Haiku stdio library has a bug. If we set stdout to unbuffered and it
is attached to a tty it discards wide output. Given how we interact with
the tty it should be safe to replace the problematic `fputwc()` calls
with simple `write()` calls. This does depend on the rest of the fish
code that writes to the tty to ultimately call write() which is true at
this time and should remain true in the future.

Fixes #4100
2017-06-04 21:01:26 -07:00
Kurtis Rader
89cab57f77 fix some chinese messages 2017-06-03 19:51:20 -07:00
Kurtis Rader
08fe6393d8 update chinese message file 2017-06-03 19:14:38 -07:00
David Adam
2bb415c47f CHANGELOG: updates to f5fc92747e 2017-06-03 22:20:14 +08:00
David Adam
f5fc92747e Merge branch 'Integration_2.6.0' 2017-06-03 22:02:59 +08:00
Kurtis Rader
f854d4a737 update the *.po translation file 2017-06-03 00:29:36 -07:00
Kurtis Rader
7a5d6391b8 update the *.po translation file 2017-06-02 23:43:11 -07:00
Kurtis Rader
52fdeefeaa update the *.po translation file 2017-06-02 23:30:30 -07:00
Kurtis Rader
809c953931 update the *.po translation file 2017-06-02 23:29:03 -07:00
Kurtis Rader
dce3b94d77 update the *.po translation file 2017-06-02 23:26:21 -07:00
Kurtis Rader
37c45f1f21 update the *.po translation file 2017-06-02 23:06:57 -07:00
Kurtis Rader
38a3699285 update the *.po translation file 2017-06-02 22:55:45 -07:00
Kurtis Rader
96004553d8 update the *.po translation file 2017-06-02 22:49:26 -07:00
Kurtis Rader
49e0a6efec fix some translations 2017-06-02 22:11:51 -07:00
Kurtis Rader
a16397ecd8 fix some translations 2017-06-02 21:44:49 -07:00
Kurtis Rader
08ff39c0c9 fix some translations 2017-06-02 21:41:54 -07:00
Kurtis Rader
c815d28b68 fix some translations 2017-06-02 21:38:25 -07:00
Kurtis Rader
15a6c2d2a1 fix some translations 2017-06-02 21:20:59 -07:00
Kurtis Rader
5ef8b91db8 fix three explicitly translated messages 2017-06-02 20:40:58 -07:00
Kurtis Rader
3e29793d04 improve detection of msgs to be translated
This change does several things. First, it works around a quirk of the
`xgetttext` command that only recognizes description strings in even
numbered position on the command. Second, it allows descriptions
introduced by the `-d` short flag to be recognized.

More importantly, it normalizes the strings so that `xgettext` correctly
extracts them into the *.po file. Prior to this change many fish script
strings were ignored due to how they were written (e.g., single versus
double quotes).

Fixes #4073
2017-06-02 17:52:55 -07:00
George Christou
5e39efa45b Fix ln file completion 2017-06-01 19:06:32 -07:00
Kurtis Rader
b8aacc29cd remove redundant output from __fish_complete_cd
Fixes #4085
2017-06-01 18:55:41 -07:00
Kurtis Rader
ee646c8dd0 move set -l to top of function
Fixes #4091
2017-06-01 17:58:29 -07:00
Martin Pelikan
65b0b947c9 Remove redundant/non-existent bind forward-kill-word 2017-06-01 17:50:05 -07:00
Kurtis Rader
c263c59346 document that set -n output is sorted 2017-05-31 13:22:49 -07:00
Kevin Ballard
3061eed647 Fix usage of osascript in help
Work around a macOS osascript bug in 10.12.5 which prevented help from
working. See #4035.
2017-05-31 23:01:31 +08:00
Kevin Ballard
5c140e5570 Revert "Use open instead of osascript in help"
This reverts commit f234637e53.
2017-05-31 23:01:31 +08:00
Kurtis Rader
3d3c6cc495 change job notification message
This came up in the context of issue #4068. This change makes it more
likely that the correct translation from english to another language
will be done for the "Job ... has {ended,stopped}" message.
2017-05-30 22:47:24 -07:00
mascafidi
4c47fbc964 Add Expert Options to DUP command completion 2017-05-30 22:38:15 -07:00
ridiculousfish
2f5af733ba Use open instead of webbrowser.open on macOS >= 10.12.5
Works around an osascript bug. Fixes #4035.
2017-05-30 20:53:59 +08:00
ridiculousfish
f234637e53 Use open instead of osascript in help
Work around a macOS osascript bug in 10.12.5 which prevented help
from working. Fixes #4035.
2017-05-30 20:53:59 +08:00
Kurtis Rader
9236e27e86 document updating translations to the CONTRIBUTING doc 2017-05-27 17:35:42 -07:00
Kurtis Rader
eff2a3c3a3 fix bug in ~ completion
Fix bug introduced by commit c114cbc9a that causes only the first match
for a ~ completion to be available for selection.

Fixes #4075
2017-05-27 16:29:24 -07:00
Fabian Homborg
603c865129 Makefile.in: Fix "fish.config" typo
See #4073.
2017-05-27 11:05:29 +02:00
Fabian Homborg
0fc9ec5538 type: Fix "-a"
This matched _all_ executable commands, where it should only match all
executable commands _with the given name_.

Fixes #4070.
2017-05-26 23:58:35 +02:00
Kurtis Rader
6f6d3ce520 note in the tutorial the vars that are auto split
Users continue to be surprised that fish auto splits/joins three env
vars but not other similar vars. Mention this in the tutorial to make it
less likely new users are surprised by this behavior.

Fixes #4009
2017-05-26 17:00:57 +02:00
Fabian Homborg
4afd41877f Fix various expansions in cd completions
This actually used the built-in file-completion logic as a fallback
for e.g. tilde-expansion (stuff like `cd ~/V`).

Fixes #4061.
2017-05-26 16:57:42 +02:00
Kurtis Rader
8f78e71b6d fix regression introduced by 21521b2
The problem was overlooking a `break` statement when refactoring a
`switch` block into a simpler `if...else...` block. This fixes the
behavior of the `history-token-search-backward` function and its forward
searching analog.

Fixes #4065
2017-05-25 20:57:30 -07:00
Kevin Ballard
f9e7ca869f Merge pull request #4057 from fish-shell/makefile_tweaks
A few Makefile tweaks
2017-05-24 11:20:15 -07:00
David Adam
8db12fe897 travis: only run tests if make succeeds 2017-05-24 11:39:59 +08:00
Kevin Ballard
9bc1b44b0d Handle missing groff macro in __fish_print_help
The Xcode installation of Fish is missing the groff macro used by
`__fish_print_help`. This caused e.g. `status -h` to stop working.

Fixes #4058.
2017-05-23 19:57:18 -07:00
Kevin Ballard
4ff002b9fb Turn off bracketed paste when Fish exits 2017-05-23 17:36:09 -07:00
Kevin Ballard
ee6c23e6c2 Extract doc install into a separate target install-doc
This way people who install via Xcode can run `make install-doc` to get
the documentation pages, as Xcode doesn't include them.
2017-05-23 16:57:26 -07:00
Kevin Ballard
027667be53 Get rid of all the ||: stuff in the Makefile
Make has a built-in way of ignoring errors.
2017-05-23 16:57:24 -07:00
Kevin Ballard
36c2ecb64f Fix the ditto command in make xcode-install 2017-05-23 16:57:17 -07:00
Kurtis Rader
a71bb03f23 fix killall completions
This fixes the obvious error in handling the `-u` short flag.
See issue #4052.
2017-05-22 20:17:08 -07:00
Fabian Homborg
a3a069234b Don't complete files if no completion can be found
This essentially breaks the "--no-files" flag to `complete`.

Some commands simply do _not_ take files.

Fixes #112.
2017-05-21 15:42:35 +02:00
Kurtis Rader
6c4a51d56e improve bash history importing
Reject more invalid commands from the bash history file.

Fixes #3636
2017-05-20 21:03:31 -07:00
Kurtis Rader
0b976a1843 fix wcsfilecmp()
This started out as a refactoring to eliminate the lint warnings. Adding
unit tests revealed the current implementation does not behave as
implied. So this is a complete rewrite of the implementation. With the
addition of unit tests so that it doesn't break in the future and anyone
who thinks this new version behaves wrong can update the unit tests to
help ensure we're testing for the correct behavior.

Fixes #4027
2017-05-19 21:09:07 -07:00
Fabian Homborg
0ee24b9bce docs: Change misleading $status comment for set
It still performs the assignment even if the command substitution
returned unsuccessfully - `set foo (echo bar; false)` returns 1 but
sets $foo to bar.

Also use `type -p` instead of `which`.
2017-05-19 19:06:44 +02:00
Fabian Homborg
64d33fac5d docs: Improve faq-exit-status
Add examples, a mention of `if command` and link to test/if.

See #2773.
2017-05-19 19:05:47 +02:00
Fabian Homborg
036b708d99 help: Properly error out when no browser is found
See #4045.
2017-05-18 22:51:57 +02:00
Mo
71f5fe1ece Added Magento2 CLI completions (#4043)
* Added Magento2 CLI completions

This is the completion file for the Magento2 CLI application I use on my servers. It has an additional feature tho, I'm not sure if it fits into the fish completion philosophy:  
If you provide limited access credentials, it will connect to the MySQL database and provide additional suggestions, such as available users, themes or indexers in the database. If this file is never touched, those suggestions simply won't show up. I, personally, find them to be pretty useful, though.  

Should I remove those database suggestions before creating a PR?

* Removed functions using MySQL, updated formatting

* Several smaller fixes

* Improved descriptions

Tried to shorten the text as much as possible and removed unnecessary characters
2017-05-18 17:05:49 +02:00
Kurtis Rader
d00ab4a326 fix some trivial style problems 2017-05-17 23:07:47 -07:00
Kurtis Rader
a5a9ca7d3b make wreaddir() handle broken struct dirent
Some platforms do not correctly define `struct dirent` so that its
`d_name` member is long enough for the longest file name. Work around
such broken definitions.

Fixes #4030
2017-05-17 22:35:28 -07:00
ridiculousfish
1f9349fb71 Initialize the key in lru_node_t to NULL
Fixes a lint error and a coding smell.
2017-05-17 21:05:32 -07:00
Sven Sternberger
cbd9181b7e Update __fish_print_hostnames.fish
For Ubuntu the default global known host files are :
/etc/ssh/ssh_known_hosts  
/etc/ssh/ssh_known_hosts2
2017-05-17 16:59:18 +02:00
David Adam
e92779981f README.md: add gmake caveat to autotools section 2017-05-16 20:22:06 +08:00
David Adam
846de82bb4 build_tools: drop completions generators
The generators for various version control systems have not been run for
some time and will overwrite the updated completions already in the the
tree.
2017-05-16 20:22:06 +08:00
David Adam
09cff3f4fe .gitattributes: include build tools in exported archives
Most of these tools are actually useful even without a git tree present.
2017-05-16 20:22:06 +08:00
Alan Somers
3aa42389ef Fix syntax error in gphoto2 completions 2017-05-15 21:53:56 -07:00
ridiculousfish
523dc6da6d Fix lru.h compilation on Yosemite
The LRU cache wants to store references from nodes back into the
lookup map, so that it is efficient to remove a node from the
map. However certain compilers refuse to form a std::map::iterator
with an incomplete type. Fix this by storing a pointer to the key
instead of the iterator.
2017-05-15 09:11:40 -07:00
362 changed files with 463870 additions and 55868 deletions

View File

@@ -7,6 +7,7 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
[{Makefile,*.in}]
indent_style = tab

16
.gitattributes vendored
View File

@@ -13,21 +13,7 @@
# omit from git archive
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
fish.spec.in export-ignore
/build_tools/make_svn_completions.fish export-ignore
/build_tools/make_hg_completions.fish export-ignore
/build_tools/make_vcs_completions.fish export-ignore
/build_tools/make_vcs_completions_generic.fish export-ignore
/build_tools/osx_package_resources export-ignore
/build_tools/osx_package_resources/* export-ignore
/build_tools/make_csv_completions.fish export-ignore
/build_tools/osx_distribution.xml export-ignore
/build_tools/make_tarball.sh export-ignore
/build_tools/osx_package_scripts export-ignore
/build_tools/osx_package_scripts/* export-ignore
/build_tools/make_pkg.sh export-ignore
/build_tools/make_darcs_completions.fish export-ignore
/debian export-ignore
/debian/* export-ignore
/.github export-ignore
@@ -39,4 +25,4 @@ fish.spec.in export-ignore
angular.js linguist-vendored
/doc_src/* linguist-documentation
*.fish linguist-language=fish
tests/*.in linguist-language=fish
tests/*.in linguist-language=fish

2
.gitignore vendored
View File

@@ -97,3 +97,5 @@ xcuserdata/
*.xccheckout
*.xcscmblueprin
# This is left over when building fish 3
muparser-*/

22
.oclint
View File

@@ -26,6 +26,28 @@ rule-configurations:
- key: RAII_CUSTOM_CLASSES
value: scoped_lock scoped_buffer_t builtin_commandline_scoped_transient_t scoped_push
# We're slightly more persmissive regarding the total number of lines in a
# function. Default is 50.
- key: LONG_METHOD
value: 60
# We're slightly more persmissive regarding the number of non-comment
# lines in a function. Default is 30.
- key: NCSS_METHOD
value: 40
# We're willing to allow slighly more linearly independent paths through a
# function. Most of our code has a lot of `switch` blocks or consecutive
# `if` tests that are straightforward to interpret but which increase this
# metric. Default is 10.
- key: CYCLOMATIC_COMPLEXITY
value: 14
# We're willing to allow slighly more execution paths through a function.
# Default is 200.
- key: NPATH_COMPLEXITY
value: 300
disable-rules:
#
# A few instances of "useless parentheses" errors are meaningful. Mostly

View File

@@ -55,9 +55,7 @@ matrix:
script:
- autoreconf
- ./configure --prefix=$HOME/prefix || cat config.log
- make -j2
- make install
- make test DESTDIR=$HOME/prefix/ SHOW_INTERACTIVE_LOG=1
- make -j2 && make test DESTDIR=$HOME/prefix/ SHOW_INTERACTIVE_LOG=1
notifications:
# Some items are encrypted so that notifications from other repositories

25
BSDmakefile Normal file
View File

@@ -0,0 +1,25 @@
JARG =
GMAKE = "gmake"
#When gmake is called from another make instance, -w is automatically added
#which causes extraneous messages about directory changes to be emitted.
#--no-print-directory silences these messages.
GARGS = "--no-print-directory"
.if "$(.MAKE.JOBS)" != ""
JARG = -j$(.MAKE.JOBS)
.endif
#by default bmake will cd into ./obj first
.OBJDIR: ./
.PHONY: FRC
$(.TARGETS): FRC
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
.DONE .DEFAULT: .SILENT
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
.ERROR: .SILENT
if ! which $(GMAKE) > /dev/null; then \
echo "GNU Make is required!"; \
fi

View File

@@ -1,3 +1,60 @@
# fish 2.7.0 (released November 23, 2017)
There are no major changes between 2.7b1 and 2.7.0. If you are upgrading from version 2.6.0 or before, please also review the release notes for 2.7b1 (included below).
Xcode builds and macOS packages could not be produced with 2.7b1, but this is fixed in 2.7.0.
--
# fish 2.7b1 (released October 31, 2017)
## Notable improvements
- A new `cdh` (change directory using recent history) command provides a more friendly alternative to prevd/nextd and pushd/popd (#2847).
- A new `argparse` command is available to allow fish script to parse arguments with the same behavior as builtin commands. This also includes the `fish_opt` helper command. (#4190).
- Invalid array indexes are now silently ignored (#826, #4127).
- Improvements to the debugging facility, including a prompt specific to the debugger (`fish_breakpoint_prompt`) and a `status is-breakpoint` subcommand (#1310).
- `string` supports new `lower` and `upper` subcommands, for altering the case of strings (#4080). The case changing is not locale-aware yet.
- `string escape` has a new `--style=xxx` flag where `xxx` can be `script`, `var`, or `url` (#4150), and can be reversed with `string unescape` (#3543).
- History can now be split into sessions with the `fish_history` variable, or not saved to disk at all (#102).
- Read history is now controlled by the `fish_history` variable rather than the `--mode-name` flag (#1504).
- `command` now supports an `--all` flag to report all directories with the command. `which` is no longer a runtime dependency (#2778).
- fish can run commands before starting an interactive session using the new `--init-command`/`-C` options (#4164).
- `set` has a new `--show` option to show lots of information about variables (#4265).
## Other significant changes
- The `COLUMNS` and `LINES` environment variables are now correctly set the first time `fish_prompt` is run (#4141).
- `complete`'s `--no-files` option works as intended (#112).
- `echo -h` now correctly echoes `-h` in line with other shells (#4120).
- The `export` compatibility function now returns zero on success, rather than always returning 1 (#4435).
- Stop converting empty elements in MANPATH to "." (#4158). The behavior being changed was introduced in fish 2.6.0.
- `count -h` and `count --help` now return 1 rather than produce command help output (#4189).
- An attempt to `read` which stops because too much data is available still defines the variables given as parameters (#4180).
- A regression in fish 2.4.0 which prevented `pushd +1` from working has been fixed (#4091).
- A regression in fish 2.6.0 where multiple `read` commands in non-interactive scripts were broken has been fixed (#4206).
- A regression in fish 2.6.0 involving universal variables with side-effects at startup such as `set -U fish_escape_delay_ms 10` has been fixed (#4196).
- Added completions for:
- `as` (#4130)
- `cdh` (#2847)
- `dhcpd` (#4115)
- `ezjail-admin` (#4324)
- Fabric's `fab` (#4153)
- `grub-file` (#4119)
- `grub-install` (#4119)
- `jest` (#4142)
- `kdeconnect-cli`
- `magneto` (#4043, #4108)
- `mdadm` (#4198)
- `passwd` (#4209)
- `pip` and `pipenv` (#4448)
- `s3cmd` (#4332)
- `sbt` (#4347)
- `snap` (#4215)
- Sublime Text 3's `subl` (#4277)
- Lots of improvements to completions.
- Updated Chinese and French translations.
---
# fish 2.6.0 (released June 3, 2017)
Since the beta release of fish 2.6b1, fish version 2.6.0 contains a number of minor fixes, new completions for `magneto` (#4043), and improvements to the documentation.
@@ -29,6 +86,7 @@ If you are upgrading from version 2.5.0 or before, please also review the releas
- `read` will read up to 10 MiB by default, leaving the target variable empty and exiting with status 122 if the line is too long. You can set a different limit with the `FISH_READ_BYTE_LIMIT` variable.
- `read` supports a new `--silent` option to hide the characters typed (#838), for when reading sensitive data from the terminal. `read` also now accepts simple strings for the prompt (rather than scripts) with the new `-P` and `--prompt-str` options (#802).
- `export` and `setenv` now understand colon-separated `PATH`, `CDPATH` and `MANPATH` variables.
- `setenv` is no longer a simple alias for `set -gx` and will complain, just like the csh version, if given more than one value (#4103).
- `bind` supports a new `--list-modes` option (#3872).
- `bg` will check all of its arguments before backgrounding any jobs; any invalid arguments will cause a failure, but non-existent (eg recently exited) jobs are ignored (#3909).
- `funced` warns if the function being edited has not been modified (#3961).
@@ -36,7 +94,7 @@ If you are upgrading from version 2.5.0 or before, please also review the releas
- `status` supports a new `current-function` subcommand to print the current function name (#1743).
- `string` supports a new `repeat` subcommand (#3864). `string match` supports a new `--entire` option to emit the entire line matched by a pattern (#3957). `string replace` supports a new `--filter` option to only emit lines which underwent a replacement (#3348).
- `test` supports the `-k` option to test for sticky bits (#733).
- `umask` understands symbolic modes (#738).
- `umask` understands symbolic modes (#738).
- Empty components in the `CDPATH`, `MANPATH` and `PATH` variables are now converted to "." (#2106, #3914).
- New versions of ncurses (6.0 and up) wipe terminal scrollback buffers with certain commands; the `C-l` binding tries to avoid this (#2855).
- Some systems' `su` implementations do not set the `USER` environment variable; it is now reset for root users (#3916).

View File

@@ -1,4 +1,3 @@
# Guidelines For Developers
This document provides guidelines for making changes to the fish-shell project. This includes rules for how to format the code, naming conventions, etcetera. Generally known as the style of the code. It also includes recommended best practices such as creating a Travis-CI account so you can verify your changes pass all the tests before making a pull-request.
@@ -7,6 +6,13 @@ See the bottom of this document for help on installing the linting and style ref
Fish source should limit the C++ features it uses to those available in C++11. It should not use exceptions.
Before introducing a new dependency, please make it optional with graceful failure if possible. Add
any new dependencies to the README.md under the *Running* and/or *Building* sections.
## Versioning
The fish version is constructed by the *build_tools/git_version_gen.sh* script. For developers the version is the branch name plus the output of `git describe --always --dirty`. Normally the main part of the version will be the closest annotated tag. Which itself is usually the most recent release number (e.g., `2.6.0`).
## Include What You Use
You should not depend on symbols being visible to a `*.cpp` module from `#include` statements inside another header file. In other words if your module does `#include "common.h"` and that header does `#include "signal.h"` your module should not assume the sub-include is present. It should instead directly `#include "signal.h"` if it needs any symbol from that header. That makes the actual dependencies much clearer. It also makes it easy to modify the headers included by a specific header file without having to worry that will break any module (or header) that includes a particular header.
@@ -32,6 +38,8 @@ To make linting the code easy there are two make targets: `lint` and `lint-all`.
Fish has custom cppcheck rules in the file `.cppcheck.rule`. These help catch mistakes such as using `wcwidth()` rather than `fish_wcwidth()`. Please add a new rule if you find similar mistakes being made.
Fish also depends on `diff` and `expect` for its tests.
### Dealing With Lint Warnings
You are strongly encouraged to address a lint warning by refactoring the code, changing variable names, or whatever action is implied by the warning.
@@ -94,7 +102,25 @@ If you use Emacs: TBD
### Configuring Your Editor for Fish Scripts
If you use ViM: TBD
If you use ViM: Install [vim-fish](https://github.com/dag/vim-fish), make sure you have syntax and filetype functionality in `~/.vimrc`:
```
syntax enable
filetype plugin indent on
```
Then turn on some options for nicer display of fish scripts in `~/.vim/ftplugin/fish.vim`:
```
" Set up :make to use fish for syntax checking.
compiler fish
" Set this to have long lines wrap inside comments.
setlocal textwidth=79
" Enable folding of block structures in fish.
setlocal foldmethod=expr
```
If you use Emacs: Install [fish-mode](https://github.com/wwwjfy/emacs-fish) (also available in melpa and melpa-stable) and `(setq-default indent-tabs-mode nil)` for it (via a hook or in `use-package`s ":init" block). It can also be made to run fish_indent via e.g.
@@ -113,6 +139,8 @@ code to ignore
// clang-format on
```
However, as I write this there are no places in the code where we use this and I can't think of any legitimate reasons for exempting blocks of code from clang-format.
## Fish Script Style Guide
1. All fish scripts, such as those in the *share/functions* and *tests* directories, should be formatted using the `fish_indent` command.
@@ -248,3 +276,27 @@ That will list the versions available. Pick the newest one available (3.9 for Ub
sudo apt-get install clang-format-3.9
sudo ln -s /usr/bin/clang-format-3.9 /usr/bin/clang-format
```
## Message Translations
Fish uses the GNU gettext library to translate messages from english to other languages. To create or update a translation run `make po/[LANGUAGE CODE].po`. Where `LANGUAGE CODE` is the two letter ISO 639-1 language code of the language you are translating to. For example, `de` for German. You'll need to have the `xgettext`, `msgfmt` and `msgmerge` commands installed to do this.
All messages in fish script must be enclosed in single or double quote characters. They must also be translated via a subcommand. This means that the following are not valid:
```
echo (_ hello)
_ "goodbye"
```
Those should be written like this:
```
echo (_ "hello")
echo (_ "goodbye")
```
Note that you can use either single or double quotes to enclose the message to be translated. You can also optionally include spaces after the opening parentheses and before the closing paren.
Be cautious about blindly updating an existing translation file. Trivial changes to an existing message (e.g., changing the punctuation) will cause existing translations to be removed. That is because the tools do literal string matching. Which means that in general you need to carefully review any recommended deletions.
See the [wiki](https://github.com/fish-shell/fish-shell/wiki/Translations) for more details.

View File

@@ -98,26 +98,30 @@ HAVE_DOXYGEN=@HAVE_DOXYGEN@
#
# All objects that the system needs to build fish, except fish.o
#
FISH_OBJS := obj/autoload.o obj/builtin.o obj/builtin_commandline.o \
obj/builtin_complete.o obj/builtin_jobs.o obj/builtin_printf.o \
obj/builtin_set.o obj/builtin_set_color.o obj/builtin_string.o \
FISH_OBJS := obj/autoload.o obj/builtin.o obj/builtin_bg.o obj/builtin_bind.o obj/builtin_block.o \
obj/builtin_builtin.o obj/builtin_cd.o obj/builtin_command.o \
obj/builtin_commandline.o obj/builtin_complete.o obj/builtin_contains.o \
obj/builtin_disown.o obj/builtin_echo.o obj/builtin_emit.o \
obj/builtin_exit.o obj/builtin_fg.o obj/builtin_function.o \
obj/builtin_functions.o obj/builtin_argparse.o obj/builtin_history.o \
obj/builtin_jobs.o obj/builtin_printf.o obj/builtin_pwd.o \
obj/builtin_random.o obj/builtin_read.o obj/builtin_realpath.o \
obj/builtin_return.o obj/builtin_set.o obj/builtin_set_color.o \
obj/builtin_source.o obj/builtin_status.o obj/builtin_string.o \
obj/builtin_test.o obj/builtin_ulimit.o obj/color.o obj/common.o \
obj/complete.o obj/env.o obj/env_universal_common.o obj/event.o \
obj/exec.o obj/expand.o obj/fallback.o obj/fish_version.o \
obj/function.o obj/highlight.o obj/history.o obj/input.o \
obj/input_common.o obj/intern.o obj/io.o obj/iothread.o obj/kill.o \
obj/output.o obj/pager.o obj/parse_execution.o \
obj/parse_productions.o obj/parse_tree.o obj/parse_util.o \
obj/parser.o obj/parser_keywords.o obj/path.o obj/postfork.o \
obj/proc.o obj/reader.o obj/sanity.o obj/screen.o obj/signal.o \
obj/tokenizer.o obj/utf8.o obj/util.o obj/wcstringutil.o \
obj/wgetopt.o obj/wildcard.o obj/wutil.o
obj/complete.o obj/env.o obj/env_universal_common.o obj/event.o obj/exec.o \
obj/expand.o obj/fallback.o obj/fish_version.o obj/function.o obj/highlight.o \
obj/history.o obj/input.o obj/input_common.o obj/intern.o obj/io.o \
obj/iothread.o obj/kill.o obj/output.o obj/pager.o obj/parse_execution.o \
obj/parse_productions.o obj/parse_tree.o obj/parse_util.o obj/parser.o \
obj/parser_keywords.o obj/path.o obj/postfork.o obj/proc.o obj/reader.o \
obj/sanity.o obj/screen.o obj/signal.o obj/tokenizer.o obj/utf8.o obj/util.o \
obj/wcstringutil.o obj/wgetopt.o obj/wildcard.o obj/wutil.o
FISH_INDENT_OBJS := obj/fish_indent.o obj/print_help.o $(FISH_OBJS)
FISH_KEYREAD_OBJS := obj/fish_key_reader.o obj/print_help.o $(FISH_OBJS)
#
# All objects that the system needs to build fish_tests
#
@@ -165,7 +169,7 @@ TEST_IN := $(wildcard tests/test*.in)
#
# Files in ./share/completions/
#
COMPLETIONS_DIR_FILES := $(wildcard share/completions/*.fish) share/completions/..fish
COMPLETIONS_DIR_FILES := $(wildcard share/completions/*.fish)
#
# Files in ./share/functions/
@@ -249,7 +253,7 @@ sgr0 := $(shell ( tput sgr0 || tput me) 2> /dev/null )
# Cool trick: `make show-$var` (e.g. make show-HAVE_DOXYGEN) to quickly see what $var is.
#
show-%:
@echo " $* = $(em)$(cyan)'$(subst ',''',$($*))'$(sgr0)" ||:
-@echo " $* = $(em)$(cyan)'$(subst ',''',$($*))'$(sgr0)"
#
# Make everything needed for installing fish
#
@@ -349,14 +353,14 @@ test: test-prep install-force test_low_level test_high_level
# We want the various tests to run serially so their output doesn't mix
# We can do that by adding ordering dependencies based on what goals are being used.
#
test_goals := test_low_level test_fishscript test_interactive
test_goals := test_low_level test_invocation test_fishscript test_interactive
#
# The following variables define targets that depend on the tests. If any more targets
# are added that depend, directly or indirectly, on tests, they need to be recorded here.
#
test_test_deps = test_low_level $(test_high_level_test_deps)
test_high_level_test_deps = test_fishscript test_interactive
test_high_level_test_deps = test_invocation test_fishscript test_interactive
active_test_goals = $(filter $(test_goals),$(foreach a,$(or $(MAKECMDGOALS),$(.DEFAULT_GOAL)),$(a) $($(a)_test_deps)))
filter_up_to = $(eval b:=1)$(foreach a,$(2),$(and $(b),$(if $(subst $(1),,$(a)),$(a),$(eval b:=))))
@@ -370,9 +374,13 @@ test_low_level: fish_tests $(call filter_up_to,test_low_level,$(active_test_goal
test_high_level: DESTDIR = $(PWD)/test/root/
test_high_level: prefix = .
test_high_level: test-prep install-force test_fishscript test_interactive
test_high_level: test-prep install-force test_invocation test_fishscript test_interactive
.PHONY: test_high_level
test_invocation: $(call filter_up_to,test_invocation,$(active_test_goals))
cd tests; ./invocation.sh
.PHONY: test_invocation
test_fishscript: $(call filter_up_to,test_fishscript,$(active_test_goals))
cd tests; ../test/root/bin/fish test.fish
.PHONY: test_fishscript
@@ -381,6 +389,7 @@ test_interactive: $(call filter_up_to,test_interactive,$(active_test_goals))
cd tests; ../test/root/bin/fish interactive.fish
.PHONY: test_interactive
#
# commands.hdr collects documentation on all commands, functions and
# builtins
@@ -388,7 +397,7 @@ test_interactive: $(call filter_up_to,test_interactive,$(active_test_goals))
doc_src/commands.hdr:$(HELP_SRC) doc_src/commands.hdr.in |
@echo " CAT AWK $(em)$@$(sgr0)"
$v rm -f command_list.tmp command_list_toc.tmp $@
$v for i in $(sort $(HELP_SRC)); do \
$v for i in `printf "%s\n" $(HELP_SRC) | LC_ALL=C.UTF-8 sort`; do \
echo "<hr>" >>command_list.tmp; \
cat $$i >>command_list.tmp; \
echo >>command_list.tmp; \
@@ -448,7 +457,7 @@ lexicon.txt: doc_src/commands.hdr $(FUNCTIONS_DIR_FILES) $(COMPLETIONS_DIR_FILES
-e "s|'\(.*\)'|func \1|p";
$v $(SED) <share/functions/__fish_config_interactive.fish >>lexicon.tmp -n \
-e '/set_default/s/.*\(fish_[a-z][a-z_]*\).*$$/clrv \1/p'; \
$(SED) <lexicon_filter.in >>lexicon.tmp -n \
$(SED) <lexicon_filter.in >>lexicon.tmp -n \
-e '/^#.!#/s/^#.!# \(.... [a-z][a-z_]*\)/\1/p';
$v mv lexicon.tmp lexicon.txt; rm -f lexicon_catalog.tmp lexicon_catalog.txt;
@@ -516,13 +525,12 @@ doc.h: $(HDR_FILES)
-e "s,@prefix\@,$(prefix),g" \
-e "s,@fish_build_version\@,$(FISH_BUILD_VERSION),g" \
#
# Compile translation files to binary format
# Compile translation files to binary format.
#
%.gmo:
@echo " msgfmt $(em)$@$(sgr0)"
$v msgfmt -o $@ $*.po
$v msgfmt --use-fuzzy -o $@ $*.po
#
# Update existing po file or copy messages.pot
@@ -538,10 +546,14 @@ doc.h: $(HDR_FILES)
#
# Create a template translation object
#
messages.pot: $(wildcard src/*.cpp src/*.h share/completions/*.fish share/functions/*.fish)
messages.pot: fish $(wildcard src/*.cpp src/*.h share/completions/*.fish share/functions/*.fish)
@echo " xgettext $(em)$@$(sgr0)"
xgettext -k_ -kN_ $(wildcard src/*.cpp src/*.h) -o messages.pot
$v xgettext -j -k_ -kN_ -k--description -LShell --from-code=UTF-8 $(wildcard share/completions/*.fish share/functions/*.fish) share/fish.config -o messages.pot
$v xgettext -k -k_ -kN_ -LC++ --no-wrap -o messages.pot src/*.cpp src/*.h
$v rm -rf /tmp/fish
$v ./fish build_tools/fish_xgettext.fish
$v xgettext -j -k -kN_ -LShell --from-code=UTF-8 -cDescription --no-wrap -o messages.pot /tmp/fish/explicit/share/*.fish /tmp/fish/explicit/share/*/*.fish
$v xgettext -j -k -kN_ -LShell --from-code=UTF-8 -cDescription --no-wrap -o messages.pot /tmp/fish/implicit/share/*.fish /tmp/fish/implicit/share/*/*.fish
$v rm -rf /tmp/fish
ifdef EXTRA_PCRE2
src/builtin_string.cpp: $(PCRE2_H)
@@ -623,13 +635,14 @@ install: all install-force | check-legacy-binaries
@echo
@if type chsh >/dev/null 2>&1; then \
echo To use fish as your login shell:; \
grep -q -- "$(DESTDIR)$(bindir)/fish" /etc/shells || echo \* add the line \'$(DESTDIR)$(bindir)/fish\' to the file \'/etc/shells\'; \
echo " * run $(yellow)chsh -s $(DESTDIR)$(bindir)/fish$(sgr0)"; \
grep -q -- "$(DESTDIR)$(bindir)/fish" /etc/shells || echo -e " * add the line '$(DESTDIR)$(bindir)/fish' to the file '/etc/shells':" \
"\n echo '$(DESTDIR)$(bindir)/fish' | sudo tee -a /etc/shells > /dev/null"; \
echo " * run '$(yellow)chsh -s $(DESTDIR)$(bindir)/fish$(sgr0)'"; \
echo; \
fi;
@if type chcon >/dev/null 2>&1; then \
echo If you have SELinux enabled, you may need to manually update the security policy:; \
echo \* use the command \'chcon -t shell_exec_t $(DESTDIR)$(bindir)/fish\'.; \
echo \ \* use the command \'chcon -t shell_exec_t $(DESTDIR)$(bindir)/fish\'; \
echo; \
fi;
@echo "To set your colors, run $(green)$(bo)fish_config$(sgr0)"
@@ -645,15 +658,13 @@ install: all install-force | check-legacy-binaries
xcode-install:
rm -Rf /tmp/fish_build
xcrun xcodebuild install DSTROOT=/tmp/fish_build
ditto /tmp/fish_build
ditto /tmp/fish_build /
.PHONY: xcode-install
#
# Actually do the installation. These '||true', '||:' lines are to prevent installs
# from failing for (e.g.) missing man pages or extra_dirs outside the
# writeable prefix.
# Actually do the installation.
#
install-force: all install-translations | show-datadir show-sysconfdir show-extra_completionsdir show-extra_functionsdir show-extra_confdir show-mandir
install-force: all install-translations install-doc | show-datadir show-sysconfdir show-extra_completionsdir show-extra_functionsdir show-extra_confdir show-mandir
$v $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$v for i in $(PROGRAMS); do\
$(INSTALL) -m 755 $$i $(DESTDIR)$(bindir);\
@@ -679,9 +690,9 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
$v $(INSTALL) -m 644 share/__fish_build_paths.fish $(DESTDIR)$(datadir)/fish/
$v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/pkgconfig
@echo "Creating placeholder vendor/'extra_' directories"
$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir) ||:
$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir) ||:
$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir) ||:
-$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir)
-$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir)
-$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir)
@echo "Installing pkgconfig file"
$v $(INSTALL) -m 644 fish.pc $(DESTDIR)$(datadir)/pkgconfig
@echo "Installing the $(bo)fish completion library$(sgr0)...";
@@ -698,19 +709,14 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
$v $(INSTALL) -m 644 share/tools/web_config/partials/* $(DESTDIR)$(datadir)/fish/tools/web_config/partials/
$v $(INSTALL) -m 644 share/tools/web_config/sample_prompts/*.fish $(DESTDIR)$(datadir)/fish/tools/web_config/sample_prompts/
$v $(INSTALL) -m 755 share/tools/web_config/*.py $(DESTDIR)$(datadir)/fish/tools/web_config/
@echo "Installing online user documentation";
$v $(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
$v for i in user_doc/html/* CHANGELOG.md; do \
if test -f $$i; then \
$(INSTALL) -m 644 $$i $(DESTDIR)$(docdir); \
fi; \
done;
@echo "Installing more man pages";
$v $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1;
$v for i in $(MANUALS); do \
$(INSTALL) -m 644 $$i $(DESTDIR)$(mandir)/man1/; \
true; \
done;
@echo "Installing miscellaneous helper resources";
$v $(INSTALL) -m 644 share/lynx.lss $(DESTDIR)$(datadir)/fish/
.PHONY: install-force
#
@@ -720,26 +726,19 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
@echo
@echo "$(bo)$(yellow)Uninstalling fish$(sgr0) from configured \$$prefix: $(bo)$(prefix)$(sgr0)"
@echo
@echo "Deleting programs: [ $(bo)$(PROGRAMS)$(sgr0) ] in $(em)$(bindir)$(sgr0)"
-$v for i in $(PROGRAMS); do \
rm -f $(DESTDIR)$(bindir)/$$i; \
done;
@echo "Deleting configuration: $(bo)$(DESTDIR)$(sysconfdir)/fish/*$(sgr0)"
-$v rm -rf $(DESTDIR)$(sysconfdir)/fish
@echo
@echo "In 5 seconds, $(red)all data$(sgr0) (includes functions, completions, tools) in"
@echo $$"\t$(bo)$(DESTDIR)$(datadir)/fish$(sgr0) will be deleted!"
@echo $$'\t$(bo)$(DESTDIR)$(datadir)/fish$(sgr0) will be deleted!'
@echo
@echo $$"If you put things there, $(red)stop now!$(sgr0) $(bo)\\c"
@echo $$"$(bo)5$(sgr0) \\c"
@echo "If you put things there, $(red)stop now!$(sgr0)"
@echo "$(bo)5$(sgr0)"
@sleep 1
@echo $$"$(bo)4$(sgr0) \\c"
@echo "$(bo)4$(sgr0)"
@sleep 1
@echo $$"$(bo)3$(sgr0) \\c"
@echo "$(bo)3$(sgr0)"
@sleep 1
@echo $$"$(bo)2$(sgr0) \\c"
@echo "$(bo)2$(sgr0)"
@sleep 1
@echo $$"$(bo)1$(sgr0) \\c"
@echo "$(bo)1$(sgr0)"
@sleep 1
@echo ...
@sleep 2
@@ -747,25 +746,26 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
-$v if test -d $(DESTDIR)$(datadir)/fish; then \
rm -rf $(DESTDIR)$(datadir)/fish; \
fi
@echo
@echo "Deleting programs: [ $(bo)$(PROGRAMS)$(sgr0) ] in $(em)$(bindir)$(sgr0)"
-$v for i in $(PROGRAMS); do \
rm -f $(DESTDIR)$(bindir)/$$i; \
done;
@echo "Deleting configuration: $(bo)$(DESTDIR)$(sysconfdir)/fish/*$(sgr0)"
-$v rm -rf $(DESTDIR)$(sysconfdir)/fish
@echo "Deleting documentation: $(bo)$(DESTDIR)$(docdir)/*$(sgr0)"
-$v if test -d $(DESTDIR)$(docdir); then \
rm -rf $(DESTDIR)$(docdir);\
fi
@echo
@echo "Deleting pkgconfig file: $(bo)$(DESTDIR)$(datadir)/pkgconfig/fish.pc$(sgr0)"
-$v if test -f $(DESTDIR)$(datadir)/pkgconfig/fish.pc; then \
rm -f $(DESTDIR)$(datadir)/pkgconfig/fish.pc;\
fi
@echo "Deleting [ $(bo)"$(notdir $(MANUALS))"$(sgr0) ] in $(em)$(mandir)/man1$(sgr0)"
-$v for i in $(notdir $(MANUALS)); do \
rm -f "$(DESTDIR)$(mandir)/man1/$$i" ;\
done
@echo
@echo $$"Deleting \\c"
@echo "[ $(bo)"$(basename $(MANUALS))$(sgr0) $$"] in \\c"
@echo "$(em)$(mandir)/man1$(sgr0)"
-$v for i in $(MANUALS); do \
rm -rf "$(DESTDIR)$(mandir)/man1/"$$$(basename $i)$$$(wildcard .*);
done;
@echo
@echo "$(green)Fish (likely) unintalled$(sgr0)"
@echo "$(green)Fish (likely) uninstalled$(sgr0)"
@echo
@echo "$(bo)./configure --prefix=$(sgr0) to uninstall fish from a different prefix"
.PHONY: uninstall
@@ -784,6 +784,15 @@ uninstall-translations: show-DESTDIR show-localedir
$v rm -f $(DESTDIR)$(localedir)/*/LC_MESSAGES/fish.mo
.PHONY: uninstall-translations
install-doc: $(user_doc)
@echo "Installing online user documentation";
$v $(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
$v for i in user_doc/html/* CHANGELOG.md; do \
if test -f $$i; then \
$(INSTALL) -m 644 $$i $(DESTDIR)$(docdir); \
fi; \
done;
#
# The build rules for all the commands
#
@@ -885,8 +894,8 @@ style-all:
# Restore the source tree to the state right after extracting a tarball.
#
distclean: clean
$v test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) V=$(V) -C $(PCRE2_DIR) distclean ||:
-$v test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) V=$(V) -C $(PCRE2_DIR) distclean
$v rm -rf config.status config.log config.h Makefile autom4te.cache aclocal.m4
.PHONY: distclean
@@ -903,12 +912,12 @@ clean:
# PCRE's make clean has a few slightly annoying exceptions to the V= rule. If V=0
# send all output to /dev/null - unless there's an error, in which case run it again not silenced.
ifeq ($(V), 0 )
@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -C $(PCRE2_DIR) clean ||:
-@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -C $(PCRE2_DIR) clean
else
@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || \
$(MAKE) -s -C $(PCRE2_DIR) clean ||:
-@test ! -f $(PCRE2_DIR)/Makefile || \
$(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || \
$(MAKE) -s -C $(PCRE2_DIR) clean
endif
$v rm -f obj/*.o *.o doc.h doc.tmp
$v rm -f doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr
@@ -936,76 +945,180 @@ V0 := @
V1 :=
v = $(V$(V))
# DO NOT DELETE THIS LINE -- make depend depends on it.
# DO NOT DELETE THIS LINE -- `make depend` depends on it.
obj/autoload.o: config.h src/autoload.h src/common.h src/fallback.h
obj/autoload.o: src/signal.h src/lru.h src/env.h src/exec.h src/wutil.h
obj/builtin.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin.o: src/signal.h src/builtin_commandline.h src/builtin_complete.h
obj/builtin.o: src/builtin_jobs.h src/builtin_printf.h src/builtin_set.h
obj/builtin.o: src/builtin_set_color.h src/builtin_string.h
obj/builtin.o: src/builtin_test.h src/builtin_ulimit.h src/complete.h
obj/builtin.o: src/env.h src/event.h src/exec.h src/expand.h
obj/builtin.o: src/parse_constants.h src/function.h src/highlight.h
obj/builtin.o: src/color.h src/history.h src/wutil.h src/input.h src/intern.h
obj/builtin.o: src/io.h src/parse_util.h src/tokenizer.h src/parser.h
obj/builtin.o: src/parse_tree.h src/proc.h src/parser_keywords.h src/path.h
obj/builtin.o: src/reader.h src/wcstringutil.h src/wgetopt.h
obj/builtin.o: src/signal.h src/builtin_bg.h src/builtin_bind.h
obj/builtin.o: src/builtin_block.h src/builtin_builtin.h src/builtin_cd.h
obj/builtin.o: src/builtin_command.h src/builtin_commandline.h
obj/builtin.o: src/builtin_complete.h src/builtin_contains.h
obj/builtin.o: src/builtin_disown.h src/builtin_echo.h src/builtin_emit.h
obj/builtin.o: src/builtin_exit.h src/builtin_fg.h src/builtin_functions.h
obj/builtin.o: src/builtin_argparse.h src/builtin_history.h src/builtin_jobs.h
obj/builtin.o: src/builtin_printf.h src/builtin_pwd.h src/builtin_random.h
obj/builtin.o: src/builtin_read.h src/builtin_realpath.h src/builtin_return.h
obj/builtin.o: src/builtin_set.h src/builtin_set_color.h src/builtin_source.h
obj/builtin.o: src/builtin_status.h src/builtin_string.h src/builtin_test.h
obj/builtin.o: src/builtin_ulimit.h src/complete.h src/exec.h src/intern.h
obj/builtin.o: src/io.h src/parse_constants.h src/parse_util.h
obj/builtin.o: src/tokenizer.h src/parser.h src/event.h src/expand.h
obj/builtin.o: src/parse_tree.h src/proc.h src/reader.h src/highlight.h
obj/builtin.o: src/color.h src/env.h src/wgetopt.h src/wutil.h
obj/builtin_bg.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_bg.o: src/signal.h src/builtin_bg.h src/io.h src/proc.h
obj/builtin_bg.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
obj/builtin_bg.o: src/wutil.h
obj/builtin_bind.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_bind.o: src/signal.h src/builtin_bind.h src/input.h src/io.h
obj/builtin_bind.o: src/wgetopt.h src/wutil.h
obj/builtin_block.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_block.o: src/signal.h src/builtin_block.h src/event.h src/io.h
obj/builtin_block.o: src/parser.h src/expand.h src/parse_constants.h
obj/builtin_block.o: src/parse_tree.h src/tokenizer.h src/proc.h
obj/builtin_block.o: src/wgetopt.h src/wutil.h
obj/builtin_builtin.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_builtin.o: src/signal.h src/builtin_builtin.h src/io.h
obj/builtin_builtin.o: src/wgetopt.h src/wutil.h
obj/builtin_cd.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_cd.o: src/signal.h src/builtin_cd.h src/env.h src/io.h
obj/builtin_cd.o: src/parser.h src/event.h src/expand.h src/parse_constants.h
obj/builtin_cd.o: src/parse_tree.h src/tokenizer.h src/proc.h src/path.h
obj/builtin_cd.o: src/wutil.h
obj/builtin_command.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_command.o: src/signal.h src/builtin_command.h src/io.h src/path.h
obj/builtin_command.o: src/env.h src/wgetopt.h src/wutil.h
obj/builtin_commandline.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_commandline.o: src/signal.h src/input.h src/env.h src/io.h
obj/builtin_commandline.o: src/parse_util.h src/parse_constants.h
obj/builtin_commandline.o: src/signal.h src/input.h src/builtin_bind.h
obj/builtin_commandline.o: src/io.h src/parse_util.h src/parse_constants.h
obj/builtin_commandline.o: src/tokenizer.h src/proc.h src/parse_tree.h
obj/builtin_commandline.o: src/reader.h src/complete.h src/highlight.h
obj/builtin_commandline.o: src/color.h src/util.h src/wgetopt.h src/wutil.h
obj/builtin_commandline.o: src/color.h src/env.h src/util.h src/wgetopt.h
obj/builtin_commandline.o: src/wutil.h
obj/builtin_complete.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_complete.o: src/signal.h src/complete.h src/env.h src/io.h
obj/builtin_complete.o: src/parse_constants.h src/parse_util.h
obj/builtin_complete.o: src/tokenizer.h src/parser.h src/event.h src/expand.h
obj/builtin_complete.o: src/parse_tree.h src/proc.h src/reader.h
obj/builtin_complete.o: src/highlight.h src/color.h src/wgetopt.h src/wutil.h
obj/builtin_contains.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_contains.o: src/signal.h src/builtin_contains.h src/io.h
obj/builtin_contains.o: src/wgetopt.h src/wutil.h
obj/builtin_disown.o: config.h src/signal.h src/builtin.h src/common.h
obj/builtin_disown.o: src/fallback.h src/builtin_disown.h src/io.h
obj/builtin_disown.o: src/parser.h src/event.h src/expand.h
obj/builtin_disown.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
obj/builtin_disown.o: src/proc.h src/wutil.h
obj/builtin_echo.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_echo.o: src/signal.h src/builtin_echo.h src/io.h src/wgetopt.h
obj/builtin_echo.o: src/wutil.h
obj/builtin_emit.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_emit.o: src/signal.h src/builtin_emit.h src/event.h src/io.h
obj/builtin_emit.o: src/wutil.h
obj/builtin_exit.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_exit.o: src/signal.h src/builtin_exit.h src/io.h src/proc.h
obj/builtin_exit.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
obj/builtin_exit.o: src/reader.h src/complete.h src/highlight.h src/color.h
obj/builtin_exit.o: src/env.h src/wgetopt.h src/wutil.h
obj/builtin_fg.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_fg.o: src/signal.h src/builtin_fg.h src/env.h src/io.h src/proc.h
obj/builtin_fg.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
obj/builtin_fg.o: src/reader.h src/complete.h src/highlight.h src/color.h
obj/builtin_fg.o: src/wutil.h
obj/builtin_function.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_function.o: src/signal.h src/builtin_function.h src/complete.h
obj/builtin_function.o: src/event.h src/function.h src/env.h src/io.h
obj/builtin_function.o: src/parser.h src/expand.h src/parse_constants.h
obj/builtin_function.o: src/parse_tree.h src/tokenizer.h src/proc.h
obj/builtin_function.o: src/parser_keywords.h src/wgetopt.h src/wutil.h
obj/builtin_functions.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_functions.o: src/signal.h src/builtin_functions.h src/env.h
obj/builtin_functions.o: src/event.h src/function.h src/io.h
obj/builtin_functions.o: src/parser_keywords.h src/proc.h src/parse_tree.h
obj/builtin_functions.o: src/parse_constants.h src/tokenizer.h src/wgetopt.h
obj/builtin_functions.o: src/wutil.h
obj/builtin_argparse.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_argparse.o: src/signal.h src/builtin_argparse.h src/env.h
obj/builtin_argparse.o: src/expand.h src/parse_constants.h src/io.h
obj/builtin_argparse.o: src/wgetopt.h src/wutil.h
obj/builtin_history.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_history.o: src/signal.h src/builtin_history.h src/history.h
obj/builtin_history.o: src/wutil.h src/io.h src/reader.h src/complete.h
obj/builtin_history.o: src/highlight.h src/color.h src/env.h
obj/builtin_history.o: src/parse_constants.h src/wgetopt.h
obj/builtin_jobs.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_jobs.o: src/signal.h src/io.h src/proc.h src/parse_tree.h
obj/builtin_jobs.o: src/parse_constants.h src/tokenizer.h src/wgetopt.h
obj/builtin_jobs.o: src/wutil.h
obj/builtin_printf.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_printf.o: src/signal.h src/io.h src/proc.h src/parse_tree.h
obj/builtin_printf.o: src/parse_constants.h src/tokenizer.h src/wutil.h
obj/builtin_printf.o: src/signal.h src/io.h src/wutil.h
obj/builtin_pwd.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_pwd.o: src/signal.h src/builtin_pwd.h src/io.h src/wutil.h
obj/builtin_random.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_random.o: src/signal.h src/builtin_random.h src/io.h src/wutil.h
obj/builtin_read.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_read.o: src/signal.h src/builtin_read.h src/complete.h src/env.h
obj/builtin_read.o: src/event.h src/expand.h src/parse_constants.h
obj/builtin_read.o: src/highlight.h src/color.h src/history.h src/wutil.h
obj/builtin_read.o: src/io.h src/proc.h src/parse_tree.h src/tokenizer.h
obj/builtin_read.o: src/reader.h src/wcstringutil.h src/wgetopt.h
obj/builtin_realpath.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_realpath.o: src/signal.h src/builtin_realpath.h src/io.h
obj/builtin_realpath.o: src/wutil.h
obj/builtin_return.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_return.o: src/signal.h src/builtin_return.h src/io.h src/parser.h
obj/builtin_return.o: src/event.h src/expand.h src/parse_constants.h
obj/builtin_return.o: src/parse_tree.h src/tokenizer.h src/proc.h
obj/builtin_return.o: src/wgetopt.h src/wutil.h
obj/builtin_set.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_set.o: src/signal.h src/env.h src/expand.h src/parse_constants.h
obj/builtin_set.o: src/io.h src/proc.h src/parse_tree.h src/tokenizer.h
obj/builtin_set.o: src/wgetopt.h src/wutil.h
obj/builtin_set_color.o: config.h src/builtin.h src/common.h src/env.h src/fallback.h
obj/builtin_set_color.o: src/signal.h src/color.h src/io.h src/output.h
obj/builtin_set_color.o: src/proc.h src/parse_tree.h src/parse_constants.h
obj/builtin_set_color.o: src/tokenizer.h src/wgetopt.h src/wutil.h
obj/builtin_set_color.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_set_color.o: src/signal.h src/color.h src/env.h src/io.h
obj/builtin_set_color.o: src/output.h src/wgetopt.h src/wutil.h
obj/builtin_source.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_source.o: src/signal.h src/builtin_source.h src/env.h
obj/builtin_source.o: src/intern.h src/io.h src/parser.h src/event.h
obj/builtin_source.o: src/expand.h src/parse_constants.h src/parse_tree.h
obj/builtin_source.o: src/tokenizer.h src/proc.h src/reader.h src/complete.h
obj/builtin_source.o: src/highlight.h src/color.h src/wutil.h
obj/builtin_status.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_status.o: src/signal.h src/builtin_status.h src/io.h src/parser.h
obj/builtin_status.o: src/event.h src/expand.h src/parse_constants.h
obj/builtin_status.o: src/parse_tree.h src/tokenizer.h src/proc.h
obj/builtin_status.o: src/wgetopt.h src/wutil.h
obj/builtin_string.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_string.o: src/signal.h src/io.h src/parse_util.h
obj/builtin_string.o: src/parse_constants.h src/tokenizer.h src/wgetopt.h
obj/builtin_string.o: src/wildcard.h src/complete.h src/expand.h src/wutil.h
obj/builtin_test.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_test.o: src/signal.h src/io.h src/proc.h src/parse_tree.h
obj/builtin_test.o: src/parse_constants.h src/tokenizer.h src/wutil.h
obj/builtin_test.o: src/signal.h src/io.h src/wutil.h
obj/builtin_ulimit.o: config.h src/builtin.h src/common.h src/fallback.h
obj/builtin_ulimit.o: src/signal.h src/io.h src/util.h src/wgetopt.h
obj/builtin_ulimit.o: src/wutil.h
obj/color.o: config.h src/color.h src/common.h src/fallback.h src/signal.h
obj/common.o: config.h src/signal.h src/common.h src/fallback.h src/expand.h
obj/common.o: src/parse_constants.h src/wildcard.h src/complete.h src/wutil.h
obj/common.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
obj/common.o: src/expand.h src/parse_constants.h src/proc.h src/io.h
obj/common.o: src/parse_tree.h src/tokenizer.h src/wildcard.h src/complete.h
obj/common.o: src/wutil.h
obj/complete.o: config.h src/autoload.h src/common.h src/fallback.h
obj/complete.o: src/signal.h src/lru.h src/builtin.h src/complete.h src/env.h
obj/complete.o: src/exec.h src/expand.h src/parse_constants.h src/function.h
obj/complete.o: src/event.h src/iothread.h src/parse_tree.h src/tokenizer.h
obj/complete.o: src/parse_util.h src/parser.h src/proc.h src/io.h src/path.h
obj/complete.o: src/util.h src/wildcard.h src/wutil.h
obj/env.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
obj/env.o: src/env_universal_common.h src/wutil.h src/event.h src/expand.h
obj/env.o: src/parse_constants.h src/fish_version.h src/history.h src/input.h
obj/env.o: src/input_common.h src/path.h src/proc.h src/io.h src/parse_tree.h
obj/env.o: config.h src/builtin_bind.h src/common.h src/fallback.h
obj/env.o: src/signal.h src/env.h src/env_universal_common.h src/wutil.h
obj/env.o: src/event.h src/expand.h src/parse_constants.h src/fish_version.h
obj/env.o: src/history.h src/input.h src/input_common.h src/output.h
obj/env.o: src/color.h src/path.h src/proc.h src/io.h src/parse_tree.h
obj/env.o: src/tokenizer.h src/reader.h src/complete.h src/highlight.h
obj/env.o: src/color.h src/sanity.h
obj/env.o: src/sanity.h src/screen.h
obj/env_universal_common.o: config.h src/common.h src/fallback.h src/signal.h
obj/env_universal_common.o: src/env.h src/env_universal_common.h src/wutil.h
obj/env_universal_common.o: src/utf8.h src/util.h
obj/env_universal_common.o: src/path.h src/utf8.h src/util.h
obj/event.o: config.h src/signal.h src/common.h src/fallback.h src/event.h
obj/event.o: src/input_common.h src/io.h src/parser.h src/expand.h
obj/event.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
@@ -1024,17 +1137,17 @@ obj/fallback.o: config.h src/signal.h src/common.h src/fallback.h src/util.h
obj/fish.o: config.h src/builtin.h src/common.h src/fallback.h src/signal.h
obj/fish.o: src/env.h src/event.h src/expand.h src/parse_constants.h
obj/fish.o: src/fish_version.h src/function.h src/history.h src/wutil.h
obj/fish.o: src/input.h src/io.h src/parser.h src/parse_tree.h
obj/fish.o: src/tokenizer.h src/proc.h src/path.h src/reader.h src/complete.h
obj/fish.o: src/highlight.h src/color.h
obj/fish.o: src/io.h src/parser.h src/parse_tree.h src/tokenizer.h src/proc.h
obj/fish.o: src/path.h src/reader.h src/complete.h src/highlight.h
obj/fish.o: src/color.h
obj/fish_indent.o: config.h src/color.h src/common.h src/fallback.h
obj/fish_indent.o: src/signal.h src/env.h src/fish_version.h src/highlight.h
obj/fish_indent.o: src/input.h src/output.h src/parse_constants.h
obj/fish_indent.o: src/parse_tree.h src/tokenizer.h src/print_help.h
obj/fish_indent.o: src/wutil.h
obj/fish_indent.o: src/output.h src/parse_constants.h src/parse_tree.h
obj/fish_indent.o: src/tokenizer.h src/print_help.h src/wutil.h
obj/fish_key_reader.o: config.h src/signal.h src/common.h src/fallback.h
obj/fish_key_reader.o: src/env.h src/input.h src/input_common.h
obj/fish_key_reader.o: src/print_help.h src/proc.h src/io.h src/parse_tree.h
obj/fish_key_reader.o: src/env.h src/fish_version.h src/input.h
obj/fish_key_reader.o: src/builtin_bind.h src/input_common.h src/print_help.h
obj/fish_key_reader.o: src/proc.h src/io.h src/parse_tree.h
obj/fish_key_reader.o: src/parse_constants.h src/tokenizer.h src/reader.h
obj/fish_key_reader.o: src/complete.h src/highlight.h src/color.h src/wutil.h
obj/fish_tests.o: config.h src/signal.h src/builtin.h src/common.h
@@ -1042,10 +1155,11 @@ obj/fish_tests.o: src/fallback.h src/color.h src/complete.h src/env.h
obj/fish_tests.o: src/env_universal_common.h src/wutil.h src/event.h
obj/fish_tests.o: src/expand.h src/parse_constants.h src/function.h
obj/fish_tests.o: src/highlight.h src/history.h src/input.h
obj/fish_tests.o: src/input_common.h src/io.h src/iothread.h src/lru.h
obj/fish_tests.o: src/pager.h src/reader.h src/screen.h src/parse_tree.h
obj/fish_tests.o: src/tokenizer.h src/parse_util.h src/parser.h src/proc.h
obj/fish_tests.o: src/path.h src/utf8.h src/wcstringutil.h src/wildcard.h
obj/fish_tests.o: src/builtin_bind.h src/input_common.h src/io.h
obj/fish_tests.o: src/iothread.h src/lru.h src/pager.h src/reader.h
obj/fish_tests.o: src/screen.h src/parse_tree.h src/tokenizer.h
obj/fish_tests.o: src/parse_util.h src/parser.h src/proc.h src/path.h
obj/fish_tests.o: src/utf8.h src/util.h src/wcstringutil.h src/wildcard.h
obj/fish_version.o: src/fish_version.h
obj/function.o: config.h src/autoload.h src/common.h src/fallback.h
obj/function.o: src/signal.h src/lru.h src/env.h src/event.h src/function.h
@@ -1061,13 +1175,13 @@ obj/highlight.o: src/wildcard.h src/complete.h
obj/history.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
obj/history.o: src/history.h src/wutil.h src/io.h src/iothread.h src/lru.h
obj/history.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
obj/history.o: src/path.h src/reader.h src/complete.h src/highlight.h
obj/history.o: src/color.h
obj/history.o: src/parse_util.h src/path.h src/reader.h src/complete.h
obj/history.o: src/highlight.h src/color.h
obj/input.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
obj/input.o: src/event.h src/input.h src/input_common.h src/io.h src/output.h
obj/input.o: src/color.h src/parser.h src/expand.h src/parse_constants.h
obj/input.o: src/event.h src/input.h src/builtin_bind.h src/input_common.h
obj/input.o: src/io.h src/parser.h src/expand.h src/parse_constants.h
obj/input.o: src/parse_tree.h src/tokenizer.h src/proc.h src/reader.h
obj/input.o: src/complete.h src/highlight.h src/wutil.h
obj/input.o: src/complete.h src/highlight.h src/color.h src/wutil.h
obj/input_common.o: config.h src/common.h src/fallback.h src/signal.h
obj/input_common.o: src/env.h src/env_universal_common.h src/wutil.h
obj/input_common.o: src/input_common.h src/iothread.h src/util.h
@@ -1075,7 +1189,7 @@ obj/intern.o: config.h src/common.h src/fallback.h src/signal.h src/intern.h
obj/io.o: config.h src/common.h src/fallback.h src/signal.h src/exec.h
obj/io.o: src/io.h src/wutil.h
obj/iothread.o: config.h src/signal.h src/common.h src/fallback.h
obj/iothread.o: src/iothread.h
obj/iothread.o: src/iothread.h src/wutil.h
obj/kill.o: config.h src/common.h src/fallback.h src/signal.h
obj/output.o: config.h src/color.h src/common.h src/fallback.h src/signal.h
obj/output.o: src/env.h src/output.h src/wutil.h
@@ -1083,13 +1197,13 @@ obj/pager.o: config.h src/common.h src/fallback.h src/signal.h src/complete.h
obj/pager.o: src/highlight.h src/color.h src/env.h src/pager.h src/reader.h
obj/pager.o: src/parse_constants.h src/screen.h src/util.h src/wutil.h
obj/parse_execution.o: config.h src/builtin.h src/common.h src/fallback.h
obj/parse_execution.o: src/signal.h src/complete.h src/env.h src/event.h
obj/parse_execution.o: src/exec.h src/expand.h src/parse_constants.h
obj/parse_execution.o: src/function.h src/io.h src/parse_execution.h
obj/parse_execution.o: src/parse_tree.h src/tokenizer.h src/proc.h
obj/parse_execution.o: src/parse_util.h src/parser.h src/path.h src/reader.h
obj/parse_execution.o: src/highlight.h src/color.h src/util.h src/wildcard.h
obj/parse_execution.o: src/wutil.h
obj/parse_execution.o: src/signal.h src/builtin_function.h src/complete.h
obj/parse_execution.o: src/env.h src/event.h src/exec.h src/expand.h
obj/parse_execution.o: src/parse_constants.h src/function.h src/io.h
obj/parse_execution.o: src/parse_execution.h src/parse_tree.h src/tokenizer.h
obj/parse_execution.o: src/proc.h src/parse_util.h src/parser.h src/path.h
obj/parse_execution.o: src/reader.h src/highlight.h src/color.h src/util.h
obj/parse_execution.o: src/wildcard.h src/wutil.h
obj/parse_productions.o: config.h src/common.h src/fallback.h src/signal.h
obj/parse_productions.o: src/parse_constants.h src/parse_productions.h
obj/parse_productions.o: src/parse_tree.h src/tokenizer.h
@@ -1125,18 +1239,18 @@ obj/proc.o: src/sanity.h src/util.h src/wutil.h
obj/reader.o: config.h src/signal.h src/color.h src/common.h src/fallback.h
obj/reader.o: src/complete.h src/env.h src/event.h src/exec.h src/expand.h
obj/reader.o: src/parse_constants.h src/function.h src/highlight.h
obj/reader.o: src/history.h src/wutil.h src/input.h src/input_common.h
obj/reader.o: src/intern.h src/io.h src/iothread.h src/kill.h src/output.h
obj/reader.o: src/pager.h src/reader.h src/screen.h src/parse_tree.h
obj/reader.o: src/tokenizer.h src/parse_util.h src/parser.h src/proc.h
obj/reader.o: src/sanity.h src/util.h
obj/reader.o: src/history.h src/wutil.h src/input.h src/builtin_bind.h
obj/reader.o: src/input_common.h src/intern.h src/io.h src/iothread.h
obj/reader.o: src/kill.h src/output.h src/pager.h src/reader.h src/screen.h
obj/reader.o: src/parse_tree.h src/tokenizer.h src/parse_util.h src/parser.h
obj/reader.o: src/proc.h src/sanity.h src/util.h
obj/sanity.o: config.h src/common.h src/fallback.h src/signal.h src/history.h
obj/sanity.o: src/wutil.h src/kill.h src/proc.h src/io.h src/parse_tree.h
obj/sanity.o: src/parse_constants.h src/tokenizer.h src/reader.h
obj/sanity.o: src/complete.h src/highlight.h src/color.h src/env.h
obj/sanity.o: src/sanity.h
obj/screen.o: config.h src/common.h src/fallback.h src/signal.h
obj/screen.o: src/highlight.h src/color.h src/env.h src/output.h src/pager.h
obj/screen.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
obj/screen.o: src/highlight.h src/color.h src/output.h src/pager.h
obj/screen.o: src/complete.h src/reader.h src/parse_constants.h src/screen.h
obj/screen.o: src/util.h
obj/signal.o: config.h src/signal.h src/common.h src/fallback.h src/event.h

178
README.md
View File

@@ -1,7 +1,9 @@
[fish](https://fishshell.com/) - the friendly interactive shell [![Build Status](https://travis-ci.org/fish-shell/fish-shell.svg?branch=master)](https://travis-ci.org/fish-shell/fish-shell)
================================================
fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family. fish includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions that just work, with no configuration required.
fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family.
fish includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions
that just work, with no configuration required.
For more on fish's design philosophy, see the [design document](https://fishshell.com/docs/current/design.html).
@@ -11,26 +13,133 @@ fish generally works like other shells, like bash or zsh. A few important differ
Detailed user documentation is available by running `help` within fish, and also at <https://fishshell.com/docs/current/index.html>
## Getting fish
### macOS
fish can be installed:
* using [Homebrew](http://brew.sh/): `brew install fish`
* using [MacPorts](https://www.macports.org/): `sudo port install fish`
* using the [installer from fishshell.com](https://fishshell.com/)
* as a [standalone app from fishshell.com](https://fishshell.com/)
### Packages for Linux
Packages for Debian, Fedora, openSUSE, and Red Hat Enterprise Linux/CentOS are available from the
[openSUSE Build
Service](https://software.opensuse.org/download.html?project=shells%3Afish%3Arelease%3A2&package=fish).
Packages for Ubuntu are available from the [fish
PPA](https://launchpad.net/~fish-shell/+archive/ubuntu/release-2), and can be installed using the
following commands:
```
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish
```
Instructions for other distributions may be found at [fishshell.com](https://fishshell.com).
### Windows
fish can be installed using [Cygwin](https://cygwin.com/) Setup (under the **Shells** category).
fish can be installed into Windows Subsystem for Linux using the instructions under *Packages for
Linux* for the appropriate image (eg Ubuntu).
### Building from source
If packages are not available for your platform, GPG-signed tarballs are available from
[fishshell.com](https://fishshell.com/) and [fish-shell on
GitHub](https://github.com/fish-shell/fish-shell/releases).
See the *Building* section for instructions.
## Running fish
Once installed, run `fish` from your current shell to try fish out!
### Dependencies
Running fish requires:
* a curses implementation such as ncurses (libraries and the `tput` command)
* PCRE2 library - a copy is included with fish
* gettext (library and `gettext` command), if compiled with translation support
* basic system utilities including `basename`, `cat`, `cut`, `date`, `dircolors`, `dirname`, `ls`,
`mkdir`, `mkfifo`, `mktemp`, `rm`, `seq`, `sort`, `stat`, `stty`, `tail`, `tr`, `tty`, `uname`,
`uniq`, `wc`, and `whoami`
* a number of common UNIX utilities:
* `awk`
* `bc`, the "basic calculator" program
* `find`
* `grep`
* `hostname`
* `kill`
* `ps`
* `sed`
The following optional features also have specific requirements:
* builtin commands that have the `--help` option or print usage messages require `nroff` and
`ul` (manual page formatters) to do so
* completion generation from manual pages requires Python 2.7, 3.3 or greater, and possibly the
`backports.lzma` module for Python 2.7
* the `fish_config` Web configuration tool requires Python 2.7, 3.3 or greater, and a web browser
* system clipboard integration (with the default Ctrl-V and Ctrl-X bindings) require either the
`xsel` or `pbcopy`/`pbpaste` utilities
* prompts which support showing VCS information (Git, Mercurial or Subversion) require these
utilities
### Switching to fish
If you wish to use fish as your default shell, use the following command:
chsh -s /usr/local/bin/fish
chsh will prompt you for your password, and change your default shell. Substitute `/usr/local/bin/fish` with whatever path to fish is in your `/etc/shells` file.
Use the following command if you didn't already add your fish path to `/etc/shells`.
echo /usr/local/bin/fish | sudo tee -a /etc/shells
To switch your default shell back, you can run:
chsh -s /bin/bash
Substitute `/bin/bash` with `/bin/tcsh` or `/bin/zsh` as appropriate.
You may need to logout/login for the change (chsh) to take effect.
## Building
fish requires a C++11 compiler. It builds successfully with g++ 4.8 or later, or with clang 3.3 or later.
### Dependencies
fish can be built using autotools or Xcode. autoconf 2.60 or later, as well as automake 1.13 or later, are required to build from git versions. These are not required to build from released tarballs.
Compiling fish requires:
fish depends on a curses implementation, such as ncurses. The headers and libraries are required for building.
* a C++11 compiler (g++ 4.8 or later, or clang 3.3 or later)
* either GNU Make (all platforms) or Xcode (macOS only)
* a curses implementation such as ncurses (headers and libraries)
* PCRE2 (headers and libraries) - a copy is included with fish
* gettext (headers and libraries) - optional, for translation support
fish requires PCRE2 due to the regular expression support contained in the `string` builtin. A copy is included with the source code, and will be used automatically if it does not already exist on your system.
Compiling from git (that is, not a released tarball) also requires:
fish requires gettext for translation support.
* either Xcode (macOS only) or the following Autotools utilities (all platforms):
* autoconf 2.60 or later
* automake 1.13 or later
* Doxygen (1.8.7 or later) - optional, for documentation
Building the documentation requires Doxygen 1.8.7 or newer.
### Building from source
### Autotools Build
autoreconf --no-recursive [if building from Git]
./configure
make [gmake on BSD]
sudo make install
```bash
autoreconf --no-recursive #if building from Git
./configure
make
sudo make install
```
### Xcode Development Build
@@ -41,8 +150,9 @@ Building the documentation requires Doxygen 1.8.7 or newer.
xcodebuild install
sudo ditto /tmp/fish.dst /
sudo make install-doc
## Help, it didn't build!
### Help, it didn't build!
If fish reports that it could not find curses, try installing a curses development package and build again.
@@ -54,46 +164,6 @@ On RedHat, CentOS, or Amazon EC2:
sudo yum install ncurses-devel
## Runtime Dependencies
fish requires a curses implementation, such as ncurses, to run.
fish requires PCRE2 due to the regular expression support contained in the `string` builtin. A bundled version will be compiled in automatically at build time if required.
fish requires a number of utilities to operate, which should be present on any Unix, GNU/Linux or OS X system. These include (but are not limited to) hostname, grep, awk, sed, and getopt. fish also requires the bc program.
Translation support requires the gettext program.
Usage output for builtin functions is generated on-demand from the installed manpages using `nroff` and `ul`.
Some optional features of fish, such as the manual page completion parser and the web configuration tool, require Python.
In order to generate completions from man pages compressed with either lzma or xz, you may need to install an extra Python package. Python versions prior to 2.6 are not supported. To process lzma-compresed manpages, backports.lzma is needed for Python 3.2 or older. From version 3.3 onwards, Python already includes the required module.
## Packages for Linux
Instructions on how to find builds for several Linux distros are at <https://github.com/fish-shell/fish-shell/wiki/Nightly-builds>
## Switching to fish
If you wish to use fish as your default shell, use the following command:
chsh -s /usr/local/bin/fish
chsh will prompt you for your password, and change your default shell. Substitute "/usr/local/bin/fish" with whatever path to fish is in your /etc/shells file.
Use the following command if you didn't already add your fish path to /etc/shells.
echo /usr/local/bin/fish | sudo tee -a /etc/shells
To switch your default shell back, you can run:
chsh -s /bin/bash
Substitute /bin/bash with /bin/tcsh or /bin/zsh as appropriate.
You may need to logout/login for the change (chsh) to take effect.
## Contributing Changes to the Code
See the [Guide for Developers](CONTRIBUTING.md).

42
build_tools/fish_xgettext.fish Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/env fish
#
# This script was originally motivated to work around a quirk (or bug depending on your viewpoint)
# of the xgettext command. See https://lists.gnu.org/archive/html/bug-gettext/2014-11/msg00006.html.
# However, it turns out that even if that quirk did not exist we would still need something like
# this script to properly extract descriptions. That's because we need to normalize the strings to
# a format that xgettext will handle correctly. Also, `xgettext -LShell` doesn't correctly extract
# all the strings we want translated. So we extract and normalize all such strings into a format
# that `xgettext` can handle.
# This regex handles descriptions for `complete` and `function` statements. These messages are not
# particularly important to translate. Hence the "implicit" label.
set implicit_regex '(?:^| +)(?:complete|function) .*? (?:-d|--description) (([\'"]).+?(?<!\\\\)\\2).*'
# This regex handles explicit requests to translate a message. These are more important to translate
# than messages which should be implicitly translated.
set explicit_regex '.*\( *_ (([\'"]).+?(?<!\\\\)\\2) *\).*'
mkdir -p /tmp/fish/implicit/share/completions /tmp/fish/implicit/share/functions
mkdir -p /tmp/fish/explicit/share/completions /tmp/fish/explicit/share/functions
for f in share/config.fish share/completions/*.fish share/functions/*.fish
# Extract explicit attempts to translate a message. That is, those that are of the form
# `(_ "message")`.
string replace --filter --regex $explicit_regex 'echo $1' <$f | fish >/tmp/fish/explicit/$f.tmp ^/dev/null
while read description
echo 'N_ "'(string replace --all '"' '\\"' -- $description)'"'
end </tmp/fish/explicit/$f.tmp >/tmp/fish/explicit/$f
rm /tmp/fish/explicit/$f.tmp
# Handle `complete` / `function` description messages. The `| fish` is subtle. It basically
# avoids the need to use `source` with a command substituion that could affect the current
# shell.
string replace --filter --regex $implicit_regex 'echo $1' <$f | fish >/tmp/fish/implicit/$f.tmp ^/dev/null
while read description
# We don't use `string escape` as shown in the next comment because it produces output that
# is not parsed correctly by xgettext. Instead just escape double-quotes and quote the
# resulting string.
echo 'N_ "'(string replace --all '"' '\\"' -- $description)'"'
end </tmp/fish/implicit/$f.tmp >/tmp/fish/implicit/$f
rm /tmp/fish/implicit/$f.tmp
end

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env fish
#
# This file produces command specific completions for csv. Meant to be executed
# from the root directory (so the completions get put in the right place).
. build_tools/make_vcs_completions_generic.fish
write_completions csv >share/completions/csv.fish

View File

@@ -1,12 +0,0 @@
#!/usr/bin/env fish
#
# This file produces command specific completions for darcs. Meant to be
# executed from the root directory (so the completions get put in the right
# place).
. build_tools/make_vcs_completions_generic.fish
set darcs_comp 'complete -c darcs -n "not __fish_use_subcommand" -a "(test -f _darcs/prefs/repos; and cat _darcs/prefs/repos)" --description "Darcs repo"'
set darcs_comp $darcs_comp 'complete -c darcs -a "test predist boringfile binariesfile" -n "contains setpref (commandline -poc)" --description "Set the specified option" -x'
write_completions darcs $darcs_comp >share/completions/darcs.fish

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env fish
#
# This file produces command specific completions for hg. Meant to be executed
# from the root directory (so the completions get put in the right place).
. build_tools/make_vcs_completions_generic.fish
write_completions hg >share/completions/hg.fish

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env fish
#
# This file produces command specific completions for svn. Meant to be executed
# from the root directory (so the completions get put in the right place).
. build_tools/make_vcs_completions_generic.fish
write_completions svn >share/completions/svn.fish

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env fish
#
# This file produces command specific completions for hg, darcs and a
# few other vcs systems.
build_tools/make_darcs_completions.fish
build_tools/make_hg_completions.fish
build_tools/make_svn_completions.fish
build_tools/make_csv_completions.fish

View File

@@ -1,229 +0,0 @@
#!/usr/bin/env fish
#
# This file provides generic functions for generating specific completions for
# hg, darcs and a few other vcs systems. It uses the fact that all these
# systems have a somewhat uniform command line help mechanism.
#
function cap
set res (echo $argv |cut -c 1|tr a-z A-Z)(echo $argv |cut -c 2-)
echo $res
end
#
# Escapes the single quote (') character and removes trailing whitespace from $argv
#
function esc
echo $argv | sed -e "s/\(['\\\]\)/\\\\\1/g" | sed -e 's/ *$//' | sed -e 's/ .*//'
end
#
# This function formats a list of completion information into a set of fish completions
#
# The first argument is the condition string, which will be copied to
# the resulting commandline verbatim
#
# Remaining arguments are tab separated lists of completion
# information. Each list contains four elements, the short switch, the
# long switch, the argument and the description.
#
function complete_from_list
set condition $argv[1]
set -e argv[1]
for j in $argv
set exploded (echo $j|tr \t \n)
set short $exploded[1]
set long $exploded[2]
set arg $exploded[3]
set desc (cap (esc $exploded[4]))
set str
switch $short
case '-?'
set str $str -s (printf "%s\n" $short|cut -c 2)
end
switch $long
case '--?*'
set str $str -l (printf "%s\n" $long|cut -c 3-)
end
switch $arg
case '=DIRECTORY' ' dir'
set str $str -x -a "'(__fish_complete_directories (commandline -ct))'"
case '=COMMAND'
set str $str -x -a "'(__fish_complete_command)'"
case '=USERNAME' ' <user>'
set str $str -x -a "'(__fish_complete_users)'"
case '=FILENAME' '=FILE' ' <file>'
set str $str -r
case ' arg'
set str $str -x
case ' (*):'
set str $str -x -a \'(echo $arg| sed -e "s/ (\(.*\)):/\1/" |tr '/' ' ')\'
case '?*'
set str $str -x
if not set -q unknown
set -g unknown
end
if not contains $arg $unknown
echo "Don't know how to handle arguments of type '$arg'" >&2
set unknown $unknown $arg
end
end
switch $desc
case '?*'
set str $str --description \'$desc\'
end
echo complete -c $cmd $condition $str
end
end
function write_completions
set -g cmd $argv[1]; or return 1
echo "Making completions for $cmd" >&2
echo '
#
# Completions for the '$cmd' command
# This file was autogenerated by the file make_vcs_completions.fish
# which is shipped with the fish source code.
#
#
# Completions from commandline
#
'
set -e argv[1]
while count $argv >/dev/null
echo $argv[1]
set -e argv[1]
end
eval "function cmd; $cmd \$argv; end"
set -l cmd_str
switch $cmd
case svn
function list_subcommand
set cmd1 '\([^ ]*\)'
set cmd2 '\([^,)]*\)'
set cmdn '\(, \([^,)]*\)\|\)'
set svn_re '^ *'$cmd1'\( ('$cmd2$cmdn$cmdn')\|\).*$'
cmd help|sed -ne 's/'$svn_re'/\1\n\3\n\5\n\7/p'| grep .
end
function list_subcommand_help
set short_exp '\(-.\|\)'
set long_exp '\(--[^ =,]*\)'
set arg_exp '\(\|[= ][^ ][^ ]*\)'
set desc_exp '\([\t ]*:[\t ]*\|\)\([^ ].*[^.]\)'
set re "^ *$short_exp *$long_exp$arg_exp *$desc_exp\(\|\\.\)\$"
cmd help $argv | sed -n -e 's/'$re'/\1\t\2\t\3\t\5/p'
end
for i in (list_subcommand)
set desc (cmd help $i|head -n 3| sed -e 's/usage:.*//'| tr \n \ | sed -e 's/[^:]*: *\(.*[^.]\)\(\|\\.\)$/\1/')
set desc (esc $desc)
set cmd_str $cmd_str "-a $i --description '$desc'"
end
case cvs
function list_subcommand
cmd --help-commands 2>| sed -n -e 's/^ *\([^ ][^ ]*\) .*$/\1/p'
end
set short_exp '\(-.\)'
set arg_exp '\(\| [^ \t][^ \t]*\)'
set desc_exp '\([\t ]*:[\t ]*\|\)\([^ ].*\)'
set -g re '^[ \t]*'$short_exp$arg_exp'[ \t]*'$desc_exp'$'
function list_subcommand_help
#'s/^[ \t]*\(-.\)[ \t]\([^- \t][^ \t]*\)*[ \t]*\([^-].*\)$/\1\t\2\t\3/p'
cmd -H $argv 2>| sed -n -e 's/'$re'/\1\t\t\2\t\4/p'
end
echo '
#
# Global switches
#
'
complete_from_list "-n '__fish_use_subcommand'" (cmd --help-options 2>| sed -n -e 's/'$re'/\1\t\t\2\t\4/p')
set cmd_str_internal (cmd --help-commands 2>| sed -n -e 's/^ *\([^ ][^ ]*\)[\t ]*\([^ ].*\)$/\1\t\2/p')
for i in $cmd_str_internal
set exploded (echo $i|tr \t \n)
set cmd_str $cmd_str "-a $exploded[1] --description '"(esc $exploded[2])"'"
end
case '*'
function list_subcommand
cmd help | sed -n -e 's/^ *\([^ ][^ ]*\) .*$/\1/p'
end
function list_subcommand_help
set -l short_exp '\(-.\|\)\( [^ -][^ ]*\|\)'
set -l long_exp '\(--[^ =,]*\)'
set -l arg_exp '\(\|[= ][^ ][^ ]*\)'
set -l desc_exp '\([\t ]*:[\t ]*\|\)\([^ ].*[^.]\)'
set -l re "^ *$short_exp *$long_exp$arg_exp *$desc_exp\(\|\\.\)\$"
cmd help $argv | sed -n -e 's/'$re'/\1\t\3\t\4\t\6/p'
end
set cmd_str (cmd help | sed -n -e 's/^ *\([^ ][^ ]*\)[\t ]*\([^ ].*[^.]\)\(\|\\.\)$/-a \1 --description \'\2\'/p')
end
echo '
#
# subcommands
#
'
printf "complete -c $cmd -n '__fish_use_subcommand' -x %s\n" $cmd_str
for i in (list_subcommand)
echo '
#
# Completions for the \''$i'\' subcommand
#
'
complete_from_list "-n 'contains \\'$i\\' (commandline -poc)'" (list_subcommand_help $i)
end
echo \n\n
end

View File

@@ -579,34 +579,6 @@ else
AC_MSG_RESULT(no)
fi
# Check that threads actually work on Solaris
AC_MSG_CHECKING([for threadsafe errno])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([
#include <errno.h>
#include <pthread.h>
#include <signal.h>
void *thread1_func(void *p_arg)
{
errno = 1;
return 0;
}
],[
errno = 0;
pthread_t t1;
pthread_create(&t1, NULL, thread1_func, NULL);
pthread_join(t1, NULL);
return errno;
])],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
AC_MSG_FAILURE([errno is not threadsafe - check your compiler settings])
],
[AC_MSG_RESULT(crosscompiling, skipped)]
)
pcre2_min_version=10.21
EXTRA_PCRE2=
AC_ARG_WITH(

View File

@@ -11,7 +11,7 @@ COMMAND1; and COMMAND2
`and` statements may be used as part of the condition in an <a href="#if">`if`</a> or <a href="#while">`while`</a> block. See the documentation for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
`and` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
`and` does not change the current exit status itself, but the command it runs most likely will. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
\subsection and-example Example

129
doc_src/argparse.txt Normal file
View File

@@ -0,0 +1,129 @@
\section argparse argparse - parse options passed to a fish script or function
\subsection argparse-synopsis Synopsis
\fish{synopsis}
argparse [OPTIONS] OPTION_SPEC... -- [ARG...]
\endfish
\subsection argparse-description Description
This command makes it easy for fish scripts and functions to handle arguments in a manner 100% identical to how fish builtin commands handle their arguments. You pass a sequence of arguments that define the options recognized, followed by a literal `--`, then the arguments to be parsed (which might also include a literal `--`). More on this in the <a href="#argparse-usage">usage</a> section below.
Each OPTION_SPEC can be written in the domain specific language <a href="#argparse-option-specs">described below</a> or created using the companion <a href="#fish-opt">`fish_opt`</a> command. All OPTION_SPECs must appear after any argparse flags and before the `--` that separates them from the arguments to be parsed.
Each option that is seen in the ARG list will result in a var name of the form `_flag_X`, where `X` is the short flag letter and the long flag name. The OPTION_SPEC always requires a short flag even if it can't be used. So there will always be `_flag_X` var set using the short flag letter if the corresponding short or long flag is seen. The long flag name var (e.g., `_flag_help`) will only be defined, obviously, if the OPTION_SPEC includes a long flag name.
For example `_flag_h` and `_flag_help` if `-h` or `--help` is seen. The var will be set with local scope (i.e., as if the script had done `set -l _flag_X`). If the flag is a boolean (that is, does not have an associated value) the values are the short and long flags seen. If the option is not a boolean flag the values will be zero or more values corresponding to the values collected when the ARG list is processed. If the flag was not seen the flag var will not be set.
The following `argparse` options are available. They must appear before all OPTION_SPECs:
- `-n` or `--name` is the command name to insert into any error messages. If you don't provide this value `argparse` will be used.
- `-x` or `--exclusive` should be followed by a comma separated list of short of long options that are mutually exclusive. You can use this option more than once to define multiple sets of mutually exclusive options.
- `-N` or `--min-args` is followed by an integer that defines the minimum number of acceptable non-option arguments. The default is zero.
- `-X` or `--max-args` is followed by an integer that defines the maximum number of acceptable non-option arguments. The default is infinity.
- `-s` or `--stop-nonopt` causes scanning the arguments to stop as soon as the first non-option argument is seen. Using this arg is equivalent to calling the C function `getopt_long()` with the short options starting with a `+` symbol. This is sometimes known as "POSIXLY CORRECT". If this flag is not used then arguments are reordered (i.e., permuted) so that all non-option arguments are moved after option arguments. This mode has several uses but the main one is to implement a command that has subcommands.
- `-h` or `--help` displays help about using this command.
\subsection argparse-usage Usage
Using this command involves passing two sets of arguments separated by `--`. The first set consists of one or more option specifications (`OPTION_SPEC` above) and options that modify the behavior of `argparse`. These must be listed before the `--` argument. The second set are the arguments to be parsed in accordance with the option specifications. They occur after the `--` argument and can be empty. More about this below but here is a simple example that might be used in a function named `my_function`:
\fish
argparse --name=my_function 'h/help' 'n/name:' -- $argv
or return
\endfish
If `$argv` is empty then there is nothing to parse and `argparse` returns zero to indicate success. If `$argv` is not empty then it is checked for flags `-h`, `--help`, `-n` and `--name`. If they are found they are removed from the arguments and local variables (more on this <a href="argparse-local-variables">below</a>) are set so the script can determine which options were seen. Assuming `$argv` doesn't have any errors, such as a missing mandatory value for an option, then `argparse` exits with status zero. Otherwise it writes appropriate error messages to stderr and exits with a status of one.
Not including a `--` argument is an error condition. You do not have to include any arguments after the `--` but you must include the `--`. For example, this is acceptable:
\fish
set -l argv
argparse 'h/help' 'n/name' -- $argv
\endfish
But this is not:
\fish
set -l argv
argparse 'h/help' 'n/name' $argv
\endfish
The first `--` seen is what allows the `argparse` command to reliably seperate the option specifications from the command arguments.
\subsection argparse-option-specs Option Specifications
Each option specification is a string composed of
- A short flag letter (which is mandatory). It must be an alphanumeric or "#". The "#" character is special and means that a flag of the form `-123` is valid. The short flag "#" must be followed by "-" (since the short name isn't otherwise valid since `_flag_#` is not a valid var name) and must but followed by a long flag name with no modifiers.
- A `/` if the short flag can be used by someone invoking your command else `-` if it should not be exposed as a valid short flag. If there is no long flag name these characters should be omitted. You can also specify a '#' to indicate the short and long flag names can be used and the value can be specified as an implicit int; i.e., a flag of the form `-NNN`.
- A long flag name which is optional. If not present then only the short flag letter can be used.
- Nothing if the flag is a boolean that takes no argument or is an implicit int flag, else
- `=` if it requires a value and only the last instance of the flag is saved, else
- `=?` it takes an optional value and only the last instance of the flag is saved, else
- `=+` if it requires a value each instance of the flag is saved.
- Optionally a `!` followed by fish script to validate the value. Typically this will be a function to run. If the return status is zero the value for the flag is valid. If non-zero the value is invalid. Any error messages should be written to stdout (not stderr). See the section on <a href="#arparse-validation">Flag Value Validation</a> for more information.
See the <a href="#fish-opt">`fish_opt`</a> command for a friendlier but more verbose way to create option specifications.
In the following examples if a flag is not seen when parsing the arguments then the corresponding _flag_X var(s) will not be set.
\subsection argparse-validation Flag Value Validation
It is common to want to validate the the value provided for an option satisfies some criteria. For example, that it is a valid integer within a specific range. You can always do this after `argparse` returns but you can also request that `argparse` perform the validation by executing arbitrary fish script. To do so simply append an `!` (exclamation-mark) then the fish script to be run. When that code is executed three vars will be defined:
- `_argparse_cmd` will be set to the value of the value of the `argparse --name` value.
- `_flag_name` will be set to the short or long flag that being processed.
- `_flag_value` will be set to the value associated with the flag being processed.
If you do this via a function it should be defined with the `--no-scope-shadowing` flag. Otherwise it won't have access to those variables.
The script should write any error messages to stdout, not stderr. It should return a status of zero if the flag value is valid otherwise a non-zero status to indicate it is invalid.
Fish ships with a `_validate_int` function that accepts a `--min` and `--max` flag. Let's say your command accepts a `-m` or `--max` flag and the minimum allowable value is zero and the maximum is 5. You would define the option like this: `m/max=!_validate_int --min 0 --max 5`. The default if you just call `_validate_int` without those flags is to simply check that the value is a valid integer with no limits on the min or max value allowed.
\subsection argparse-optspec-examples Example OPTION_SPECs
Some OPTION_SPEC examples:
- `h/help` means that both `-h` and `--help` are valid. The flag is a boolean and can be used more than once. If either flag is used then `_flag_h` and `_flag_help` will be set to the count of how many times either flag was seen.
- `h-help` means that only `--help` is valid. The flag is a boolean and can be used more than once. If the long flag is used then `_flag_h` and `_flag_help` will be set to the count of how many times the long flag was seen.
- `n/name=` means that both `-n` and `--name` are valid. It requires a value and can be used at most once. If the flag is seen then `_flag_n` and `_flag_name` will be set with the single mandatory value associated with the flag.
- `n/name=?` means that both `-n` and `--name` are valid. It accepts an optional value and can be used at most once. If the flag is seen then `_flag_n` and `_flag_name` will be set with the value associated with the flag if one was provided else it will be set with no values.
- `n-name=+` means that only `--name` is valid. It requires a value and can be used more than once. If the flag is seen then `_flag_n` and `_flag_name` will be set with the values associated with each occurrence of the flag.
- `x` means that only `-x` is valid. It is a boolean can can be used more than once. If it is seen then `_flag_x` will be set to the count of how many times the flag was seen.
- `x=`, `x=?`, and `x=+` are similar to the n/name examples above but there is no long flag alternative to the short flag `-x`.
- `x-` is not valid since there is no long flag name and therefore the short flag, `-x`, has to be usable. This is obviously true whether or not the specification also includes one of `:`, `::`, `+`.
- `#-max` means that flags matching the regex "^--?\d+$" are valid. When seen they are assigned to the variable `_flag_max`. This allows any valid positive or negative integer to be specified by prefixing it with a single "-". Many commands support this idiom. For example `head -3 /a/file` to emit only the first three lines of /a/file.
- `n#max` means that flags matching the regex "^--?\d+$" are valid. When seen they are assigned to the variables `_flag_n` and `_flag_max`. This allows any valid positive or negative integer to be specified by prefixing it with a single "-". Many commands support this idiom. For example `head -3 /a/file` to emit only the first three lines of /a/file. You can also specify the value using either flag: `-n NNN` or `--max NNN` in this example.
After parsing the arguments the `argv` var is set with local scope to any values not already consumed during flag processing. If there are not unbound values the var is set but `count $argv` will be zero.
If an error occurs during argparse processing it will exit with a non-zero status and appropriate error messages are written to stderr.
\subsection argparse-notes Notes
Prior to the addition of this builtin command in the 2.7.0 release there were two main ways to parse the arguments passed to a fish script or function. One way was to use the OS provided `getopt` command. The problem with that is that the GNU and BSD implementations are not compatible. Which makes using that external command difficult other than in trivial situations. The other way is to iterate over `$argv` and use the fish `switch` statement to decide how to handle the argument. That, however, involves a huge amount of boilerplate code. It is also borderline impossible to implement the same behavior as builtin commands.

View File

@@ -13,7 +13,7 @@ The block is unconditionally executed. `begin; ...; end` is equivalent to `if tr
`begin` is used to group a number of commands into a block. This allows the introduction of a new variable scope, redirection of the input or output of a set of commands as a group, or to specify precedence when using the conditional commands like `and`.
`begin` does not change the current exit status.
`begin` does not change the current exit status itself. After the block has completed, `$status` will be set to the status returned by the most recent command.
\subsection begin-example Example

View File

@@ -28,7 +28,7 @@ When `COMMAND` is a shellscript command, it is a good practice to put the actual
If such a script produces output, the script needs to finish by calling `commandline -f repaint` in order to tell fish that a repaint is in order.
When multiple `COMMAND`s are provided, they are all run in the specified order when the key is pressed.
When multiple `COMMAND`s are provided, they are all run in the specified order when the key is pressed. Note that special input functions cannot be combined with ordinary shell script commands. The commands must be entirely a sequence of special input functions (from `bind -f`) or all shell script commands (i.e., valid fish script).
If no `SEQUENCE` is provided, all bindings (or just the bindings in the specified `MODE`) are printed. If `SEQUENCE` is provided without `COMMAND`, just the binding matching that sequence is printed.

View File

@@ -41,6 +41,6 @@ block -e
\endfish
\subsection notes Notes
\subsection block-notes Notes
Note that events are only received from the current fish process as there is no way to send events from one fish process to another.

View File

@@ -14,7 +14,7 @@ If `DIRECTORY` is a relative path, the paths found in the `CDPATH` environment v
Note that the shell will attempt to change directory without requiring `cd` if the name of a directory is provided (starting with `.`, `/` or `~`, or ending with `/`).
Fish also ships a wrapper function around the builtin `cd` that understands `cd -` as changing to the previous directory. See also <a href="commands.html#prevd">`prevd`</a>. This wrapper function maintains a history of the 25 most recently visited directories in the `$dirprev` and `$dirnext` global variables.
Fish also ships a wrapper function around the builtin `cd` that understands `cd -` as changing to the previous directory. See also <a href="commands.html#prevd">`prevd`</a>. This wrapper function maintains a history of the 25 most recently visited directories in the `$dirprev` and `$dirnext` global variables. If you make those universal variables your `cd` history is shared among all fish instances.
\subsection cd-example Examples
@@ -25,3 +25,7 @@ cd
cd /usr/src/fish-shell
# changes the working directory to /usr/src/fish-shell
\endfish
\subsection cd-see-also See Also
See also the <a href="commands.html#cdh">`cdh`</a> command for changing to a recently visited directory.

16
doc_src/cdh.txt Normal file
View File

@@ -0,0 +1,16 @@
\section cdh cdh - change to a recently visited directory
\subsection cdh-synopsis Synopsis
\fish{synopsis}
cdh [ directory ]
\endfish
\subsection cdh-description Description
`cdh` with no arguments presents a list of recently visited directories. You can then select one of the entries by letter or number. You can also press @key{tab} to use the completion pager to select an item from the list. If you give it a single argument it is equivalent to `cd directory`.
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates. If you make those universal variables your `cd` history is shared among all fish instances.
\subsection cdh-see-also See Also
See also the <a href="commands.html#prevd">`prevd`</a> and <a href="commands.html#pushd">`pushd`</a> commands which also work with the recent `cd` history and are provided for compatibility with other shells.

View File

@@ -11,7 +11,9 @@ command [OPTIONS] COMMANDNAME [ARGS...]
The following options are available:
- `-s` or `--search` returns the name of the disk file that would be executed, or nothing if no file with the specified name could be found in the `$PATH`.
- `-a` or `--all` returns all the external commands that are found in `$PATH` in the order they are found.
- `-s` or `--search` returns the name of the external command that would be executed, or nothing if no file with the specified name could be found in the `$PATH`.
With the `-s` option, `command` treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found. Additionally passing a `-q` or `--quiet` option prevents any paths from being printed, like the `type -q`, for testing only the exit status.

View File

@@ -62,13 +62,13 @@ 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 shell configuration options.
- Fish does not allow you to set the number of history entries, different language substyles or any number of other common shell 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 off by default in zsh. Other features that zsh supports that are disabled by default include tab-completion of strings containing wildcards, a sane completion pager and a history file.
\section 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.
When designing a program, one should first think about how to make an intuitive and powerful program. Implementation issues should only be considered once a user interface has been designed.
Rationale:

View File

@@ -22,7 +22,7 @@ end
emit test_event something
\subsection notes Notes
\subsection emit-notes Notes
Note that events are only sent to the current fish process as there is no way to send events from one fish process to another.
\endfish

View File

@@ -16,4 +16,4 @@ switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
For more information, read the
documentation for the block constructs, such as `if`, `for` and `while`.
The `end` command does not change the current exit status.
The `end` command does not change the current exit status. Instead, the status after it will be the status returned by the most recent command.

View File

@@ -14,6 +14,7 @@
- <a href='#faq-subcommand'>How do I run a subcommand? The backtick doesn't work!</a>
- <a href='#faq-exit-status'>How do I get the exit status of a command?</a>
- <a href='#faq-single-env'>How do I set an environment variable for just one command?</a>
- <a href='#faq-exported-uvar'>Why doesn't `set -Ux` (exported universal varables) seem to work?</a>
- <a href='#faq-customize-colors'>How do I customize my syntax highlighting colors?</a>
- <a href='#faq-update-manpage-completions'>How do I update man page completions?</a>
- <a href='#faq-cwd-symlink'>Why does cd, pwd and other fish commands always resolve symlinked directories to their canonical path?</a>
@@ -23,7 +24,8 @@
- <a href='#faq-titlebar'>I'm seeing weird output before each prompt when using screen. What's wrong?</a>
- <a href='#faq-greeting'>How do I change the greeting message?</a>
- <a href='#faq-history'>Why doesn't history substitution ("!$" etc.) work?</a>
- <a href='#faq-cd-minus'>How to make `-` a shortcut for `cd -`?</a>
- <a href='#faq-find-braces'>Why do I get a missing argument error with `find ... {}`?</a>
- <a href='#faq-cd-minus'>How can I use `-` as a shortcut for `cd -`?</a>
- <a href='#faq-uninstalling'>How do I uninstall fish?</a>
- <a href='#faq-third-party'>Where can I find extra tools for fish?</a>
@@ -105,7 +107,6 @@ end
See the documentation for <a href="commands.html#test">`test`</a> and <a href="commands.html#if">`if`</a> for more information.
Use the <a href="commands.html#fish_update_completions">`fish_update_completions`</a> command.
<hr>
\section faq-single-env How do I set an environment variable for just one command?
@@ -124,6 +125,26 @@ begin
end
\endfish
\section faq-exported-uvar Why doesn't `set -Ux` (exported universal variables) seem to work?
A global variable of the same name already exists.
Environment variables such as `EDITOR` or `TZ` can be set universally using `set -Ux`. However, if
there is an environment variable already set before fish starts (such as by login scripts or system
administrators), it is imported into fish as a global variable. The <a
href="index.html#variables-scope">variable scopes</a> are searched from the "inside out", which
means that local variables are checked first, followed by global variables, and finally universal
variables.
This means that the global value takes precedence over the universal value.
To avoid this problem, consider changing the setting which fish inherits. If this is not possible,
add a statement to your <a href="index.html#">user initilization file</a> (usually
`~/.config/fish/config.fish`):
\fish{cli-dark}
set -gx EDITOR vim
\endfish
\section faq-customize-colors How do I customize my syntax highlighting colors?
@@ -224,7 +245,22 @@ Fish history recall is very simple yet effective:
See <a href='index.html#editor'>documentation</a> for more details about line editing in fish.
<hr>
\section faq-cd-minus How to make `-` a shortcut for `cd -`?
\section faq-find-braces Why do I get a missing argument error with `find ... {}`?
Running `find ... -exec ... {}` produces an error:
find: missing argument to '-exec'
The problem is caused by the empty braces, which are subject to <a href="index.html#expand-brace">brace expansion</a>.
Quote the empty braces to achieve the desired effect:
\fish{cli-dark}
find ... -exec ... '{{}}'
\endfish
<hr>
\section faq-cd-minus How can I use `-` as a shortcut for `cd -`?
In fish versions prior to 2.5.0 it was possible to create a function named `-` that would do `cd -`. Changes in the 2.5.0 release included several bug fixes that enforce the rule that a bare hyphen is not a valid function (or variable) name. However, you can achieve the same effect via an abbreviation:

View File

@@ -13,6 +13,8 @@ The following options are available:
- `-c` or `--command=COMMANDS` evaluate the specified commands instead of reading from the commandline
- `-C` or `--init-command=COMMANDS` evaluate the specified commands after reading the configuration, before running the command specified by `-c` or reading interactive input
- `-d` or `--debug-level=DEBUG_LEVEL` specify the verbosity level of fish. A higher number means higher verbosity. The default level is 1.
- `-i` or `--interactive` specify that fish is to run in interactive mode

View File

@@ -0,0 +1,30 @@
\section fish_breakpoint_prompt fish_breakpoint_prompt - define the appearance of the command line prompt when in the context of a `breakpoint` command
\subsection fish_breakpoint_prompt-synopsis Synopsis
\fish{synopsis}
function fish_breakpoint_prompt
...
end
\endfish
\subsection fish_breakpoint_prompt-description Description
By defining the `fish_breakpoint_prompt` function, the user can choose a custom prompt when asking for input in response to a `breakpoint` command. The `fish_breakpoint_prompt` function is executed when the prompt is to be shown, and the output is used as a prompt.
The exit status of commands within `fish_breakpoint_prompt` will not modify the value of <a href="index.html#variables-status">$status</a> outside of the `fish_breakpoint_prompt` function.
`fish` ships with a default version of this function that displays the function name and line number of the current execution context.
\subsection fish_breakpoint_prompt-example Example
A simple prompt that is a simplified version of the default debugging prompt:
\fish
function fish_breakpoint_prompt -d "Write out the debug prompt"
set -l function (status current-function)
set -l line (status current-line-number)
set -l prompt "$function:$line >"
echo -ns (set_color $fish_color_status) "BP $prompt" (set_color normal) ' '
end
\endfish

View File

@@ -21,6 +21,8 @@ The following options are available:
- `-h` or `--help` prints usage information.
- `-v` or `--version` prints fish_key_reader's version and exits.
\subsection fish_key_reader-usage-notes Usage Notes
The delay in milliseconds since the previous character was received is included in the diagnostic information written to stderr. This information may be useful to determine the optimal `fish_escape_delay_ms` setting or learn the amount of lag introduced by tools like `ssh`, `mosh` or `tmux`.

View File

@@ -2,10 +2,36 @@
\subsection fish_mode_prompt-synopsis Synopsis
fish_mode_prompt will output the mode indicator for use in vi-mode.
The fish_mode_prompt function will output the mode indicator for use in vi-mode.
\subsection fish_mode_prompt-description Description
The output of `fish_mode_prompt` will be displayed in the mode indicator position to the left of the regular prompt.
The default `fish_mode_prompt` function will output indicators about the current Vi editor mode displayed to the left of the regular prompt. Define your own function to customize the appearance of the mode indicator. You can also define an empty `fish_mode_prompt` function to remove the Vi mode indicators. The `$fish_bind_mode variable` can be used to determine the current mode. It
will be one of `default`, `insert`, `replace_one`, or `visual`.
Multiple lines are not supported in `fish_mode_prompt`.
\subsection fish_mode_prompt-example Example
\fish
function fish_mode_prompt
switch $fish_bind_mode
case default
set_color --bold red
echo 'N'
case insert
set_color --bold green
echo 'I'
case replace_one
set_color --bold green
echo 'R'
case visual
set_color --bold brmagenta
echo 'V'
case '*'
set_color --bold red
echo '?'
end
set_color normal
end
\endfish
Outputting multiple lines is not supported in `fish_mode_prompt`.

54
doc_src/fish_opt.txt Normal file
View File

@@ -0,0 +1,54 @@
\section fish_opt fish_opt - create an option spec for the argparse command
\subsection fish_opt-synopsis Synopsis
\fish{synopsis}
fish_opt [ -h | --help ]
fish_opt ( -s X | --short=X ) [ -l LONG | --long=LONG ] [ --long-only ] \
[ -o | --optional-val ] [ -r | --required-val ] [ --multiple-vals ]
\endfish
\subsection fish_opt-description Description
This command provides a way to produce option specifications suitable for use with the <a href="#argparse">`argparse`</a> command. You can, of course, write the option specs by hand without using this command. But you might prefer to use this for the clarity it provides.
The following `argparse` options are available:
- `-s` or `--short` takes a single letter that is used as the short flag in the option being defined. This option is mandatory.
- `-l` or `--long` takes a string that is used as the long flag in the option being defined. This option is optional and has no default. If no long flag is defined then only the short flag will be allowed when parsing arguments using the option spec.
- `--long-only` means the option spec being defined will only allow the long flag name to be used. The short flag name must still be defined (i.e., `--short` must be specified) but it cannot be used when parsing args using this option spec.
- `-o` or `--optional` means the option being defined can take a value but it is optional rather than required. If the option is seen more than once when parsing arguments only the last value seen is saved. This means the resulting flag variable created by `argparse` will zero elements if no value was given with the option else it will have exactly one element.
- `-r` or `--required` means the option being defined requires a value. If the option is seen more than once when parsing arguments only the last value seen is saved. This means the resulting flag variable created by `argparse` will have exactly one element.
- `--multiple-vals` means the option being defined requires a value each time it is seen. Each instance is stored. This means the resulting flag variable created by `argparse` will have one element for each instance of this option in the args.
- `-h` or `--help` displays help about using this command.
\subsection fish_opt-examples Examples
Define a single option spec for the boolean help flag:
\fish
set -l options (fish_opt -s h -l help)
argparse $options -- $argv
\endfish
Same as above but with a second flag that requires a value:
\fish
set -l options (fish_opt -s h -l help)
set options $options (fish_opt -s m -l max --required-val)
argparse $options -- $argv
\endfish
Same as above but with a third flag that can be given multiple times saving the value of each instance seen and only the long flag name (`--token`) can be used:
\fish
set -l options (fish_opt --short=h --long=help)
set options $options (fish_opt --short=m --long=max --required-val)
set options $options (fish_opt --short=t --long=token --multiple-vals --long-only)
argparse $options -- $argv
\endfish

View File

@@ -92,6 +92,6 @@ end
This will beep when the most recent job completes.
\subsection notes Notes
\subsection function-notes Notes
Note that events are only received from the current fish process as there is no way to send events from one fish process to another.

View File

@@ -60,6 +60,16 @@ history delete --prefix "foo"
# You can select more than one entry by entering their IDs seperated by a space.
\endfish
\subsection customizing-the-histfile Customizing the name of the history file
By default interactive commands are logged to `$XDG_DATA_HOME/fish/fish_history` (typically `~/.local/share/fish/fish_history`).
You can set the `fish_history` variable to another name for the current shell session. The default value (when the variable is unset) is `fish` which corresponds to `$XDG_DATA_HOME/fish/fish_history`. If you set it to e.g. `fun`, the history would be written to `$XDG_DATA_HOME/fish/fun_history`. An empty string means history will not be stored at all. This is similar to the private session features in web browsers.
You can change `fish_history` at any time (by using `set -x fish_history "session_name"`) and it will take effect right away. If you set it to `"default"`, it will use the default session name (which is `"fish"`).
Other shells such as bash and zsh use a variable named `HISTFILE` for a similar purpose. Fish uses a different name to avoid conflicts and signal that the behavior is different (session name instead of a file path). Also, if you set the var to anything other than `fish` or `default` it will inhibit importing the bash history. That's because the most common use case for this feature is to avoid leaking private or sensitive history when giving a presentation.
\subsection history-notes Notes
If you specify both `--prefix` and `--contains` the last flag seen is used.

View File

@@ -106,6 +106,7 @@ Some characters can not be written directly on the command line. For these chara
- '<code>\\\></code>' escapes the more than character
- '<code>\\^</code>' escapes the circumflex character
- '<code>\\&amp;</code>' escapes the ampersand character
- '<code>\\|</code>' escapes the vertical bar character
- '<code>\\;</code>' escapes the semicolon character
- '<code>\\"</code>' escapes the quote character
- '<code>\\'</code>' escapes the apostrophe character
@@ -580,7 +581,7 @@ Be careful when you try to use braces to separate variable names from text. The
\subsection expand-index-range Index range expansion
Both command substitution and shell variable expansion support accessing only specific items by providing a set of indices in square brackets. It's often needed to access a sequence of elements. To do this, use the range operator '`..`' for this. A range '`a..b`', where range limits 'a' and 'b' are integer numbers, is expanded into a sequence of indices '`a a+1 a+2 ... b`' or '`a a-1 a-2 ... b`' depending on which of 'a' or 'b' is higher. The negative range limits are calculated from the end of the array or command substitution.
Both command substitution and shell variable expansion support accessing only specific items by providing a set of indices in square brackets. It's often needed to access a sequence of elements. To do this, use the range operator '`..`' for this. A range '`a..b`', where range limits 'a' and 'b' are integer numbers, is expanded into a sequence of indices '`a a+1 a+2 ... b`' or '`a a-1 a-2 ... b`' depending on which of 'a' or 'b' is higher. The negative range limits are calculated from the end of the array or command substitution. Note that invalid indexes for either end are silently clamped to one or the size of the array as appropriate.
Some examples:
@@ -692,7 +693,7 @@ After a variable has been set, you can use the value of a variable in the shell
Example:
To use the value of the variable `smurf`, write `$` (dollar symbol) followed by the name of the variable, like `echo Smurfs are usually $smurf_color`, which would print the result 'Smurfs are usually blue'.
To use the value of the variable `smurf_color`, write `$` (dollar symbol) followed by the name of the variable, like `echo Smurfs are usually $smurf_color`, which would print the result 'Smurfs are usually blue'.
\subsection variables-scope Variable scope
@@ -778,7 +779,7 @@ Variables can be explicitly set to be exported with the `-x` or `--export` switc
`echo $PATH[3]`
Note that array indices start at 1 in `fish`, not 0, as is more common in other languages. This is because many common Unix tools like `seq` are more suited to such use.
Note that array indices start at 1 in `fish`, not 0, as is more common in other languages. This is because many common Unix tools like `seq` are more suited to such use. An invalid index is silently ignored resulting in no value being substituted (not an empty string).
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:
@@ -822,9 +823,19 @@ The user can change the settings of `fish` by changing the values of certain var
- A large number of variable starting with the prefixes `fish_color` and `fish_pager_color.` See <a href='#variables-color'>Variables for changing highlighting colors</a> for more information.
- `fish_escape_delay_ms` overrides the default timeout of 300ms (default key bindings) or 10ms (vi key bindings) after seeing an escape character before giving up on matching a key binding. See the documentation for the <a href='bind.html#special-case-escape'>bind</a> builtin command. This delay facilitates using escape as a meta key.
- `fish_greeting`, the greeting message printed on startup.
- `fish_escape_delay_ms` overrides the default timeout of 300ms (default key bindings) or 10ms (vi key bindings) after seeing an escape character before giving up on matching a key binding. See the documentation for the <a href='bind.html#special-case-escape'>bind</a> builtin command. This delay facilitates using escape as a meta key.
- `fish_history`, the current history session name. If set, all subsequent commands within an
interactive fish session will be logged to a separate file identified by the value of the
variable. If unset, or set to `default`, the default session name "fish" is used. If set to an
empty string, history is not saved to disk (but is still available within the interactive
session).
- `fish_user_paths`, an array of directories that are prepended to `PATH`. This can be a universal variable.
- `umask`, the current file creation mask. The preferred way to change the umask variable is through the <a href="commands.html#umask">umask function</a>. An attempt to set umask to an invalid value will always fail.
- `BROWSER`, the user's 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.
@@ -832,12 +843,8 @@ The user can change the settings of `fish` by changing the values of certain var
- `LANG`, `LC_ALL`, `LC_COLLATE`, `LC_CTYPE`, `LC_MESSAGES`, `LC_MONETARY`, `LC_NUMERIC` and `LC_TIME` set the language option for the shell and subprograms. See the section <a href='#variables-locale'>Locale variables</a> for more information.
- `fish_user_paths`, an array of directories that are prepended to `PATH`. This can be a universal variable.
- `PATH`, an array of directories in which to search for commands
- `umask`, the current file creation mask. The preferred way to change the umask variable is through the <a href="commands.html#umask">umask function</a>. An attempt to set umask to an invalid value will always fail.
`fish` also sends additional information to the user through the values of certain environment variables. The user cannot change the values of most of these variables.
- `_`, the name of the currently running command.
@@ -1091,7 +1098,7 @@ Command mode is also known as normal mode.
- @key{p} pastes text from the <a href="#killring">killring</a>.
- @key{u} undoes the most recent action.
- @key{u} search history backwards.
- @key{[} and @key{]} search the command history for the previous/next token containing the token under the cursor before the search was started. See the <a href='#history'>history</a> section for more information on history searching.
@@ -1129,7 +1136,10 @@ History searches can be aborted by pressing the escape key.
Prefixing the commandline with a space will prevent the entire line from being stored in the history.
The history is stored in the file `~/.local/share/fish/fish_history` (or `$XDG_DATA_HOME/fish/fish_history` if that variable is set).
The command history is stored in the file `~/.local/share/fish/fish_history` (or
`$XDG_DATA_HOME/fish/fish_history` if that variable is set) by default. However, you can set the
`fish_history` environment variable to change the name of the history session (resulting in a
`<session>_history` file); both before starting the shell and while the shell is running.
Examples:
@@ -1287,9 +1297,11 @@ For more information on how to define new event handlers, see the documentation
\subsection debugging Debugging fish scripts
Fish includes a built in debugger. The debugger allows you to stop execution of a script at an arbitrary point and launch a prompt. This prompt can then be used to check or change the value of any variables or perform any shellscript command. To resume normal execution of the script, simply exit the prompt.
Fish includes a built in debugging facility. The debugger allows you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt. At this prompt you can execute any fish command (there are no debug commands as such). For example, you can check or change the value of any variables using `printf` and `set`. As another example, you can run `status print-stack-trace` to see how this breakpoint was reached. To resume normal execution of the script, simply type `exit` or [ctrl-D].
To start the debugger, simply call the builtin command `breakpoint`. The default action of the TRAP signal is to call this builtin, so a running script can be debugged by sending it the TRAP signal. Once in the debugger, it is easy to insert new breakpoints by using the funced function to edit the definition of a function.
To start a debug session simply run the builtin command `breakpoint` at the point in a function or script where you wish to gain control. Also, the default action of the TRAP signal is to call this builtin. So a running script can be debugged by sending it the TRAP signal with the `kill` command. Once in the debugger, it is easy to insert new breakpoints by using the funced function to edit the definition of a function.
Note: At the moment the debug prompt is identical to your normal fish prompt. This can make it hard to recognize that you've entered a debug session. <a hread="https://github.com/fish-shell/fish-shell/issues/1310">Issue 1310</a> is open to improve this.
\section issues Common issues with fish

View File

@@ -2,7 +2,7 @@
\subsection math-synopsis Synopsis
\fish{synopsis}
math [-sN] EXPRESSION
math [-sN | --scale=N] [--] EXPRESSION
\endfish
\subsection math-description Description
@@ -13,7 +13,7 @@ For a description of the syntax supported by math, see the manual for the bc pro
The following options are available:
- `-sN` Sets the scale of the result. `N` must be an integer and defaults to zero. This simply sets bc's `scale` variable to the provided value. Note that you cannot put a space between `-s` and `N`.
- `-sN` or `--scale=N` sets the scale of the result. `N` must be an integer and defaults to zero. This simply sets bc's `scale` variable to the provided value.
\subsection return-values Return Values
@@ -33,4 +33,6 @@ If invalid options or no expression is provided the return `status` is two. If t
\subsection math-cautions Cautions
You should always place a `--` flag separator before the expression. 99.99% of the time you'll get the desired result without the separator. Something like `math -10.0 / 2` will fail because the negative floating point value gets treated as an invalid flag. But `math -10 / 2` will work because negative integers are special-cased.
Note that the modulo operator (`x % y`) is not well defined for floating point arithmetic. The `bc` command produces a nonsensical result rather than emit an error and fail in that case. It doesn't matter if the arguments are integers; e.g., `10 % 4`. You'll still get an incorrect result. Do not use the `-sN` flag with N greater than zero if you want sensible answers when using the modulo operator.

View File

@@ -13,6 +13,8 @@ If the `-l` or `--list` flag is specified, the current directory history is also
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates.
You may be interested in the <a href="commands.html#cdh">`cdh`</a> command which provides a more intuitive way to navigate to recently visited directories.
\subsection nextd-example Example
\fish

View File

@@ -12,7 +12,7 @@ COMMAND1; or COMMAND2
`or` statements may be used as part of the condition in an <a href="#if">`and`</a> or <a href="#while">`while`</a> block. See the documentation
for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
`or` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
`or` does not change the current exit status itself, but the command it runs most likely will. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
\subsection or-example Example

View File

@@ -9,6 +9,7 @@ popd
`popd` removes the top directory from the directory stack and changes the working directory to the new top directory. Use <a href="#pushd">`pushd`</a> to add directories to the stack.
You may be interested in the <a href="commands.html#cdh">`cdh`</a> command which provides a more intuitive way to navigate to recently visited directories.
\subsection popd-example Example

View File

@@ -13,6 +13,8 @@ If the `-l` or `--list` flag is specified, the current history is also displayed
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates.
You may be interested in the <a href="commands.html#cdh">`cdh`</a> command which provides a more intuitive way to navigate to recently visited directories.
\subsection prevd-example Example
\fish

View File

@@ -2,17 +2,20 @@
\subsection psub-synopsis Synopsis
\fish{synopsis}
COMMAND1 ( COMMAND2 | psub [-f] [-s SUFFIX])
COMMAND1 ( COMMAND2 | psub [-F | --fifo] [-f | --file] [-s SUFFIX])
\endfish
\subsection psub-description Description
Posix shells feature a syntax that is a mix between command substitution and piping, called process substitution. It is used to send the output of a command into the calling command, much like command substitution, but with the difference that the output is not sent through commandline arguments but through a named pipe, with the filename of the named pipe sent as an argument to the calling program. `psub` combined with a regular command substitution provides the same functionality.
Some shells (e.g., ksh, bash) feature a syntax that is a mix between command substitution and piping, called process substitution. It is used to send the output of a command into the calling command, much like command substitution, but with the difference that the output is not sent through commandline arguments but through a named pipe, with the filename of the named pipe sent as an argument to the calling program. `psub` combined with a regular command substitution provides the same functionality.
If the `-f` or `--file` switch is given to `psub`, `psub` will use a regular file instead of a named pipe to communicate with the calling process. This will cause `psub` to be significantly slower when large amounts of data are involved, but has the advantage that the reading process can seek in the stream.
The following options are available:
If the `-s` or `---suffix` switch is given, `psub` will append SUFFIX to the filename.
- `-f` or `--file` will cause psub to use a regular file instead of a named pipe to communicate with the calling process. This will cause `psub` to be significantly slower when large amounts of data are involved, but has the advantage that the reading process can seek in the stream. This is the default.
- `-F` or `--fifo` will cause psub to use a named pipe rather than a file. You should only use this if the command produces no more than 8 KiB of output. The limit on the amount of data a FIFO can buffer varies with the OS but is typically 8 KiB, 16 KiB or 64 KiB. If you use this option and the command on the left of the psub pipeline produces more output a deadlock is likely to occur.
- `-s` or `--suffix` will append SUFFIX to the filename.
\subsection psub-example Example
@@ -20,6 +23,6 @@ If the `-s` or `---suffix` switch is given, `psub` will append SUFFIX to the fil
diff (sort a.txt | psub) (sort b.txt | psub)
# shows the difference between the sorted versions of files `a.txt` and `b.txt`.
source-highlight -f esc (cpp main.c | psub -s .c)
source-highlight -f esc (cpp main.c | psub -f -s .c)
# highlights `main.c` after preprocessing as a C source.
\endfish

View File

@@ -17,6 +17,8 @@ Without arguments, it exchanges the top two directories in the stack.
See also `dirs` and `dirs -c`.
You may be interested in the <a href="commands.html#cdh">`cdh`</a> command which provides a more intuitive way to navigate to recently visited directories.
\subsection pushd-example Example
\fish

View File

@@ -7,7 +7,7 @@ read [OPTIONS] [VARIABLES...]
\subsection read-description Description
`read` reads from standard input and stores the result in one or more shell variables. By default it reads one line terminated by a newline but options are available to read up to a null character and to limit each "line" to a maximum number of characters.
`read` reads from standard input and stores the result in one or more shell variables. By default, one line (terminated by a newline) is read into each variable. Alternatively, a null character or a maximum number of characters can be used to terminate the input. Unlike other shells, there is no default variable (such as `REPLY`) for storing the result.
The following options are available:
@@ -19,9 +19,8 @@ The following options are available:
- `-l` or `--local` makes the variables local.
- `-m NAME` or `--mode-name=NAME` specifies that the name NAME should be used to save/load the history file. If NAME is fish, the regular fish history will be available.
- `-n NCHARS` or `--nchars=NCHARS` causes `read` to return after reading NCHARS characters rather than waiting for a complete line of input (either newline or null terminated).
- `-n NCHARS` or `--nchars=NCHARS` makes `read` return after reading NCHARS characters or the end of
the line, whichever comes first.
- `-p PROMPT_CMD` or `--prompt=PROMPT_CMD` uses the output of the shell command `PROMPT_CMD` as the prompt for the interactive mode. The default prompt command is <code>set_color green; echo read; set_color normal; echo "> "</code>.
@@ -39,7 +38,8 @@ The following options are available:
- `-a` or `--array` stores the result as an array in a single variable.
- `-z` or `--null` reads up to NUL instead of newline. Disables interactive mode.
- `-z` or `--null` marks the end of the line with the NUL character, instead of newline. This also
disables interactive mode.
`read` reads a single line of input from stdin, breaks it into tokens based on the `IFS` shell variable, and then assigns one token to each variable specified in `VARIABLES`. If there are more tokens than variables, the complete remainder is assigned to the last variable. As a special case, if `IFS` is set to the empty string, each character of the input is considered a separate token.
@@ -47,9 +47,14 @@ If `-a` or `--array` is provided, only one variable name is allowed and the toke
See the documentation for `set` for more details on the scoping rules for variables.
When read reaches the end-of-file (EOF) instead of the separator, it sets `$status` to 1. If not, it sets it to 0.
When `read` reaches the end-of-file (EOF) instead of the terminator, the exit status is set to 1.
Otherwise, it is set to 0.
Fish has a default limit of 10 MiB on the number of characters each `read` will consume. If you attempt to read more than that `$status` is set to 122 and the variable will be empty. You can modify that limit by setting the `FISH_READ_BYTE_LIMIT` variable at any time including in the environment before fish starts running. This is a safety mechanism to keep the shell from consuming an unreasonable amount of memory if the input is malformed.
In order to protect the shell from consuming too many system resources, `read` will only consume a maximum of 10 MiB (1048576 bytes); if the terminator is not reached before this limit then VARIABLE is set to empty and the exit status is set to 122. This limit can be altered with the `FISH_READ_BYTE_LIMIT` variable. If set to 0 (zero), the limit is removed.
\subsection read-history Using another read history file
The `read` command supported the `-m` and `--mode-name` flags in fish versions prior to 2.7.0 to specify an alternative read history file. Those flags are now deprecated and ignored. Instead, set the `fish_history` variable to specify a history session ID. That will affect both the `read` history file and the fish command history file. You can set it to an empty string to specify that no history should be read or written. This is useful for presentations where you do not want possibly private or sensitive history to be exposed to the audience but do want history relevant to the presentation to be available.
\subsection read-example Example

View File

@@ -8,6 +8,7 @@ set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES...
set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME
set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
set ( -S | --show ) [SCOPE_OPTIONS] [VARIABLE_NAME]...
\endfish
\subsection set-description Description
@@ -39,12 +40,14 @@ The following options are available:
- `-n` or `--names` List only the names of all defined variables, not their value. The names are guaranteed to be sorted.
- `-S` or `--show` Shows information about the given variables. If no variable names are given then all variables are shown in sorted order. No other flags can be used with this option. The information shown includes whether or not it is set in each of the local, global, and universal scopes. If it is set in one of those scopes whether or not it is exported is reported. The individual elements are also shown along with the length of each element.
- `-L` or `--long` do not abbreviate long values when printing set variables
If a variable is set to more than one value, the variable will be an array with the specified elements. If a variable is set to zero elements, it will become an array with zero elements.
If the variable name is one or more array elements, such as `PATH[1 3 7]`, only those array elements specified will be changed. When array indices are specified to `set`, multiple arguments may be used to specify additional indexes, e.g. `set PATH[1] PATH[4] /bin /sbin`. If you specify a negative index when expanding or assigning to an array variable, the index will be calculated from the end of the array. For example, the index -1 means the last index of an array.
If the variable name is one or more array elements, such as `PATH[1 3 7]`, only those array elements specified will be changed. If you specify a negative index when expanding or assigning to an array variable, the index will be calculated from the end of the array. For example, the index -1 means the last index of an array.
The scoping rules when creating or updating a variable are:

View File

@@ -6,14 +6,15 @@ status
status is-login
status is-interactive
status is-block
status is-breakpoint
status is-command-substitution
status is-no-job-control
status is-full-job-control
status is-interactive-job-control
status current-filename
status current-function
status current-line-number
status print-stack-trace
status filename
status function
status line-number
status stack-trace
status job-control CONTROL-TYPE
\endfish
@@ -27,6 +28,8 @@ The following operations (sub-commands) are available:
- `is-block` returns 0 if fish is currently executing a block of code. Also `-b` or `--is-block`.
- `is-breakpoint` returns 0 if fish is currently showing a prompt in the context of a `breakpoint` command. See also the `fish_breakpoint_prompt` function.
- `is-interactive` returns 0 if fish is interactive - that is, connected to a keyboard. Also `-i` or `--is-interactive`.
- `is-login` returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up the PATH. Also `-l` or `--is-login`.
@@ -37,15 +40,16 @@ The following operations (sub-commands) are available:
- `is-no-job-control` returns 0 if no job control is enabled. Also `--is-no-job-control` (no short flag).
- `current-filename` prints the filename of the currently running script. Also `-f` or `--current-filename`.
- `filename` prints the filename of the currently running script. Also `current-filename`, `-f` or `--current-filename`.
- `current-function` prints the name of the currently called function if able, when missing displays "Not a function". Also `-u` or `--current-function`.
- `function` prints the name of the currently called function if able, when missing displays "Not a
function" (or equivalent translated string). Also `current-function`, `-u` or `--current-function`.
- `current-line-number` prints the line number of the currently running script. Also `-n` or `--current-line-number`.
- `line-number` prints the line number of the currently running script. Also `current-line-number`, `-n` or `--current-line-number`.
- `job-control CONTROL-TYPE` sets the job control type, which can be `none`, `full`, or `interactive`. Also `-j CONTROL-TYPE` or `--job-control=CONTROL-TYPE`.
- `print-stack-trace` prints a stack trace of all function calls on the call stack. Also `-t` or `--print-stack-trace`.
- `stack-trace` prints a stack trace of all function calls on the call stack. Also `print-stack-trace`, `-t` or `--print-stack-trace`.
\subsection status-notes Notes

View File

@@ -2,21 +2,24 @@
\subsection string-synopsis Synopsis
\fish{synopsis}
string length [(-q | --quiet)] [STRING...]
string sub [(-s | --start) START] [(-l | --length) LENGTH] [(-q | --quiet)]
[STRING...]
string split [(-m | --max) MAX] [(-r | --right)] [(-q | --quiet)] SEP
[STRING...]
string escape [(-n | --no-quoted)] [--style=xxx] [STRING...]
string join [(-q | --quiet)] SEP [STRING...]
string trim [(-l | --left)] [(-r | --right)] [(-c | --chars CHARS)]
[(-q | --quiet)] [STRING...]
string escape [(-n | --no-quoted)] [STRING...]
string length [(-q | --quiet)] [STRING...]
string lower [(-q | --quiet)] [STRING...]
string match [(-a | --all)] [((-e | --entire)] [(-i | --ignore-case)] [(-r | --regex)]
[(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...]
string repeat [(-n | --count) COUNT] [(-m | --max) MAX] [(-N | --no-newline)]
[(-q | --quiet)] [STRING...]
string replace [(-a | --all)] [(-f | --filter)] [(-i | --ignore-case)] [(-r | --regex)]
[(-q | --quiet)] PATTERN REPLACEMENT [STRING...]
string repeat [(-n | --count)] [(-m | --max)] [(-N | --no-newline)]
[(-q | --quiet)] [STRING...]
string split [(-m | --max) MAX] [(-r | --right)] [(-q | --quiet)] SEP
[STRING...]
string sub [(-s | --start) START] [(-l | --length) LENGTH] [(-q | --quiet)]
[STRING...]
string trim [(-l | --left)] [(-r | --right)] [(-c | --chars CHARS)]
[(-q | --quiet)] [STRING...]
string unescape [--style=xxx] [STRING...]
string upper [(-q | --quiet)] [STRING...]
\endfish
@@ -32,46 +35,48 @@ Most subcommands accept a `-q` or `--quiet` switch, which suppresses the usual o
The following subcommands are available.
\subsection string-length "length" subcommand
\subsection string-escape "escape" subcommand
`string length` reports the length of each string argument in characters. Exit status: 0 if at least one non-empty STRING was given, or 1 otherwise.
`string escape` escapes each STRING in one of three ways. The first is `--style=script`. This is the default. It alters the string such that it can be passed back to `eval` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If `-n` or `--no-quoted` is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
\subsection string-sub "sub" subcommand
The second is `--style=var` which ensures the string can be used as a variable name by hex encoding any non-alphanumeric characters. The string is first converted to UTF-8 before being encoded.
`string sub` prints a substring of each string argument. The start of the substring can be specified with `-s` or `--start` followed by a 1-based index value. Positive index values are relative to the start of the string and negative index values are relative to the end of the string. The default start value is 1. The length of the substring can be specified with `-l` or `--length`. If the length is not specified, the substring continues to the end of each STRING. Exit status: 0 if at least one substring operation was performed, 1 otherwise.
The third is `--style=url` which ensures the string can be used as a URL by hex encoding any character which is not legal in a URL. The string is first converted to UTF-8 before being encoded.
\subsection string-split "split" subcommand
`string split` splits each STRING on the separator SEP, which can be an empty string. If `-m` or `--max` is specified, at most MAX splits are done on each STRING. If `-r` or `--right` is given, splitting is performed right-to-left. This is useful in combination with `-m` or `--max`. Exit status: 0 if at least one split was performed, or 1 otherwise.
`string unescape` performs the inverse of the `string escape` command. If the string to be unescaped is not properly formatted it is ignored. For example, doing `string unescape --style=var (string escape --style=var $str)` will return the original string.
\subsection string-join "join" subcommand
`string join` joins its STRING arguments into a single string separated by SEP, which can be an empty string. Exit status: 0 if at least one join was performed, or 1 otherwise.
\subsection string-trim "trim" subcommand
\subsection string-length "length" subcommand
`string trim` removes leading and trailing whitespace from each STRING. If `-l` or `--left` is given, only leading whitespace is removed. If `-r` or `--right` is given, only trailing whitespace is trimmed. The `-c` or `--chars` switch causes the characters in CHARS to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
`string length` reports the length of each string argument in characters. Exit status: 0 if at least one non-empty STRING was given, or 1 otherwise.
\subsection string-escape "escape" subcommand
\subsection string-lower "lower" subcommand
`string escape` escapes each STRING such that it can be passed back to `eval` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If `-n` or `--no-quoted` is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
`string lower` converts each string argument to lowercase. Exit status: 0 if at least one string was converted to lowercase, else 1. This means that in conjunction with the `-q` flag you can readily test whether a string is already lowercase.
\subsection string-match "match" subcommand
`string match` tests each STRING against PATTERN and prints matching substrings. Only the first match for each STRING is reported unless `-a` or `--all` is given, in which case all matches are reported.The default behavior is equivalent to `grep -o`.
`string match` tests each STRING against PATTERN and prints matching substrings. Only the first match for each STRING is reported unless `-a` or `--all` is given, in which case all matches are reported.
If you specify the `-e` or `--entire` then each matching string is printed including any prefix or suffix not matched by the pattern (equivalent to `grep` without the `-o` flag). You can, obviously, achieve the same result by prepending and appending `*` or `.*` depending on whether or not you have specified the `--regex` flag. The `--entire` flag is simply a way to avoid having to complicate the pattern in that fashion and make the intent of the `string match` clearer.
If you specify the `-e` or `--entire` then each matching string is printed including any prefix or suffix not matched by the pattern (equivalent to `grep` without the `-o` flag). You can, obviously, achieve the same result by prepending and appending `*` or `.*` depending on whether or not you have specified the `--regex` flag. The `--entire` flag is simply a way to avoid having to complicate the pattern in that fashion and make the intent of the `string match` clearer. Without `--entire` and `--regex`, a PATTERN will need to match the entire STRING before it will be reported.
Matching can be made case-insensitive with `--ignore-case` or `-i`.
If `--index` or `-n` is given, each match is reported as a 1-based start position and a length. By default, PATTERN is interpreted as a glob pattern matched against each entire STRING argument. A glob pattern is only considered a valid match if it matches the entire STRING.
If `--regex` or `-r` is given, PATTERN is interpreted as a Perl-compatible regular expression, which does not have to match the entire STRING. For a regular expression containing capturing groups, multiple items will be reported for each match, one for the entire match and one for each capturing group.
If `--regex` or `-r` is given, PATTERN is interpreted as a Perl-compatible regular expression, which does not have to match the entire STRING. For a regular expression containing capturing groups, multiple items will be reported for each match, one for the entire match and one for each capturing group. With this, only the matching part of the STRING will be reported, unless `--entire` is given.
If `--invert` or `-v` is used the selected lines will be only those which do not match the given glob pattern or regular expression.
Exit status: 0 if at least one match was found, or 1 otherwise.
\subsection string-repeat "repeat" subcommand
`string repeat` repeats the STRING `-n` or `--count` times. The `-m` or `--max` option will limit the number of outputed char (excluding the newline). This option can be used by itself or in conjuction with `--count`. If both `--count` and `--max` are present, max char will be outputed unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both `--count` and `--max` will accept a number greater than or equal to zero, in the case of zero, nothing will be outputed. If `-N` or `--no-newline` is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
\subsection string-replace "replace" subcommand
`string replace` is similar to `string match` but replaces non-overlapping matching substrings with a replacement string and prints the result. By default, PATTERN is treated as a literal substring to be matched.
@@ -82,9 +87,21 @@ If you specify the `-f` or `--filter` flag then each input string is printed onl
Exit status: 0 if at least one replacement was performed, or 1 otherwise.
\subsection string-repeat "repeat" subcommand
\subsection string-split "split" subcommand
`string repeat` repeats the STRING `-n` or `--count` times. The `-m` or `--max` option will limit the number of outputed char (excluding the newline). This option can be used by itself or in conjuction with `--count`. If both `--count` and `--max` are present, max char will be outputed unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both `--count` and `--max` will accept a number greater than or equal to zero, in the case of zero, nothing will be outputed. If `-N` or `--no-newline` is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
`string split` splits each STRING on the separator SEP, which can be an empty string. If `-m` or `--max` is specified, at most MAX splits are done on each STRING. If `-r` or `--right` is given, splitting is performed right-to-left. This is useful in combination with `-m` or `--max`. Exit status: 0 if at least one split was performed, or 1 otherwise.
\subsection string-sub "sub" subcommand
`string sub` prints a substring of each string argument. The start of the substring can be specified with `-s` or `--start` followed by a 1-based index value. Positive index values are relative to the start of the string and negative index values are relative to the end of the string. The default start value is 1. The length of the substring can be specified with `-l` or `--length`. If the length is not specified, the substring continues to the end of each STRING. Exit status: 0 if at least one substring operation was performed, 1 otherwise.
\subsection string-trim "trim" subcommand
`string trim` removes leading and trailing whitespace from each STRING. If `-l` or `--left` is given, only leading whitespace is removed. If `-r` or `--right` is given, only trailing whitespace is trimmed. The `-c` or `--chars` switch causes the characters in CHARS to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
\subsection string-upper "upper" subcommand
`string upper` converts each string argument to uppercase. Exit status: 0 if at least one string was converted to uppercase, else 1. This means that in conjunction with the `-q` flag you can readily test whether a string is already uppercase.
\subsection regular-expressions Regular Expressions
@@ -149,6 +166,11 @@ In general, special characters are special by default, so `a+` matches one or mo
<bs>cg</bs>
\endfish
\fish{cli-dark}
>_ string escape --style=var 'a1 b2'\\u6161
<bs>a1_20b2__c_E6_85_A1</bs>
\endfish
\subsection string-example-match-glob Match Glob Examples
\fish{cli-dark}
@@ -162,7 +184,23 @@ In general, special characters are special by default, so `a+` matches one or mo
<outp>Axxb</outp>
>_ echo 'ok?' | string match '*\\?'
>_ <outp>ok?</outp>
<outp>ok?</outp>
# Note that only the second STRING will match here.
>_ string match 'foo' 'foo1' 'foo' 'foo2'
<outp>foo</outp>
>_ string match -e 'foo' 'foo1' 'foo' 'foo2'
<outp>foo1
foo
foo2
</outp>
>_ string match 'foo?' 'foo1' 'foo' 'foo2'
<outp>foo1
foo
foo2
</outp>
\endfish
\subsection string-example-match-regex Match Regex Examples

View File

@@ -14,6 +14,8 @@ The first form (`test`) is preferred. For compatibility with other shells, the s
This test is mostly POSIX-compatible.
When using a variable as an argument for a test operator you should almost always enclose it in double-quotes. There are only two situations it is safe to omit the quote marks. The first is when the argument is a literal string with no whitespace or other characters special to the shell (e.g., semicolon). For example, `test -b /my/file`. The second is using a variable that expands to exactly one element including if that element is the empty string (e.g., `set x ''`). If the variable is not set, set but with no value, or set to more than one value you must enclose it in double-quotes. For example, `test "$x" = "$y"`. Since it is always safe to enclose variables in double-quotes when used as `test` arguments that is the recommended practice.
\subsection test-files Operators for files and directories
- `-b FILE` returns true if `FILE` is a block device.
@@ -137,6 +139,22 @@ if test $status -eq 0
end
\endfish
The previous test can likewise be inverted:
\fish
if test ! $status -eq 0
echo "Previous command failed"
end
\endfish
which is logically equivalent to the following:
\fish
if test $status -ne 0
echo "Previous command failed"
end
\endfish
\subsection test-standards Standards
`test` implements a subset of the <a href="http://www.unix.com/man-page/POSIX/1/test/">IEEE Std 1003.1-2008 (POSIX.1) standard</a>. The following exceptions apply:

View File

@@ -19,6 +19,7 @@
- <a href="#tut_exports">Shell Variables</a>
- <a href="#tut_lists">Lists</a>
- <a href="#tut_command_substitutions">Command Substitutions</a>
- <a href="#tut_semicolon">Separating Commands (Semicolon)</a>
- <a href="#tut_combiners">Combiners (And, Or, Not)</a>
- <a href="#tut_conditionals">Conditionals (If, Else, Switch)</a>
- <a href="#tut_functions">Functions</a>
@@ -391,6 +392,31 @@ Command substitutions are not expanded within quotes. Instead, you can temporari
<outp>testing_1360099791.txt</outp>
\endfish
Unlike other shells, fish does not split command substitutions on any whitespace (like spaces or tabs), only newlines. This can be an issue with commands like `pkg-config` that print what is meant to be multiple arguments on a single line. To split it on spaces too, use `string split`.
\fish{cli-dark}
>_ printf '%s\n' (pkg-config --libs gio-2.0)
<outp>-lgio-2.0 -lgobject-2.0 -lglib-2.0</outp>
>_ printf '%s\n' (pkg-config --libs gio-2.0 | string split " ")
<outp>-lgio-2.0
-lgobject-2.0
-lglib-2.0</outp>
\endfish
\section tut_semicolon Separating Commands (Semicolon)
Like other shells, fish allows multiple commands either on separate lines or the same line.
To write them on the same line, use the semicolon (";"). That means the following two examples are equivalent:
\fish
echo fish; echo chips
# or
echo fish
echo chips
\endfish
\section tut_combiners Combiners (And, Or, Not)
@@ -401,6 +427,14 @@ Unlike other shells, `fish` does not have special syntax like &amp;&amp; or || t
<outp>Backup failed</outp>
\endfish
As mentioned in <a href="#tut_semicolon">the section on the semicolon</a>, this can also be written in multiple lines, like so:
\fish
cp file1.txt file1_bak.txt
and echo "Backup successful"
or echo "Backup failed"
\endfish
\section tut_conditionals Conditionals (If, Else, Switch)
@@ -416,6 +450,16 @@ else
end
\endfish
<a href="#tut_combiners">Combiners</a> can also be used to make more complex conditions, like
\fish
if grep fish /etc/shells; and command -sq fish
echo fish is installed and configured
end
\endfish
For even more complex conditions, use `begin` and `end` to group parts of them.
There is also a `switch` command:
\fish{cli-dark}
@@ -537,6 +581,12 @@ To prepend /usr/local/bin and /usr/sbin to `$PATH`, you can write:
>_ set PATH /usr/local/bin /usr/sbin $PATH
\endfish
To remove /usr/local/bin from `$PATH`, you can write:
\fish{cli-dark}
>_ set PATH (string match -v /usr/local/bin $PATH)
\end{fish}
You can do so directly in `config.fish`, like you might do in other shells with `.profile`. See [this example](#path_example).
A faster way is to modify the `$fish_user_paths` [universal variable](#tut_universal), which is automatically prepended to `$PATH`. For example, to permanently add `/usr/local/bin` to your `$PATH`, you could write:

View File

@@ -23,6 +23,8 @@ The following options are available:
- `-q` or `--quiet` suppresses all output; this is useful when testing the exit status.
The `-q`, `-p`, `-t` and `-P` flags (and their long flag aliases) are mutually exclusive. Only one can be specified at a time.
\subsection type-example Example

View File

@@ -15,6 +15,10 @@ BuildRequires: ncurses-devel gettext gcc-c++ autoconf
BuildRequires: gcc48 gcc48-c++
%endif
%if 0%{?is_opensuse} || 0%{?fedora}
BuildRequires: pcre2-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: bc

View File

@@ -69,24 +69,8 @@
/* Begin PBXBuildFile section */
63A2C0E91CC60F3B00973404 /* pcre2_find_bracket.c in Sources */ = {isa = PBXBuildFile; fileRef = 63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */; };
9C7A55271DCD651F0049C25D /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
9C7A55281DCD65540049C25D /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */; };
9C7A55291DCD65540049C25D /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */; };
9C7A552A1DCD65540049C25D /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */; };
9C7A552B1DCD65540049C25D /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853313B3ACEE0099B651 /* builtin_set.cpp */; };
9C7A552C1DCD65540049C25D /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */; };
9C7A552D1DCD65540049C25D /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */; };
9C7A552E1DCD65540049C25D /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */; };
9C7A552F1DCD65820049C25D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855E13B3ACEE0099B651 /* util.cpp */; };
9C7A55361DCD71330049C25D /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
9C7A55371DCD71330049C25D /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */; };
9C7A55381DCD71330049C25D /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */; };
9C7A55391DCD71330049C25D /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */; };
9C7A553A1DCD71330049C25D /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853313B3ACEE0099B651 /* builtin_set.cpp */; };
9C7A553B1DCD71330049C25D /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */; };
9C7A553C1DCD71330049C25D /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */; };
9C7A553D1DCD71330049C25D /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
9C7A553E1DCD71330049C25D /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */; };
9C7A553F1DCD71330049C25D /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
9C7A55401DCD71330049C25D /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
9C7A55411DCD71330049C25D /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; };
9C7A55421DCD71330049C25D /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
@@ -100,7 +84,6 @@
9C7A554A1DCD71330049C25D /* screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855A13B3ACEE0099B651 /* screen.cpp */; };
9C7A554B1DCD71330049C25D /* signal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855C13B3ACEE0099B651 /* signal.cpp */; };
9C7A554C1DCD71330049C25D /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C9733718DE5449002D7C81 /* utf8.cpp */; };
9C7A554D1DCD71330049C25D /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
9C7A554E1DCD71330049C25D /* function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854413B3ACEE0099B651 /* function.cpp */; };
9C7A554F1DCD71330049C25D /* complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853713B3ACEE0099B651 /* complete.cpp */; };
9C7A55501DCD71330049C25D /* env.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853A13B3ACEE0099B651 /* env.cpp */; };
@@ -134,8 +117,43 @@
9C7A557D1DCD71890049C25D /* fish_key_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9C7A557C1DCD717C0049C25D /* fish_key_reader.cpp */; };
9C7A557E1DCD71CD0049C25D /* print_help.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855613B3ACEE0099B651 /* print_help.cpp */; };
9C7A55811DCD739C0049C25D /* fish_key_reader in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C7A55721DCD71330049C25D /* fish_key_reader */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
9CC8D8C51F7AF0D40095062A /* lynx.lss in Copy Files */ = {isa = PBXBuildFile; fileRef = 9CC8D8C41F7AF0610095062A /* lynx.lss */; };
CB0F034C1F156FE3001827D3 /* builtin_argparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */; };
CB0F034D1F156FE3001827D3 /* builtin_argparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */; };
CB0F034E1F156FE3001827D3 /* builtin_argparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */; };
D001B5EE1F041CBD000838CC /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F592F1F041AE4003EE978 /* builtin.cpp */; };
D001B5F01F041CBD000838CC /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59311F041AE4003EE978 /* builtin_ulimit.cpp */; };
D001B5F21F041CBD000838CC /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59331F041AE4003EE978 /* builtin_test.cpp */; };
D001B5F41F041CBD000838CC /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59351F041AE4003EE978 /* builtin_string.cpp */; };
D001B5F61F041CBD000838CC /* builtin_status.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59371F041AE4003EE978 /* builtin_status.cpp */; };
D001B5F81F041CBD000838CC /* builtin_source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59391F041AE4003EE978 /* builtin_source.cpp */; };
D001B5FA1F041CBD000838CC /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593B1F041AE4003EE978 /* builtin_set.cpp */; };
D001B5FC1F041CBD000838CC /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593D1F041AE4003EE978 /* builtin_set_color.cpp */; };
D001B5FE1F041CBD000838CC /* builtin_return.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593F1F041AE4003EE978 /* builtin_return.cpp */; };
D001B6001F041CBD000838CC /* builtin_realpath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59411F041AE4003EE978 /* builtin_realpath.cpp */; };
D001B6021F041CBD000838CC /* builtin_read.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59431F041AE4003EE978 /* builtin_read.cpp */; };
D001B6041F041CBD000838CC /* builtin_random.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59451F041AE4003EE978 /* builtin_random.cpp */; };
D001B6061F041CBD000838CC /* builtin_pwd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59471F041AE4003EE978 /* builtin_pwd.cpp */; };
D001B6081F041CBD000838CC /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59491F041AE4003EE978 /* builtin_printf.cpp */; };
D001B60A1F041CBD000838CC /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594B1F041AE4003EE978 /* builtin_jobs.cpp */; };
D001B60C1F041CBD000838CC /* builtin_history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594D1F041AE4003EE978 /* builtin_history.cpp */; };
D001B60E1F041CBD000838CC /* builtin_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594F1F041AE4003EE978 /* builtin_functions.cpp */; };
D001B6101F041CBD000838CC /* builtin_function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59511F041AE4003EE978 /* builtin_function.cpp */; };
D001B6121F041CBD000838CC /* builtin_fg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59531F041AE4003EE978 /* builtin_fg.cpp */; };
D001B6141F041CBD000838CC /* builtin_exit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59551F041AE4003EE978 /* builtin_exit.cpp */; };
D001B6161F041CBD000838CC /* builtin_emit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59571F041AE4003EE978 /* builtin_emit.cpp */; };
D001B6181F041CBD000838CC /* builtin_echo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59591F041AE4003EE978 /* builtin_echo.cpp */; };
D001B61A1F041CBD000838CC /* builtin_disown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595B1F041AE4003EE978 /* builtin_disown.cpp */; };
D001B61C1F041CBD000838CC /* builtin_contains.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595D1F041AE4003EE978 /* builtin_contains.cpp */; };
D001B61E1F041CBD000838CC /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595F1F041AE4003EE978 /* builtin_complete.cpp */; };
D001B6201F041CBD000838CC /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59611F041AE4003EE978 /* builtin_commandline.cpp */; };
D001B6221F041CBD000838CC /* builtin_command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59631F041AE4003EE978 /* builtin_command.cpp */; };
D001B6241F041CBD000838CC /* builtin_cd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59651F041AE4003EE978 /* builtin_cd.cpp */; };
D001B6261F041CBD000838CC /* builtin_builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59671F041AE4003EE978 /* builtin_builtin.cpp */; };
D001B6281F041CBD000838CC /* builtin_block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59691F041AE4003EE978 /* builtin_block.cpp */; };
D001B62A1F041CBD000838CC /* builtin_bind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596B1F041AE4003EE978 /* builtin_bind.cpp */; };
D001B62C1F041CBD000838CC /* builtin_bg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596D1F041AE4003EE978 /* builtin_bg.cpp */; };
D00769121990137800CA4627 /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
D00769131990137800CA4627 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
D00769141990137800CA4627 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
D00769151990137800CA4627 /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; };
D00769161990137800CA4627 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
@@ -149,7 +167,6 @@
D007691E1990137800CA4627 /* screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855A13B3ACEE0099B651 /* screen.cpp */; };
D007691F1990137800CA4627 /* signal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855C13B3ACEE0099B651 /* signal.cpp */; };
D00769201990137800CA4627 /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C9733718DE5449002D7C81 /* utf8.cpp */; };
D00769211990137800CA4627 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
D00769221990137800CA4627 /* function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854413B3ACEE0099B651 /* function.cpp */; };
D00769231990137800CA4627 /* complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853713B3ACEE0099B651 /* complete.cpp */; };
D00769241990137800CA4627 /* env.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853A13B3ACEE0099B651 /* env.cpp */; };
@@ -179,33 +196,19 @@
D0076943199013B900CA4627 /* fish_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854113B3ACEE0099B651 /* fish_tests.cpp */; };
D00F63F119137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; settings = {COMPILER_FLAGS = "-I$(DERIVED_FILE_DIR)"; }; };
D00F63F219137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; settings = {COMPILER_FLAGS = "-I$(DERIVED_FILE_DIR)"; }; };
D01243591CD3DAD100C64313 /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */; };
D012435A1CD3DAD100C64313 /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */; };
D012435B1CD3DAD100C64313 /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */; };
D012435C1CD3DAD100C64313 /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853313B3ACEE0099B651 /* builtin_set.cpp */; };
D012435D1CD3DAD100C64313 /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */; };
D012435E1CD3DAD100C64313 /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */; };
D012435F1CD3DAD100C64313 /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */; };
D01243601CD3DAE200C64313 /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */; };
D01243611CD3DAE200C64313 /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */; };
D01243621CD3DAE200C64313 /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */; };
D01243631CD3DAE200C64313 /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853313B3ACEE0099B651 /* builtin_set.cpp */; };
D01243641CD3DAE200C64313 /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */; };
D01243651CD3DAE200C64313 /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */; };
D01243661CD3DAE200C64313 /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */; };
D01243681CD4015600C64313 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855E13B3ACEE0099B651 /* util.cpp */; };
D01243691CD4015C00C64313 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855E13B3ACEE0099B651 /* util.cpp */; };
D012436A1CD4018100C64313 /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
D012436B1CD4019700C64313 /* fallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853E13B3ACEE0099B651 /* fallback.cpp */; };
D01A2D24169B736200767098 /* man1 in Copy Files */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
D01A2D25169B737700767098 /* man1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
D02DE6831FB2CD5E0049D8D8 /* builtin_argparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */; };
D030FBEF1A4A382000F7ADA0 /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854A13B3ACEE0099B651 /* input.cpp */; };
D030FBF01A4A382B00F7ADA0 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
D030FBF11A4A384000F7ADA0 /* output.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855113B3ACEE0099B651 /* output.cpp */; };
D030FBF21A4A384A00F7ADA0 /* signal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855C13B3ACEE0099B651 /* signal.cpp */; };
D030FBF31A4A386A00F7ADA0 /* reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855813B3ACEE0099B651 /* reader.cpp */; };
D030FBF41A4A38F300F7ADA0 /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
D030FBF51A4A38F300F7ADA0 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
D030FBF61A4A38F300F7ADA0 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
D030FBF71A4A38F300F7ADA0 /* complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853713B3ACEE0099B651 /* complete.cpp */; };
D030FBF81A4A38F300F7ADA0 /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; };
@@ -235,14 +238,11 @@
D030FC121A4A38F300F7ADA0 /* wcstringutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F5B46319CFCDE80090665E /* wcstringutil.cpp */; };
D030FC131A4A38F300F7ADA0 /* wgetopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855F13B3ACEE0099B651 /* wgetopt.cpp */; };
D030FC141A4A38F300F7ADA0 /* wildcard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856013B3ACEE0099B651 /* wildcard.cpp */; };
D030FC151A4A391900F7ADA0 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
D031890C15E36E4600D9CC39 /* base in Resources */ = {isa = PBXBuildFile; fileRef = D031890915E36D9800D9CC39 /* base */; };
D032388B1849D1980032CF2C /* pager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D03238891849D1980032CF2C /* pager.cpp */; };
D033781115DC6D4C00A634BA /* completions in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02715D1FEA100B9DB63 /* completions */; };
D033781215DC6D5200A634BA /* functions in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02815D1FEA100B9DB63 /* functions */; };
D033781315DC6D5400A634BA /* tools in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02915D1FEA100B9DB63 /* tools */; };
D04F7F7C1BA4BF4000B0F227 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
D04F7F7D1BA4BF4000B0F227 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
D04F7FD51BA4E3AC00B0F227 /* pcre2_compile.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */; };
D04F7FD61BA4E3AC00B0F227 /* pcre2_config.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F901BA4DCE900B0F227 /* pcre2_config.c */; };
D04F7FD71BA4E3AC00B0F227 /* pcre2_context.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */; };
@@ -264,13 +264,108 @@
D04F7FE71BA4E3AC00B0F227 /* pcre2_ucd.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FBA1BA4DDEB00B0F227 /* pcre2_ucd.c */; };
D04F7FE81BA4E3AC00B0F227 /* pcre2_valid_utf.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FBB1BA4DDEB00B0F227 /* pcre2_valid_utf.c */; };
D04F7FE91BA4E3AC00B0F227 /* pcre2_xclass.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FBC1BA4DDEB00B0F227 /* pcre2_xclass.c */; };
D04F7FF01BA4E5B900B0F227 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
D04F7FF11BA4E68200B0F227 /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
D04F7FF21BA4E68A00B0F227 /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
D04F7FF41BA4E6F300B0F227 /* pcre2_auto_possess.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FF31BA4E6F300B0F227 /* pcre2_auto_possess.c */; };
D04F7FF91BA4E87B00B0F227 /* pcre2_chartables.c.dist in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */; };
D04F7FFA1BA4E9A400B0F227 /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
D052D80B1868F7FC003ABCBD /* parse_execution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D052D8091868F7FC003ABCBD /* parse_execution.cpp */; };
D05F596E1F041AE4003EE978 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F592F1F041AE4003EE978 /* builtin.cpp */; };
D05F596F1F041AE4003EE978 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F592F1F041AE4003EE978 /* builtin.cpp */; };
D05F59701F041AE4003EE978 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F592F1F041AE4003EE978 /* builtin.cpp */; };
D05F59711F041AE4003EE978 /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59311F041AE4003EE978 /* builtin_ulimit.cpp */; };
D05F59721F041AE4003EE978 /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59311F041AE4003EE978 /* builtin_ulimit.cpp */; };
D05F59731F041AE4003EE978 /* builtin_ulimit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59311F041AE4003EE978 /* builtin_ulimit.cpp */; };
D05F59741F041AE4003EE978 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59331F041AE4003EE978 /* builtin_test.cpp */; };
D05F59751F041AE4003EE978 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59331F041AE4003EE978 /* builtin_test.cpp */; };
D05F59761F041AE4003EE978 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59331F041AE4003EE978 /* builtin_test.cpp */; };
D05F59771F041AE4003EE978 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59351F041AE4003EE978 /* builtin_string.cpp */; };
D05F59781F041AE4003EE978 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59351F041AE4003EE978 /* builtin_string.cpp */; };
D05F59791F041AE4003EE978 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59351F041AE4003EE978 /* builtin_string.cpp */; };
D05F597A1F041AE4003EE978 /* builtin_status.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59371F041AE4003EE978 /* builtin_status.cpp */; };
D05F597B1F041AE4003EE978 /* builtin_status.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59371F041AE4003EE978 /* builtin_status.cpp */; };
D05F597C1F041AE4003EE978 /* builtin_status.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59371F041AE4003EE978 /* builtin_status.cpp */; };
D05F597D1F041AE4003EE978 /* builtin_source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59391F041AE4003EE978 /* builtin_source.cpp */; };
D05F597E1F041AE4003EE978 /* builtin_source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59391F041AE4003EE978 /* builtin_source.cpp */; };
D05F597F1F041AE4003EE978 /* builtin_source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59391F041AE4003EE978 /* builtin_source.cpp */; };
D05F59801F041AE4003EE978 /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593B1F041AE4003EE978 /* builtin_set.cpp */; };
D05F59811F041AE4003EE978 /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593B1F041AE4003EE978 /* builtin_set.cpp */; };
D05F59821F041AE4003EE978 /* builtin_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593B1F041AE4003EE978 /* builtin_set.cpp */; };
D05F59831F041AE4003EE978 /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593D1F041AE4003EE978 /* builtin_set_color.cpp */; };
D05F59841F041AE4003EE978 /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593D1F041AE4003EE978 /* builtin_set_color.cpp */; };
D05F59851F041AE4003EE978 /* builtin_set_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593D1F041AE4003EE978 /* builtin_set_color.cpp */; };
D05F59861F041AE4003EE978 /* builtin_return.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593F1F041AE4003EE978 /* builtin_return.cpp */; };
D05F59871F041AE4003EE978 /* builtin_return.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593F1F041AE4003EE978 /* builtin_return.cpp */; };
D05F59881F041AE4003EE978 /* builtin_return.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F593F1F041AE4003EE978 /* builtin_return.cpp */; };
D05F59891F041AE4003EE978 /* builtin_realpath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59411F041AE4003EE978 /* builtin_realpath.cpp */; };
D05F598A1F041AE4003EE978 /* builtin_realpath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59411F041AE4003EE978 /* builtin_realpath.cpp */; };
D05F598B1F041AE4003EE978 /* builtin_realpath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59411F041AE4003EE978 /* builtin_realpath.cpp */; };
D05F598C1F041AE4003EE978 /* builtin_read.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59431F041AE4003EE978 /* builtin_read.cpp */; };
D05F598D1F041AE4003EE978 /* builtin_read.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59431F041AE4003EE978 /* builtin_read.cpp */; };
D05F598E1F041AE4003EE978 /* builtin_read.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59431F041AE4003EE978 /* builtin_read.cpp */; };
D05F598F1F041AE4003EE978 /* builtin_random.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59451F041AE4003EE978 /* builtin_random.cpp */; };
D05F59901F041AE4003EE978 /* builtin_random.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59451F041AE4003EE978 /* builtin_random.cpp */; };
D05F59911F041AE4003EE978 /* builtin_random.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59451F041AE4003EE978 /* builtin_random.cpp */; };
D05F59921F041AE4003EE978 /* builtin_pwd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59471F041AE4003EE978 /* builtin_pwd.cpp */; };
D05F59931F041AE4003EE978 /* builtin_pwd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59471F041AE4003EE978 /* builtin_pwd.cpp */; };
D05F59941F041AE4003EE978 /* builtin_pwd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59471F041AE4003EE978 /* builtin_pwd.cpp */; };
D05F59951F041AE4003EE978 /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59491F041AE4003EE978 /* builtin_printf.cpp */; };
D05F59961F041AE4003EE978 /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59491F041AE4003EE978 /* builtin_printf.cpp */; };
D05F59971F041AE4003EE978 /* builtin_printf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59491F041AE4003EE978 /* builtin_printf.cpp */; };
D05F59981F041AE4003EE978 /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594B1F041AE4003EE978 /* builtin_jobs.cpp */; };
D05F59991F041AE4003EE978 /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594B1F041AE4003EE978 /* builtin_jobs.cpp */; };
D05F599A1F041AE4003EE978 /* builtin_jobs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594B1F041AE4003EE978 /* builtin_jobs.cpp */; };
D05F599B1F041AE4003EE978 /* builtin_history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594D1F041AE4003EE978 /* builtin_history.cpp */; };
D05F599C1F041AE4003EE978 /* builtin_history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594D1F041AE4003EE978 /* builtin_history.cpp */; };
D05F599D1F041AE4003EE978 /* builtin_history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594D1F041AE4003EE978 /* builtin_history.cpp */; };
D05F599E1F041AE4003EE978 /* builtin_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594F1F041AE4003EE978 /* builtin_functions.cpp */; };
D05F599F1F041AE4003EE978 /* builtin_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594F1F041AE4003EE978 /* builtin_functions.cpp */; };
D05F59A01F041AE4003EE978 /* builtin_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F594F1F041AE4003EE978 /* builtin_functions.cpp */; };
D05F59A11F041AE4003EE978 /* builtin_function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59511F041AE4003EE978 /* builtin_function.cpp */; };
D05F59A21F041AE4003EE978 /* builtin_function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59511F041AE4003EE978 /* builtin_function.cpp */; };
D05F59A31F041AE4003EE978 /* builtin_function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59511F041AE4003EE978 /* builtin_function.cpp */; };
D05F59A41F041AE4003EE978 /* builtin_fg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59531F041AE4003EE978 /* builtin_fg.cpp */; };
D05F59A51F041AE4003EE978 /* builtin_fg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59531F041AE4003EE978 /* builtin_fg.cpp */; };
D05F59A61F041AE4003EE978 /* builtin_fg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59531F041AE4003EE978 /* builtin_fg.cpp */; };
D05F59A71F041AE4003EE978 /* builtin_exit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59551F041AE4003EE978 /* builtin_exit.cpp */; };
D05F59A81F041AE4003EE978 /* builtin_exit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59551F041AE4003EE978 /* builtin_exit.cpp */; };
D05F59A91F041AE4003EE978 /* builtin_exit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59551F041AE4003EE978 /* builtin_exit.cpp */; };
D05F59AA1F041AE4003EE978 /* builtin_emit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59571F041AE4003EE978 /* builtin_emit.cpp */; };
D05F59AB1F041AE4003EE978 /* builtin_emit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59571F041AE4003EE978 /* builtin_emit.cpp */; };
D05F59AC1F041AE4003EE978 /* builtin_emit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59571F041AE4003EE978 /* builtin_emit.cpp */; };
D05F59AD1F041AE4003EE978 /* builtin_echo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59591F041AE4003EE978 /* builtin_echo.cpp */; };
D05F59AE1F041AE4003EE978 /* builtin_echo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59591F041AE4003EE978 /* builtin_echo.cpp */; };
D05F59AF1F041AE4003EE978 /* builtin_echo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59591F041AE4003EE978 /* builtin_echo.cpp */; };
D05F59B01F041AE4003EE978 /* builtin_disown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595B1F041AE4003EE978 /* builtin_disown.cpp */; };
D05F59B11F041AE4003EE978 /* builtin_disown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595B1F041AE4003EE978 /* builtin_disown.cpp */; };
D05F59B21F041AE4003EE978 /* builtin_disown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595B1F041AE4003EE978 /* builtin_disown.cpp */; };
D05F59B31F041AE4003EE978 /* builtin_contains.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595D1F041AE4003EE978 /* builtin_contains.cpp */; };
D05F59B41F041AE4003EE978 /* builtin_contains.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595D1F041AE4003EE978 /* builtin_contains.cpp */; };
D05F59B51F041AE4003EE978 /* builtin_contains.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595D1F041AE4003EE978 /* builtin_contains.cpp */; };
D05F59B61F041AE4003EE978 /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595F1F041AE4003EE978 /* builtin_complete.cpp */; };
D05F59B71F041AE4003EE978 /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595F1F041AE4003EE978 /* builtin_complete.cpp */; };
D05F59B81F041AE4003EE978 /* builtin_complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F595F1F041AE4003EE978 /* builtin_complete.cpp */; };
D05F59B91F041AE4003EE978 /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59611F041AE4003EE978 /* builtin_commandline.cpp */; };
D05F59BA1F041AE4003EE978 /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59611F041AE4003EE978 /* builtin_commandline.cpp */; };
D05F59BB1F041AE4003EE978 /* builtin_commandline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59611F041AE4003EE978 /* builtin_commandline.cpp */; };
D05F59BC1F041AE4003EE978 /* builtin_command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59631F041AE4003EE978 /* builtin_command.cpp */; };
D05F59BD1F041AE4003EE978 /* builtin_command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59631F041AE4003EE978 /* builtin_command.cpp */; };
D05F59BE1F041AE4003EE978 /* builtin_command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59631F041AE4003EE978 /* builtin_command.cpp */; };
D05F59BF1F041AE4003EE978 /* builtin_cd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59651F041AE4003EE978 /* builtin_cd.cpp */; };
D05F59C01F041AE4003EE978 /* builtin_cd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59651F041AE4003EE978 /* builtin_cd.cpp */; };
D05F59C11F041AE4003EE978 /* builtin_cd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59651F041AE4003EE978 /* builtin_cd.cpp */; };
D05F59C21F041AE4003EE978 /* builtin_builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59671F041AE4003EE978 /* builtin_builtin.cpp */; };
D05F59C31F041AE4003EE978 /* builtin_builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59671F041AE4003EE978 /* builtin_builtin.cpp */; };
D05F59C41F041AE4003EE978 /* builtin_builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59671F041AE4003EE978 /* builtin_builtin.cpp */; };
D05F59C51F041AE4003EE978 /* builtin_block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59691F041AE4003EE978 /* builtin_block.cpp */; };
D05F59C61F041AE4003EE978 /* builtin_block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59691F041AE4003EE978 /* builtin_block.cpp */; };
D05F59C71F041AE4003EE978 /* builtin_block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F59691F041AE4003EE978 /* builtin_block.cpp */; };
D05F59C81F041AE4003EE978 /* builtin_bind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596B1F041AE4003EE978 /* builtin_bind.cpp */; };
D05F59C91F041AE4003EE978 /* builtin_bind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596B1F041AE4003EE978 /* builtin_bind.cpp */; };
D05F59CA1F041AE4003EE978 /* builtin_bind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596B1F041AE4003EE978 /* builtin_bind.cpp */; };
D05F59CB1F041AE4003EE978 /* builtin_bg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596D1F041AE4003EE978 /* builtin_bg.cpp */; };
D05F59CC1F041AE4003EE978 /* builtin_bg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596D1F041AE4003EE978 /* builtin_bg.cpp */; };
D05F59CD1F041AE4003EE978 /* builtin_bg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D05F596D1F041AE4003EE978 /* builtin_bg.cpp */; };
D07B247315BCC15700D4ADB4 /* add-shell in Resources */ = {isa = PBXBuildFile; fileRef = D07B247215BCC15700D4ADB4 /* add-shell */; };
D07B247615BCC4BE00D4ADB4 /* install.sh in Resources */ = {isa = PBXBuildFile; fileRef = D07B247515BCC4BE00D4ADB4 /* install.sh */; };
D07D266A15E33B86009E43F6 /* config.fish in CopyFiles */ = {isa = PBXBuildFile; fileRef = D0C4FD9415A7D7EE00212EF1 /* config.fish */; };
@@ -304,7 +399,6 @@
D0D02A7915983888008E62BD /* intern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854B13B3ACEE0099B651 /* intern.cpp */; };
D0D02A7B15983928008E62BD /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; };
D0D02A7C159839D5008E62BD /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
D0D02A7D159839D5008E62BD /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
D0D02A7E159839D5008E62BD /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
D0D02A7F159839D5008E62BD /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; };
D0D02A80159839D5008E62BD /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
@@ -327,7 +421,6 @@
D0D02ADB159864C2008E62BD /* tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855D13B3ACEE0099B651 /* tokenizer.cpp */; };
D0D02ADC159864D5008E62BD /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D02A8C15983CFA008E62BD /* libncurses.dylib */; };
D0D2694915983772005D9B9C /* function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854413B3ACEE0099B651 /* function.cpp */; };
D0D2694A15983779005D9B9C /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
D0F019F115A977140034B3B1 /* fish in CopyFiles */ = {isa = PBXBuildFile; fileRef = D0D2693C159835CA005D9B9C /* fish */; };
D0F019F315A977290034B3B1 /* fish_indent in CopyFiles */ = {isa = PBXBuildFile; fileRef = D0D02AD01598642A008E62BD /* fish_indent */; };
D0F019F815A977AB0034B3B1 /* config.fish in CopyFiles */ = {isa = PBXBuildFile; fileRef = D0CBD580159EE48F0024809C /* config.fish */; };
@@ -511,6 +604,7 @@
dstPath = "${INSTALL_PATH}/share/fish";
dstSubfolderSpec = 0;
files = (
9CC8D8C51F7AF0D40095062A /* lynx.lss in Copy Files */,
D07D267215E34171009E43F6 /* config.fish in Copy Files */,
D07D266C15E33B86009E43F6 /* completions in Copy Files */,
D07D266D15E33B86009E43F6 /* functions in Copy Files */,
@@ -558,16 +652,12 @@
4E142D731B56B5D7008783C8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../osx/config.h; sourceTree = "<group>"; };
63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_find_bracket.c; sourceTree = "<group>"; };
9C7A55721DCD71330049C25D /* fish_key_reader */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_key_reader; sourceTree = BUILT_PRODUCTS_DIR; };
9C7A55731DCD716F0049C25D /* builtin_commandline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_commandline.h; sourceTree = "<group>"; };
9C7A55741DCD716F0049C25D /* builtin_complete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_complete.h; sourceTree = "<group>"; };
9C7A55751DCD716F0049C25D /* builtin_jobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_jobs.h; sourceTree = "<group>"; };
9C7A55761DCD716F0049C25D /* builtin_printf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_printf.h; sourceTree = "<group>"; };
9C7A55771DCD716F0049C25D /* builtin_set_color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_set_color.h; sourceTree = "<group>"; };
9C7A55781DCD716F0049C25D /* builtin_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_set.h; sourceTree = "<group>"; };
9C7A55791DCD716F0049C25D /* builtin_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_string.h; sourceTree = "<group>"; };
9C7A557A1DCD716F0049C25D /* builtin_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_test.h; sourceTree = "<group>"; };
9C7A557B1DCD716F0049C25D /* builtin_ulimit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_ulimit.h; sourceTree = "<group>"; };
9C7A557C1DCD717C0049C25D /* fish_key_reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_key_reader.cpp; sourceTree = "<group>"; };
9CC8D8C41F7AF0610095062A /* lynx.lss */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = lynx.lss; path = share/lynx.lss; sourceTree = "<group>"; };
CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_argparse.cpp; sourceTree = "<group>"; };
CB0F034B1F156FE3001827D3 /* builtin_argparse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_argparse.h; sourceTree = "<group>"; };
CBB7725B1F14964100780A21 /* fish-shell */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "fish-shell"; sourceTree = "<group>"; };
CBB7725C1F1496AF00780A21 /* fish-shell */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "fish-shell"; sourceTree = "<group>"; };
D00769421990137800CA4627 /* fish_tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_tests; sourceTree = BUILT_PRODUCTS_DIR; };
D00F63F019137E9D00FCCDEC /* fish_version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_version.cpp; sourceTree = "<group>"; };
D01A2D23169B730A00767098 /* man1 */ = {isa = PBXFileReference; lastKnownFileType = text; name = man1; path = pages_for_manpath/man1; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -578,7 +668,6 @@
D03238891849D1980032CF2C /* pager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pager.cpp; sourceTree = "<group>"; };
D032388A1849D1980032CF2C /* pager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pager.h; sourceTree = "<group>"; };
D03EE83814DF88B200FC7150 /* lru.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lru.h; sourceTree = "<group>"; };
D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_string.cpp; sourceTree = "<group>"; };
D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_compile.c; sourceTree = "<group>"; };
D04F7F901BA4DCE900B0F227 /* pcre2_config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_config.c; sourceTree = "<group>"; };
D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_context.c; sourceTree = "<group>"; };
@@ -605,12 +694,75 @@
D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre2_chartables.c.dist; sourceTree = "<group>"; };
D052D8091868F7FC003ABCBD /* parse_execution.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_execution.cpp; sourceTree = "<group>"; };
D052D80A1868F7FC003ABCBD /* parse_execution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_execution.h; sourceTree = "<group>"; };
D05F592E1F041AE4003EE978 /* builtin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin.h; sourceTree = "<group>"; };
D05F592F1F041AE4003EE978 /* builtin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin.cpp; sourceTree = "<group>"; };
D05F59301F041AE4003EE978 /* builtin_ulimit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_ulimit.h; sourceTree = "<group>"; };
D05F59311F041AE4003EE978 /* builtin_ulimit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_ulimit.cpp; sourceTree = "<group>"; };
D05F59321F041AE4003EE978 /* builtin_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_test.h; sourceTree = "<group>"; };
D05F59331F041AE4003EE978 /* builtin_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_test.cpp; sourceTree = "<group>"; };
D05F59341F041AE4003EE978 /* builtin_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_string.h; sourceTree = "<group>"; };
D05F59351F041AE4003EE978 /* builtin_string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_string.cpp; sourceTree = "<group>"; };
D05F59361F041AE4003EE978 /* builtin_status.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_status.h; sourceTree = "<group>"; };
D05F59371F041AE4003EE978 /* builtin_status.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_status.cpp; sourceTree = "<group>"; };
D05F59381F041AE4003EE978 /* builtin_source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_source.h; sourceTree = "<group>"; };
D05F59391F041AE4003EE978 /* builtin_source.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_source.cpp; sourceTree = "<group>"; };
D05F593A1F041AE4003EE978 /* builtin_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_set.h; sourceTree = "<group>"; };
D05F593B1F041AE4003EE978 /* builtin_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_set.cpp; sourceTree = "<group>"; };
D05F593C1F041AE4003EE978 /* builtin_set_color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_set_color.h; sourceTree = "<group>"; };
D05F593D1F041AE4003EE978 /* builtin_set_color.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_set_color.cpp; sourceTree = "<group>"; };
D05F593E1F041AE4003EE978 /* builtin_return.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_return.h; sourceTree = "<group>"; };
D05F593F1F041AE4003EE978 /* builtin_return.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_return.cpp; sourceTree = "<group>"; };
D05F59401F041AE4003EE978 /* builtin_realpath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_realpath.h; sourceTree = "<group>"; };
D05F59411F041AE4003EE978 /* builtin_realpath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_realpath.cpp; sourceTree = "<group>"; };
D05F59421F041AE4003EE978 /* builtin_read.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_read.h; sourceTree = "<group>"; };
D05F59431F041AE4003EE978 /* builtin_read.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_read.cpp; sourceTree = "<group>"; };
D05F59441F041AE4003EE978 /* builtin_random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_random.h; sourceTree = "<group>"; };
D05F59451F041AE4003EE978 /* builtin_random.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_random.cpp; sourceTree = "<group>"; };
D05F59461F041AE4003EE978 /* builtin_pwd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_pwd.h; sourceTree = "<group>"; };
D05F59471F041AE4003EE978 /* builtin_pwd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_pwd.cpp; sourceTree = "<group>"; };
D05F59481F041AE4003EE978 /* builtin_printf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_printf.h; sourceTree = "<group>"; };
D05F59491F041AE4003EE978 /* builtin_printf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_printf.cpp; sourceTree = "<group>"; };
D05F594A1F041AE4003EE978 /* builtin_jobs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_jobs.h; sourceTree = "<group>"; };
D05F594B1F041AE4003EE978 /* builtin_jobs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_jobs.cpp; sourceTree = "<group>"; };
D05F594C1F041AE4003EE978 /* builtin_history.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_history.h; sourceTree = "<group>"; };
D05F594D1F041AE4003EE978 /* builtin_history.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_history.cpp; sourceTree = "<group>"; };
D05F594E1F041AE4003EE978 /* builtin_functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_functions.h; sourceTree = "<group>"; };
D05F594F1F041AE4003EE978 /* builtin_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_functions.cpp; sourceTree = "<group>"; };
D05F59501F041AE4003EE978 /* builtin_function.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_function.h; sourceTree = "<group>"; };
D05F59511F041AE4003EE978 /* builtin_function.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_function.cpp; sourceTree = "<group>"; };
D05F59521F041AE4003EE978 /* builtin_fg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_fg.h; sourceTree = "<group>"; };
D05F59531F041AE4003EE978 /* builtin_fg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_fg.cpp; sourceTree = "<group>"; };
D05F59541F041AE4003EE978 /* builtin_exit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_exit.h; sourceTree = "<group>"; };
D05F59551F041AE4003EE978 /* builtin_exit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_exit.cpp; sourceTree = "<group>"; };
D05F59561F041AE4003EE978 /* builtin_emit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_emit.h; sourceTree = "<group>"; };
D05F59571F041AE4003EE978 /* builtin_emit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_emit.cpp; sourceTree = "<group>"; };
D05F59581F041AE4003EE978 /* builtin_echo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_echo.h; sourceTree = "<group>"; };
D05F59591F041AE4003EE978 /* builtin_echo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_echo.cpp; sourceTree = "<group>"; };
D05F595A1F041AE4003EE978 /* builtin_disown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_disown.h; sourceTree = "<group>"; };
D05F595B1F041AE4003EE978 /* builtin_disown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_disown.cpp; sourceTree = "<group>"; };
D05F595C1F041AE4003EE978 /* builtin_contains.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_contains.h; sourceTree = "<group>"; };
D05F595D1F041AE4003EE978 /* builtin_contains.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_contains.cpp; sourceTree = "<group>"; };
D05F595E1F041AE4003EE978 /* builtin_complete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_complete.h; sourceTree = "<group>"; };
D05F595F1F041AE4003EE978 /* builtin_complete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_complete.cpp; sourceTree = "<group>"; };
D05F59601F041AE4003EE978 /* builtin_commandline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_commandline.h; sourceTree = "<group>"; };
D05F59611F041AE4003EE978 /* builtin_commandline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_commandline.cpp; sourceTree = "<group>"; };
D05F59621F041AE4003EE978 /* builtin_command.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_command.h; sourceTree = "<group>"; };
D05F59631F041AE4003EE978 /* builtin_command.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_command.cpp; sourceTree = "<group>"; };
D05F59641F041AE4003EE978 /* builtin_cd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_cd.h; sourceTree = "<group>"; };
D05F59651F041AE4003EE978 /* builtin_cd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_cd.cpp; sourceTree = "<group>"; };
D05F59661F041AE4003EE978 /* builtin_builtin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_builtin.h; sourceTree = "<group>"; };
D05F59671F041AE4003EE978 /* builtin_builtin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_builtin.cpp; sourceTree = "<group>"; };
D05F59681F041AE4003EE978 /* builtin_block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_block.h; sourceTree = "<group>"; };
D05F59691F041AE4003EE978 /* builtin_block.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_block.cpp; sourceTree = "<group>"; };
D05F596A1F041AE4003EE978 /* builtin_bind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_bind.h; sourceTree = "<group>"; };
D05F596B1F041AE4003EE978 /* builtin_bind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_bind.cpp; sourceTree = "<group>"; };
D05F596C1F041AE4003EE978 /* builtin_bg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin_bg.h; sourceTree = "<group>"; };
D05F596D1F041AE4003EE978 /* builtin_bg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_bg.cpp; sourceTree = "<group>"; };
D07B247215BCC15700D4ADB4 /* add-shell */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "add-shell"; path = "build_tools/osx_package_scripts/add-shell"; sourceTree = "<group>"; };
D07B247515BCC4BE00D4ADB4 /* install.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = install.sh; path = osx/install.sh; sourceTree = "<group>"; };
D0879AC616BF9A1A00E98E56 /* fish_term_icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = fish_term_icon.icns; path = osx/fish_term_icon.icns; sourceTree = "<group>"; };
D09B1C1914FC7B5B00F91077 /* postfork.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = postfork.cpp; sourceTree = "<group>"; };
D09B1C1A14FC7B5B00F91077 /* postfork.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = postfork.h; sourceTree = "<group>"; };
D0A0850313B3ACEE0099B651 /* builtin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin.h; sourceTree = "<group>"; };
D0A0850413B3ACEE0099B651 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
D0A0850513B3ACEE0099B651 /* complete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = complete.h; sourceTree = "<group>"; };
D0A0850713B3ACEE0099B651 /* env_universal_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = env_universal_common.h; sourceTree = "<group>"; };
@@ -644,12 +796,6 @@
D0A0852713B3ACEE0099B651 /* wgetopt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wgetopt.h; sourceTree = "<group>"; };
D0A0852813B3ACEE0099B651 /* wildcard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wildcard.h; sourceTree = "<group>"; };
D0A0852913B3ACEE0099B651 /* wutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wutil.h; sourceTree = "<group>"; };
D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_commandline.cpp; sourceTree = "<group>"; };
D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_complete.cpp; sourceTree = "<group>"; };
D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_jobs.cpp; sourceTree = "<group>"; };
D0A0853313B3ACEE0099B651 /* builtin_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_set.cpp; sourceTree = "<group>"; };
D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_ulimit.cpp; sourceTree = "<group>"; };
D0A0853513B3ACEE0099B651 /* builtin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin.cpp; sourceTree = "<group>"; };
D0A0853613B3ACEE0099B651 /* common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = common.cpp; sourceTree = "<group>"; };
D0A0853713B3ACEE0099B651 /* complete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = complete.cpp; sourceTree = "<group>"; };
D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = env_universal_common.cpp; sourceTree = "<group>"; };
@@ -696,10 +842,8 @@
D0C52F361765284C00BFAB82 /* parse_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_tree.h; sourceTree = "<group>"; };
D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = autoload.cpp; sourceTree = "<group>"; };
D0C6FCCB14CFA4B7004CE8AD /* autoload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = autoload.h; sourceTree = "<group>"; };
D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_set_color.cpp; sourceTree = "<group>"; };
D0C9733718DE5449002D7C81 /* utf8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utf8.cpp; sourceTree = "<group>"; };
D0C9733A18DE5451002D7C81 /* utf8.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = "<group>"; };
D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_printf.cpp; sourceTree = "<group>"; };
D0CBD580159EE48F0024809C /* config.fish */ = {isa = PBXFileReference; lastKnownFileType = text; name = config.fish; path = share/config.fish; sourceTree = "<group>"; };
D0CBD583159EEE010024809C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D0CBD586159EF0E10024809C /* launch_fish.scpt */ = {isa = PBXFileReference; lastKnownFileType = file; name = launch_fish.scpt; path = osx/launch_fish.scpt; sourceTree = "<group>"; };
@@ -710,7 +854,6 @@
D0D02AFA159871B2008E62BD /* osx_fish_launcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = osx_fish_launcher.m; path = osx/osx_fish_launcher.m; sourceTree = "<group>"; };
D0D2693C159835CA005D9B9C /* fish */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish; sourceTree = BUILT_PRODUCTS_DIR; };
D0D9B2B318555D92001AE279 /* parse_constants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = parse_constants.h; sourceTree = "<group>"; };
D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_test.cpp; sourceTree = "<group>"; };
D0F5B46319CFCDE80090665E /* wcstringutil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wcstringutil.cpp; sourceTree = "<group>"; };
D0F5B46419CFCDE80090665E /* wcstringutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wcstringutil.h; sourceTree = "<group>"; };
D0FE8EE6179CA8A5008C9F21 /* parse_productions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_productions.h; sourceTree = "<group>"; };
@@ -830,6 +973,8 @@
D0A084F013B3AC130099B651 = {
isa = PBXGroup;
children = (
CBB7725C1F1496AF00780A21 /* fish-shell */,
CBB7725B1F14964100780A21 /* fish-shell */,
D0D02A91159845EF008E62BD /* Sources */,
D0D02AFC159871BF008E62BD /* Launcher */,
D0D02A8E15983D5F008E62BD /* Libraries */,
@@ -852,30 +997,76 @@
D0D02A91159845EF008E62BD /* Sources */ = {
isa = PBXGroup;
children = (
CB0F034A1F156FE3001827D3 /* builtin_argparse.cpp */,
CB0F034B1F156FE3001827D3 /* builtin_argparse.h */,
9C7A557C1DCD717C0049C25D /* fish_key_reader.cpp */,
9C7A55731DCD716F0049C25D /* builtin_commandline.h */,
9C7A55741DCD716F0049C25D /* builtin_complete.h */,
9C7A55751DCD716F0049C25D /* builtin_jobs.h */,
9C7A55761DCD716F0049C25D /* builtin_printf.h */,
9C7A55771DCD716F0049C25D /* builtin_set_color.h */,
9C7A55781DCD716F0049C25D /* builtin_set.h */,
9C7A55791DCD716F0049C25D /* builtin_string.h */,
9C7A557A1DCD716F0049C25D /* builtin_test.h */,
9C7A557B1DCD716F0049C25D /* builtin_ulimit.h */,
4E142D731B56B5D7008783C8 /* config.h */,
D0C6FCCB14CFA4B7004CE8AD /* autoload.h */,
D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */,
D0A0850313B3ACEE0099B651 /* builtin.h */,
D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */,
D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */,
D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */,
D0A0853313B3ACEE0099B651 /* builtin_set.cpp */,
D0C861EA16CC7054003B5A04 /* builtin_set_color.cpp */,
D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */,
D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */,
D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */,
D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */,
D0A0853513B3ACEE0099B651 /* builtin.cpp */,
D05F592E1F041AE4003EE978 /* builtin.h */,
D05F592F1F041AE4003EE978 /* builtin.cpp */,
D05F59301F041AE4003EE978 /* builtin_ulimit.h */,
D05F59311F041AE4003EE978 /* builtin_ulimit.cpp */,
D05F59321F041AE4003EE978 /* builtin_test.h */,
D05F59331F041AE4003EE978 /* builtin_test.cpp */,
D05F59341F041AE4003EE978 /* builtin_string.h */,
D05F59351F041AE4003EE978 /* builtin_string.cpp */,
D05F59361F041AE4003EE978 /* builtin_status.h */,
D05F59371F041AE4003EE978 /* builtin_status.cpp */,
D05F59381F041AE4003EE978 /* builtin_source.h */,
D05F59391F041AE4003EE978 /* builtin_source.cpp */,
D05F593A1F041AE4003EE978 /* builtin_set.h */,
D05F593B1F041AE4003EE978 /* builtin_set.cpp */,
D05F593C1F041AE4003EE978 /* builtin_set_color.h */,
D05F593D1F041AE4003EE978 /* builtin_set_color.cpp */,
D05F593E1F041AE4003EE978 /* builtin_return.h */,
D05F593F1F041AE4003EE978 /* builtin_return.cpp */,
D05F59401F041AE4003EE978 /* builtin_realpath.h */,
D05F59411F041AE4003EE978 /* builtin_realpath.cpp */,
D05F59421F041AE4003EE978 /* builtin_read.h */,
D05F59431F041AE4003EE978 /* builtin_read.cpp */,
D05F59441F041AE4003EE978 /* builtin_random.h */,
D05F59451F041AE4003EE978 /* builtin_random.cpp */,
D05F59461F041AE4003EE978 /* builtin_pwd.h */,
D05F59471F041AE4003EE978 /* builtin_pwd.cpp */,
D05F59481F041AE4003EE978 /* builtin_printf.h */,
D05F59491F041AE4003EE978 /* builtin_printf.cpp */,
D05F594A1F041AE4003EE978 /* builtin_jobs.h */,
D05F594B1F041AE4003EE978 /* builtin_jobs.cpp */,
D05F594C1F041AE4003EE978 /* builtin_history.h */,
D05F594D1F041AE4003EE978 /* builtin_history.cpp */,
D05F594E1F041AE4003EE978 /* builtin_functions.h */,
D05F594F1F041AE4003EE978 /* builtin_functions.cpp */,
D05F59501F041AE4003EE978 /* builtin_function.h */,
D05F59511F041AE4003EE978 /* builtin_function.cpp */,
D05F59521F041AE4003EE978 /* builtin_fg.h */,
D05F59531F041AE4003EE978 /* builtin_fg.cpp */,
D05F59541F041AE4003EE978 /* builtin_exit.h */,
D05F59551F041AE4003EE978 /* builtin_exit.cpp */,
D05F59561F041AE4003EE978 /* builtin_emit.h */,
D05F59571F041AE4003EE978 /* builtin_emit.cpp */,
D05F59581F041AE4003EE978 /* builtin_echo.h */,
D05F59591F041AE4003EE978 /* builtin_echo.cpp */,
D05F595A1F041AE4003EE978 /* builtin_disown.h */,
D05F595B1F041AE4003EE978 /* builtin_disown.cpp */,
D05F595C1F041AE4003EE978 /* builtin_contains.h */,
D05F595D1F041AE4003EE978 /* builtin_contains.cpp */,
D05F595E1F041AE4003EE978 /* builtin_complete.h */,
D05F595F1F041AE4003EE978 /* builtin_complete.cpp */,
D05F59601F041AE4003EE978 /* builtin_commandline.h */,
D05F59611F041AE4003EE978 /* builtin_commandline.cpp */,
D05F59621F041AE4003EE978 /* builtin_command.h */,
D05F59631F041AE4003EE978 /* builtin_command.cpp */,
D05F59641F041AE4003EE978 /* builtin_cd.h */,
D05F59651F041AE4003EE978 /* builtin_cd.cpp */,
D05F59661F041AE4003EE978 /* builtin_builtin.h */,
D05F59671F041AE4003EE978 /* builtin_builtin.cpp */,
D05F59681F041AE4003EE978 /* builtin_block.h */,
D05F59691F041AE4003EE978 /* builtin_block.cpp */,
D05F596A1F041AE4003EE978 /* builtin_bind.h */,
D05F596B1F041AE4003EE978 /* builtin_bind.cpp */,
D05F596C1F041AE4003EE978 /* builtin_bg.h */,
D05F596D1F041AE4003EE978 /* builtin_bg.cpp */,
D0B6B0FF14E88BA400AD6C10 /* color.h */,
D0B6B0FE14E88BA400AD6C10 /* color.cpp */,
D0A0850413B3ACEE0099B651 /* common.h */,
@@ -973,6 +1164,7 @@
D0D02AAB15985C14008E62BD /* Resources */ = {
isa = PBXGroup;
children = (
9CC8D8C41F7AF0610095062A /* lynx.lss */,
D0879AC616BF9A1A00E98E56 /* fish_term_icon.icns */,
D07B247215BCC15700D4ADB4 /* add-shell */,
D0CBD586159EF0E10024809C /* launch_fish.scpt */,
@@ -1369,18 +1561,42 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D001B5EE1F041CBD000838CC /* builtin.cpp in Sources */,
D02DE6831FB2CD5E0049D8D8 /* builtin_argparse.cpp in Sources */,
D001B5F01F041CBD000838CC /* builtin_ulimit.cpp in Sources */,
D001B5F21F041CBD000838CC /* builtin_test.cpp in Sources */,
D001B5F41F041CBD000838CC /* builtin_string.cpp in Sources */,
D001B5F61F041CBD000838CC /* builtin_status.cpp in Sources */,
D001B5F81F041CBD000838CC /* builtin_source.cpp in Sources */,
D001B5FA1F041CBD000838CC /* builtin_set.cpp in Sources */,
D001B5FC1F041CBD000838CC /* builtin_set_color.cpp in Sources */,
D001B5FE1F041CBD000838CC /* builtin_return.cpp in Sources */,
D001B6001F041CBD000838CC /* builtin_realpath.cpp in Sources */,
D001B6021F041CBD000838CC /* builtin_read.cpp in Sources */,
D001B6041F041CBD000838CC /* builtin_random.cpp in Sources */,
D001B6061F041CBD000838CC /* builtin_pwd.cpp in Sources */,
D001B6081F041CBD000838CC /* builtin_printf.cpp in Sources */,
D001B60A1F041CBD000838CC /* builtin_jobs.cpp in Sources */,
D001B60C1F041CBD000838CC /* builtin_history.cpp in Sources */,
D001B60E1F041CBD000838CC /* builtin_functions.cpp in Sources */,
D001B6101F041CBD000838CC /* builtin_function.cpp in Sources */,
D001B6121F041CBD000838CC /* builtin_fg.cpp in Sources */,
D001B6141F041CBD000838CC /* builtin_exit.cpp in Sources */,
D001B6161F041CBD000838CC /* builtin_emit.cpp in Sources */,
D001B6181F041CBD000838CC /* builtin_echo.cpp in Sources */,
D001B61A1F041CBD000838CC /* builtin_disown.cpp in Sources */,
D001B61C1F041CBD000838CC /* builtin_contains.cpp in Sources */,
D001B61E1F041CBD000838CC /* builtin_complete.cpp in Sources */,
D001B6201F041CBD000838CC /* builtin_commandline.cpp in Sources */,
D001B6221F041CBD000838CC /* builtin_command.cpp in Sources */,
D001B6241F041CBD000838CC /* builtin_cd.cpp in Sources */,
D001B6261F041CBD000838CC /* builtin_builtin.cpp in Sources */,
D001B6281F041CBD000838CC /* builtin_block.cpp in Sources */,
D001B62A1F041CBD000838CC /* builtin_bind.cpp in Sources */,
D001B62C1F041CBD000838CC /* builtin_bg.cpp in Sources */,
9C7A557E1DCD71CD0049C25D /* print_help.cpp in Sources */,
9C7A557D1DCD71890049C25D /* fish_key_reader.cpp in Sources */,
9C7A55361DCD71330049C25D /* autoload.cpp in Sources */,
9C7A55371DCD71330049C25D /* builtin_commandline.cpp in Sources */,
9C7A55381DCD71330049C25D /* builtin_complete.cpp in Sources */,
9C7A55391DCD71330049C25D /* builtin_jobs.cpp in Sources */,
9C7A553A1DCD71330049C25D /* builtin_set.cpp in Sources */,
9C7A553B1DCD71330049C25D /* builtin_set_color.cpp in Sources */,
9C7A553C1DCD71330049C25D /* builtin_ulimit.cpp in Sources */,
9C7A553D1DCD71330049C25D /* builtin_test.cpp in Sources */,
9C7A553E1DCD71330049C25D /* builtin_printf.cpp in Sources */,
9C7A553F1DCD71330049C25D /* builtin_string.cpp in Sources */,
9C7A55401DCD71330049C25D /* color.cpp in Sources */,
9C7A55411DCD71330049C25D /* common.cpp in Sources */,
9C7A55421DCD71330049C25D /* event.cpp in Sources */,
@@ -1394,7 +1610,6 @@
9C7A554A1DCD71330049C25D /* screen.cpp in Sources */,
9C7A554B1DCD71330049C25D /* signal.cpp in Sources */,
9C7A554C1DCD71330049C25D /* utf8.cpp in Sources */,
9C7A554D1DCD71330049C25D /* builtin.cpp in Sources */,
9C7A554E1DCD71330049C25D /* function.cpp in Sources */,
9C7A554F1DCD71330049C25D /* complete.cpp in Sources */,
9C7A55501DCD71330049C25D /* env.cpp in Sources */,
@@ -1431,18 +1646,21 @@
buildActionMask = 2147483647;
files = (
9C7A552F1DCD65820049C25D /* util.cpp in Sources */,
9C7A55281DCD65540049C25D /* builtin_commandline.cpp in Sources */,
9C7A55291DCD65540049C25D /* builtin_complete.cpp in Sources */,
9C7A552A1DCD65540049C25D /* builtin_jobs.cpp in Sources */,
9C7A552B1DCD65540049C25D /* builtin_set.cpp in Sources */,
9C7A552C1DCD65540049C25D /* builtin_set_color.cpp in Sources */,
9C7A552D1DCD65540049C25D /* builtin_ulimit.cpp in Sources */,
9C7A552E1DCD65540049C25D /* builtin_printf.cpp in Sources */,
D05F59971F041AE4003EE978 /* builtin_printf.cpp in Sources */,
D05F59A31F041AE4003EE978 /* builtin_function.cpp in Sources */,
9C7A55271DCD651F0049C25D /* fallback.cpp in Sources */,
D05F59CA1F041AE4003EE978 /* builtin_bind.cpp in Sources */,
D05F59AF1F041AE4003EE978 /* builtin_echo.cpp in Sources */,
D05F59A61F041AE4003EE978 /* builtin_fg.cpp in Sources */,
D00769121990137800CA4627 /* autoload.cpp in Sources */,
D00769131990137800CA4627 /* builtin_test.cpp in Sources */,
D05F59BE1F041AE4003EE978 /* builtin_command.cpp in Sources */,
D05F59AC1F041AE4003EE978 /* builtin_emit.cpp in Sources */,
D00769141990137800CA4627 /* color.cpp in Sources */,
D05F59731F041AE4003EE978 /* builtin_ulimit.cpp in Sources */,
D05F59C71F041AE4003EE978 /* builtin_block.cpp in Sources */,
D05F59CD1F041AE4003EE978 /* builtin_bg.cpp in Sources */,
D00769151990137800CA4627 /* common.cpp in Sources */,
D05F59B21F041AE4003EE978 /* builtin_disown.cpp in Sources */,
D00769161990137800CA4627 /* event.cpp in Sources */,
D00769171990137800CA4627 /* input_common.cpp in Sources */,
D00769181990137800CA4627 /* io.cpp in Sources */,
@@ -1450,39 +1668,59 @@
D007691A1990137800CA4627 /* parse_util.cpp in Sources */,
D007691B1990137800CA4627 /* path.cpp in Sources */,
D007691C1990137800CA4627 /* parse_execution.cpp in Sources */,
D05F59881F041AE4003EE978 /* builtin_return.cpp in Sources */,
D007691D1990137800CA4627 /* postfork.cpp in Sources */,
D05F598E1F041AE4003EE978 /* builtin_read.cpp in Sources */,
D007691E1990137800CA4627 /* screen.cpp in Sources */,
D007691F1990137800CA4627 /* signal.cpp in Sources */,
D05F59C41F041AE4003EE978 /* builtin_builtin.cpp in Sources */,
D05F59BB1F041AE4003EE978 /* builtin_commandline.cpp in Sources */,
D05F59C11F041AE4003EE978 /* builtin_cd.cpp in Sources */,
D05F59701F041AE4003EE978 /* builtin.cpp in Sources */,
D00769201990137800CA4627 /* utf8.cpp in Sources */,
D00769211990137800CA4627 /* builtin.cpp in Sources */,
D05F599A1F041AE4003EE978 /* builtin_jobs.cpp in Sources */,
D00769221990137800CA4627 /* function.cpp in Sources */,
D00769231990137800CA4627 /* complete.cpp in Sources */,
D00769241990137800CA4627 /* env.cpp in Sources */,
D05F59A01F041AE4003EE978 /* builtin_functions.cpp in Sources */,
D00769251990137800CA4627 /* exec.cpp in Sources */,
D00769261990137800CA4627 /* expand.cpp in Sources */,
D05F59941F041AE4003EE978 /* builtin_pwd.cpp in Sources */,
D00769271990137800CA4627 /* fish_version.cpp in Sources */,
D00769281990137800CA4627 /* highlight.cpp in Sources */,
D00769291990137800CA4627 /* history.cpp in Sources */,
D007692A1990137800CA4627 /* kill.cpp in Sources */,
D007692B1990137800CA4627 /* parser.cpp in Sources */,
D05F59791F041AE4003EE978 /* builtin_string.cpp in Sources */,
D05F597C1F041AE4003EE978 /* builtin_status.cpp in Sources */,
D007692C1990137800CA4627 /* parser_keywords.cpp in Sources */,
D007692D1990137800CA4627 /* proc.cpp in Sources */,
D007692E1990137800CA4627 /* reader.cpp in Sources */,
D007692F1990137800CA4627 /* sanity.cpp in Sources */,
CB0F034E1F156FE3001827D3 /* builtin_argparse.cpp in Sources */,
D05F597F1F041AE4003EE978 /* builtin_source.cpp in Sources */,
D05F59B51F041AE4003EE978 /* builtin_contains.cpp in Sources */,
D05F59911F041AE4003EE978 /* builtin_random.cpp in Sources */,
D00769301990137800CA4627 /* tokenizer.cpp in Sources */,
D05F59761F041AE4003EE978 /* builtin_test.cpp in Sources */,
D05F599D1F041AE4003EE978 /* builtin_history.cpp in Sources */,
D0F5B46619CFCEBC0090665E /* wcstringutil.cpp in Sources */,
D05F59B81F041AE4003EE978 /* builtin_complete.cpp in Sources */,
D00769311990137800CA4627 /* wildcard.cpp in Sources */,
D00769321990137800CA4627 /* wgetopt.cpp in Sources */,
D00769331990137800CA4627 /* wutil.cpp in Sources */,
D00769341990137800CA4627 /* input.cpp in Sources */,
D04F7F7D1BA4BF4000B0F227 /* builtin_string.cpp in Sources */,
D05F59821F041AE4003EE978 /* builtin_set.cpp in Sources */,
D00769351990137800CA4627 /* output.cpp in Sources */,
D00769361990137800CA4627 /* intern.cpp in Sources */,
D05F59A91F041AE4003EE978 /* builtin_exit.cpp in Sources */,
D00769371990137800CA4627 /* env_universal_common.cpp in Sources */,
D05F59851F041AE4003EE978 /* builtin_set_color.cpp in Sources */,
D00769381990137800CA4627 /* pager.cpp in Sources */,
D007693A1990137800CA4627 /* parse_tree.cpp in Sources */,
D007693B1990137800CA4627 /* parse_productions.cpp in Sources */,
D0076943199013B900CA4627 /* fish_tests.cpp in Sources */,
D05F598B1F041AE4003EE978 /* builtin_realpath.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1521,42 +1759,62 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D05F59BD1F041AE4003EE978 /* builtin_command.cpp in Sources */,
D030FBF41A4A38F300F7ADA0 /* autoload.cpp in Sources */,
D030FBF51A4A38F300F7ADA0 /* builtin.cpp in Sources */,
D01243591CD3DAD100C64313 /* builtin_commandline.cpp in Sources */,
D012435A1CD3DAD100C64313 /* builtin_complete.cpp in Sources */,
D012435B1CD3DAD100C64313 /* builtin_jobs.cpp in Sources */,
D012435C1CD3DAD100C64313 /* builtin_set.cpp in Sources */,
D012435D1CD3DAD100C64313 /* builtin_set_color.cpp in Sources */,
D012435E1CD3DAD100C64313 /* builtin_ulimit.cpp in Sources */,
D030FC151A4A391900F7ADA0 /* builtin_test.cpp in Sources */,
D012435F1CD3DAD100C64313 /* builtin_printf.cpp in Sources */,
D04F7FF01BA4E5B900B0F227 /* builtin_string.cpp in Sources */,
D05F59BA1F041AE4003EE978 /* builtin_commandline.cpp in Sources */,
D030FBF61A4A38F300F7ADA0 /* color.cpp in Sources */,
D0D02AD81598649E008E62BD /* common.cpp in Sources */,
D030FBF71A4A38F300F7ADA0 /* complete.cpp in Sources */,
D030FBF81A4A38F300F7ADA0 /* env_universal_common.cpp in Sources */,
D030FBF91A4A38F300F7ADA0 /* env.cpp in Sources */,
D030FBF01A4A382B00F7ADA0 /* event.cpp in Sources */,
D05F59B11F041AE4003EE978 /* builtin_disown.cpp in Sources */,
D030FBFA1A4A38F300F7ADA0 /* exec.cpp in Sources */,
D05F597E1F041AE4003EE978 /* builtin_source.cpp in Sources */,
D05F597B1F041AE4003EE978 /* builtin_status.cpp in Sources */,
D05F59811F041AE4003EE978 /* builtin_set.cpp in Sources */,
D030FBFB1A4A38F300F7ADA0 /* expand.cpp in Sources */,
D030FBFC1A4A38F300F7ADA0 /* parse_productions.cpp in Sources */,
D030FBFD1A4A38F300F7ADA0 /* parse_tree.cpp in Sources */,
D05F598A1F041AE4003EE978 /* builtin_realpath.cpp in Sources */,
D05F59931F041AE4003EE978 /* builtin_pwd.cpp in Sources */,
D030FBFE1A4A38F300F7ADA0 /* parse_execution.cpp in Sources */,
D05F59A81F041AE4003EE978 /* builtin_exit.cpp in Sources */,
D012436B1CD4019700C64313 /* fallback.cpp in Sources */,
D05F59CC1F041AE4003EE978 /* builtin_bg.cpp in Sources */,
D05F59AB1F041AE4003EE978 /* builtin_emit.cpp in Sources */,
D05F59961F041AE4003EE978 /* builtin_printf.cpp in Sources */,
D030FC001A4A38F300F7ADA0 /* function.cpp in Sources */,
CB0F034D1F156FE3001827D3 /* builtin_argparse.cpp in Sources */,
D05F59C61F041AE4003EE978 /* builtin_block.cpp in Sources */,
D05F59C91F041AE4003EE978 /* builtin_bind.cpp in Sources */,
D05F599C1F041AE4003EE978 /* builtin_history.cpp in Sources */,
D05F599F1F041AE4003EE978 /* builtin_functions.cpp in Sources */,
D030FC011A4A38F300F7ADA0 /* highlight.cpp in Sources */,
D05F59841F041AE4003EE978 /* builtin_set_color.cpp in Sources */,
D05F59AE1F041AE4003EE978 /* builtin_echo.cpp in Sources */,
D05F59721F041AE4003EE978 /* builtin_ulimit.cpp in Sources */,
D05F59781F041AE4003EE978 /* builtin_string.cpp in Sources */,
D030FC021A4A38F300F7ADA0 /* history.cpp in Sources */,
D030FC031A4A38F300F7ADA0 /* input_common.cpp in Sources */,
D030FBEF1A4A382000F7ADA0 /* input.cpp in Sources */,
D05F59A21F041AE4003EE978 /* builtin_function.cpp in Sources */,
D05F59871F041AE4003EE978 /* builtin_return.cpp in Sources */,
D05F59901F041AE4003EE978 /* builtin_random.cpp in Sources */,
D030FC041A4A38F300F7ADA0 /* intern.cpp in Sources */,
D030FC051A4A38F300F7ADA0 /* io.cpp in Sources */,
D030FC061A4A38F300F7ADA0 /* iothread.cpp in Sources */,
D05F59751F041AE4003EE978 /* builtin_test.cpp in Sources */,
D030FC071A4A38F300F7ADA0 /* kill.cpp in Sources */,
D030FBF11A4A384000F7ADA0 /* output.cpp in Sources */,
D05F59B41F041AE4003EE978 /* builtin_contains.cpp in Sources */,
D030FC081A4A38F300F7ADA0 /* pager.cpp in Sources */,
D030FC091A4A38F300F7ADA0 /* parse_util.cpp in Sources */,
D0D02AD9159864A6008E62BD /* parser_keywords.cpp in Sources */,
D05F59A51F041AE4003EE978 /* builtin_fg.cpp in Sources */,
D05F596F1F041AE4003EE978 /* builtin.cpp in Sources */,
D05F598D1F041AE4003EE978 /* builtin_read.cpp in Sources */,
D05F59C31F041AE4003EE978 /* builtin_builtin.cpp in Sources */,
D030FC0A1A4A38F300F7ADA0 /* parser.cpp in Sources */,
D030FC0B1A4A38F300F7ADA0 /* path.cpp in Sources */,
D030FC0C1A4A38F300F7ADA0 /* postfork.cpp in Sources */,
@@ -1574,6 +1832,9 @@
D0D02ADA159864AB008E62BD /* wutil.cpp in Sources */,
D01243691CD4015C00C64313 /* util.cpp in Sources */,
D0D02AD615986492008E62BD /* fish_indent.cpp in Sources */,
D05F59C01F041AE4003EE978 /* builtin_cd.cpp in Sources */,
D05F59991F041AE4003EE978 /* builtin_jobs.cpp in Sources */,
D05F59B71F041AE4003EE978 /* builtin_complete.cpp in Sources */,
D00F63F219137E9D00FCCDEC /* fish_version.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1583,19 +1844,21 @@
buildActionMask = 2147483647;
files = (
D0D02A7C159839D5008E62BD /* autoload.cpp in Sources */,
D01243601CD3DAE200C64313 /* builtin_commandline.cpp in Sources */,
D01243611CD3DAE200C64313 /* builtin_complete.cpp in Sources */,
D01243621CD3DAE200C64313 /* builtin_jobs.cpp in Sources */,
D01243631CD3DAE200C64313 /* builtin_set.cpp in Sources */,
D01243641CD3DAE200C64313 /* builtin_set_color.cpp in Sources */,
D01243651CD3DAE200C64313 /* builtin_ulimit.cpp in Sources */,
D0D02A7D159839D5008E62BD /* builtin_test.cpp in Sources */,
D01243661CD3DAE200C64313 /* builtin_printf.cpp in Sources */,
D04F7F7C1BA4BF4000B0F227 /* builtin_string.cpp in Sources */,
D05F59951F041AE4003EE978 /* builtin_printf.cpp in Sources */,
D05F59A11F041AE4003EE978 /* builtin_function.cpp in Sources */,
D0D02A7E159839D5008E62BD /* color.cpp in Sources */,
D05F59C81F041AE4003EE978 /* builtin_bind.cpp in Sources */,
D05F59AD1F041AE4003EE978 /* builtin_echo.cpp in Sources */,
D05F59A41F041AE4003EE978 /* builtin_fg.cpp in Sources */,
D0D02A7F159839D5008E62BD /* common.cpp in Sources */,
D05F59BC1F041AE4003EE978 /* builtin_command.cpp in Sources */,
D05F59AA1F041AE4003EE978 /* builtin_emit.cpp in Sources */,
D0D02A80159839D5008E62BD /* event.cpp in Sources */,
D05F59711F041AE4003EE978 /* builtin_ulimit.cpp in Sources */,
D05F59C51F041AE4003EE978 /* builtin_block.cpp in Sources */,
D05F59CB1F041AE4003EE978 /* builtin_bg.cpp in Sources */,
D0D02A81159839D5008E62BD /* input_common.cpp in Sources */,
D05F59B01F041AE4003EE978 /* builtin_disown.cpp in Sources */,
D0D02A82159839D5008E62BD /* io.cpp in Sources */,
D0D02A83159839D5008E62BD /* iothread.cpp in Sources */,
D0D02A84159839D5008E62BD /* parse_util.cpp in Sources */,
@@ -1603,38 +1866,59 @@
D052D80B1868F7FC003ABCBD /* parse_execution.cpp in Sources */,
D0D02A86159839D5008E62BD /* postfork.cpp in Sources */,
D0D02A87159839D5008E62BD /* screen.cpp in Sources */,
D05F59861F041AE4003EE978 /* builtin_return.cpp in Sources */,
D0D02A88159839D5008E62BD /* signal.cpp in Sources */,
D05F598C1F041AE4003EE978 /* builtin_read.cpp in Sources */,
D0C9733818DE5449002D7C81 /* utf8.cpp in Sources */,
D0D2694A15983779005D9B9C /* builtin.cpp in Sources */,
D0D2694915983772005D9B9C /* function.cpp in Sources */,
D05F59C21F041AE4003EE978 /* builtin_builtin.cpp in Sources */,
D05F59B91F041AE4003EE978 /* builtin_commandline.cpp in Sources */,
D05F59BF1F041AE4003EE978 /* builtin_cd.cpp in Sources */,
D05F596E1F041AE4003EE978 /* builtin.cpp in Sources */,
D0D02A67159837AD008E62BD /* complete.cpp in Sources */,
D05F59981F041AE4003EE978 /* builtin_jobs.cpp in Sources */,
D0D02A69159837B2008E62BD /* env.cpp in Sources */,
D0D02A6A1598381A008E62BD /* exec.cpp in Sources */,
D0F5B46519CFCDE80090665E /* wcstringutil.cpp in Sources */,
D05F599E1F041AE4003EE978 /* builtin_functions.cpp in Sources */,
D0D02A6B1598381F008E62BD /* expand.cpp in Sources */,
D012436A1CD4018100C64313 /* fallback.cpp in Sources */,
D05F59921F041AE4003EE978 /* builtin_pwd.cpp in Sources */,
D00F63F119137E9D00FCCDEC /* fish_version.cpp in Sources */,
D0D02A6C15983829008E62BD /* highlight.cpp in Sources */,
D0D02A6D1598382C008E62BD /* history.cpp in Sources */,
D0D02A6E15983838008E62BD /* kill.cpp in Sources */,
D0D02A6F1598383E008E62BD /* parser.cpp in Sources */,
D05F59771F041AE4003EE978 /* builtin_string.cpp in Sources */,
D05F597A1F041AE4003EE978 /* builtin_status.cpp in Sources */,
D0D02A8F15983D8F008E62BD /* parser_keywords.cpp in Sources */,
D0D02A7015983842008E62BD /* proc.cpp in Sources */,
D0D02A7115983848008E62BD /* reader.cpp in Sources */,
D0D02A721598384C008E62BD /* sanity.cpp in Sources */,
CB0F034C1F156FE3001827D3 /* builtin_argparse.cpp in Sources */,
D05F597D1F041AE4003EE978 /* builtin_source.cpp in Sources */,
D05F59B31F041AE4003EE978 /* builtin_contains.cpp in Sources */,
D05F598F1F041AE4003EE978 /* builtin_random.cpp in Sources */,
D0D02A7315983852008E62BD /* tokenizer.cpp in Sources */,
D05F59741F041AE4003EE978 /* builtin_test.cpp in Sources */,
D05F599B1F041AE4003EE978 /* builtin_history.cpp in Sources */,
D0D02A7415983857008E62BD /* wildcard.cpp in Sources */,
D05F59B61F041AE4003EE978 /* builtin_complete.cpp in Sources */,
D0D02A751598385E008E62BD /* wgetopt.cpp in Sources */,
D0D02A7615983869008E62BD /* wutil.cpp in Sources */,
D0D02A7715983875008E62BD /* input.cpp in Sources */,
D0D02A781598387E008E62BD /* output.cpp in Sources */,
D05F59801F041AE4003EE978 /* builtin_set.cpp in Sources */,
D0D02A7915983888008E62BD /* intern.cpp in Sources */,
D0D02A7B15983928008E62BD /* env_universal_common.cpp in Sources */,
D05F59A71F041AE4003EE978 /* builtin_exit.cpp in Sources */,
D032388B1849D1980032CF2C /* pager.cpp in Sources */,
D05F59831F041AE4003EE978 /* builtin_set_color.cpp in Sources */,
D0D02A89159839DF008E62BD /* fish.cpp in Sources */,
D0C52F371765284C00BFAB82 /* parse_tree.cpp in Sources */,
D0FE8EE8179FB760008C9F21 /* parse_productions.cpp in Sources */,
D01243681CD4015600C64313 /* util.cpp in Sources */,
D05F59891F041AE4003EE978 /* builtin_realpath.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1743,7 +2027,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
@@ -1769,7 +2052,6 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
@@ -1880,7 +2162,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
@@ -2008,7 +2290,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
EXECUTABLE_NAME = fish_launcher;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -2042,7 +2323,6 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;
@@ -2066,7 +2346,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
LLVM_LTO = YES_THIN;

View File

@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
@@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

View File

@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
@@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.0</string>
<string>2.7.0</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>LSApplicationCategoryType</key>

View File

@@ -200,7 +200,7 @@
#define PACKAGE_NAME "fish"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "fish 2.6.0"
#define PACKAGE_STRING "fish 2.7.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fish"
@@ -209,7 +209,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.6.0"
#define PACKAGE_VERSION "2.7.0"
/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4

65602
po/de.po

File diff suppressed because it is too large Load Diff

View File

@@ -8114,10 +8114,6 @@ msgstr "Show current path"
msgid "Test if the token under the cursor matches the specified wildcard"
msgstr "Test if the token under the cursor matches the specified wildcard"
#: share/functions/__fish_urlencode.fish:1
msgid "URL-encode stdin"
msgstr "URL-encode stdin"
#: share/functions/__terlar_git_prompt.fish:23
msgid "Write out the git prompt"
msgstr "Write out the git prompt"

61008
po/fr.po

File diff suppressed because it is too large Load Diff

56859
po/nb.po

File diff suppressed because it is too large Load Diff

56859
po/nn.po

File diff suppressed because it is too large Load Diff

58496
po/pl.po

File diff suppressed because it is too large Load Diff

70386
po/pt_BR.po

File diff suppressed because it is too large Load Diff

66253
po/sv.po

File diff suppressed because it is too large Load Diff

64899
po/zh_CN.po

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
complete -c . -x -a "(__fish_complete_suffix .fish)"

View File

@@ -19,10 +19,26 @@ function __fish_apt_use_package --description 'Test if apt command should have p
end
function __fish_apt_subcommand
set subcommand $argv[1]; set -e argv[1]
set subcommand $argv[1]
set -e argv[1]
complete -f -c apt -n '__fish_apt_no_subcommand' -a $subcommand $argv
end
function __fish_apt_using_subcommand --description 'Test if given subcommand is used'
for i in (commandline -opc)
if contains -- $i $argv
return 0
end
end
return 1
end
function __fish_apt_option
set subcommand $argv[1]
set -e argv[1]
complete -f -c apt -n "__fish_apt_using_subcommand $subcommand" $argv
end
complete -c apt -n '__fish_apt_use_package' -a '(__fish_print_packages)' --description 'Package'
# Support flags
@@ -36,9 +52,9 @@ complete -f -c apt -s t --description 'Target release'
# List
__fish_apt_subcommand list --description 'List packages'
__fish_apt_subcommand list -l installed --description 'Installed packages'
__fish_apt_subcommand list -l upgradable --description 'Upgradable packages'
__fish_apt_subcommand list -l all-versions --description 'Show all versions of any package'
__fish_apt_option list -l installed --description 'Installed packages'
__fish_apt_option list -l upgradable --description 'Upgradable packages'
__fish_apt_option list -l all-versions --description 'Show all versions of any package'
# Search
__fish_apt_subcommand search -r --description 'Search for packages'

102
share/completions/as.fish Normal file
View File

@@ -0,0 +1,102 @@
# AS - the portable GNU assembler
# See: https://www.gnu.org/software/binutils
complete -c as -o ac -d 'Omit false conditionals'
complete -c as -o ad -d 'Omit debugging directives'
complete -c as -o ag -d 'Include general information'
complete -c as -o ah -d 'Include high-level source'
complete -c as -o al -d 'Include assembly'
complete -c as -o am -d 'Include macro expansions'
complete -c as -o an -d 'Omit forms processing'
complete -c as -o as -d 'Include symbols'
complete -c as -l alternate -d 'Initially turn on alternate macro syntax'
complete -c as -l compress-debug-sections -a 'none zlib zlib-gnu zlib-gabi' -x -d 'Compress DWARF debug sections using zlib'
complete -c as -l nocompress-debug-sections -d 'Don\'t compress DWARF debug sections'
complete -c as -s D -d 'Produce assembler debugging messages'
complete -c as -l debug-prefix-map -x -d 'Remap debug information'
complete -c as -l defsym -x -d 'Redefine symbols'
complete -c as -l execstack -d 'Require executable stack for this object'
complete -c as -l noexecstack -d 'Don\'t require executable stack for this object'
complete -c as -l size-check -a 'error\tDefault warning' -x -d 'ELF .size directive check'
complete -c as -l elf-stt-common -a 'yes no' -d 'Generate ELF common symbols with STT_COMMON type'
complete -c as -l sectname-subst -d 'Enable section name substitution sequences'
complete -c as -s f -d 'Skip whitespace and comment preprocessing'
complete -c as -l gen-debug -s g -d 'Generate debugging information'
complete -c as -l gstabs -d 'Generate STABS debugging information'
complete -c as -l 'gstabs+' -d 'Generate STABS debug info with GNU extensions'
complete -c as -l gdwarf-2 -d 'Generate DWARF2 debugging information'
complete -c as -l gdwarf-sections -d 'Generate per-function section names for DWARF line information'
complete -c as -l hash-size -x -d 'Set the hash table size close'
complete -c as -l help -d 'Show help message and exit'
complete -c as -l target-help -d 'Show target specific options'
complete -c as -s I -r -d 'Add DIR to search list for .include directives'
complete -c as -s J -d 'Don\'t warn about signed overflow'
complete -c as -s K -d 'Warn when differences altered for long displacements'
complete -c as -s L -d 'Keep local symbols'
complete -c as -l mri -s M -d 'Assemble in MRI compatibility mode'
complete -c as -l MD -r -d 'Write dependency information in given file'
complete -c as -o no-pad-sections -d 'Do not pad the end of sections to alignment boundaries'
complete -c as -s o -r -d 'Set object-file output file name'
complete -c as -s R -d 'Fold data section into text section'
complete -c as -l reduce-memory-overheads -d 'Prefer smaller memory use'
complete -c as -l statistics -d 'Print various measured statistics from execution'
complete -c as -l strip-local-absolute -d 'Strip local absolute symbols'
complete -c as -l traditional-format -d 'Use same format as native assembler when possible'
complete -c as -l version -d 'Print assembler version number and exit'
complete -c as -l no-warn -s W -d 'Suppress warnings'
complete -c as -l warn -d 'Don\'t suppress warnings'
complete -c as -l fatal-warnings -d 'Treat warnings as errors'
complete -c as -s Z -d 'Generate object file even after errors'
complete -c as -l listing-lhs-width
complete -c as -l listing-lhs-width2
complete -c as -l listing-rhs-width
complete -c as -l listing-cont-lines
complete -c as -s '@' -r -d 'Read option from given file'
complete -c as -s V -d 'Print assembler version number'
complete -c as -s n -d 'Don\'t optimize code alignment'
complete -c as -s q -d 'Quieten some warnings'
complete -c as -l 32 -d 'Generate 32 bits code'
complete -c as -l 64 -d 'Generate 64 bits code'
complete -c as -l x32 -d 'Generate x32 code'
complete -c as -o msse2avx -d 'Encode SSE instructions with VEX prefix'
complete -c as -o msse-check -a 'none error warning' -x -d 'Check SSE instructions'
complete -c as -o moperand-check -a 'none error warning' -x -d 'Check operand combinations for validity'
complete -c as -o mavxscalar -a '128 256' -x -d 'Encode scalar AVX instructions with specific vector length'
complete -c as -o mevexlig -a '128 256 512' -x -d 'Encode scalar EVEX instructions with specific vector length'
complete -c as -o mevexwig -a '0 1' -x -d 'Encode EVEX instructions with specific EVEX.W'
complete -c as -o mevexrcig -a 'rne rd ru rz' -x -d 'Encode EVEX instructions with specific EVEX.RC'
complete -c as -o mmnemonic -a 'att\tAT\&T intel\tIntel' -x -d 'Use specfied mnemonic'
complete -c as -o msyntax -a 'att\tAT\&T intel\tIntel' -x -d 'Use specfied syntax'
complete -c as -o mindex-reg -d 'Support pseudo index registers'
complete -c as -o mnaked-reg -d 'Don\'t require \'%\' prefix for registers'
complete -c as -o mold-gcc -d 'Support old (<= 2.8.1) versions of gcc'
complete -c as -o madd-bnd-prefix -d 'Add BND prefix for all valid branches'
complete -c as -o mshared -d 'Disable branch optimization for shared code'
complete -c as -o momit-lock-prefix -a 'yes no' -x -d 'Strip all lock prefixes'
complete -c as -o mfence-as-lock-add -a 'yes no' -x -d 'Encode lfence mfence and sfence as lock addl $0x0 (%{re}sp)'
complete -c as -o mrelax-relocations -a 'yes no' -x -d 'Generate relax relocations'
complete -c as -o mamd64 -d 'Accept only AMD64 ISA'
complete -c as -o mintel64 -d 'Accept only Intel64 ISA'
function __fish_complete_as_march
# Complete: CPU[,EXTENSION...]
set -l cpus generic32 generic64 i386 i486 i586 i686 pentium pentiumpro pentiumii pentiumiii pentium4 prescott nocona core core2 corei7 l1om k1om iamcu k6 k6_2 athlon opteron k8 amdfam10 bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
set -l extensions 8087 287 387 687 mmx sse sse2 sse3 ssse3 sse4.1 sse4.2 sse4 avx avx2 avx512f avx512cd avx512er avx512pf avx512dq avx512bw avx512vl vmx vmfunc smx xsave xsaveopt xsavec xsaves aes pclmul fsgsbase rdrnd f16c bmi2 fma fma4 xop lwp movbe cx16 ept lzcnt hle rtm invpcid clflush nop syscall rdtscp 3dnow 3dnowa padlock svme sse4a abm bmi tbm adx rdseed prfchw smap mpx sha clflushopt prefetchwt1 se1 clwb avx512ifma avx512vbmi avx512_4fmaps avx512_4vnniw avx512_vpopcntdq clzero mwaitx ospke rdpid ptwrite no87 no287 no387 no687 nommx nosse nosse2 nosse3 nossse3 nosse4.1 nosse4.2 nosse4 noavx noavx2 noavx512f noavx512cd noavx512er noavx512pf noavx512dq noavx512bw noavx512vl noavx512ifma noavx512vbmi noavx512_4fmaps noavx512_4vnniw noavx512_vpopcntdq
set -l token (commandline -ct)
set -l opts (string split -- , $token)
if not set -q opts[2]
# We are completing the CPU part
printf '%s\tCPU\n' $cpus
else
# We are completing the EXTENSION part
printf '%s\tExtension\n' (string join -- , $opts)$extensions
end
end
complete -c as -o march -x -a '(__fish_complete_as_march)'
complete -c as -o mtune -x -a 'generic32 generic64 i8086 i186 i286 i386 i486 i586 i686 pentium pentiumpro pentiumii pentiumiii pentium4 prescott nocona core core2 corei7 l1om k1om iamcu k6 k6_2 athlon opteron k8 amdfam10 bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2' -d 'Optimize for given CPU'

View File

@@ -145,8 +145,8 @@ complete -c aura -n $query -s e -l explicit -d 'List only explicitly installed p
complete -c aura -n $query -s k -l check -d 'Check if all files owned by PACKAGE are present'
complete -c aura -n $query -s l -l list -d 'List all files owned by PACKAGE'
complete -c aura -n $query -s m -l foreign -d 'List all packages not in the database'
complete -c aura -n $query -s o -l owns -r -d 'Search for the package that owns FILE' -xa ''
complete -c aura -n $query -s p -l file -d 'Apply the query to a package file, not package' -xa ''
complete -c aura -n $query -s o -l owns -r -d 'Search for the package that owns FILE'
complete -c aura -n $query -s p -l file -d 'Apply the query to a package file, not package'
complete -c aura -n $query -s t -l unrequired -d 'List only unrequired packages'
complete -c aura -n $query -s u -l upgrades -d 'List only out-of-date packages'
complete -c aura -n "$query; and $argument" -xa $listinstalled -d 'Installed package'

View File

@@ -1,3 +1,2 @@
complete -x -c cd -a "(__fish_complete_cd)"
complete -c cd -a "(__fish_complete_cd)"
complete -c cd -s h -l help --description 'Display help and exit'

View File

@@ -0,0 +1,23 @@
function __fish_cdh_args
set -l all_dirs $dirprev $dirnext
set -l uniq_dirs
# This next bit of code doesn't do anything useful at the moment since the fish pager always
# sorts, and eliminates duplicate, entries. But we do this to mimic the modal behavor of `cdh`
# and in hope that the fish pager behavior will be changed to preserve the order of entries.
for dir in $all_dirs[-1..1]
if not contains $dir $uniq_dirs
set uniq_dirs $uniq_dirs $dir
end
end
for dir in $uniq_dirs
set -l home_dir (string match -r "$HOME(/.*|\$)" "$dir")
if set -q home_dir[2]
set dir "~$home_dir[2]"
end
echo $dir
end
end
complete -c cdh -xa '(__fish_cdh_args)'

View File

@@ -20,12 +20,51 @@ function __fish_composer_using_command
return 1
end
function __fish_composer_required_packages
test -f composer.json; or return
echo "
import json
json_data = open('composer.json')
data = json.load(json_data)
json_data.close()
packages = data['require'].keys() + data['require-dev'].keys()
print \"\n\".join(packages)
" | python
end
function __fish_composer_installed_packages
test -f composer.lock; or return
echo "
import json
json_data = open('composer.lock')
data = json.load(json_data)
json_data.close()
installed_packages = []
for package in data['packages']:
installed_packages.append(package['name'])
for package in data['packages-dev']:
installed_packages.append(package['name'])
print \"\n\".join(installed_packages)
" | python
end
#add cmds list
set --local composer_cmds 'about' 'archive' 'browse' 'clear-cache' 'clearcache' 'config' 'create-project' 'depends' 'diagnose' 'dump-autoload' 'dumpautoload' 'global' 'help' 'home' 'init' 'install' 'licenses' 'list' 'remove' 'require' 'run-script' 'search' 'self-update' 'selfupdate' 'show' 'status' 'update' 'validate'
#help
complete -f -c composer -n '__fish_composer_using_command help' -a "$composer_cmds"
#update
complete -f -c composer -n '__fish_composer_using_command update' -a "(__fish_composer_required_packages)"
#remove
complete -f -c composer -n '__fish_composer_using_command remove' -a "(__fish_composer_required_packages)"
#diagnostics on installed commands
complete -f -c composer -n '__fish_composer_using_command why' -a "(__fish_composer_installed_packages)"
complete -f -c composer -n '__fish_composer_using_command why-not' -a "(__fish_composer_installed_packages)"
complete -f -c composer -n '__fish_composer_using_command depends' -a "(__fish_composer_installed_packages)"
#popisky
complete -f -c composer -n '__fish_composer_needs_command' -a 'about' -d 'Short information about Composer'
complete -f -c composer -n '__fish_composer_needs_command' -a 'archive' -d 'Create an archive of this composer package'
@@ -55,6 +94,8 @@ complete -f -c composer -n '__fish_composer_needs_command' -a 'show' -d 'Show in
complete -f -c composer -n '__fish_composer_needs_command' -a 'status' -d 'Show a list of locally modified packages'
complete -f -c composer -n '__fish_composer_needs_command' -a 'update' -d 'Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.'
complete -f -c composer -n '__fish_composer_needs_command' -a 'validate' -d 'Validates a composer.json'
complete -f -c composer -n '__fish_composer_needs_command' -a 'why' -d 'Shows which packages cause the given package to be installed'
complete -f -c composer -n '__fish_composer_needs_command' -a 'why-not' -d 'Shows which packages prevent the given package from being installed'
complete -f -c composer -n '__fish_composer_needs_command' -s 'h' -l 'help' -d 'Displays composer\'s help.'
complete -f -c composer -n '__fish_composer_needs_command' -s 'q' -l 'quiet' -d 'Do not output any message.'

View File

@@ -0,0 +1,37 @@
# dhcpcd is a DHCP client
# See: https://roy.marples.name/projects/dhcpcd/index
complete -c dhcpcd -l background -s b -d 'Background immediately'
complete -c dhcpcd -l script -s c -d 'Use given script'
complete -c dhcpcd -l duid -s D -d 'Generate an RFC 4361 compliant clientid'
complete -c dhcpcd -l debug -s d -d 'Echo debug messages to stderr & syslog'
complete -c dhcpcd -l lastlease -s E -d 'Use last acquired lease if cannot obtain one'
complete -c dhcpcd -l lastleaseextend -d 'Use last acquired lease if cannot obtain one even if expired'
complete -c dhcpcd -l env -s e -x -d 'Push given value the environment'
complete -c dhcpcd -l reconfigure -s g -d 'Reapply configuration for each interface'
complete -c dhcpcd -l fqdn -s F -d 'Request DHCP server to update DNS using FQDN instead of hostname'
complete -c dhcpcd -l config -s f -r -d 'Specify config to load instead of /etc/dhcpcd.conf'
complete -c dhcpcd -l hostname -s h -x -d 'Send hostname to DHCP server'
complete -c dhcpcd -l clientid -s I -x -d 'Send given clientid'
complete -c dhcpcd -l vendorclassid -s i -x -d 'Override DHCPv4 vendorclassid field sent'
complete -c dhcpcd -l logfile -s j -r -d 'Writes to specfied log file instead of syslog'
complete -c dhcpcd -l release -s k -x -d 'Release lease and de-configure interface' -a '(__fish_print_interfaces)'
complete -c dhcpcd -l leasetime -s l -x -d 'Request specific lease time in secs'
complete -c dhcpcd -l master -s M -d 'Start dhcpcd in Master mode'
complete -c dhcpcd -l metric -s m -x -d 'Set prefered interface based on given rank (lowest wins)'
complete -c dhcpcd -l rebind -s n -x -d 'Reload config and rebind specified interface' -a '(__fish_print_interfaces)'
complete -c dhcpcd -l renew -s N -x -d 'Renew existing addresses on specified interface' -a '(__fish_print_interfaces)'
complete -c dhcpcd -l option -s o -x -d 'Request DHCP option'
complete -c dhcpcd -l persistent -s p -d 'Keep configuration even when dhcpcd exits'
complete -c dhcpcd -l request -s r -x -d 'Request given address in DHCP DISCOVER message'
complete -c dhcpcd -l inform -s s -d 'Request given address in DHCP INFORM message'
complete -c dhcpcd -l inform6 -d 'Perform DHCPv6 Information Request'
complete -c dhcpcd -l static -s S -x -d 'Configure static DHCP value'
complete -c dhcpcd -l timeout -s t -x -d 'Timeout after seconds' -a '30\tDefault'
complete -c dhcpcd -l userclass -s u -x -d 'Tag DHCPv4 message with given userclass'
complete -c dhcpcd -l vendor -s v -x -d 'Add encapsulated vendor option'
complete -c dhcpcd -l version -d 'Show version and exit'
complete -c dhcpcd -s w -d 'Wait for address to be assigned before forking to background'
complete -c dhcpcd -l waitip -x -d 'Wait for address to be assigned before forking to background' -a '4\tIPv4 6\tIPv6'
complete -c dhcpcd -l exit -s x -x -d 'Exit dhcpcd process linked to given interface' -a '(__fish_print_interfaces)'
complete -c dhcpcd -l reboot -s y -x -d 'Allow reboot after secs'

View File

@@ -0,0 +1,65 @@
function __fish_complete_jails
ezjail-admin list | tail +3 | awk '{ print $4 }'
end
function __fish_complete_running_jails
ezjail-admin list | tail +3 | grep '^.R' | awk '{ print $4 }'
end
function __fish_complete_stopped_jails
ezjail-admin list | tail +3 | grep '^.S' | awk '{ print $4 }'
end
# archive
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a archive --description "create a backup of one or several jails"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from archive" -a "(__fish_complete_jails)" --description "jail"
# config
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a config --description "manage specific jails"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from config" -a "(__fish_complete_jails)" --description "jail"
# console
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a console --description "attach your console to a running jail"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from console" -a "(__fish_complete_jails)" --description "jail"
# create
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a create --description "installs a new jail inside ezjail's scope"
# delete
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a delete --description "removes a jail from ezjail's config"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from delete" -a "(__fish_complete_jails)" --description "jail"
# freeze
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a freeze --description "dump diffs between jail initialisation and freeze time into a flavour"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from freeze" -a "(__fish_complete_jails)" --description "jail"
# install
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a install --description "create the basejail from binary packages"
# list
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a list --description "list all jails"
# restart
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a restart --description "restart a running jail"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from restart" -a "(__fish_complete_running_jails)" --description "jail"
# restore
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a restore --description "create new jails from archived versions"
# snapshot
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a snapshot --description "create a snapshot of a jail"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from snapshot" -a "(__fish_complete_jails)" --description "jail"
# start
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a start --description "start a jail"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from start" -a "(__fish_complete_stopped_jails)" --description "jail"
# stop
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a stop --description "stop a running jail"
complete -xc "ezjail-admin" -n "__fish_seen_subcommand_from stop" -a "(__fish_complete_running_jails)" --description "jail"
# troubleshoot
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a troubleshoot --description "check for reasons for the jails to fail"
# update
complete -xc "ezjail-admin" -n "__fish_use_subcommand" -a update --description "create or update the basejail from source"

View File

@@ -0,0 +1,59 @@
function __fish_complete_fab_tasks
for task in (fab -l)
set -l _matched (string match -r "^ +([^ ]*) *([^ ]?.*)" $task)
printf "%s\t%s\n" "$_matched[2]" "$_matched[3]"
end
end
# tasks
complete -x -c fab -a "(__fish_complete_fab_tasks)"
# options
complete -c fab -s h -l help -d "show this help message and exit"
complete -x -c fab -s d -l display -a "(fab --shortlist)" -d "print detailed info about command NAME"
complete -x -c fab -s F -l list-format -a "short normal nested" -d "formats --list, choices: short, normal, nested"
complete -c fab -s I -l initial-password-prompt -d "Force password prompt up-front"
complete -c fab -l initial-sudo-password-prompt -d "Force sudo password prompt up-front"
complete -c fab -s l -l list -d "print list of possible commands and exit"
complete -x -c fab -l set -d "comma separated KEY=VALUE pairs to set Fab env vars"
complete -c fab -l shortlist -d "alias for -F short --list"
complete -c fab -s V -l version -d "show program's version number and exit"
complete -c fab -s a -l no_agent -d "don't user the running SSH agent"
complete -c fab -s A -l forward-agent -d "forward local agent to remote end"
complete -c fab -l abort-on-prompts -d "abort instead of prompting (for password, host, etc)"
complete -r -c fab -s c -l config -d "specify location of config file to use"
complete -c fab -l colorize-errors -d "Color error output"
complete -c fab -s D -l disable-known-host -d "do not load user known_hosts file"
complete -c fab -s e -l eagerly-disconnect -d "disconnect from hosts as soon as possible"
complete -r -c fab -s f -l fabfile -d "python module file to import, e.g. '../other.py'"
complete -x -c fab -s g -l gateway -a "(__fish_complete_user_at_hosts)" -d "gateway host to connect through"
complete -c fab -l gss-auth -d "Use GSS-API authentication"
complete -c fab -l gss-deleg -d "Delegate GSS-API client credentials or not"
complete -c fab -l gss-kex -d "Perform GSS-API Key Exchange and user authentication"
complete -x -c fab -l hide -d "comma-separated list of output levels to hide"
complete -x -c fab -s H -l hosts -a "(__fish_complete_user_at_hosts)" -d "comma-separated list of hosts to operate on"
complete -r -c fab -s i -d "path to SSH private key file. May be repeated."
complete -c fab -s k -l no-keys -d "don't load private key files from ~/.ssh/"
complete -x -c fab -l keepaplive -d "enables a keepalive every N seconds"
complete -c fab -l linewise -d "print line-by-line instead of byte-by-byte"
complete -x -c fab -s n -l connection-attempts -d "make M attempts to connect before giving up"
complete -c fab -l no-pty -d "do not use pseudo-terminal in run/sudo"
complete -c fab -s p -l password -d "password for use with authentication and/or sudo"
complete -c fab -s P -l parallel -d "default to parallel execution method"
complete -x -c fab -l port -d "SSH connection port"
complete -c fab -s r -l reject-unknown-host -d "reject unknown hosts"
complete -x -c fab -l sudo-password -d "password for use with sudo only"
complete -x -c fab -l system-known-hosts -d "load system known_hosts file before reading user known_hosts"
complete -x -c fab -s R -l roles -d "comma-separated list of roles to operate on"
complete -x -c fab -s s -l shell -d "specify a new shell, defaults to '/bin/bash -l -c'"
complete -x -c fab -l show -d "comma-separated list of output levels to show"
complete -c fab -l skip-bad-hosts -d "skip over hosts that can't be reached"
complete -c fab -l skip-unknown-tasks -d "skip over unknown tasks"
complete -r -c fab -l ssh-config-path -d "Path to SSH config file"
complete -x -c fab -s t -l timeout -d "set connection timeout to N seconds"
complete -x -c fab -s T -l command-timeout -d "set remote command timeout to N seconds"
complete -x -c fab -s u -l user -d "username to use when connecting to remote hosts"
complete -c fab -s w -l warn-only -d "warn, instead of abort, when commands fail"
complete -x -c fab -s x -l exclude-hosts -a "(__fish_complete_user_at_hosts)" -d "comma-separated list of hosts to exclude"
complete -x -c fab -s z -l pool-size -d "number of concurrent processes to use in parallel mode"

View File

@@ -30,9 +30,9 @@ complete -f -c flatpak -n "not __fish_seen_subcommand_from $commands" -a build-i
complete -f -c flatpak -n "not __fish_seen_subcommand_from $commands" -a build-sign -d 'Sign an application or runtime'
complete -f -c flatpak -n "not __fish_seen_subcommand_from $commands" -a build-update-repo -d 'Update the summary file in a repository'
complete -f -c flatpak -n "__fish_seen_subcommand_from run" -a "(flatpak list --app | string trim)"
complete -f -c flatpak -n "__fish_seen_subcommand_from info uninstall" -a "(flatpak list | string trim)"
complete -f -c flatpak -n "__fish_seen_subcommand_from remote-ls remote-modify remote-delete" -a "(flatpak remote-list | string trim)"
complete -f -c flatpak -n "__fish_seen_subcommand_from run" -a "(flatpak list --app | string match -r '\S+')"
complete -f -c flatpak -n "__fish_seen_subcommand_from info uninstall" -a "(flatpak list | string match -r '\S+')"
complete -f -c flatpak -n "__fish_seen_subcommand_from remote-ls remote-modify remote-delete" -a "(flatpak remote-list | string match -r '\S+')"
# Note that "remote-ls" opens an internet connection, so we don't want to complete "install"
# Plenty of the other stuff is too free-form to complete (e.g. remote-add).

View File

@@ -6,5 +6,5 @@ complete -c functions -s d -l description --description "Set function descriptio
complete -c functions -s q -l query --description "Test if function is defined"
complete -c functions -s n -l names --description "List the names of the functions, but not their definition"
complete -c functions -s c -l copy --description "Copy the specified function to the specified new name"
complete -c functions -s m -l metadata --description "Display data about the function"
complete -c functions -s D -l details --description "Display information about the function"
complete -c functions -s v -l verbose --description "Print more output"

View File

@@ -18,6 +18,14 @@ function __fish_git_recent_commits
| string replace -r '(.{73}).+' '$1…'
end
function __fish_git_local_branches
command git branch | string trim -c ' *'
end
function __fish_git_remote_branches
command git branch --remote | string trim -c ' *'
end
function __fish_git_branches
# In some cases, git can end up on no branch - e.g. with a detached head
# This will result in output like `* (no branch)` or a localized `* (HEAD detached at SHA)`
@@ -63,7 +71,7 @@ function __fish_git_modified_files
set -l root (command git rev-parse --show-toplevel ^/dev/null)
# Print files from the current $PWD as-is, prepend all others with ":/" (relative to toplevel in git-speak)
# This is a bit simplistic but finding the lowest common directory and then replacing everything else in $PWD with ".." is a bit annoying
string replace -- "$PWD/" "" "$root/"(command git diff --name-only ^/dev/null) | string replace "$root/" ":/"
string replace -- "$PWD/" "" "$root/"(command git diff --name-only $argv ^/dev/null) | string replace "$root/" ":/"
end
function __fish_git_staged_files
@@ -130,6 +138,28 @@ function __fish_git_needs_command
return 1
end
# HACK: Aliases
# Git allows aliases, so we need to see what command the current command-token corresponds to
# (so we can complete e.g. `lg` like `log`).
# Checking `git config` for a lot of aliases can be quite slow if it is called
# for every possible command.
# Ideally, we'd `complete --wraps` this, but that is not currently possible, as is
# using `complete -C` like
# complete -c git -n '__fish_git_using_command lg' -a '(complete -C"git log ")'
#
# So instead, we store the aliases in global variables, named after the alias, containing the command.
# This is because alias:command is an n:1 mapping (an alias can only have one corresponding command,
# but a command can be aliased multiple times)
git config -z --get-regexp 'alias\..*' | while read -lz alias command _
# Git aliases can contain chars that variable names can't - escape them.
if test (count $command) -ne 1
printf (_ "Warning: alias '%s' has more than one command: '%s'") $alias "$command" >&2
end
set alias (string replace 'alias.' '' -- $alias | string escape --style=var)
set -g __fish_git_alias_$alias $command
end
function __fish_git_using_command
set -l cmd (__fish_git_needs_command)
test -z "$cmd"
@@ -137,9 +167,10 @@ function __fish_git_using_command
contains -- $cmd $argv
and return 0
# aliased command
set -l aliased (command git config --get "alias.$cmd" ^/dev/null | string split " ")
contains -- "$aliased[1]" $argv
# Check aliases.
set -l varname __fish_git_alias_(string escape --style=var -- $cmd)
set -q $varname
and contains -- $$varname $argv
and return 0
return 1
end
@@ -339,13 +370,16 @@ complete -f -c git -n '__fish_git_using_command add' -a '(__fish_git_add_files)'
### checkout
complete -f -c git -n '__fish_git_needs_command' -a checkout -d 'Checkout and switch to a branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_branches)' --description 'Branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_local_branches)' --description 'Local Branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_remote_branches)' --description 'Remote Branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_heads)' --description 'Head'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_unique_remote_branches)' --description 'Remote branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_tags)' --description 'Tag'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_modified_files)' --description 'File'
complete -f -c git -n '__fish_git_using_command checkout' -s b -d 'Create a new branch'
complete -f -c git -n '__fish_git_using_command checkout' -s t -l track -d 'Track a new branch'
complete -f -c git -n '__fish_git_using_command checkout' -l theirs -d 'Keep staged changes'
complete -f -c git -n '__fish_git_using_command checkout' -l ours -d 'Keep unmerged changes'
# TODO options
### apply
@@ -720,9 +754,11 @@ complete -f -c git -n '__fish_git_using_command push' -l prune -d "Remove remote
complete -f -c git -n '__fish_git_using_command push' -l mirror -d 'Push all refs under refs/'
complete -f -c git -n '__fish_git_using_command push' -l delete -d 'Delete all listed refs from the remote repository'
complete -f -c git -n '__fish_git_using_command push' -l tags -d 'Push all refs under refs/tags'
complete -f -c git -n '__fish_git_using_command push' -l follow-tags -d 'Push all usual refs plus the ones under refs/tags'
complete -f -c git -n '__fish_git_using_command push' -s n -l dry-run -d 'Do everything except actually send the updates'
complete -f -c git -n '__fish_git_using_command push' -l porcelain -d 'Produce machine-readable output'
complete -f -c git -n '__fish_git_using_command push' -s f -l force -d 'Force update of remote refs'
complete -f -c git -n '__fish_git_using_command push' -s f -l force-with-lease -d 'Force update of remote refs, stopping if other\'s changes would be overwritten'
complete -f -c git -n '__fish_git_using_command push' -s u -l set-upstream -d 'Add upstream (tracking) reference'
complete -f -c git -n '__fish_git_using_command push' -s q -l quiet -d 'Be quiet'
complete -f -c git -n '__fish_git_using_command push' -s v -l verbose -d 'Be verbose'
@@ -759,6 +795,8 @@ complete -c git -n '__fish_git_needs_command' -a reset -d 'Reset current HEAD to
complete -f -c git -n '__fish_git_using_command reset' -l hard -d 'Reset files in working directory'
complete -c git -n '__fish_git_using_command reset' -a '(__fish_git_branches)' -d 'Branch'
complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_staged_files)' -d 'File'
# reset changes the index, so we need to compare that to the commit.
complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_modified_files --cached)' -d 'File'
complete -f -c git -n '__fish_git_using_command reset' -a '(__fish_git_reflog)' -d 'Reflog'
# TODO options

View File

@@ -11,7 +11,7 @@ complete -c gradle -l continue -d 'Continue task execution after failure'
complete -c gradle -l system-prop -s D -r -d 'Set system property of the JVM'
complete -c gradle -l debug -s d -d 'Log in debug mode'
complete -c gradle -l daemon -d 'Uses Gradle Daemon to run build'
complete -c gradle -l forground -d 'Uses Gradle Daemon in forground'
complete -c gradle -l foreground -d 'Uses Gradle Daemon in foreground'
complete -c gradle -l gradle-user-home -s g -r -d 'Specify gradle user home directory'
complete -c gradle -l gui -d 'Launch Gradle GUI'
complete -c gradle -l initscript -s I -r -d 'Specify an initialization script'

View File

@@ -0,0 +1,34 @@
# grub-file - check file type
complete -c grub-file -l is-i386-xen-pae-domu -d 'Check if FILE can be booted as i386 PAE Xen unprivileged guest kernel'
complete -c grub-file -l is-x86 -d 'Check if given file can be booted as x86_64 Xen unprivileged guest kernel'
complete -c grub-file -l is-x86-xen-dom0 -d 'Check if given file can be used as Xen x86 privileged guest kernel'
complete -c grub-file -l is-x86-multiboot -d 'Check if given file can be used as x86 multiboot kernel'
complete -c grub-file -l is-x86-multiboot2 -d 'Check if given file can be used as x86 multiboot2 kernel'
complete -c grub-file -l is-arm-linux -d 'Check if given file is ARM Linux'
complete -c grub-file -l is-arm64-linux -d 'Check if given file is ARM64 Linux'
complete -c grub-file -l is-ia64-linux -d 'Check if given file is IA64 Linux'
complete -c grub-file -l is-mips-linux -d 'Check if given file is MIPS Linux'
complete -c grub-file -l is-mipsel-linux -d 'Check if given file is MIPSEL Linux'
complete -c grub-file -l is-sparc64-linux -d 'Check if given file is SPARC64 Linux'
complete -c grub-file -l is-powerpc-linux -d 'Check if given file is POWERPC Linux'
complete -c grub-file -l is-x86-linux -d 'Check if given file is x86 Linux'
complete -c grub-file -l is-x86-linux32 -d 'Check if given file is x86 Linux supporting 32-bit protocol'
complete -c grub-file -l is-x86-kfreebsd -d 'Check if given file is x86 kFreeBSD'
complete -c grub-file -l is-i386-kfreebsd -d 'Check if given file is i386 kFreeBSD'
complete -c grub-file -l is-x86 -d 'Check if given file is x86_64 kFreeBSD'
complete -c grub-file -l is-x86-knetbsd -d 'Check if given file is x86 kNetBSD'
complete -c grub-file -l is-i386-knetbsd -d 'Check if given file is i386 kNetBSD'
complete -c grub-file -l is-x86 -d 'Check if given file is x86_64 kNetBSD'
complete -c grub-file -l is-i386-efi -d 'Check if given file is i386 EFI file'
complete -c grub-file -l is-x86 -d 'Check if given file is x86_64 EFI file'
complete -c grub-file -l is-ia64-efi -d 'Check if given file is IA64 EFI file'
complete -c grub-file -l is-arm64-efi -d 'Check if given file is ARM64 EFI file'
complete -c grub-file -l is-arm-efi -d 'Check if given file is ARM EFI file'
complete -c grub-file -l is-hibernated-hiberfil -d 'Check if given file is hiberfil.sys in hibernated state'
complete -c grub-file -l is-x86 -d 'Check if given file is x86_64 XNU (Mac OS X kernel)'
complete -c grub-file -l is-i386-xnu -d 'Check if given file is i386 XNU (Mac OS X kernel)'
complete -c grub-file -l is-xnu-hibr -d 'Check if given file is XNU (Mac OS X kernel) hibernated image'
complete -c grub-file -l is-x86-bios-bootsector -d 'Check if given file is BIOS bootsector'
complete -c grub-file -l help -s h -d 'Display help and exit'
complete -c grub-file -l usage -s u -d 'Display usage and exit'

View File

@@ -0,0 +1,35 @@
# grub-install - install GRUB to a device
complete -c grub-install -l compress -d 'Compress GRUB files' -x -a 'no xz gz lzo'
complete -c grub-install -l directory -s d -d 'Use image and modules under given directory' -r
complete -c grub-install -l fonts -d 'Install given fonts' -r
complete -c grub-install -l install-modules -d 'Install only given modules and their dependencies' -x
complete -c grub-install -l pubkey -s k -d 'Embed given file as public key for signature checking' -r
complete -c grub-install -l locale-directory -d 'Use translations under given directory' -r
complete -c grub-install -l locales -d 'Install only given locales' -x
complete -c grub-install -l modules -d 'Preload specfied modules' -x
complete -c grub-install -l themes -d 'Install given theme' -x
complete -c grub-install -l verbose -s v -d 'Verbose mode'
complete -c grub-install -l allow-floppy -d 'Make drive also bootable as floppy'
complete -c grub-install -l boot-directory -d 'Install GRUB images under DIR/grub' -r
complete -c grub-install -l bootloader-id -d 'Set bootloader ID' -x
complete -c grub-install -l core-compress -d 'Choose compression to use for core image' -x -a 'none xz auto'
complete -c grub-install -l disk-module -d 'Set disk module to use' -x
complete -c grub-install -l efi-directory -d 'Use given directory as the EFI System Partition root' -r
complete -c grub-install -l force -d 'Install even if problems are detected'
complete -c grub-install -l force-file-id -d 'Use identifier file even if UUID is available'
complete -c grub-install -l label-bgcolor -d 'Use given color for label background' -x
complete -c grub-install -l label-color -d 'Use given color for label' -x
complete -c grub-install -l label-font -d 'Use given file for label' -r
complete -c grub-install -l macppc-directory -d 'Use given directory for PPC Mac install' -r
complete -c grub-install -l no-bootsector -d 'Do not install bootsector'
complete -c grub-install -l no-nvram -d 'Don\'t update the boot-device/Boot* NVRAM variables'
complete -c grub-install -l no-rs-codes -d 'Don\'t apply any reed-solomon codes when embedding core.img'
complete -c grub-install -l product-version -d 'Set product version' -x
complete -c grub-install -l recheck -d 'Delete device map if it already exists'
complete -c grub-install -l removable -d 'The installation is removable'
complete -c grub-install -l skip-fs-probe -s s -d 'Do not probe for filesystems'
complete -c grub-install -l target -d 'Install GRUB for given platform' -a 'arm-efi\t arm-uboot\t arm64-efi\t i386-coreboot\t i386-efi\t i386-ieee1275\t i386-multiboot\t i386-pc\t i386-qemu\t i386-xen\t ia64-efi\t mips-arc\t mips-qemu_mips\t mipsel-arc\t mipsel-loongson\t mipsel-qemu_mips\t powerpc-ieee1275\t sparc64-ieee1275\t x86_64-efi\t x86_64-xen\t' -x
complete -c grub-install -l help -s '?' -d 'Show help'
complete -c grub-install -l usage -d 'Show usage'
complete -c grub-install -l version -d 'Show version'

View File

@@ -2,27 +2,101 @@ if test -d "$__fish_datadir/man/man1/"
complete -c help -x -a '(__fish_print_commands)' --description 'Help for this command'
end
complete -c help -x -a syntax --description 'Introduction to the fish syntax'
complete -c help -x -a todo --description 'Incomplete aspects of fish'
complete -c help -x -a bugs --description 'Known fish bugs'
# Help topics
# This was semi-automated with `grep 'class="anchor"' -A1 /usr/share/doc/fish/index.html
# It's not fully automated since that requires parsing html with regex,
# and since this is by definition in sync - we ship the html, and we ship these completions.
complete -c help -x -a autosuggestions --description 'Autosuggestions'
complete -c help -x -a builtin-overview --description 'Builtin commands'
complete -c help -x -a cartesian-product --description 'Cartesian Products'
complete -c help -x -a color --description 'Setting syntax highlighting colors'
complete -c help -x -a combine --description 'Combining different expansions'
complete -c help -x -a completion --description 'How tab-completion works'
complete -c help -x -a completion-func --description 'Useful functions for writing completions'
complete -c help -x -a completion-own --description 'Writing your own completions'
complete -c help -x -a completion-path --description 'Where to put completions'
complete -c help -x -a debugging --description 'Debugging fish scripts'
complete -c help -x -a docs --description 'Help'
complete -c help -x -a editor --description 'Command line editor'
complete -c help -x -a emacs-mode --description 'Emacs mode commands'
complete -c help -x -a escapes --description 'Escaping characters'
complete -c help -x -a event --description 'Event handlers'
complete -c help -x -a expand --description 'Parameter expansion (Globbing)'
complete -c help -x -a expand-brace --description 'Brace expansion {a,b,c}'
complete -c help -x -a expand-command-substitution --description 'Command substitution'
complete -c help -x -a expand-command-substitution --description 'Command substitution (SUBCOMMAND)'
complete -c help -x -a expand-home --description 'Home directory expansion ~USER'
complete -c help -x -a expand-index-range --description 'Index range expansion'
complete -c help -x -a expand-process --description 'Process expansion %JOB'
complete -c help -x -a expand-variable --description 'Variable expansion $VARNAME'
complete -c help -x -a expand-wildcard --description 'Wildcard expansion *.*'
# Note: This is hard-coded in help.fish - it's not an anchor in the html.
complete -c help -x -a globbing --description 'Parameter expansion (Globbing)'
complete -c help -x -a greeting --description 'Configurable greeting'
complete -c help -x -a history --description 'Help on how to reuse previously entered commands'
complete -c help -x -a history-search --description 'Searchable history'
complete -c help -x -a identifiers --description 'Shell variable and function names'
complete -c help -x -a initialization --description 'Initialization files'
complete -c help -x -a introduction --description 'Introduction'
complete -c help -x -a issues --description 'Common issues with fish'
complete -c help -x -a job-control --description 'Running multiple programs'
complete -c help -x -a killring --description 'Copy and paste (Kill Ring)'
complete -c help -x -a more-help --description 'Further help and development'
complete -c help -x -a multiline --description 'Multiline editing'
complete -c help -x -a other --description 'Other features'
complete -c help -x -a piping --description 'Piping'
complete -c help -x -a prompt --description 'Programmable prompt'
complete -c help -x -a quotes --description 'Quotes'
complete -c help -x -a redirects --description 'Input/Output (IO) redirection'
complete -c help -x -a shared-binds --description 'Shared bindings'
complete -c help -x -a syntax --description 'Introduction to the fish syntax'
complete -c help -x -a syntax-background --description 'Background jobs'
complete -c help -x -a syntax-conditional --description 'Conditional execution of code and flow control'
complete -c help -x -a syntax-function --description 'Functions'
complete -c help -x -a syntax-function-autoloading --description 'Autoloading functions'
complete -c help -x -a syntax-function-wrappers --description 'Defining aliases'
complete -c help -x -a syntax-job-control --description 'Job control'
complete -c help -x -a syntax-words --description 'Some common words'
complete -c help -x -a title --description 'Programmable title'
complete -c help -x -a variables --description 'Shell variables'
complete -c help -x -a variables-arrays --description 'Arrays'
complete -c help -x -a variables-color --description 'Variables for changing highlighting colors'
complete -c help -x -a variables-export --description 'Exporting variables'
complete -c help -x -a variables-functions --description 'Variable scope for functions'
complete -c help -x -a variables-locale --description 'Locale variables'
complete -c help -x -a variables-scope --description 'Variable scope'
complete -c help -x -a variables-special --description 'Special variables'
complete -c help -x -a variables-status --description 'The status variable'
complete -c help -x -a variables-universal --description 'More on universal variables'
complete -c help -x -a vi-mode --description 'Vi mode commands'
complete -c help -x -a vi-mode-command --description 'Command mode'
complete -c help -x -a vi-mode-insert --description 'Insert mode'
complete -c help -x -a vi-mode-visual --description 'Visual mode'
complete -c help -x -a completion --description 'Help on how tab-completion works'
complete -c help -x -a job-control --description 'Help on how job control works'
complete -c help -x -a difference --description 'Summary on how fish differs from other shells'
complete -c help -x -a prompt --description 'Help on how to set the prompt'
complete -c help -x -a title --description 'Help on how to set the titlebar message'
complete -c help -x -a killring --description 'Help on how to copy and paste'
complete -c help -x -a editor --description 'Help on editor shortcuts'
complete -c help -x -a variables --description 'Help on environment variables'
complete -c help -x -a color --description 'Help on setting syntax highlighting colors'
complete -c help -x -a globbing --description 'Help on parameter expansion (Globbing)'
complete -c help -x -a expand --description 'Help on parameter expansion (Globbing)'
complete -c help -x -a expand-variable --description 'Help on variable expansion $VARNAME'
complete -c help -x -a expand-home --description 'Help on home directory expansion ~USER'
complete -c help -x -a expand-brace --description 'Help on brace expansion {a,b,c}'
complete -c help -x -a expand-wildcard --description 'Help on wildcard expansion *.*'
complete -c help -x -a expand-command-substitution --description 'Help on command substitution (SUBCOMMAND)'
complete -c help -x -a expand-process --description 'Help on process expansion %JOB'
# Tutorial
complete -c help -x -a tutorial --description 'Tutorial'
complete -c help -x -a tut_autoload --description 'Autoloading Functions'
complete -c help -x -a tut_autosuggestions --description 'Autosuggestions'
complete -c help -x -a tut_combiners --description 'Combiners (And, Or, Not)'
complete -c help -x -a tut_command_substitutions --description 'Command Substitutions'
complete -c help -x -a tut_conditionals --description 'Conditionals (If, Else, Switch)'
complete -c help -x -a tut_exit_status --description 'Exit Status'
complete -c help -x -a tut_exports --description 'Exports (Shell Variables)'
complete -c help -x -a tut_functions --description 'Functions'
complete -c help -x -a tut_getting_help --description 'Getting Help'
complete -c help -x -a tut_learning_Fish --description 'Learning fish'
complete -c help -x -a tut_lists --description 'Lists'
complete -c help -x -a tut_loops --description 'Loops'
complete -c help -x -a tut_more --description 'Ready for more?'
complete -c help -x -a tut_path --description '$PATH'
complete -c help -x -a tut_pipes_and_redirections --description 'Pipes and Redirections'
complete -c help -x -a tut_prompt --description 'Prompt'
complete -c help -x -a tut_running_commands --description 'Running Commands'
complete -c help -x -a tut_semicolon --description 'Separating Commands (Semicolon)'
complete -c help -x -a tut_startup --description "Startup (Where's .bashrc?)"
complete -c help -x -a tut_syntax_highlighting --description 'Syntax Highlighting'
complete -c help -x -a tut_tab_completions --description 'Tab Completions'
complete -c help -x -a tut_universal --description 'Universal Variables'
complete -c help -x -a tut_variables --description 'Variables'
complete -c help -x -a tut_why_fish --description 'Why fish?'
complete -c help -x -a tut_wildcards --description 'Wildcards'

View File

@@ -74,7 +74,6 @@ complete $heroku_looking -xa maintenance -d 'manage maintenance mode for an app'
complete $heroku_looking -xa members -d 'manage membership in organization accounts'
complete $heroku_looking -xa orgs -d 'manage organization accounts'
complete $heroku_looking -xa pg -d 'manage heroku-postgresql databases'
complete $heroku_looking -xa pgbackups -d 'manage backups of heroku postgresql databases'
complete $heroku_looking -xa plugins -d 'manage plugins to the heroku gem'
complete $heroku_looking -xa regions -d 'list available regions'
complete $heroku_looking -xa stack -d 'manage the stack for an app'
@@ -168,6 +167,19 @@ complete -c heroku -n '__fish_heroku_using_command logs' -s p -l ps -l PS -d "on
complete -c heroku -n '__fish_heroku_using_command logs' -s s -l source -l SOURCE -d "only display logs from the given source"
complete -c heroku -n '__fish_heroku_using_command logs' -s t -l tail -d "continually stream logs"
# PG subcommands
complete $heroku_looking -xa pg:backups -d "manage backups of heroku postgresql databases"
complete $heroku_looking -xa pg:backups:cancel -d "cancel an in-progress backup or restore (default newest)"
complete $heroku_looking -xa pg:backups:capture -d "capture a new backup"
complete $heroku_looking -xa pg:backups:delete -d "delete a backup"
complete $heroku_looking -xa pg:backups:download -d "downloads database backup"
complete $heroku_looking -xa pg:backups:info -d "get information about a specific backup"
complete $heroku_looking -xa pg:backups:restore -d "restore a backup (default latest) to a database"
complete $heroku_looking -xa pg:backups:schedule -d "schedule daily backups for given database"
complete $heroku_looking -xa pg:backups:schedules -d "list backup schedule"
complete $heroku_looking -xa pg:backups:unschedule -d "stop daily backups"
complete $heroku_looking -xa pg:backups:url -d "get secret but publicly accessible URL of a backup"
# PS subcommands
complete $heroku_looking -xa ps:resize -d "resize dynos to the given size (DYNO1=1X|2X|PX)"
complete -c heroku -n '__fish_heroku_using_command ps:resize' -fa '(__fish_list_heroku_dynos)' -d "resize dynos to the given size (DYNO1=1X|2X|PX)"

View File

@@ -0,0 +1,79 @@
# fish for Jest
complete -f -c jest -l help -s h -d 'Show help'
complete -f -c jest -l automock -d 'Automock all files by default'
complete -f -c jest -l bail -s b -d 'Exit the test suite immediately upon the first failing test'
complete -f -c jest -l browser -d 'Respect the "browser" field in package.json when resolving modules'
complete -f -c jest -l cache -d 'Whether to use the transform cache'
complete -f -c jest -l no-cache -d 'Disable the cache'
complete -f -c jest -l cacheDirectory -d 'The directory where Jest should store its dependency information'
complete -f -c jest -l ci -d 'Whether to run Jest in continuous integration (CI) mode'
complete -f -c jest -l clearMocks -d 'Automatically clear mock calls and instances every test'
complete -f -c jest -l collectCoverage -d 'Alias for --coverage'
complete -f -c jest -l collectCoverageFrom -d 'glob pattern matching files that coverage info needs to be collected from'
complete -f -c jest -l collectCoverageOnlyFrom -d 'Explicit list of paths coverage will be restricted to'
complete -f -c jest -l color -d 'Forces test results output color highlighting'
complete -f -c jest -l colors -d 'Alias for --color'
complete -c jest -l config -s c -d 'The path to a jest config file'
complete -f -c jest -l coverage -d 'Indicates that test coverage information be collected and reported in the output'
complete -f -c jest -l coverageDirectory -d 'The directory where Jest should output its coverage files'
complete -f -c jest -l coveragePathIgnorePatterns -d 'Pattern of files to ignore'
complete -f -c jest -l coverageReporters -d 'A list of reporter names that Jest uses when writing coverage reports'
complete -f -c jest -l coverageThreshold -d 'A JSON with which will be used to configure minimum threshold enforcement for coverage results'
complete -f -c jest -l debug -d 'Print debugging info about your jest config'
complete -f -c jest -l env -d 'The test environment used for all tests'
complete -f -c jest -l expand -s e -d 'Use this flag to show full diffs instead of a patch'
complete -f -c jest -l findRelatedTests -d 'Find related tests for a list of source files'
complete -f -c jest -l forceExit -d 'Force Jest to exit after all tests have completed running'
complete -f -c jest -l globals -d 'A JSON string with map of global variables'
complete -f -c jest -l haste -d 'A JSON string with map of variables for the haste module system'
complete -f -c jest -l json -d 'Prints the test results in JSON'
complete -f -c jest -l lastCommit -d 'Will run all tests affected by file changes in the last commit made'
complete -f -c jest -l listTests -d 'Lists all tests Jest will run given the arguments and exits'
complete -f -c jest -l logHeapUsage -d 'Logs the heap usage after every test'
complete -f -c jest -l mapCoverage -d 'Maps code coverage reports against original source code'
complete -f -c jest -l maxWorkers -s w -d 'Specifies the maximum number of workers'
complete -f -c jest -l moduleDirectories -d 'Directory names to be searched recursively up from the requiring module''s location'
complete -f -c jest -l moduleFileExtensions -d 'An array of file extensions your modules use'
complete -f -c jest -l -moduleNameMapper -d 'A JSON with a map from regular expressions to module names that allow to stub out resources'
complete -f -c jest -l modulePathIgnorePatterns -d 'Modules to ignore'
complete -f -c jest -l modulePaths -d 'An alternative API to setting the NODE_PATH env variable'
complete -f -c jest -l noStackTrace -d 'Disables stack trace in test results output'
complete -f -c jest -l notify -d 'Activates notifications for test results'
complete -f -c jest -l onlyChanged -s o -d 'Run tests based on the changed files'
complete -c jest -l outputFile -d 'A file where to write test results'
complete -c jest -l preset -d 'A preset that is used as a base for Jest''s configuration'
complete -f -c jest -l projects -d 'A list of projects that use Jest to run all tests'
complete -f -c jest -l reporters -d 'A list of custom reporters for the test suite'
complete -f -c jest -l resetMocks -d 'Automatically reset mock state between every test'
complete -f -c jest -l resetModules -d 'Whatever to reset the module registry for every test'
complete -f -c jest -l resolver -d 'A JSON string which allows the use of a custom resolver'
complete -c jest -l rootDir -d 'The root directory that Jest should scan for tests and modules within'
complete -c jest -l roots -d 'Paths to directories that Jest should use to search for files in'
complete -f -c jest -l runInBand -s i -d 'Run all tests serially in the current process'
complete -c jest -l setupFiles -d 'The paths to modules to configure the testing environment'
complete -c jest -l setupTestFrameworkScriptFile -d 'The path to a module to configure the testing framework'
complete -f -c jest -l showConfig -d 'Print your jest config and then exits'
complete -f -c jest -l silent -d 'Prevent tests from printing messages through the console'
complete -c jest -l snapshotSerializers -d 'Snapshot serializer modules Jest should use for snapshot testing'
complete -f -c jest -l testEnvironment -d 'Alias for --env'
complete -f -c jest -l testMatch -d 'The glob patterns Jest uses to detect test files'
complete -f -c jest -l testNamePattern -s t -d 'Run only tests with a name that matches the regex pattern'
complete -f -c jest -l testPathIgnorePatterns -d 'Paths to skip'
complete -f -c jest -l testPathPattern -d 'Regex for test paths'
complete -f -c jest -l testRegex -d 'The regexp pattern Jest uses to detect test files'
complete -f -c jest -l testResultsProcessor -d 'Allows the use of a custom results processor'
complete -f -c jest -l testRunner -d 'Allows to specify a custom test runner'
complete -f -c jest -l testURL -d 'This option sets the URL for the jsdom environment'
complete -f -c jest -l timers -d 'Setting this value to fake value of timers'
complete -f -c jest -l transform -d 'A JSON string which maps from regular expressions to paths to transformers'
complete -f -c jest -l transformIgnorePatterns -d 'Regexp patterns that are matched against all source file paths before transformation'
complete -f -c jest -l unmockedModulePathPatterns -d 'a regex pattern of module to unmock'
complete -f -c jest -l updateSnapshot -s u -d 'Use this flag to re-record snapshots'
complete -f -c jest -l useStderr -d 'Divert all output to stderr'
complete -f -c jest -l verbose -d 'Display individual test results with the test suite hierarchy'
complete -f -c jest -l version -s v -d 'Print the version and exit'
complete -f -c jest -l watch -d 'Watch files for changes and rerun tests related to changed files'
complete -f -c jest -l watchAll -d 'Watch files for changes and rerun all tests'
complete -f -c jest -l watchman -d 'Whether to use watchman for file crawling'
complete -f -c jest -l no-watchman -d 'Disable using watchman for file crawling'

View File

@@ -0,0 +1,24 @@
complete -c 'kdeconnect-cli' -s l -l list-devices -d "List all devices"
complete -c 'kdeconnect-cli' -s a -l list-available -d "List available (paired and reachable) devices"
complete -c 'kdeconnect-cli' -l id-only -d "Make --list-devices or --list-available print the devices id, to ease scripting"
complete -c 'kdeconnect-cli' -l refresh -d "Search for devices in the network and re-establish connections"
complete -c 'kdeconnect-cli' -l pair -d "Request pairing to a said device"
complete -c 'kdeconnect-cli' -l ring -d "Find the said device by ringing it."
complete -c 'kdeconnect-cli' -l unpair -d "Stop pairing to a said device"
complete -c 'kdeconnect-cli' -l ping -d "Sends a ping to said device"
complete -c 'kdeconnect-cli' -l ping-msg -f -r -d "Same as ping but you can set the message to display" # message
complete -c 'kdeconnect-cli' -l share -r -d "Share a file to a said device" # path
complete -c 'kdeconnect-cli' -l list-notifications -d "Display the notifications on a said device"
complete -c 'kdeconnect-cli' -l lock -d "Lock the specified device"
complete -c 'kdeconnect-cli' -l send-sms -f -r -d "Sends an SMS. Requires destination" # message
complete -c 'kdeconnect-cli' -l destination -f -r -d "Phone number to send the message" # phone number
complete -c 'kdeconnect-cli' -s d -l device -f -r -a '(kdeconnect-cli -l --id-only)' -d "Device ID" # dev
complete -c 'kdeconnect-cli' -s n -l name -f -r -d "Device Name" # name
complete -c 'kdeconnect-cli' -l encryption-info -d "Get encryption info about said device"
complete -c 'kdeconnect-cli' -l list-commands -d "Lists remote commands and their ids"
complete -c 'kdeconnect-cli' -l execute-command -f -r -d "Executes a remote command by id" # id
complete -c 'kdeconnect-cli' -s h -l help -d "Displays this help."
complete -c 'kdeconnect-cli' -s v -l version -d "Displays version information."
complete -c 'kdeconnect-cli' -l author -d "Show author information."
complete -c 'kdeconnect-cli' -l license -d "Show license information."
complete -c 'kdeconnect-cli' -l desktopfile -r -d "The base file name of the desktop entry for this application." # file name

View File

@@ -1,16 +1,16 @@
complete -c ln -s s -l symbolic -d 'Make symbolic links instead of hard links'
complete -c ln -l backup -d 'Make a backup of each existing destination file' -a "none off numbered t existing nil simple never"
complete -c ln -s b -d 'Make a backup of each existing destination file'
complete -c ln -s d -l directory -d 'Allow superuser to attempt to hard link directories'
complete -c ln -s f -l force -d 'Remove existing destination files'
complete -c ln -s i -l interactive -d 'Prompt whether to remove destinations'
complete -c ln -s L -l logical -d 'Dereference TARGETs that are symbolic links'
complete -c ln -s n -l no-dereference -d 'Treat symlink to directory as if it were a file'
complete -c ln -s P -l physical -d 'Make hard links directly to symbolic links'
complete -c ln -s S -l suffix -d 'Override the usual ~ backup suffix'
complete -c ln -s t -l target-directory -d 'Specify the DIRECTORY in which to create the links' -a '(__fish_complete_directories)'
complete -c ln -s T -l no-target-directory -d 'Treat LINK_NAME as a normal file'
complete -c ln -s v -l verbose -d 'Print name of each linked file'
complete -c ln -f -s s -l symbolic -d 'Make symbolic links instead of hard links'
complete -c ln -f -l backup -a "none off numbered t existing nil simple never" -d 'Make a backup of each existing destination file'
complete -c ln -f -s b -d 'Make a backup of each existing destination file'
complete -c ln -f -s d -l directory -d 'Allow superuser to attempt to hard link directories'
complete -c ln -f -s f -l force -d 'Remove existing destination files'
complete -c ln -f -s i -l interactive -d 'Prompt whether to remove destinations'
complete -c ln -f -s L -l logical -d 'Dereference TARGETs that are symbolic links'
complete -c ln -f -s n -l no-dereference -d 'Treat symlink to directory as if it were a file'
complete -c ln -f -s P -l physical -d 'Make hard links directly to symbolic links'
complete -c ln -f -s S -l suffix -d 'Override the usual ~ backup suffix'
complete -c ln -f -s t -l target-directory -a '(__fish_complete_directories)' -d 'Specify the DIRECTORY in which to create the links'
complete -c ln -f -s T -l no-target-directory -d 'Treat LINK_NAME as a normal file'
complete -c ln -f -s v -l verbose -d 'Print name of each linked file'
complete -c ln -f -l help -d 'Display help and exit'
complete -c ln -f -l version -d 'Output version information and exit'
complete -c ln -f -l help -d 'Display help and exit'
complete -c ln -f -l version -d 'Output version information and exit'

View File

@@ -353,7 +353,7 @@ __fish_magento_register_command_option admin:user:create -n "__fish_magento_para
__fish_magento_register_command_option admin:user:create -n "__fish_magento_parameter_missing admin-lastname" -f -a "--admin-lastname" -d "(Required) Admin last name";
__fish_magento_register_command_option admin:user:create -f -r -l admin-user -d "(Required) Admin user";
__fish_magento_register_command_option admin:user:create -f -r -l admin-password -d "(Required) Admin password";
__fish_magento_register_command_option admin:user:create -f -r -l admin-email "-d "(Required) Admin email";
__fish_magento_register_command_option admin:user:create -f -r -l admin-email -d "(Required) Admin email";
__fish_magento_register_command_option admin:user:create -f -r -l admin-firstname -d "(Required) Admin first name";
__fish_magento_register_command_option admin:user:create -f -r -l admin-lastname -d "(Required) Admin last name";
__fish_magento_register_command_option admin:user:create -f -l magento-init-params -d "Add to any command to customize Magento initialization parameters";

View File

@@ -0,0 +1,206 @@
# fish completions for mdadm, as documented under Debian Stretch (mdadm v3.4)
# Known lacks :
# - be more contextual : suggest according to available files, devices, arrays…
# - especially, suggest values for levels, metadata format… according to the already given parameters
# - some descriptions are not very useful, even a bit Captain Obvious-like
# - some options could see their meaning in different contexts explained with different completions with proper tests for context
# - misc and manage modes could be tested for, and the corresponding options proposed only in the right context
#
# -n tests have been simplified when __fish_contains_opt …; or _fish_not_contain_opt …: the options in the first test were removed from the second one,
# as their absence has already been checked, because this absence caused evaluation of __fish_not_contain_opt
function __fish_mdadm_metadata_options
echo -e "0\tUse original 0.90 format superblock"
echo -e "0.90\tUse original 0.90 format superblock"
echo -e "1\tUse last 1.x format superblock"
echo -e "default\tUse last 1.x format superblock"
echo -e "1.0\tUse 1.0 format superblock"
echo -e "1.1\tUse 1.1 format superblock"
echo -e "1.2\tUse 1.2 format superblock"
echo -e "ddf\tUse DDF (Disk Data Format) format"
echo -e "imsm\tUse Intel(R) Matrix Storage Manager format"
end
function __fish_mdadm_level_options
echo -e "linear\tJBOD"
echo -e "raid0\tStripped volume (RAID 0)"
echo -e "0\tStripped volume (RAID 0)"
echo -e "stripe\tStripped volume (RAID 0)"
echo -e "raid1\tMirrored volume (RAID 1)"
echo -e "1\tMirrored volume (RAID 1)"
echo -e "mirror\tMirrored volume (RAID 1)"
echo -e "raid4\tStripped volume with parity disk (RAID 4)"
echo -e "4\tStripped volume with parity disk (RAID 4)"
echo -e "raid5\tStripped volume with distributed parity (RAID 5)"
echo -e "5\tStripped volume with distributed parity (RAID 5)"
echo -e "raid6\tStripped volume with double distributed parity (RAID 5)"
echo -e "6\tStripped volume with double distributed parity (RAID 5)"
echo -e "raid10\tMirrored stripped volume (RAID 10)"
echo -e "10\tMirrored stripped volume (RAID 10)"
echo -e "multipath\tMultiple access device, AKA multipath (deprecated)"
echo -e "mp\tMultiple access device, AKA multipath (deprecated)"
echo -e "faulty\tPseudo RAID layer for single device (akin faulty RAID 1)"
echo -e "container\tContainer" # To be clarified
end
function __fish_mdadm_layout_options # To be clarified
echo -e "left-asymmetric"
echo -e "left-symmetric"
echo -e "right-asymmetric"
echo -e "right-symmetric"
echo -e "la\tAlias of left-asymmetric"
echo -e "ra\tAlias of right-asymmetric"
echo -e "ls\tAlias of left-symmetric"
echo -e "rs\tAlias of right-symmetric"
echo -e "parity-first"
echo -e "parity-last"
echo -e "ddf-zero-restart"
echo -e "ddf-N-restart"
echo -e "ddf-N-continue"
echo -e "left-symmetric-6"
echo -e "right-symmetric-6"
echo -e "left-asymmetric-6"
echo -e "right-asymmetric-6"
echo -e "parity-first-6"
echo -e "write-transient"
echo -e "wt\tAlias of write-transient"
echo -e "read-transient"
echo -e "rt\tAlias of read-transient"
echo -e "write-persistent"
echo -e "wp\tAlias of write-persistent"
echo -e "read-persistent"
echo -e "rp\tAlias of read-persistent"
echo -e "write-all"
echo -e "read-fixable"
echo -e "rf\tAlias of read-fixable"
echo -e "clear"
echo -e "flush"
echo -e "none"
echo -e "n"
echo -e "o"
echo -e "f"
echo -e "normalise"
echo -e "preserve"
end
function __fish_mdadm_level_options
echo -e "yes\tUse standard format (default)"
echo -e "md\tUse a non-partitionable array"
echo -e "mdp\tUse a partitionable array"
echo -e "part\tUse a partitionable array"
echo -e "p\tUse a partitionable array"
end
function __fish_mdadm_update_options
echo -e "sparc2.2\tRemove superblock misalignement from SPARC kernel 2.2"
echo -e "summaries\tCorrect superblock summaries"
echo -e "uuid\tUpdate array UUID"
echo -e "name\tUpdate array name"
echo -e "nodes\tUpdate array nodes"
echo -e "homehost\tUpdate array homehost"
echo -e "home-cluster\tUpdate array cluster name"
echo -e "resync\tMark the array as dirty, thus forcing resync"
echo -e "byteorder\tReverse superblock endianness"
echo -e "devicesize\tRefresh device size"
echo -e "no-bitmap\tAssume bitmap absence"
echo -e "bbl\tReserve space for bad block list"
echo -e "no-bbl\tFree reserved space for bad block list"
echo -e "metadata\tConvert 0.90 metadata to 1.0"
echo -e "super-minor\tReset preferred minor to current one"
end
function __fish_mdadm_action_options
echo -e "idle\tAbort currently running actions"
echo -e "frozen\tAbort currently running actions, prevent their restart"
echo -e "check\tScrub the array (i.e. check constistency)"
echo -e "repair\tCheck, then resync"
end
# In the next 7 lines, the tested option is maintained into the search list to prevent suggesting it if it has already been used, as they cannot be used twice
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s A -l assemble --description "Assemble a pre-existing array"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s B -l build --description "Build a legacy array without superblocks"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s C -l create --description "Create a new array"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s F -l follow -l monitor --description "Select monitor mode"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s G -l grow --description "Change the size or shape of an active array"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s I -l incremental --description "Manage devices in array, and possibly start it"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l auto-detect --description "Start all auto-detected arrays"
complete -c mdadm -s h -l help --description "Display help"
complete -c mdadm -l help-options --description "Display more detailed help"
complete -c mdadm -s V -l version --description "Print version information"
complete -c mdadm -s v -l verbose --description "Be more verbose"
complete -c mdadm -s q -l quiet --description "Be quiet"
complete -c mdadm -s f -l force --description "Force operation"
complete -c mdadm -s c -l config -r --description "Specify config file or directory"
complete -c mdadm -s s -l scan --description "Scan for missing information"
complete -c mdadm -s e -l metadata -a "__fish_mdadm_metadata_options" -x --description "Set metadata style to use"
complete -c mdadm -l homehost -x --description "Provide home host identity"
complete -c mdadm -l prefer -x --description "Give name format preference"
complete -c mdadm -l home-cluster -x --description "Give cluster name"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow; or __fish_not_contain_opt -s A assemble -s F follow monitor -s I incremental auto-detect' -s n -l raid-devices -x --description "Specify the number of active devices"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -s x -l spare-devices -x --description "Specify the number of spare devices"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -s z -l size -x --description "Specify the space to use from each drive"
complete -c mdadm -n '__fish_contains_opt -s G grow' -s Z -l array-size -x --description "Specify the size made available on the array"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -s c -l chunk -x --description "Specify the chunk size"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l rounding -x --description "Specify rounding factor"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -s l -l level -a "__fish_mdadm_level_options" -x --description "Specify RAID level"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -s p -l layout -l parity -a "__fish_mdadm_layout_options" -x --description "Specify data layout"
complete -c mdadm -n '__fish_contains_opt -s A assemble -s B build -s C create -s G grow' -s b -l bitmap -r --description "Specify file for write-intent bitmap"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l bitmap-chunk -x --description "Specify chunksize of bitmap"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow -s a add' -s W -l write-mostly --description "Prefer reading from other devices than these"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l readwrite --description "Enable writes on array or device"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create; or __fish_not_contain_opt -s A assemble -s F follow monitor -s G grow -s I incremental' -s o -l readonly --description "Disable writes on array"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l write-behind -x --description "Enable write-behind mode"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l assume-clean --description "Assume the array is clean"
complete -c mdadm -n '__fish_contains_opt -s A assemble -s G grow' -l backup-file -r --description "Use this file as a backup"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l data-offset -x --description "Specify start of array data"
complete -c mdadm -n '__fish_contains_opt -s G grow' -l continue --description "Resume frozen --grow command"
complete -c mdadm -n '__fish_contains_opt -s A assemble -s B build -s C create' -s N -l name -x --description "Set array name"
complete -c mdadm -n '__fish_contains_opt -s A assemble -s B build -s C create -s I incremental; or __fish_not_contain_opt -s F follow monitor -s G grow' -s R -l run --description "Run array despite warnings"
complete -c mdadm -n '__fish_contains_opt -s A assemble -s B build -s C create' -s a -l auto -l level -a "__fish_mdadm_level_options" -x --description "Give instruction for device file" # May be improved with device numbers management
complete -c mdadm -n '__fish_contains_opt -s A assemble -s G grow' -s a -l add --description "Add devices to array"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l nodes --description "Specify max nodes in the cluster"
complete -c mdadm -n '__fish_contains_opt -s B build -s C create -s G grow' -l write-journal --description "Specify journal device for RAID-4/5/6 array"
complete -c mdadm -n '__fish_contains_opt -s A assemble' -s u -l uuid -x --description "UUID of array to assemble"
complete -c mdadm -n '__fish_contains_opt -s A assemble' -s m -l super-minor -x --description "Minor number of array device"
complete -c mdadm -n '__fish_contains_opt -s A assemble; and __fish_contains_opt -s s scan' -l no-degraded --description "Refuse to start without all drives"
complete -c mdadm -n '__fish_contains_opt -s A assemble' -l invalid-backup --description "Do not ask for backup file, unavailable"
complete -c mdadm -n '__fish_contains_opt -s A assemble' -s U -l update -a "__fish_mdadm_update_options" -x --description "Update superblock properties"
complete -c mdadm -n '__fish_contains_opt -s A assemble' -l freeze-reshape --description "Freeze --grow command"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor; or __fish_not_contain_opt -s A assemble -s B build -s C create -s G grow -s I incremental auto-detect' -s t -l test --description "Test mode" # To be clarified
complete -c mdadm -n '__fish_contains_opt -s G grow; or __fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s I incremental auto-detect' -s a -l add --description "Hot-add listed devices"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l re-add --description "Re-add a previously removed device"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l add-spare --description "Hot-add listed devices as spare"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s r -l remove --description "Remove listed inactive devices"
complete -c mdadm -n '__fish_contains_opt -s I incremental; or __fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow auto-detect' -s f -l fail -l set-faulty --description "Mark listed devices as faulty"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l replace --description "Mark listed devices as requiring replacement"
complete -c mdadm -n '__fish_contains_opt replace' -l with --description "Give devices as replacement"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l cluster-confirm --description "Confirm existence of device"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s Q -l query --description "Examine device for md use"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s D -l detail --description "Print details on array"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l detail-platform --description "Print details on platform capabilities"
complete -c mdadm -n '__fish_contains_opt -s I incremental; or __fish_contains_opt -s D detail; or __fish_contains_opt detail-platform; or __fish_contains_opt -s E examine' -s Y -l export --description "Format data output as key=value pairs"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s E -l examine --description "Print content of device metadata"
complete -c mdadm -n '__fish_contains_opt -s E examine; or __fish_contains_opt -s A assemble' -l sparc2.2 --description "Fix examination for buggy SPARC 2.2 kernel RAID"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s X -l examine-bitmap --description "Print report about bitmap"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l examine-badblocks --description "List recorded bad blocks"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l dump -r --description "Dump metadata to directory"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l restore -r --description "Restore metadata from directory"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s S -l stop --description "Deactivate array"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l zero-superblock --description "Erase possible superblock"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l kill-subarray -r --description "Delete subarray"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l update-subarray -r --description "Update subarray" # To be clarified
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -s W -l wait --description "Wait for pending operations"
complete -c mdadm -l wait-clean --description "Mark array as clean ASAP"
complete -c mdadm -n '__fish_not_contain_opt -s A assemble -s B build -s C create -s F follow monitor -s G grow -s I incremental auto-detect' -l action -a "__fish_mdadm_action_options" -x --description "Set sync action for md devices"
complete -c mdadm -n '__fish_contains_opt -s I incremental' -s r -l rebuild-map --description "Rebuild /run/mdadm/map"
complete -c mdadm -n '__fish_contains_opt -s I incremental; and __fish_contains_opt -s f fail set-faulty' -l path -r --description "Automatically add eventually appearing device to array"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s m -l mail -x --description "Mail address to send alerts to"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s p -l program -l alert -x --description "Program to run in case of an event"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s y -l syslog --description "Record events in syslog"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s d -l delay -x --description "Polling interval"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s r -l increment -x --description "Generate RebuildNN events each given percentage"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s f -l daemonise --description "Run monitor mode as a daemon"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor; and __fish_contains_opt -s 1 oneshot' -s i -l pid-file -r --description "Write PID file when running as a daemon"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -s 1 -l oneshot --description "Check arrays only once"
complete -c mdadm -n '__fish_contains_opt -s F follow monitor' -l no-sharing --description "Do not move spares between arrays"
complete -c mdadm -n '__fish_contains_opt -s D detail; or __fish_contains_opt -s E examine' -s b -l brief --description "Be more concise"

View File

@@ -6,10 +6,10 @@
#
# the four main options, each with a short & long flag
complete -x -c node -s v -n '__fish_not_contain_opt -s p -s i -s e --eval --print --interactive' -l version --description "Print node's version"
complete -c node -n '__fish_not_contain_opt -s v -s p -s i --version --print --interactive' -r -s e -l eval --description 'Evaluate script'
complete -c node -n '__fish_not_contain_opt -s v -s e -s i --version --eval --interactive' -r -s p -l print --description 'Print result of --eval'
complete -c node -n '__fish_not_contain_opt -s v -s p -s e --version --print --eval' -s i -l interactive --description 'Always enter the REPL even if stdin does not appear to be a terminal'
complete -x -c node -s v -n '__fish_not_contain_opt -s p -s i -s e eval print interactive' -l version --description "Print node's version"
complete -c node -n '__fish_not_contain_opt -s v -s p -s i version print interactive' -r -s e -l eval --description 'Evaluate script'
complete -c node -n '__fish_not_contain_opt -s v -s e -s i version eval interactive' -r -s p -l print --description 'Print result of --eval'
complete -c node -n '__fish_not_contain_opt -s v -s p -s e version print eval' -s i -l interactive --description 'Always enter the REPL even if stdin does not appear to be a terminal'
# longer options related to V8, ES5, logging, etc.
complete -c node -l no-deprecation --description 'Silence deprecation warnings'

View File

@@ -64,21 +64,28 @@ function __fish_complete_npm --description "Complete the commandline using npm's
end
# use npm completion for most of the things,
# except options completion because it sucks at it.
# except options completion (because it sucks at it)
# and run-script completion (reading package.json is faster).
# see: https://github.com/npm/npm/issues/9524
# and: https://github.com/fish-shell/fish-shell/pull/2366
complete -f -c npm -n 'not __fish_npm_needs_option' -a "(__fish_complete_npm)"
complete -f -c npm -n 'not __fish_npm_needs_option; and not __fish_npm_using_command run; and not __fish_npm_using_command run-script' -a "(__fish_complete_npm)"
# list available npm scripts and their parial content
function __fish_parse_npm_run_completions
while read -l name
set -l trim 20
read -l value
set value (string sub -l $trim -- $value)
printf "%s\t%s\n" $name $value
end
end
function __fish_npm_run
# Like above, only try to call npm if there's a command by that name to facilitate aliases that call nvm.
if command -sq npm
command npm run | string match -r -v '^[^ ]|^$' | string trim | while read -l name
set -l trim 20
read -l value
echo "$value" | cut -c1-$trim | read -l value
printf "%s\t%s\n" $name $value
end
if command -sq jq; and test -e package.json
jq -r '.scripts | to_entries[] | .key,.value' <package.json | __fish_parse_npm_run_completions
else if command -sq npm
command npm run | string match -r -v '^[^ ]|^$' | string trim | __fish_parse_npm_run_completions
end
end

View File

@@ -88,8 +88,8 @@ complete -c $progname -n $query -s e -l explicit -d 'List only explicitly instal
complete -c $progname -n $query -s k -l check -d 'Check if all files owned by PACKAGE are present' -f
complete -c $progname -n $query -s l -l list -d 'List all files owned by PACKAGE' -f
complete -c $progname -n $query -s m -l foreign -d 'List all packages not in the database' -f
complete -c $progname -n $query -s o -l owns -r -d 'Search for the package that owns FILE' -xa '' -f
complete -c $progname -n $query -s p -l file -d 'Apply the query to a package file, not package' -xa '' -f
complete -c $progname -n $query -s o -l owns -r -d 'Search for the package that owns FILE'
complete -c $progname -n $query -s p -l file -d 'Apply the query to a package file, not package'
complete -c $progname -n $query -s t -l unrequired -d 'List only unrequired packages' -f
complete -c $progname -n $query -s u -l upgrades -d 'List only out-of-date packages' -f
complete -c $progname -n "$query" -d 'Installed package' -xa $listinstalled -f

View File

@@ -0,0 +1,43 @@
# Completions for passwd
function __fish_passwd_darwin_infosystem
echo -e "PAM\tPluggable Authentication Module"
echo -e "opendirectory\tOpen Directory-compatible system"
echo -e "file\tLocal flat-file"
echo -e "nis\tRemote NIS server"
end
if passwd --help >/dev/null ^&1
complete -c passwd -n '__fish_contains_opt -s S status' -s a -l all -f --description "Display password state for all users"
complete -c passwd -s d -l delete -f --description "Delete user password"
complete -c passwd -s e -l expire -f --description "Immediately obsolete user password"
complete -c passwd -s h -l help -f --description "Display help and exit"
complete -c passwd -s i -l inactive -x --description "Schedule account inactivation after password expiration"
complete -c passwd -s k -l keep-tokens -f --description "Wait tokens expiration before changing password"
complete -c passwd -s l -l lock -f --description "Lock password"
complete -c passwd -s n -l mindays -x --description "Define minimum delay between password changes"
complete -c passwd -s q -l quiet -f --description "Be quiet"
complete -c passwd -s r -l repository -r --description "Update given repository"
complete -c passwd -s R -l root -r --description "Use given directory as working directory"
complete -c passwd -s S -l status -f --description "Display account status"
complete -c passwd -s u -l unlock -f --description "Unlock password"
complete -c passwd -s w -l warndays -x --description "Define warning period before mandatory password change"
complete -c passwd -s w -l warndays -x --description "Define maximum period of password validity"
complete -c passwd -n '__fish_not_contain_opt -s A all' -f -a '(__fish_complete_users)' --description "Account to be altered"
else # Not Linux, so let's see what it is, with the ugly uname
set os_type (uname)
switch $os_type
case Darwin # macOS family
complete -c passwd -f -a '(__fish_complete_users)' --description "Account to be altered"
complete -c passwd -x -s i -a '(__fish_passwd_darwin_infosystem)' --description "Directory system to apply the update to"
complete -c passwd -x -s l --description "Location to be updated on chosen directory system"
complete -c passwd -x -s u --description "User name to use on chosen directory system"
case FreeBSD
complete -c passwd -f -s l --description "Update locally, not in Kerberos"
complete -c passwd -f -a '(__fish_complete_users)' --description "Account to be altered"
end
# This is common to Darwin, FreeBSD and OpenBSD, and is even the only possible completion under OpenBSD
# This is separated from Linux completions, because the Linux one is useless with -A / --all,
# whereas -A / --all does not exist under *BSD
complete -c passwd -f -a '(__fish_complete_users)' --description "Account to be altered"
end

View File

@@ -0,0 +1,4 @@
if command -sq pip
pip completion --fish | source
end

View File

@@ -0,0 +1,7 @@
if command -sq pip2
# pip[2|3] emits (or emitted) completions with the wrong command name
# See discussion at https://github.com/fish-shell/fish-shell/pull/4448
# and pip bug at https://github.com/pypa/pip/pull/4755
# Keep this even after pip fix is upstreamed for users not on the latest pip
pip2 completion --fish | string replace -r -- " -c\s+pip\b" " -c pip2" | source
end

View File

@@ -0,0 +1,7 @@
if command -sq pip3
# pip[2|3] emits (or emitted) completions with the wrong command name
# See discussion at https://github.com/fish-shell/fish-shell/pull/4448
# and pip bug at https://github.com/pypa/pip/pull/4755
# Keep this even after pip fix is upstreamed for users not on the latest pip
pip3 completion --fish | string replace -r -- " -c\s+pip\b" " -c pip3" | source
end

View File

@@ -0,0 +1,3 @@
if command -sq pipenv
pipenv --completion | source
end

View File

@@ -0,0 +1,163 @@
# s3cmd
function __s3cmd_is_remote_path
commandline -pct | string match -q -r -- "^s3://.*"
end
function __s3cmd_is_valid_remote_path
commandline -pct | string match -q -r -- "^s3://.*?/.*"
end
# Completions to allow for autocomplete of remote paths
complete -c s3cmd -f -n "__s3cmd_is_valid_remote_path" -a "(s3cmd ls (commandline -ct) 2>/dev/null | string match -r -- 's3://.*')"
complete -c s3cmd -f -n "__s3cmd_is_remote_path"
# Supress file completions for initial command
complete -c s3cmd -n "__fish_is_first_token" -f
# Available commands
complete -c s3cmd -n "__fish_is_first_token" -a 'mb' --description 'Make bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'rb' --description 'Remove bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'ls' --description 'List objects or buckets'
complete -c s3cmd -n "__fish_is_first_token" -a 'la' --description 'List all object in all buckets'
complete -c s3cmd -n "__fish_is_first_token" -a 'put' --description 'Put file into bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'get' --description 'Get file from bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'del' --description 'Delete file from bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'rm' --description 'Delete file from bucket (alias for del)'
complete -c s3cmd -n "__fish_is_first_token" -a 'restore' --description 'Restore file from Glacier storage'
complete -c s3cmd -n "__fish_is_first_token" -a 'sync' --description 'Synchronize a directory tree to S3'
complete -c s3cmd -n "__fish_is_first_token" -a 'du' --description 'Disk usage by buckets'
complete -c s3cmd -n "__fish_is_first_token" -a 'info' --description 'Get various information about Buckets or Files'
complete -c s3cmd -n "__fish_is_first_token" -a 'cp' --description 'Copy object'
complete -c s3cmd -n "__fish_is_first_token" -a 'modify' --description 'Modify object metadata'
complete -c s3cmd -n "__fish_is_first_token" -a 'mv' --description 'Move object'
complete -c s3cmd -n "__fish_is_first_token" -a 'setacl' --description 'Modify Access control list for Bucket or Files'
complete -c s3cmd -n "__fish_is_first_token" -a 'setpolicy' --description 'Modify Bucket Policy'
complete -c s3cmd -n "__fish_is_first_token" -a 'delpolicy' --description 'Delete Bucket Policy'
complete -c s3cmd -n "__fish_is_first_token" -a 'setcors' --description 'Modify Bucket CORS'
complete -c s3cmd -n "__fish_is_first_token" -a 'delcors' --description 'Delete Bucket CORS'
complete -c s3cmd -n "__fish_is_first_token" -a 'payer' --description 'Modify Bucket Requester Pays policy'
complete -c s3cmd -n "__fish_is_first_token" -a 'multipart' --description 'Show multipart uploads'
complete -c s3cmd -n "__fish_is_first_token" -a 'abortmp' --description 'Abort a multipart upload'
complete -c s3cmd -n "__fish_is_first_token" -a 'listmp' --description 'List parts of a multipart upload'
complete -c s3cmd -n "__fish_is_first_token" -a 'accesslog' --description 'Enable/disable bucket access logging'
complete -c s3cmd -n "__fish_is_first_token" -a 'sign' --description 'Sign arbitrary string using the secret key'
complete -c s3cmd -n "__fish_is_first_token" -a 'signurl' --description 'Sign an S3 URL to provide limited public access with expiry'
complete -c s3cmd -n "__fish_is_first_token" -a 'fixbucket' --description 'Fix invalid file names in a bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'ws-create' --description 'Create Website from bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'ws-delete' --description 'Delete Website'
complete -c s3cmd -n "__fish_is_first_token" -a 'ws-info' --description 'Info about Website'
complete -c s3cmd -n "__fish_is_first_token" -a 'expire' --description 'Set or delete expiration rule for the bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'setlifecycle' --description 'Upload a lifecycle policy for the bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'dellifecycle' --description 'Remove a lifecycle policy for the bucket'
complete -c s3cmd -n "__fish_is_first_token" -a 'cflist' --description 'List CloudFront distribution points'
complete -c s3cmd -n "__fish_is_first_token" -a 'cfinfo' --description 'Display CloudFront distribution point parameters'
complete -c s3cmd -n "__fish_is_first_token" -a 'cfcreate' --description 'Create CloudFront distribution point'
complete -c s3cmd -n "__fish_is_first_token" -a 'cfdelete' --description 'Delete CloudFront distribution point'
complete -c s3cmd -n "__fish_is_first_token" -a 'cfmodify' --description 'Change CloudFront distribution point parameters'
complete -c s3cmd -n "__fish_is_first_token" -a 'cfinvalinfo' --description 'Display CloudFront invalidation request(s) status'
# Created against s3cmd version 2.0
complete -c s3cmd -s h -l help --description 'Show help and exit'
complete -c s3cmd -l configure --description 'Run interactive (re)configuration tool'
complete -c s3cmd -s c -l config --description 'Config file (default: $HOME/.s3cfg)'
complete -c s3cmd -l dump-config --description 'Dump current configuration'
complete -c s3cmd -l access_key --description 'AWS Access Key'
complete -c s3cmd -l secret_key --description 'AWS Secret Key'
complete -c s3cmd -l access_token --description 'AWS Access Token'
complete -c s3cmd -s n -l dry-run --description 'Dry run, test only'
complete -c s3cmd -s s -l ssl --description 'Use HTTPS (default)'
complete -c s3cmd -l no-ssl --description 'Don\'t use HTTPS'
complete -c s3cmd -s e -l encrypt --description 'Encrypt files before uploading'
complete -c s3cmd -l no-encrypt --description 'Don\'t encrypt files'
complete -c s3cmd -s f -l force --description 'Force overwrite'
complete -c s3cmd -l continue --description 'Resume partially downloaded file' -n "__fish_seen_subcommand_from get"
complete -c s3cmd -l continue-put --description 'Resume partially uploaded files'
complete -c s3cmd -l upload-id --description 'Resume multipart upload by UploadId'
complete -c s3cmd -l skip-existing --description 'Skip existing files at destination' -n "__fish_seen_subcommand_from get sync"
complete -c s3cmd -s r -l recursive --description 'Upload/download/delete recursively'
complete -c s3cmd -l check-md5 --description 'Check MD5 sums (default)' -n "__fish_seen_subcommand_from sync"
complete -c s3cmd -l no-check-md5 --description 'Skip MD5 sum check' -n "__fish_seen_subcommand_from sync"
complete -c s3cmd -s P -l acl-public --description 'Store with ACL read for all'
complete -c s3cmd -l acl-private --description 'Store with private ACL'
complete -c s3cmd -l acl-grant --description 'Grant permission to named user'
complete -c s3cmd -l acl-revoke --description 'Revoke permission to named user'
complete -c s3cmd -s D -l restore-days --description 'Days to keep restored file'
complete -c s3cmd -l restore-priority --description 'S3 glacier restore priority'
complete -c s3cmd -l delete-removed --description 'Delete objects not found locally' -n "__fish_seen_subcommand_from sync"
complete -c s3cmd -l no-delete-removed --description 'Don\'t delete dest objects'
complete -c s3cmd -l delete-after --description 'Delete after upload' -n "__fish_seen_subcommand_from sync"
complete -c s3cmd -l max-delete --description 'Delete no more than NUM files' -n "__fish_seen_subcommand_from del sync"
complete -c s3cmd -l limit --description 'Max objects per response' -n "__fish_seen_subcommand_from ls la"
complete -c s3cmd -l add-destination --description 'Additional parallel upload'
complete -c s3cmd -l delete-after-fetch --description 'Delete remotely after fetch' -n "__fish_seen_subcommand_from get sync"
complete -c s3cmd -s p -l preserve --description 'Preserve FS attributes'
complete -c s3cmd -l no-preserve --description 'Don\'t store FS attributes'
complete -c s3cmd -l exclude --description 'Exclude GLOB matches'
complete -c s3cmd -l exclude-from --description '--exclude GLOBs from FILE'
complete -c s3cmd -l rexclude --description 'Exclude REGEXP matches'
complete -c s3cmd -l rexclude-from --description 'Read --rexclude REGEXPs from FILE'
complete -c s3cmd -l include --description 'Include GLOB matches even if previously excluded'
complete -c s3cmd -l include-from --description 'Read --include GLOBs from FILE'
complete -c s3cmd -l rinclude --description 'Include REGEXP matches even if preiously excluded'
complete -c s3cmd -l rinclude-from --description 'Read --rinclude REGEXPs from FILE'
complete -c s3cmd -l files-from --description 'Read source-file names from FILE'
complete -c s3cmd -l region -l bucket-location --description 'Create bucket in region'
complete -c s3cmd -l host --description 'S3 endpoint (default: s3.amazonaws.com)'
complete -c s3cmd -l host-bucket --description 'DNS-style bucket+hostname:port template for bucket'
complete -c s3cmd -l reduced-redundancy -l rr --description 'Store with reduced redundancy' -n "__fish_seen_subcommand_from put cp mv"
complete -c s3cmd -l no-reduced-redundancy -l no-rr --description 'Store without reduced redundancy' -n "__fish_seen_subcommand_from put cp mv"
complete -c s3cmd -l storage-class --description 'Store with STANDARD, STANDARD_IA, or REDUCED_REDUNDANCY'
complete -c s3cmd -l access-logging-target-prefix --description 'Prefix for access logs' -n "__fish_seen_subcommand_from cfmodify accesslog"
complete -c s3cmd -l no-access-logging --description 'Disable access logging' -n "__fish_seen_subcommand_from cfmodify accesslog"
complete -c s3cmd -l default-mime-type --description 'Default MIME-type for objects'
complete -c s3cmd -s M -l guess-mime-type --description 'Guess MIME-type'
complete -c s3cmd -l no-guess-mime-type --description 'Don\'t guess MIME-type, use default'
complete -c s3cmd -l no-mime-magic --description 'Don\'t use mime magic when guessing'
complete -c s3cmd -s m -l mime-type --description 'Force MIME-type'
complete -c s3cmd -l add-header --description 'Add HTTP header'
complete -c s3cmd -l remove-header --description 'Remove HTTP header'
complete -c s3cmd -l server-side-encryption --description 'Use server-side encryption for upload'
complete -c s3cmd -l server-side-encryption-kms-id --description 'Encrypt with specified AWS KMS-managed key'
complete -c s3cmd -l encoding --description 'Use specified encoding'
complete -c s3cmd -l add-encoding-exts --description 'Add encoding to CSV extension list'
complete -c s3cmd -l verbatim --description 'Use S3 name as-is'
complete -c s3cmd -l disable-multipart --description 'No multipart on files larger than --multipart-chunk-size-mb'
complete -c s3cmd -l multipart-chunk-size-mb --description 'Multipart upload chunk size'
complete -c s3cmd -l list-md5 --description 'Include MD5 sums in bucket listings' -n "__fish_seen_subcommand_from ls"
complete -c s3cmd -s H -l human-readable-sizes --description 'Print sizes in human-readable form'
complete -c s3cmd -l ws-index --description 'Name of index-document' -n "__fish_seen_subcommand_from ws-create"
complete -c s3cmd -l ws-error --description 'Name of error-document' -n "__fish_seen_subcommand_from ws-create"
complete -c s3cmd -l expiry-date --description 'When expiration rule takes effect' -n "__fish_seen_subcommand_from expire"
complete -c s3cmd -l expiry-days --description 'Days to expire' -n "__fish_seen_subcommand_from expire"
complete -c s3cmd -l expiry-prefix --description 'Apply expiry to objects matching prefix' -n "__fish_seen_subcommand_from expire"
complete -c s3cmd -l progress --description 'Show progress (default on TTY)'
complete -c s3cmd -l no-progress --description 'Don\'t show progress meter (default if non-TTY)'
complete -c s3cmd -l stats --description 'Show file transfer stats'
complete -c s3cmd -l enable --description 'Enable CloudFront distribution' -n "__fish_seen_subcommand_from cfmodify"
complete -c s3cmd -l disable --description 'Disable CloudFront distribution' -n "__fish_seen_subcommand_from cfmodify"
complete -c s3cmd -l cf-invalidate --description 'Invalidate CloudFront file' -n "__fish_seen_subcommand_from cfmodify"
complete -c s3cmd -l cf-invalidate-default-index --description 'Invalidate default index' -n "__fish_seen_subcommand_from cfmodify"
complete -c s3cmd -l cf-no-invalidate-default-index-root --description 'Don\'t invalidate default index' -n "__fish_seen_subcommand_from cfmodify"
complete -c s3cmd -l cf-add-cname --description 'Add CNAME to CloudFront distribution' -n "__fish_seen_subcommand_from cfcreate cfmodify"
complete -c s3cmd -l cf-remove-cname --description 'Remove CNAME from CloudFront distribution' -n "__fish_seen_subcommand_from cfmodify"
complete -c s3cmd -l cf-comment --description 'Set COMMENT for CloudFront distribution' -n "__fish_seen_subcommand_from cfcreate cfmodify"
complete -c s3cmd -l cf-default-root-object --description 'Set default root object' -n "__fish_seen_subcommand_from cfcreate cfmodify"
complete -c s3cmd -s v -l verbose --description 'Verbose output'
complete -c s3cmd -s d -l debug --description 'Debug output'
complete -c s3cmd -l version --description 'Show version'
complete -c s3cmd -s F -l follow-symlinks --description 'Follow symlinks'
complete -c s3cmd -l cache-file --description 'Cache FILE containing MD5 values'
complete -c s3cmd -s q -l quiet --description 'Silence stdout output'
complete -c s3cmd -l ca-certs --description 'Path to SSL CA certificate FILE'
complete -c s3cmd -l check-certificate --description 'Validate SSL certificate'
complete -c s3cmd -l no-check-certificate --description 'Don\'t validate SSL certificate'
complete -c s3cmd -l check-hostname --description 'Validate SSL hostname'
complete -c s3cmd -l no-check-hostname --description 'Don\'t validate SSL hostname'
complete -c s3cmd -l signature-v2 --description 'Use AWS Signature version 2'
complete -c s3cmd -l limit-rate --description 'Limit upload or download speed (bytes/sec)'
complete -c s3cmd -l requester-pays --description 'Set REQUESTER PAYS for operations'
complete -c s3cmd -s l -l long-listing --description 'Produce long listing' -n "__fish_seen_subcommand_from ls"
complete -c s3cmd -l stop-on-error --description 'Stop on error in transfer'
complete -c s3cmd -l content-disposition --description 'Provide Content-Disposition for signed URLs'
complete -c s3cmd -l content-type --description 'Provide Content-Type for signed URLs'

View File

@@ -0,0 +1,74 @@
############
# COMMANDS #
############
# 1. In general it's not recommended to run commands one by one, because sbt startup is quite slow
# 2. Only commands without arguments are completed, because any commands with args have to be quoted: `sbt "show key"`
# 3. Only those commands are completed that could be useful to run as one off, like `sbt new ...`, the rest should be run in an interactive sbt shell
# 4. Tasks is somewhat dynamic and depends on the project definition, so only most common are offered
# 5. Same about settings (none are offered)
# These commands can be combined in any order
complete -c sbt -f -a '(string split "\n" "
about Display basic information about sbt and the build
clean Delete files produced by the build
compile Compile sources
console Scala REPL: project classes
consoleQuick Scala REPL: only project dependencies
doc Generate API documentation
help Display help message
package Produce the main artifact
plugins List currently available plugins
projects List the names of available projects
publish Publish artifacts to a repository
publishLocal Publish artifacts to the local Ivy repository
publishM2 Publish artifacts to the local Maven repository
run Run a main class
settings List the settings defined for the current project
shell Launch an interactive sbt prompt
tasks List the tasks defined for the current project
test Execute all tests
" | string trim | string replace -r "\s+" "\t")' \
-n 'not contains -- "new" (commandline -cpo);
and not contains -- "client" (commandline -cpo)'
# These cannot be combined with any other commands and require an argument
complete -c sbt -f -n '[ (count (commandline -cpo)) = 1 ]' -a 'new' -d 'Create a new sbt project from the given template'
complete -c sbt -f -n '[ (count (commandline -cpo)) = 1 ]' -a 'client' -d 'Connect to a server with an interactive sbt prompt'
###########
# OPTIONS #
###########
# This is based on the output of `sbt -help`:
# general options without arguments
complete -c sbt -o help -s h -f -d "Print options help message"
complete -c sbt -o verbose -s v -f -d "Print more details"
complete -c sbt -o debug -s d -f -d "Set log level to debug"
complete -c sbt -o no-colors -f -d "Disable ANSI color codes"
complete -c sbt -o sbt-create -f -d "Launch even if there's no sbt project"
complete -c sbt -o no-share -f -d "Use all local caches"
complete -c sbt -o no-global -f -d "Use global caches, but not global ~/.sbt directory"
complete -c sbt -o batch -f -d "Disable interactive mode"
# general options with arguments
complete -c sbt -o sbt-dir -d "Specify path to global settings/plugins" -r # path
complete -c sbt -o sbt-boot -d "Specify path to shared boot directory" -r # path
complete -c sbt -o ivy -d "Specify path to local Ivy repository" -r # path
complete -c sbt -o mem -d "Set memory options" -x # integer? (default: -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m)
complete -c sbt -o port -d "Turn on JVM debugging, open at the given port" -r # port
# sbt version
complete -c sbt -o sbt-version -d "Use specified version of sbt" -x -a '0.13.(seq 0 6)\t"" 1.0.0\t""'
complete -c sbt -o sbt-jar -d "Use specified jar as the sbt launcher" -r # jar path
complete -c sbt -o sbt-rc -d "Use an RC version of sbt" -f
complete -c sbt -o sbt-snapshot -d "Use a snapshot version of sbt" -f
# java-related
complete -c sbt -o java-home -d "Alternate JAVA_HOME" -r # path
complete -c sbt -o D -d "Pass -D option directly to the Java runtime" -x # -Dkey=val
complete -c sbt -o J-X -d "Pass -X option directly to the Java runtime" -x # -X*
complete -c sbt -o S-X -d "Pass -X option to sbt's scalacOptions" -x # -X*
# TODO: list available -X options if it's possible to do in an automatic way

Some files were not shown because too many files have changed in this diff Show More