Compare commits

...

831 Commits

Author SHA1 Message Date
David Adam
b680db8ce6 Bump version for 2.7.1 2017-12-23 00:16:29 +08:00
David Adam
cd5c40ed9c CHANGELOG: update for 2.7.1 2017-12-23 00:16:24 +08:00
David Adam
fd10c29211 Disable __update_cwd_osx for iTerm.app
Fixes #4521.

(cherry picked from commit 5faa425df1)
2017-12-22 22:10:36 +08:00
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
David Adam
b0389cb77d Bump version for 2.6.0 2017-06-03 20:45:13 +08:00
David Adam
eb01106751 CHANGELOG: updates for 2.6.0 2017-06-03 18:21:34 +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
80d9c3ec8b document that set -n output is sorted
(cherry picked from commit c263c59346)
2017-06-03 12:16:26 +08:00
Kevin Ballard
4a724ce40e Fix usage of osascript in help
Work around a macOS osascript bug in 10.12.5 which prevented help from
working. See #4035.

(cherry picked from commit 3061eed647)
2017-06-03 12:16:25 +08: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
1c06067d0d 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

(cherry picked from commit eff2a3c3a3)
2017-05-27 16:31:06 -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
Kurtis Rader
8ed63d63a4 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

(cherry picked from commit 6f6d3ce520)
2017-05-27 23:00:33 +08:00
Kurtis Rader
06ea31d0ab improve bash history importing
Reject more invalid commands from the bash history file.

Fixes #3636

(cherry picked from commit 6c4a51d56e)
2017-05-27 23:00:33 +08:00
Fabian Homborg
603c865129 Makefile.in: Fix "fish.config" typo
See #4073.
2017-05-27 11:05:29 +02:00
Fabian Homborg
44830589ab type: Fix "-a"
This matched _all_ executable commands, where it should only match all
executable commands _with the given name_.

Fixes #4070.

(cherry picked from commit 0fc9ec5538)
2017-05-26 18:04:18 -07: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
ee572a13c8 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

(cherry picked from commit 8f78e71b6d)
2017-05-25 21:00:07 -07: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
8d4d47b548 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.

(cherry picked from commit 9bc1b44b0d)
2017-05-25 22:37:31 +08:00
Kevin Ballard
80afc31ff8 Turn off bracketed paste when Fish exits
(cherry picked from commit 4ff002b9fb)
2017-05-25 22:37:31 +08:00
Kurtis Rader
0bf4d398ab fix killall completions
This fixes the obvious error in handling the `-u` short flag.
See issue #4052.

(cherry picked from commit a71bb03f23)
2017-05-25 22:37:31 +08: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
4b53cd583d 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`.

(cherry picked from commit 0ee24b9bce)
2017-05-22 21:27:25 +08:00
Fabian Homborg
fdea1abf70 docs: Improve faq-exit-status
Add examples, a mention of `if command` and link to test/if.

See #2773.

(cherry picked from commit 64d33fac5d)
2017-05-22 21:27:25 +08: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
3cca94b268 help: Properly error out when no browser is found
See #4045.

(cherry picked from commit 036b708d99)
2017-05-19 16:46:51 +08:00
Mo
291d88a72f 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

(cherry picked from commit 71f5fe1ece)
2017-05-19 16:46:51 +08: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
40679560a6 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

(cherry picked from commit a5a9ca7d3b)
2017-05-17 22:37:55 -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
c9c802d3fc Update __fish_print_hostnames.fish
For Ubuntu the default global known host files are :
/etc/ssh/ssh_known_hosts
/etc/ssh/ssh_known_hosts2
(cherry picked from commit cbd9181b7e)
2017-05-17 23:27:34 +08: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
David Adam
ec1f00e59b CHANGELOG: updates for 2.6.0 2017-05-16 13:07:55 +08:00
Alan Somers
a5d3ac8444 Fix syntax error in gphoto2 completions 2017-05-15 21:57:33 -07:00
Alan Somers
3aa42389ef Fix syntax error in gphoto2 completions 2017-05-15 21:53:56 -07:00
ridiculousfish
4050166738 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.

(cherry picked from commit 523dc6da6d)
2017-05-16 10:09:19 +08: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
David Adam
426653a9d7 Bump version for 2.6b1 2017-05-14 10:37:03 +08:00
David Adam
910f78dd74 osx/config.h: update to match current configure output on 10.11 2017-05-14 10:25:53 +08:00
David Adam
611cf852aa CHANGELOG: correct 2.6b1 entry 2017-05-14 10:03:27 +08:00
David Adam
c179e447a6 CHANGELOG: updates for 2.6b1 2017-05-13 22:43:06 +08:00
Jonas Damtoft
573c539956 Gradle-completions for gradle tasks (#3972)
* Implement https://github.com/hanny24/gradle-fish/blob/master/gradle.load

* Use XDG_CACHE_HOME

* Use __funced_md5

* Fix fish_md5.fish

* Actually use the new function.

* Use string match for matching tasks

* I goofed. Actually pass a string to complete -a

* Fix attempt to remove needed function...

* Fix regex

* Fix fish_md5.fish to use a flag
2017-05-13 13:28:32 +02:00
Kurtis Rader
9e64571de0 deal with lint in fish_key_reader.cpp 2017-05-11 21:56:04 -07:00
Kurtis Rader
63bb2da4d8 make some compilers happy
Commit f10e4f8 causes some old compilers to complain about implicit
return from non-void function. A false positive error but make the
compiler happy so it stops complaining.
2017-05-11 14:27:40 -07:00
Fabian Homborg
573e1ad4b1 type: Remove TODO
[Ci skip]
2017-05-11 15:24:47 +02:00
Kurtis Rader
c114cbc9af lint: deal with getpwent() warnings
This suppresses lint warnings about using `getpwent()` because there is
only one context where fish uses it. Thus the fact it may not be thread
safe is not relevant to fish. This also improves that call site in
`completer_t::try_complete_user()` method by short-circuiting the loop
when a match is found.
2017-05-10 22:07:01 -07:00
Kurtis Rader
f10e4f88b6 lint: replace getpwuid() with getpwuid_r() 2017-05-10 21:08:36 -07:00
Kurtis Rader
a92a7cbb9c lint: replace getpwname() with getpwnam_r() 2017-05-09 22:23:32 -07:00
Kurtis Rader
9b78857894 lint: replace ttyname() with ttyname_r() 2017-05-09 21:46:18 -07:00
Kurtis Rader
edf745232f lint: replace ctermid() with ctermid_r() 2017-05-09 21:39:25 -07:00
Kurtis Rader
5659898331 remove pointless flock() lint warning
The lint warning about possible problems using `flock()` to lock files
that I added isn't helpful and is just noise in the `make lint-all`
output. What we should do is is change to code to obviate the need for
file locking. But that's a big change for another day.
2017-05-09 21:03:00 -07:00
Kurtis Rader
f00084f28b lint: replace readdir() with readdir_r() 2017-05-09 21:02:05 -07:00
Kurtis Rader
3a0bb6b19a fix lint warning due to silly naming inconsitency 2017-05-09 21:01:27 -07:00
Clément Martinez
f0a00ab2f2 Add mkdosfs completions 2017-05-08 19:16:06 +02:00
Sebastian Keller
6620b9ec72 Add gsettings completions 2017-05-08 19:14:47 +02:00
Kurtis Rader
e84200b847 remove incorrect statement from string docs
Another change related to issue #3985. I forgot to includes this in my
previous two changes related to to consistently returning status 121
when any command, not just `string`, is handed invalid args.
2017-05-07 21:26:45 -07:00
Kurtis Rader
e6e1805c5f another step in fixing issue #3985
This changes all of the builtins to behave like `string` to return
STATUS_INVALID_ARGS (121) if the args passed to the command don't make
sense. Also change several of the builtins to use the existing symbols
(e.g., STATUS_CMD_OK and STATUS_CMD_ERROR) rather than hardcoded "0"
and "1" for consistency and to make it easier to find such values in
the future.

Fixes #3985
2017-05-07 21:20:31 -07:00
Kurtis Rader
be2b6bfdc9 fix lint errors that have crept in 2017-05-06 22:08:07 -07:00
Fabian Homborg
8814f34dc1 Improve killall completions
- Remove UID resolution, since that can be slow.
- Remove a `uname` call by storing the result
- Stringify
- Indent

Fixes #3996.
2017-05-04 23:58:45 +02:00
Adriaan Zonnenberg
09ce297352 Add completions for caddy 2017-05-04 15:09:29 +02:00
Kurtis Rader
4c38867768 another step in fixing issue #3985
This primarily replaces "STATUS_BUILTIN_OK" with "STATUS_CMD_OK" and
"STATUS_BUILTIN_ERROR" with "STATUS_CMD_ERROR". That is because we want
to make it clear these status codes are applicable to fish functions as
well as builtins. Future changes will make it easier to use these
symbols and values in functions.
2017-05-04 00:18:02 -07:00
Kurtis Rader
23978aee81 codify string retval for invalid arguments
This is the first, tiny, step in addressing issue #3985.
2017-05-03 22:18:36 -07:00
Kurtis Rader
fddd5fd045 fix how SIGHUP is handled when ignored
Working on a related problem caused me to notice that if a fish script
was run via `nohup` it would die when receiving SIGHUP. This fixes the
code to handle that correctly so that fish scripts can be nohup'd.

Fixes #4007
2017-05-03 22:16:41 -07:00
Fabian Homborg
084a820de3 Stringify xrandr completions 2017-05-03 23:36:43 +02:00
Fabian Homborg
c06a71bfbe Stringify hg completions 2017-05-03 23:36:25 +02:00
Fabian Homborg
044d45a0ff Stringify adb completions
Also reindent.
2017-05-03 23:35:34 +02:00
Kurtis Rader
4c798ce3b4 update changelog to include fix for #1432 2017-05-02 21:11:15 -07:00
Kurtis Rader
107127afb7 ensure no signals are blocked when started
Fixes #3964
2017-05-02 21:02:42 -07:00
David Adam
d3cfab1391 webconfig: apply colour syntax highlighting to functions tab
Closes #1432.
2017-05-03 08:37:27 +10:00
David Adam
1e9caecbcb webconfig: import angular-sanitize module
Enables use of ngBindHtml.

Work on #1432.
2017-05-03 08:37:27 +10:00
Kurtis Rader
fb54d34788 change string match --filter to --entire
Per discussion in PR#3998 to review adding a `--filter` flag to `string
replace` rename the same flag in the `string match` subcommand to avoid
confusion about the meaning of the flag.
2017-05-01 22:19:58 -07:00
Kurtis Rader
16816a1202 add string replace --filter flag
Fixes #3348
2017-05-01 22:07:30 -07:00
Kurtis Rader
48d5342601 style cleanups
Time for another `make style-all`.
2017-05-01 22:05:35 -07:00
David Adam
46d86766c4 README.md: drop which requirement
No longer required following merge of #3945.
2017-05-02 09:26:52 +08:00
Kurtis Rader
6b1c939b67 rename --metadata to --details
Discussion in issue #3295 resulted in a decisions to rename the
functions --metadata flag to --details.

This also fixes a bug in the definition of the short flags for the
`functions` command. The `-e` flag does not take an argument and
therefore should not be defined as `e:`. Notice that the long form,
`--erase`, specifies `no_argument`. This discrepency happened to work
due to a quirk of how the flag parsing loop was written.
2017-04-30 20:21:40 -07:00
Kurtis Rader
65c762f1e1 fix parser error message
Fixes #4000
2017-04-29 21:33:50 -07:00
David Adam
4fde67fa50 implement disown builtin
Closes #2810.

The syntax mirrors that of zsh.
2017-04-29 19:20:03 +08:00
David Adam
f52708a20f job_t: use the sentinel value of -2 for new job process group IDs
0 is not a good default PGID, because it's possible for a kernel process
to have the PGID of 0 under Linux.

This meant that job_get_from_pid could return incorrect jobs, as the PGID
for internal, non-forked jobs was the same as kernel processes.

Avoid this by using an invalid PGID as the initial PGID.
2017-04-29 19:20:03 +08:00
David Adam
16931f724b job_signal: confirm process group before signalling it
It is possible for fish to not be the process group leader; avoid
signalling the process group containing the current process by checking
with getpgrp() rather than assuming that getpid() is enough.
2017-04-29 19:20:03 +08:00
David Adam
8f77b1cdd2 use current PGID (not PID) for new processes when job control is off
If fish is not the first process in a pipeline, and jobs are started
from the fish process, it is possible for fish and the OS to have
different ideas about what the process group of the jobs are.

This change confirms the current PGID, rather than assuming that it is
the same as the PID.
2017-04-29 19:20:03 +08:00
David Adam
10e64fd548 job_get_from_pid: don't assume pgid == pid
Compare apples with apples by using getpgid() when checking a process
against the job list.
2017-04-29 19:20:03 +08:00
David Adam
d32e7f5ad7 job_get_from_pid: use canonical pid_t type 2017-04-29 19:20:03 +08:00
David Adam
8612ac592d add comments documenting use of negative IDs for PGIDs in events 2017-04-29 19:20:03 +08:00
David Adam
b8bf567514 postfork: correct terminology from parent group to process group 2017-04-29 19:20:03 +08:00
David Adam
c32032757e builtin.cpp: update template builtin function 2017-04-29 19:20:03 +08:00
Andreas Nordal
1cb69e6f5c Fix msgid typo from commit 08d42a0507 2017-04-28 17:39:52 -07:00
Fabian Homborg
f5fac096c0 Don't move cursor in delete-char
Instead, move forward and backward in vi-mode.

Fixes #3899.
2017-04-28 22:53:03 +08:00
Andrei Dziahel
a26419557f fixes identical code in both if branches introduced in e52a04e34 2017-04-26 20:30:36 -07:00
Marc Garcia Sastre
980af4aa5b status returns the function name when called with -u parameter
Fixes #1743
2017-04-26 20:15:45 -07:00
David Bishop
2565c5c15b Use $suffix in classic_vcs prompt instead of hardcoding to '>'
Also, ensure that suffix is local in both classic_vcs.fish and informative_vcs.fish.

Fixes #3991
2017-04-26 16:01:52 -07:00
Kurtis Rader
5604bb238e fix make test_high_level so it works 2017-04-25 21:18:14 -07:00
Kurtis Rader
a1d5a19e24 fix string man page
Fixes #3987
2017-04-25 08:48:00 -07:00
Fabian Homborg
77201ade34 __fish_complete_users: Also test for command, not path 2017-04-25 17:36:22 +02:00
Fabian Homborg
49d3a58a9e __fish_complete_users: Use command, not a hardcoded path 2017-04-25 12:47:23 +02:00
Kurtis Rader
937c229b2e eliminate symbol aliases that obscure the code
Defining aliases for existing symbols serves only to obscure the code.
So remove the following symbols and replace them with the primary
symbols:

enum { BUILTIN_TEST_SUCCESS = STATUS_BUILTIN_OK, BUILTIN_TEST_FAIL =
STATUS_BUILTIN_ERROR };

See issue #3985.
2017-04-24 23:06:22 -07:00
Kurtis Rader
5b6814d6ad add string match --filter flag
Fixes #3957
2017-04-24 21:45:06 -07:00
Kurtis Rader
37508d1f1e refactor the __*_users functions
Per my comment in issue #3980 this implements `__fish_print_users` in
terms of `__fish_complete_users` so we don't have to modify both when a
change to how users are enumerated is needed.
2017-04-23 20:08:40 -07:00
Christian Rondeau
bea0b17c9e Aucompletion guards for /etc/passwd #3980 2017-04-23 19:41:07 -07:00
Fabian Homborg
30e02383a5 Identifiers: Fix typo.
Function names can indeed not contain a "/".
2017-04-23 13:46:56 +02:00
Fabian Homborg
ec92e91ddc fish_clipboard_paste: Turn \r into \n
We already do this in bracketed-paste because it's really confusing to
have a \r literal in the commandline.
2017-04-23 13:40:40 +02:00
Fabian Homborg
cc7d83fa94 fish_clipboard_paste: Fix multiline pasting 2017-04-23 13:38:32 +02:00
Fabian Homborg
17ba21cfe4 Fix pasting backslashes
Another missing escape.

Fixes #3981.
2017-04-23 13:32:24 +02:00
Kurtis Rader
f1d40a3c7c limit bind mode names to the rules for var names
The bind mode names can be, and are, used in the construction of fish
variable names. So don't allow users to use names that are not legal as
a variable name. This should not break anything since, AFAICT, no
existing fish scripts, including those provided by Oh-My-Fish and
Fisherman define bind modes that would not be legal with this change.

Fixes #3965
2017-04-22 20:33:56 -07:00
Kurtis Rader
275d658616 simplify and clarify valid identifiers
This is the first step in addressing issue #3965. It renames some of the
functions involved in validating variable and function names to clarify
their purpose. It also augments the documentation to make the rules for
such identifiers clearly documented.
2017-04-21 21:55:06 -07:00
Kurtis Rader
15e1f4349b document [alt-enter] behavior in funced command
Fixes #893
2017-04-21 17:15:56 -07:00
Alex Gaynor
f30c50cec5 [hg completions] remove a grep and use hg's native query syntax
This has the side benefit of working around a wild bug with readline+fish that I've reported to the upstream readline developers. (The result of that bug is that the hg processes are constantly being leaked as `bg` jobs in the shell, which is how I came to notice this in the first place)
2017-04-21 18:56:54 +02:00
Fabian Homborg
805a177673 __fish_config_interactive: Prefer python3
Also includes the CHANGELOG.
2017-04-21 13:45:49 +02:00
Fabian Homborg
e410d47565 fish_config: Pick a python
Also remove a use of `eval` and `string escape`.

Fixes #3970.
2017-04-21 13:45:49 +02:00
Fabian Homborg
7ef2d5e86f fish_update_completions: Pick a python
This removes a need for packagers to either patch our shebangs or pick
a particular python.

This was already done in __fish_config_interactive (where we need to
duplicate the code because it involves backgrounding).

Work towards #3970.
2017-04-21 13:45:49 +02:00
Fabian Homborg
3c95e00e8a It's "single quotes", not "single-quotes" 2017-04-21 13:43:02 +02:00
Kurtis Rader
b9d2e4d897 fix fish greeting regression
Fixes #3973
2017-04-20 20:17:50 -07:00
Fabian Homborg
cb9f4e621f lua completions: Try harder to find libraries
Fedora puts them in /usr/lib64 without having /usr/lib as a symlink.

Also silence errors (in case a directory doesn't exist) and stringify.

See https://bugzilla.redhat.com/show_bug.cgi?id=1442628.

CC @amluto.
2017-04-20 14:00:30 +02:00
Fabian Homborg
7c6600895e Add missing options to functions completion 2017-04-19 23:11:35 +02:00
Fabian Homborg
c0d80ab996 Tighten MANPATH test
This is to fix tests on Travis, since that stores the commit message in an environment variable.

`env | grep MANPATH` of course picks it up and generates unwanted output.

Yes.
2017-04-18 22:42:38 +02:00
Fabian Homborg
ffbda7fe64 Group read changes in CHANGELOG
Also attempt to defeat Travis.
2017-04-18 22:27:32 +02:00
Fabian Homborg
8b201d8077 Update CHANGELOG entry for empty $*PATH components
This was later changed to auto-convert these and expanded to $PATH and $MANPATH as well.
2017-04-18 21:03:13 +02:00
Fabian Homborg
9e2776af0e Changelog $USER changes 2017-04-18 15:13:29 +02:00
Fabian Homborg
3fa5d6c794 Force setting $USER if UID is 0
Works around some weird su implementations.

Fixes #3916.
2017-04-18 15:06:49 +02:00
Kurtis Rader
3ade72266c fix bug I introduced by previous squash merge
When I squash merged to create commit a9db99ac5 I overlooked updating
the unit test.
2017-04-17 21:23:03 -07:00
Francisco Giordano
349eff0df7 change cancel_commandline function to use color from variable
This allows the user to define how they want the "^C" rendered when a
pending command line is interrupted.
2017-04-17 21:16:42 -07:00
Ivan Trubach
a9db99ac52 Rename replace-one to replace_one
Fixes invalid character in variable name $fish_cursor_replace-one (used by fish_vi_cursor[_handle]) by renaming bind mode 'replace-one' to 'replace_one'.
2017-04-17 21:10:23 -07:00
Adam Byrtek
e7d686461e Terraform completions (#3960)
* Basic Terraform completion supporting all commands

* Option completion for Terraform commands

* Search command line in reverse order

* CHANGELOG entry

* Fix `terraform untaint` completion

* Use common completion functions to handle subcommands

* Use imperative form and remove CHANGELOG changes
2017-04-17 17:18:39 +02:00
Adam Byrtek
dd69ca5a81 Warn when function is not modified by the editor after calling funced (#3961)
* Check whether tmp file was modified in `funced`

* More idiomatic error messages

* Store the checksum in a local variable

* MD5 function supporting both GNU and BSD

* Use `else if` in MD5 function

* Use `string` builtin instead of `cut`
2017-04-17 17:18:02 +02:00
Kurtis Rader
e332573fe1 remove transitory test directory
Reinstatate a command to remove a temporary directory that inadvertently
removed by commit 49518b71.
2017-04-15 22:28:59 -07:00
Kurtis Rader
dcc081a594 mark __fish_sgrep as deprecated
Fixes #2450
2017-04-15 21:51:33 -07:00
Kurtis Rader
75f1e36b44 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:49:08 -07:00
Kurtis Rader
b3617cfd86 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:30:36 -07:00
Kurtis Rader
a381d959f2 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:29:07 -07:00
Kurtis Rader
ae03df4bc4 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:22:09 -07:00
Kurtis Rader
9d25b52208 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:01:03 -07:00
Kurtis Rader
d48c872913 a step to remove __fish_sgrep per issue #2450 2017-04-15 20:59:09 -07:00
Kurtis Rader
4936de29e7 a step to remove __fish_sgrep per issue #2450 2017-04-15 20:23:48 -07:00
Kurtis Rader
3463e81dda a step to remove __fish_sgrep per issue #2450 2017-04-15 20:04:43 -07:00
Kurtis Rader
a3cd5bf170 a step to remove __fish_sgrep per issue #2450 2017-04-15 18:32:30 -07:00
ridiculousfish
6bd47b8662 Kill an unused variable 2017-04-15 17:37:30 -07:00
Kurtis Rader
cc3efcc3ab a step to remove __fish_sgrep per issue #2450 2017-04-14 23:21:17 -07:00
Kurtis Rader
0be8d0d385 another __fish_sgrep replacement 2017-04-13 23:14:36 -07:00
Kurtis Rader
c3584111d6 fix unused parameter error
The recent change to improve the behavior of the `bg` command (commit
3edb7d538) resulted in the `send_to_bg()` no longer using the `name`
parameter it was given. This rectifies that lint warning by removing
that parameter as it never served a useful purpose.
2017-04-12 22:48:32 -07:00
Kurtis Rader
095e04cb0d remove mention of __fish_sgrep
This is a trivial change to address issue #2450 by eliminating a
inconsequential reference to `__fish_sgrep` in the core C++ code.
2017-04-11 22:11:45 -07:00
Kurtis Rader
ef313dc8c5 a step to remove __fish_sgrep per issue #2450 2017-04-11 21:53:13 -07:00
Kurtis Rader
c272584fec a step to remove __fish_sgrep per issue #2450 2017-04-11 21:46:46 -07:00
Kurtis Rader
f20c7deaf1 a step to remove __fish_sgrep per issue #2450 2017-04-11 21:01:43 -07:00
Andreas Nordal
08d42a0507 Error message prefix: Prefix the message, not the context
Fixes #3649
2017-04-11 20:00:29 -07:00
Kurtis Rader
89efa9a8b1 update changelog to reflect prior two commits 2017-04-11 19:33:31 -07:00
Kurtis Rader
fae1a398bd document new read --silent flag 2017-04-11 19:30:12 -07:00
Marc Garcia Sastre
8213885491 Capture read command contents without displaying it via a silent flag.
Implement a `read --silent` flag. This echos the input using an
obfuscation character.
2017-04-11 19:06:48 -07:00
Kurtis Rader
da09a915f2 improve __fish_complete_directories function
Reviewing a PR for a completion script caused me to look at the
implementation for the `__fish_complete_directories` function. Which in
turn lead me to create this change to improve its implementation and add
unit tests for the function.
2017-04-11 13:45:53 -07:00
Fabian Homborg
2a2ccea24e Document special-paste 2017-04-11 14:42:36 +02:00
Alan Somers
ed6298ad17 Fix portmaster completions when there are no matches
Don't spew warnings when there are no matches.  Also, use the string
builtin instead of calling sed.

Fixes #3949
2017-04-10 21:37:54 -07:00
Kurtis Rader
252c821cb3 contributing doc cleanup 2017-04-09 20:52:50 -07:00
Kurtis Rader
8440308470 two more /tmp references that aren't necessary
Eliminate two more references to /tmp as part of removing our dependency
on /tmp being a valid directory.
2017-04-08 21:47:05 -07:00
Kurtis Rader
49518b71ab low level tests should not depend on /tmp
The low level tests should not depend on /tmp being a valid directory.
2017-04-08 21:13:34 -07:00
Fabian Homborg
702de29549 fish.spec.in: Remove which dependency
Also changelog
2017-04-08 13:25:26 +02:00
Fabian Homborg
757a95123d configure.ac: Replace which with command -v
This allows us to drop `which` as a makedependency.
2017-04-08 13:21:04 +02:00
Fabian Homborg
6ab46bb8db Reword which changelog entry
It's still used by configure, so it is still a compile-time dependency.
2017-04-08 13:21:04 +02:00
Fabian Homborg
ddb9350ea9 Replace use of which with command -sq 2017-04-08 13:21:04 +02:00
Kurtis Rader
03571b82be cleanup env code and contains()
Switch from null terminated arrays to `wcstring_list_t` for lists of
special env var names. Rename `list_contains_string` to `contains` and
modify the latter interface to not rely on a `#define`.

Rename `list_contains_string()` to `contains()` and eliminate the
current variadic implementation. Update all callers of the removed
version to use the string list version.
2017-04-05 17:09:12 -07:00
Kurtis Rader
75600b6b53 fix setenv and add unit tests
Fixes #3937
2017-04-05 15:31:13 -07:00
Rory O’Kane
35e1d1e2d8 Fix deprecated flags in history example in docs
Update the Example section in the documentation for the `history` command so that it uses the subcommands instead of the deprecated long options.
2017-04-05 19:55:58 +02:00
Kurtis Rader
a4f925d822 empty path components are equivalent to "."
There are at least three env vars describing a sequence of paths to be
searched where an empty path element is implicitly equivalent to ".".
This change converts the implicit "." to explicit whenever the variable
is imported or set. This makes the variable much easier to use in fish
scripts.

Fixes #3914
2017-04-04 17:32:45 -07:00
Fabian Homborg
3edb7d538f Improve bg argument handling
- Error out if anything that is not a PID is given

- Otherwise background all matching existing jobs, even if not all
  PIDs exist (but print a message for the non-existing ones)

Fixes #3909.
2017-04-04 14:59:43 +02:00
Fabian Homborg
b5a38ca96b Changelog #3922/#1362 2017-04-01 22:44:12 +02:00
Fabian Homborg
cd16676911 Make "trying to match mapping" debug priority 4
Instantly makes debug output _much_ more usable.
2017-04-01 10:43:01 +02:00
Fabian Homborg
d7ef7eb484 Also give subshells the terminal
Fixes #1362.
2017-03-31 19:34:42 -07:00
SanskritFritz
2105bae1fc Completions for ipset 2017-04-01 01:52:05 +02:00
SanskritFritz
0c265c0f52 Obnam completions updated 2017-04-01 01:52:05 +02:00
SanskritFritz
cd8982b645 Obsolete completions removed 2017-04-01 01:52:05 +02:00
Kurtis Rader
c0de8afaf3 untokenize string before printing it
Fixes #3915
2017-03-28 19:15:08 -07:00
Kurtis Rader
62244f01c2 fix umask handling of symbolic modes
This fixes the handling of symbolic umask values. It also removes two
invocations of `perl` and all but two `math` commands.

Fixes #738
2017-03-28 16:28:24 -07:00
Fabian Homborg
2b4ab19d47 CHANGELOG: which dep removal 2017-03-28 15:57:13 +02:00
Fabian Homborg
4b9424eb20 type: Minor reformatting
Empty lines after `if` and `if begin`.
2017-03-28 15:55:10 +02:00
Fabian Homborg
c4d69ea8a1 type: Rewrite option parsing
Removes a call to `seq` and makes it a bit more readable.
2017-03-28 15:55:10 +02:00
Fabian Homborg
a3f28e221f type: Remove need for which
This should be completely equivalent without needing an external command.
2017-03-28 15:55:02 +02:00
Kurtis Rader
765891cc4e clarify where to post questions
We've gotten feedback from the Stackexchange team that too many fish
questions asked on stackoverflow don't really belong there. So clarify
the README to also point users at superuser for questions not related to
fish script.
2017-03-27 17:53:47 -07:00
ridiculousfish
dec0f7aa84 Make s_generation_count a std::atomic
This should improve safety and satisfy tsan
2017-03-26 13:44:27 -07:00
ridiculousfish
44b3554a11 Reorder a lock to prevent a potential deadlock in uvars
A call to default_vars_path() takes the environment variable
lock while the uvars lock is held. Ensure that doesn't happen by
deferring the uvars lock to later in the function.
2017-03-26 13:22:23 -07:00
ridiculousfish
9f13edbe4a Fix a buffer overflow in cached_esc_sequences_t::find_entry
cached_esc_sequences_t::find_entry was constructing a wcstring
from a c string, using lengths longer than the length of the cstring.

Detected with asan.
2017-03-26 12:55:15 -07:00
Fabian Homborg
3d6c4adda9 Fix unescaped ' literals in bracketed-paste
This was a case of a missing \\.

Fixes #3913.
2017-03-26 09:33:11 +02:00
Kurtis Rader
38c851f4cf let read take a simple string for the prompt
Fixes #802
2017-03-25 20:24:43 -07:00
Fabian Homborg
e1c3ec25ab Document snippet sourcing order
Fixes #3099.
2017-03-23 17:46:11 +01:00
Kurtis Rader
542962bc69 document events are per fish process
Fixes #2954
2017-03-22 20:53:39 -07:00
Kurtis Rader
ae0321778f empty CDPATH elements are equivalent to "."
In the process of fixing the issue I decided it didn't make sense to
have two, incompatible, ways of converting variable strings to arrays.
Especially since the one I'm removing does not return empty array elements.

Fixes #2106
2017-03-22 19:30:42 -07:00
Fabian Homborg
570a6430ad Update changelog
- Mention setenv

- Don't mention bracketed paste twice, group paste-related changes together
2017-03-22 14:41:09 +01:00
Fabian Homborg
83791a26c3 Stringify mkinitcpio completions
Also fixes an issue with the -k completions.
2017-03-21 01:31:26 +01:00
Fabian Homborg
2118973251 Document \cn/\cp bindings
We want to downplay this in favor of the arrow keys, but mentioning it
is still the right thing to do.

Supersedes #3879.
2017-03-20 16:49:29 +01:00
Fabian Homborg
70354f9f5e Add bind --list-modes option
Fixes #3872.
2017-03-20 16:42:53 +01:00
Kurtis Rader
536b1220fd cleanup __fish_complete_man.fish
I looked at this and noted some problems fixed by this change in
response to exploring if issue #726 was still unresolved.
2017-03-18 21:55:02 -07:00
Fabian Homborg
b6517250c7 vi-mode: \cd should do delete-or-exit
This just removes the special vi binding and hence falls back upon the
shared one.

Fixes #2219.
2017-03-17 12:07:10 +01:00
Kurtis Rader
a811ae25dc don't preemptively send SIGPIPE
Fixes #1926
2017-03-16 18:59:34 -07:00
Fabian Homborg
29429874b3 Update changelog with the paste changes 2017-03-16 16:13:19 +01:00
Fabian Homborg
99e87dded3 Auto-escape pastes inside single-quotes
This is to make pasting literals easier.

When a user pastes something, we normally take it as-is.

The exception is when a single-quote is open, e.g. the current token
is

    foo'bar

When something is pasted here, we escape single-quotes (`'`) and
backslashes (`\\`), so typing a `'` after it will turn it into a
literal token.

Fixes #967.
2017-03-16 16:08:13 +01:00
Kurtis Rader
84cf391faa style cleanups 2017-03-15 14:06:58 -07:00
Kurtis Rader
f0469d829a string repeat of an empty string is an error
Fixes #3898
2017-03-15 13:55:53 -07:00
Kurtis Rader
6fd8dc44fb support test -k to test the sticky bit
Fixes #733
2017-03-14 21:43:15 -07:00
Kurtis Rader
6123d3cb50 document trap ... EXIT
Fixes #1180
2017-03-14 21:02:02 -07:00
Kurtis Rader
516e989464 mention string repeat in the change log 2017-03-14 19:44:07 -07:00
Kurtis Rader
085a9b9267 fix stupid typo introduced by d9b30ab09 2017-03-14 13:17:53 -07:00
Kurtis Rader
d9b30ab090 setenv should behave like export
Fixes #3897
2017-03-14 12:14:22 -07:00
Kurtis Rader
7ab1c6c7ad update CHANGES.md 2017-03-13 21:44:05 -07:00
Kurtis Rader
1afea1b650 add description to functions -m -v output
Fixes #597
2017-03-13 20:52:31 -07:00
Kurtis Rader
8efe88201e correct escape_string corner case
Fixes #3892
2017-03-13 20:38:57 -07:00
mus0u
b4f70cb98b include exit status indicator in robbyrussell sample prompt 2017-03-13 18:05:49 -07:00
Greynad
98f4e49669 Add string 'repeat' subcommand
This feature add the ability to repeat a string a given number of times.
For example: string repeat -n 3 foo
2017-03-12 20:30:36 -07:00
Kurtis Rader
e0f62c178f make not blocking signals the default
This is the next step in determining whether we can disable blocking
signals without a good reason to do so. This makes not blocking signals
the default behavior. If someone finds a problem they can add this to
their ~/config/fish/config.fish file:

set FISH_NO_SIGNAL_BLOCK 0

Alternatively set that env var before starting fish. I won't be surprised
if people report problems. Till now we have relied on people opting in
to this behavior to tell us whether it causes problems. This makes the
experimental behavior the default that has to be opted out of. This will
give us a lot more confidence this change doesn't cause problems before
the next minor release.

Note that there are still a few places where we force blocking of
signals. Primarily to keep SIGTSTP from interfering with the shell in
response to manipulating the controlling tty. Bash is more selective
in the signals it blocks around the problematic syscalls (c.f., its
`git_terminal_to()` function). However, I don't see any value in that
refinement.
2017-03-10 21:34:24 -08:00
Kurtis Rader
6d02bec4c7 fix setting up and using the terminfo data
There should be just one place that calls `setupterm()`. While refactoring
the code I also decided to not make initializing the curses subsystem a
fatal error. We now try two fallback terminal names ("ansi" and "dumb")
and if those can't be used we still end up with a usable shell.

Fixes #3850
2017-03-08 20:54:37 -08:00
David Adam
42a320064c fallback: restore wcsndup fallback for Apple platforms
Problem introduced in commit 002757225a.
2017-03-06 21:39:37 +08:00
David Adam
002757225a fallback: check for existence of std:: namespace functions
Before defining fallback functions of wcsdup(), wcscasecmp() and
wcsncasecmp(), use the std:: namespace functions instead if they exist.

0019c12af3 fixed the build on Solaris 10, but broke it on Solaris 11.
2017-03-06 21:24:40 +08:00
Fabian Homborg
db63be7909 Add support for bracketed paste
This is a terminal feature where pastes will be "bracketed" in
\e\[200~ and \e\[201~.

It is more of a "security" measure (since particularly copying from a
browser can copy text different from what the user sees, which might
be malicious) than a performance optimization.

Work towards #967.
2017-03-06 00:19:46 +01:00
David Adam
3444fe87fb configure: check for definition of setupterm, not just linkability
Some platforms ship the headers and libraries for ncurses in different
packages, which can produce false positives when checking for their
presence.

Closes #3866.
2017-03-05 15:06:20 +08:00
Kurtis Rader
fac9b2393f change the github issue template
I have noticed that too many new issues have not used the issue template
in the expected manner. Primarily because most people opening issues are
not accustomed to Github Markdown syntax. So change the template to be
exclusively a comment that provides advice regarding what information
will help the fish community resolve a issue.
2017-02-28 21:29:50 -08:00
Dan Zimmerman
f17ddb6770 Fix error when using tmux with vi mode 2017-02-28 19:05:05 +01:00
Kurtis Rader
ea9e05568e Revert "make not blocking signals the default"
This reverts commit e30f3fee88.

Not sure why I didn't notice this before merging it but the change I'm
reverting makes it impossible to start a login shell.
2017-02-25 21:06:30 -08:00
Kurtis Rader
e30f3fee88 make not blocking signals the default
This is the next step in determining whether we can disable blocking
signals without a good reason to do so. This makes not blocking signals
the default behavior. If someone finds a problem they can add this to
their ~/config/fish/config.fish file:

set FISH_NO_SIGNAL_BLOCK 0

Alternatively set that env var before starting fish. I won't be surprised
if people report problems. Till now we have relied on people opting in
to this behavior to tell us whether it causes problems. This makes the
experimental behavior the default that has to be opted out of. This will
give is a lot more confidence this change doesn't cause major problems
prior to the next minor release.
2017-02-22 21:53:49 -08:00
Kurtis Rader
7d65141137 be quiet when make style does nothing
The `make style` and `make style-all` commands have been performing well
without glitches for long enough that it is no longer necessary to report
when they don't change the style of a file. Especially in light of the
fact that all the relevant code has been restyled in the past year. This
change makes `make style-all` much less noisy.
2017-02-22 20:57:15 -08:00
Clément Martinez
64fe617c63 Add gradle completions 2017-02-22 20:01:13 -08:00
Georgy Yakovlev
b2174bc9c0 support the LINGUAS variable by make install
Fixes 3863
2017-02-22 19:58:06 -08:00
Kurtis Rader
7a9efa7930 tweak gitignore rules for *tests* directory 2017-02-20 20:29:43 -08:00
Kurtis Rader
9dd0c47d0b harden alias against foo; bar
If the first word of the alias body ends with a semicolon we need to
strip that character, and otherwise escape the extracted command, to
ensure the subsequent function definition is valid.

Fixes #3860
2017-02-20 20:23:55 -08:00
Kurtis Rader
992e1d0059 use a consistent ERANGE message
The previous change neglected to consider that numbers too large for the
long long datatype will result in calling strerror(ERANGE) whose return
value can vary depending on the platform. Which breaks the unit test.
2017-02-20 18:43:13 -08:00
Kurtis Rader
3d0a377e26 correct printf handling of %x with long ints
Fixes #3352
2017-02-20 17:58:08 -08:00
Kurtis Rader
9f5ce04229 fix perl completions
Fixes #3856
2017-02-18 19:54:36 -08:00
Twinkle
a9617f97b6 enhance git repo for Robbyrussell prompt 2017-02-18 17:11:38 -08:00
Fabian Homborg
0a8c922d92 Use command -sq instead of redirection
This option has been available for a while now and it's a bit shorter.
2017-02-18 22:16:55 +01:00
David Adam
40de253b3a Upgrade git:// and http:// URLs to https://
Work on fish-shell/fish-site#47

[ci skip]
2017-02-17 21:31:44 +08:00
Kurtis Rader
ce61ada623 remove some lint from pager.cpp
The primary pupose of this change is to make OpenSUSE builds happy by
adding a `DIE()` call so its build toolchain knows we won't fall off the
end of function `selection_direction_is_cardinal()`.
2017-02-15 15:21:35 -08:00
maxried
06b2775131 Improved adb completion
* Added reconnect and its subcommand
* Updated the sideload description and made its completion more advanced
* Silenced errors on backup and uninstall auto completion when no device is attached
2017-02-15 11:53:28 -08:00
Kurtis Rader
4ad5b756e4 more sanity involving fatal errors
This folds the "VOMIT_*" family of macros into the assert and DIE
family.

Another change related to issue #3276.
2017-02-14 21:09:15 -08:00
Kurtis Rader
509ee64fc9 implement our own assert() function
I recently upgraded the software on my macOS server and was dismayed to
see that cppcheck reported a huge number of format string errors due to
mismatches between the format string and its arguments from calls to
`assert()`. It turns out they are due to the macOS header using `%lu`
for the line number which is obviously wrong since it is using the C
preprocessor `__LINE__` symbol which evaluates to a signed int.

I also noticed that the macOS implementation writes to stdout, rather
than stderr. It also uses `printf()` which can be a problem on some
platforms if the stream is already in wide mode which is the normal case
for fish.

So implement our own `assert()` implementation. This also eliminates
double-negative warnings that we get from some of our calls to
`assert()` on some platforms by oclint.

Also reimplement the `DIE()` macro in terms of our internal
implementation.

Rewrite `assert(0 && msg)` statements to `DIE(msg)` for clarity and to
eliminate oclint warnings about constant expressions.

Fixes #3276, albeit not in the fashion I originally envisioned.
2017-02-14 18:48:27 -08:00
Kurtis Rader
7fc1994339 some trivial lint cleanups 2017-02-13 18:48:59 -08:00
Terje Larsen
22a2098c34 Add completions for helm (#3829)
* Add completions for helm

helm - is a tool for managing Kubernetes charts. Charts are packages of
pre-configured Kubernetes resources.

See: https://github.com/kubernetes/helm

* Improve helm release completions description

After some feedback from the community it seems it is good to include
the chart in the release description. This adds the chart information to
the description. So to say this is `Release of CHART`.

* Further improvements to helm completions

- Utilize complete -f, -r and -x properly
- Add some more context aware completions (chart versions, kubectl context and namespaces)
2017-02-13 17:23:29 +01:00
ridiculousfish
0cc307fbd9 Remove unnecessary NULL assignment per linter
Fixes #3849
2017-02-12 21:54:26 -08:00
Kurtis Rader
69731f6642 more IWYU fixes
I'm starting to wonder if IWYU is worth the effort. Nonetheless, this
makes it lint clean on macOS and reduces the number of warnings on
FreeBSD and Linux.
2017-02-12 20:36:37 -08:00
Kurtis Rader
ce2d1c4e83 fix IWYU on FreeBSD 2017-02-12 20:36:37 -08:00
Alan Somers
ad6ea1691e Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue #3841
2017-02-12 18:05:37 -08:00
ridiculousfish
2ea2a4c831 Make error color in tutorial a more pastel red 2017-02-12 15:41:31 -08:00
ridiculousfish
67c18c77d0 'Correct' error to eror in lexicon_filter
This changes the error examples in the tutorial to properly show in
red
2017-02-12 15:39:22 -08:00
Kurtis Rader
813415302a fix clear screen invocation
It's necessary to use a subcommand to eat the newline that `string
replace` appends to the string.
2017-02-12 14:12:12 -08:00
Clément Martinez
cbea0b9378 mount & udisksctl: improve -o completions` (#3764)
* mount & udisksctl: improve `-o` completions`

* Update __fish_complete_mount_opts
2017-02-12 15:23:41 +01:00
Markus Reiter
d93e57a3f9 Add export PATH entry to changlog. 2017-02-12 15:20:07 +01:00
Markus Reiter
f38646593c Allow export to set colon-separated PATH, CDPATH and MANPATH. 2017-02-12 15:20:07 +01:00
Fabian Homborg
9598218a94 Don't call fish in the background to generate completions
Fixes #3803 even harder.
2017-02-12 14:56:36 +01:00
Fabian Homborg
afdd1a98c1 Don't clear scrollback with the \cl binding
ncurses since 6.0 sends the "E3" sequence along with "clear", even for
just `clear` or `tput clear`. This deletes the scrollback buffer which
is usually not what you want.

Fixes #2855.
2017-02-12 12:01:28 +01:00
Kurtis Rader
9cae25d1eb correct test for IWYU command
I noticed this when testing what `make lint-all` would output on FreeBSD
12 which does not have a symlink from `iwyu` to `include-what-you-use`.
2017-02-11 21:30:38 -08:00
Kurtis Rader
4ffb0adb78 lint cleanups 2017-02-11 21:30:38 -08:00
Fabian Homborg
52648acdc8 Check python version at runtime for completions
Some things like pyenv can change what `python` refers to, so what we
detect when we load the completions can become invalid later.

Also mentioned in #3840.
2017-02-11 16:07:06 +01:00
Fabian Homborg
f9664f224d Don't wrap pythonX completions
The issue here was that the `python` completion did a version check on
the `python` binary, so it would complete python2 stuff if system
python was py2, even if the user tried to complete `python3`.

This isn't beautiful, but it's more resilient than e.g. doing magic
with `commandline`.

Fixes #3840.
2017-02-11 16:07:06 +01:00
Kurtis Rader
0a929f7a0b don't export COLUMNS/LINES unless already exported
Fixes #3839
2017-02-10 15:20:09 -08:00
Markus Reiter
3e35e6e488 Use string split in alias. 2017-02-10 14:09:41 +01:00
Kurtis Rader
af7f5f42b6 put upper bound on data read will consume
This puts a hard upper bound of 10 MiB on the amount of data that read
will consume. This is to avoid having the shell consume an unreasonable
amount of memory, possibly causing the system to enter a OOM condition,
if the user does something non-sensical.

Fixes #3712
2017-02-09 21:04:46 -08:00
Kurtis Rader
f27407bbf9 correct German translation strings
Fixes #3834
2017-02-09 13:32:30 -08:00
Fabian Homborg
214c677032 Remove outdated completions
These are dead projects with completions that didn't provide much
value.

Fixes #3662.
2017-02-09 18:42:55 +01:00
Cristian Prieto
2bbecf4292 Yarn completion (#3816)
* Add main yarn commands and subcommands

* Add more short/long options

* Add subcommands for most main commands

* Add suboptions for mutext and access
2017-02-09 17:24:38 +01:00
Kurtis Rader
0541a34201 improve bash command history importing
Fixes #2091
2017-02-08 20:50:57 -08:00
Jeff Dickey
cf63d1b2a7 added mocha.fish 2017-02-08 14:22:30 -08:00
Andrei Dziahel
85ba4e0142 Fix colors table (#3826)
* color: make brgrey really grey

The 0055 value is actually 0x2d which isn't 0x55 mentioned further and is probably a typo

* color.cpp: reformat color table

Tidy color table up and also fix hex number case for grey color. This should ease spotting errors like one from previous commit.
2017-02-08 13:49:19 -08:00
Kurtis Rader
9b24d26972 document creating - abbreviation in FAQ 2017-02-08 13:22:47 -08:00
Kurtis Rader
0970cc8736 time for another make style-all 2017-02-07 21:52:35 -08:00
Kurtis Rader
616d301083 set stdout to unbuffered if attached to a tty
Fixes #3748
2017-02-07 21:01:22 -08:00
ridiculousfish
162053ed8d Make history file rewriting be more lock savvy
We now are stingier with taking history file locks - if the lock
is held too long we may just break it. But the current file save
architecture holds the lock for the duration of the save. It also
has some not-quite-right checks that can cause spurious failures in
the history stress test.

Reimplement the history save to retry. Rather than holding the lock,
rewrite the file to a temporary location and then take the lock. If
the history file has changed, start all over.

This is going to be slower under contention, but the advantage is that
the lock is only held for a brief period (stat + rename) rather than
across calls to write().

Some updated logic also fixes spurious failures that were easy to observe
when tsan was enabled. These failures were due to failing to check if the
file at the path was the same file we opened.

The next step is to move the history file saving to a background thread
to reduce the chances of it impacting user's typing.
2017-02-06 11:04:07 -08:00
ridiculousfish
f9371899a1 Including missing atomic header in history.cpp 2017-02-06 10:51:27 -08:00
ridiculousfish
56b60fab4b Improve history's save_internal_via_appending
Allow retrying, fix an issue where we trip over our own changes
by thinking the file has changed when we are responsible for changing
it, and improve some commenting
2017-02-06 10:39:07 -08:00
ridiculousfish
b91a2dd0bb Factor map_fd out of map_file
Will enable us to map an already-opened file
2017-02-06 10:09:31 -08:00
ridiculousfish
83f386347f Make file_id_for_fd return kInvalidFiledID when passed a negative fd
Rather than making fstat do this, make it explicit.
2017-02-06 10:01:33 -08:00
ridiculousfish
6eb1e31070 Add some safety to history_file_lock
Use an atomic to avoid TSAN complaints, and ensure that we don't
leave the file locked if we've decided to give up on locking.
2017-02-06 10:00:34 -08:00
ridiculousfish
e3c538a991 Simplify history_output_buffer_t
This class is used to accumulate data to be written to the history
file. It has some dubious optimizations around trying to track an
offset separately from the size of the buffer. After some investigation
these aren't helping, vector behaves fine on its own. So just make
this a simple wrapper around vector.
2017-02-06 10:00:01 -08:00
René Schwaiger
908ed493cc Fix wildcard bug in __fish_print_filesystems
Before this change the function `__fish_print_filesystems` would print
an error message about an empty wildcard match for the pattern
`$PATH/mount.*`, if the current operating system does not include any
helper binaries for the command `mount`. An example for such an OS is
the current version of macOS (version 10.12).
2017-02-06 08:08:54 -08:00
Rabah Meradi
a5e8b81ee3 Add completion for climate 2017-02-05 19:22:35 -08:00
Kurtis Rader
c4f2210cc5 cache prompts and escape sequences we've seen
Cache the escape sequences we've seen when checking for those which
don't take any visual space when writing the prompt or similar strings.
This reduces the cost of determining the true cost of such strings by a
full order of magnitude if they include lots of such escape sequences.

Periodically sort the cached escape sequence lengths based on feedback
from cache hits so that we're always checking for the most likely
sequence lengths first.

Also cache the prompt layouts to avoid doing the calculations if the
prompt doesn't change.

Fixes #3793
2017-02-05 18:31:14 -08:00
Kurtis Rader
6d72d538a6 refactor escape_code_length()
Step one in addressing issue #3793
2017-02-05 18:31:14 -08:00
Aaron Gyes
279ec88351 Fix PR template typo
Thanks @sanssecours for noticing.
2017-02-05 10:39:51 -08:00
ridiculousfish
8a09c99f36 Escape in vi mode to end paging, but stay in insert mode
Change the escape key binding in insert mode (in vi key bindings)
to check if we are in paging mode. If so, emit cancel and stay in
insert mode. Otherwise perform the current behavior of switching
back to default mode and adjusting the cursor.

Fixes #2871
2017-02-05 02:49:52 -08:00
ridiculousfish
56161250de Make a missing --sets-mode property for a key binding do nothing
Currently, if bind is run with --mode but not --sets-mode, the
binding gets an implicit --sets-mode equivalent to the mode. This
is usually unobservable but it may matter if the mode is changed
by some internal part of the binding (e.g. set fish_bind_mode...)
then that setting will be lost after the binding is complete.
2017-02-05 02:49:45 -08:00
David Adam
41a49b014a Makefile: use recursively expanded variable for the list of manpages
Restores the installation of manual pages when running `make install`
without running `make` first, a bug introduced with 417255fc.

Closes #3813.
2017-02-05 14:22:16 +08:00
David Adam
8339e28cfe build_tools/list_committers_since.fish: tool for showing new & returning committers 2017-02-04 21:04:03 +08:00
Fabian Homborg
b3d5fb71f4 completion generator: Protect against undefined variable
Proc wasn't defined if $MANPATH was used.

Fixes #3808.
2017-02-03 18:32:14 +01:00
Fabian Homborg
94b71353ef completion generator: Define parent_paths directly if MANPATH is set 2017-02-03 18:32:14 +01:00
David Adam
3e17b8fccc add CHANGELOG note to pull request template
[ci skip]
2017-02-03 21:17:25 +08:00
David Adam
40428f592d bump metadata following 2.5.0 release
[ci skip]
2017-02-03 21:17:17 +08:00
David Adam
49e98cde4c Merge branch 'Integration_2.5.0' 2017-02-03 21:14:40 +08:00
Clément Martinez
47ad707bba Add jq completions 2017-02-02 23:07:54 +01:00
Terje Larsen
bf84879134 Add completions for minikube (#3778)
* Add completions for minikube

This adds basic completions for minikube, the subcommands and their options.

* Improve minikube completions

- Use more consistent and shorter descriptions.
- Fix subcommand options
- Add more semantic completions

* Fix named variable for option value

* Add completions for minikube addons enable/disable

* Add completions for minikube addons open
2017-02-02 17:45:42 +01:00
Fabian Homborg
b7cdb6d586 Merge pull request #3757 from nim65s/master
systemctl completions: add cat & edit commands

Also use systemd version to determine the commands it knows.
2017-02-02 17:44:07 +01:00
Kurtis Rader
088b10f4c2 style fixes to previous commit
This commit addresses many of the style problems with the previous
commit. If this introduces any bugs they are solely my fault. The style
of this code needs more improvement. Some of which could be done today.
Others will have to wait until `fish_indent` is improved.
2017-02-01 22:49:40 -08:00
Dale Eidd
eff6b98813 numerous improvements to ssh/scp completions
Add IPV6 /etc/hosts completion support. Parses columns rather than values which produces improved output.

Support ssh -F and Include completion

Ignore ssh Hostname and Host with wildcard. The following only get in the way:

- Hostname: Host resolves to Hostname
- Wildcard Host: Cannot ssh to a glob pattern

Improve scp completions

* complete only local files when no host provided
* complete only remote files when host is provided
* complete local files or hosts when no separator

Disable username completion for ssh/scp

Username completion only provides local users which will unlikely be
useful on a remote machine. ssh will use the current username (the only
useful one) or one provided in the ssh config.
2017-02-01 22:12:49 -08:00
Kurtis Rader
949fc7bdd7 fix IWYU lint
Commit 8645aa94 was made because it seemed necessary at the time.  However,
when I run `make lint-all` now it complains about include loops for header
`signal.h`. This reverts part of that earlier commit to get sane behavior
from IWYU again.
2017-02-01 22:06:24 -08:00
Kurtis Rader
44cfe3e340 remove dependency on xxd
Fixes #3797
2017-01-31 22:10:53 -08:00
Clément Martinez
2b13472419 Improve htop completion
Add new options
Add description at the top of the file
Fix `--sort-key` completions
2017-01-31 15:52:55 -08:00
Clément Martinez
9d5471722f Improve help completions 2017-01-31 15:52:55 -08:00
Clément Martinez
0447ee7b96 Improve go completions 2017-01-31 15:52:55 -08:00
Clément Martinez
cd58e6129c Improve grep completions 2017-01-31 15:52:55 -08:00
ridiculousfish
f48291b70c Add #include<atomic> to env_universal_common.cpp
Should fix the Linux builds
2017-01-30 13:41:17 -08:00
ridiculousfish
2a472af7b8 Add sanity checking to LRU cache 2017-01-30 12:59:01 -08:00
ridiculousfish
927a678056 Add support for sorting in LRU caches
Performs an in-place merge sort
2017-01-30 10:25:17 -08:00
ridiculousfish
2565ffab25 Make a bool atomic in env_universal_common.cpp
Fixes a race identified by thread sanitizer
2017-01-29 21:42:33 -08:00
ridiculousfish
cb70ac6932 Use a std::atomic in test_iothread
Reduces noise from thread-sanitizer
2017-01-29 21:35:22 -08:00
ridiculousfish
e8d90dbf4b Remove support for the builtin_script_t feature
This was an old experiment to compile scripts directly into the
shell itself, reducing the amount of I/O performed at startup.
It has not been used for a long time. Time to remove it.
2017-01-29 21:34:30 -08:00
ridiculousfish
6db372133d Clean up and adopt owning_lock in intern.cpp 2017-01-29 21:19:39 -08:00
ridiculousfish
f220250ada Adopt owning_lock in wgettext 2017-01-29 21:12:23 -08:00
ridiculousfish
4ac2cfba61 Adopt owning_lock in iothread.cpp 2017-01-29 21:06:46 -08:00
Clément Martinez
0df65a106d Add setsid completions 2017-01-29 20:06:32 -08:00
ridiculousfish
0fefdb458f Revert "Adopt owning_lock and some cleanup of termsize storage in common.cpp"
Tests are failing on Travis but not locally

This reverts commit c5d9e7e391.
2017-01-29 19:33:30 -08:00
ridiculousfish
8aab725782 Make autoload_t no longer virtual
Equip it instead with a function pointer that it invokes
when a command is removed
2017-01-29 18:56:55 -08:00
ridiculousfish
c5d9e7e391 Adopt owning_lock and some cleanup of termsize storage in common.cpp 2017-01-29 18:15:38 -08:00
ridiculousfish
3569987c81 Adopt owning_lock in builtin_commandline 2017-01-29 18:15:38 -08:00
ridiculousfish
10a2275c34 Adopt owning_lock in history_collection_t 2017-01-29 18:15:38 -08:00
ridiculousfish
017836cffa Adopt owning_lock for job_ids 2017-01-29 18:15:38 -08:00
ridiculousfish
eaf143dd8a Introduce owning_lock template
Will enable rust-style lock ownership semantics
2017-01-29 18:15:38 -08:00
Fabian Homborg
03e0f1eb21 create_manpage_completions: Try more ways to get manpath
Haiku only has `man --path`.

Still doesn't support OpenBSD.

Use $MANPATH if available. This needs to:

- Ignore stderr (we pipe it and throw it away)

- Read the subprocess returncode, since `man --path` is an existing
  command that fails instead of a non-existent one (that raises an
  exception)

- Properly set up the fallback

Fixes #2194.
2017-01-29 18:00:48 -08:00
Kurtis Rader
06282f02fd don't run fish_update_completions in unit tests
Running `fish_update_completions` in unit tests is not needed and
hideously expensive. To the point it can cause flakey test behavior.
2017-01-29 18:00:48 -08:00
Kurtis Rader
973097f025 style fixups 2017-01-29 18:00:48 -08:00
ridiculousfish
e52a04e341 Cleanup of LRU cache implementation
Switch to CRTP from virtual functions and improve ownership semantics.
It's no longer necessary for clients to use new and delete.
2017-01-29 12:16:42 -08:00
Clément Martinez
61f272495d Add i3-msg completions 2017-01-28 19:48:57 +01:00
Clément Martinez
0d170222a6 Update french translations 2017-01-28 19:48:00 +01:00
Cristian Prieto
7edfcd5c63 Add more options for git log
This closes #3743
2017-01-27 14:13:25 +01:00
Kurtis Rader
5b6cc5af6d time for another make style-all
Gotta keep the entropy (i.e., disorder) from increasing.
2017-01-26 20:05:46 -08:00
ridiculousfish
05d569ee44 Simplify error case of token_type_description and keyword_description
Simply return a constant string, since in practice the error case
is not hit
2017-01-26 17:47:24 -08:00
ridiculousfish
a40f491c93 Defeat some miscellaneous warnings in the g++ build 2017-01-26 17:33:48 -08:00
ridiculousfish
e78cefd759 Defeat "enumeral mismatch" g++ warnings through typecasting 2017-01-26 17:18:38 -08:00
ridiculousfish
07c9f0de9d Set -Wno-missing-field-initializers
Suppresses a hugely annoying warning in g++ build for
code initialized via the ={} idiom (which is safe).
2017-01-26 16:34:55 -08:00
ridiculousfish
1efb81456b Use std::move instead of swap in a few places where it improves clarity 2017-01-26 16:14:50 -08:00
ridiculousfish
fec83fa975 Eliminate moved_ref
Use real rvalue references instead
2017-01-26 15:43:46 -08:00
ridiculousfish
1634c9df78 Make job_get_flag and job_set_flag instance methods of jobs
Makes them easier to call when you have a smart pointer
2017-01-26 15:06:58 -08:00
ridiculousfish
14fb38f952 Switch job handling to use shared pointers instead of raw pointers
Clarifies memory management around allocation of job_ts
2017-01-26 14:47:32 -08:00
ridiculousfish
1d9cc12984 Repair control-C cancellation of loops
Commit ab189a75 introduced a regression where we stop breaking out
of loops in response to a child death via a signal. Fix that regression.

Also introduces a test to help ensure we don't regress in the future.

Fixes #3780
2017-01-26 13:41:56 -08:00
Fabian Homborg
98b561929f Add flatpak completions
A bit barebones, but better than nothing.
2017-01-26 22:04:27 +01:00
Fabian Homborg
f513f4e53a Add completions for xinput 2017-01-26 22:04:27 +01:00
Fabian Homborg
67a661c19f Fix dconf completions
This would always just suggest the commands.
2017-01-26 22:04:27 +01:00
ridiculousfish
2fb1d5900d Use true and false for bool, not 0 and 1 2017-01-26 12:51:22 -08:00
ridiculousfish
59a3968fd2 Switch to using unique_ptr in env_node_t
Makes our memory management of the variable stack more explicit
2017-01-26 12:51:22 -08:00
ridiculousfish
8e577b01bc Migrate "unspecified scope" logic for set into var_stack_t 2017-01-26 12:51:22 -08:00
Fabian Homborg
7d44f8e871 Add usermod completions
Fixes #3775.
2017-01-26 21:40:05 +01:00
ridiculousfish
8d2dfdf2c9 Migrate environment variable cache into var_stack_t 2017-01-26 12:03:14 -08:00
ridiculousfish
dabc34e0f9 Migrate next_scope_to_search into var_stack_t 2017-01-26 11:32:45 -08:00
ridiculousfish
3525a9d7ee Make env_node_t's destructor private
Migrate responsibility for popping the environment into var_stack_t
2017-01-26 11:20:09 -08:00
ridiculousfish
61887c061b Migrate responsibility for node creation into var_stack_t 2017-01-26 11:06:03 -08:00
ridiculousfish
e4fd1d5f5a Wrap up the variable stack in a little struct
First step towards cleaning up env.cpp's global variables
2017-01-26 10:38:55 -08:00
ridiculousfish
afe54df843 Eliminate the 'global' var_table_t variable in env.cpp
This can always be trivially found from 'global_env'
2017-01-26 10:32:31 -08:00
ridiculousfish
dddb0bb24b Merge branch 'iothread_perform_lambda'
Bravely reintroducing the iothread changes that broke on g++
2017-01-26 10:08:01 -08:00
ridiculousfish
37578d8b39 Add some additional commenting around iothreads 2017-01-26 09:40:18 -08:00
ridiculousfish
2f29473efc Remove legacy iothread_perform templates
We no longer need to have overloads for function pointers.
2017-01-26 09:40:18 -08:00
ridiculousfish
f29139e853 Change clients of file_detection_context_t to use lambdas
Allows for eliminating file_detection_context_t
2017-01-26 09:40:17 -08:00
ridiculousfish
87152877b2 Switch to use lambda-style iothread for autosuggestions
Allows eliminating autosuggestion_context_t
2017-01-26 09:40:17 -08:00
ridiculousfish
8af00d2b78 Adopt lambda-style iothread_perform in syntax highlighting
Allows eliminating background_highlight_context_t
2017-01-26 09:40:17 -08:00
ridiculousfish
a3dbca90d5 g++-friendly 'Rework iothread_perform for void return types'
Allows iothread_perform to work with void return types on both
g++ and clang

This reverts commit 1040b255c7
and reintroduces ac9a0f0dbf
2017-01-26 09:40:17 -08:00
Guilhem Saurel
e07928062f addressing comments 2017-01-26 00:01:34 +01:00
Clément Martinez
ec19159580 man completions: complete fish commands (#3762)
* man completions: complete fish commands

`apropos` does not output fish commands so they were not completed.

* Improve __fish_complete_man
2017-01-25 15:34:59 +01:00
Cristian Prieto
b7d60dc7bb Improve bzr completion (#3769)
* Improve bzr completion. Closes #3661

 * Add basic completion for bzr commands
 * Include short and log options for common commands
 * Removed not so common commands

* Remove trailing '.' as requested by #3769

* Remove '=' as suggested by #3769

 * We don't need '=' in long options

* Use fish helper functions for autocomplete

To avoid issues pointed out in #3769 helper functions included in fish
are used (__fish_use_subcommand and __fish_seen_subcommand).

* Fixed typo
2017-01-25 15:34:00 +01:00
Guilhem Saurel
fab4399b8c available completions for systemctl depends on its current version 2017-01-25 01:14:38 +01:00
Kurtis Rader
a447a9aeff correct handling of SIGHUP by interactive fish
This is a partial fix for issue #3737. It only addresses the SIGHUP
aspect of the problem. Fixing SIGTERM is TBD.
2017-01-24 15:24:13 -08:00
Kurtis Rader
319e65af05 improve sanity check code 2017-01-24 15:24:13 -08:00
Clément Martinez
3e10640c04 Add pv completions 2017-01-24 23:52:46 +01:00
Clément Martinez
405ec12940 Add new french translations 2017-01-24 22:12:07 +01:00
Judicaël Grasset
730086b0f0 apt: Add completion for the autoremove subcommand (#3771) 2017-01-24 19:55:42 +01:00
Fabian Homborg
1040b255c7 Revert "Rework iothread_perform for void return types"
This reverts commit ac9a0f0dbf, which massively broke fish built with gcc.

Fixes #3770.
2017-01-24 17:33:03 +01:00
Kurtis Rader
bf2d61c6fd Revert "improve sanity check code"
This reverts commit 7e6543c4cd.
2017-01-24 07:34:51 -08:00
Kurtis Rader
64485167e9 Revert "correct handling of SIGHUP by interactive fish"
This reverts commit 31adc221d9.
2017-01-24 07:34:15 -08:00
Kurtis Rader
31adc221d9 correct handling of SIGHUP by interactive fish
This is a partial fix for issue #3737. It only addresses the SIGHUP
aspect of the problem. Fixing SIGTERM is TBD.
2017-01-23 19:42:27 -08:00
Kurtis Rader
7e6543c4cd improve sanity check code
Partial fix for #3737
2017-01-23 19:42:26 -08:00
ridiculousfish
ac9a0f0dbf Rework iothread_perform for void return types
Need to use a template specialization so we don't try to create
a variable of type void
2017-01-23 13:56:43 -08:00
ridiculousfish
699d294ac1 Adopt iothread_perform-lambdas in fish_tests.cpp 2017-01-23 11:45:28 -08:00
ridiculousfish
1cfbd62266 Enable use of std::function and lambdas in iothread_perform 2017-01-23 11:35:22 -08:00
ridiculousfish
02ddc20c87 Correct signatures of main_thread_request_t's deleted functions 2017-01-23 10:58:38 -08:00
ridiculousfish
520e567390 Eliminate the old-style iothread_perform_on_main
All clients now use the std::function form (i.e. lambdas)
2017-01-23 10:46:42 -08:00
ridiculousfish
144e7b0616 Adopt lamba-style perform_on_main in the tests 2017-01-23 10:45:48 -08:00
ridiculousfish
fe8e99138d Adopt lambda-style perform_on_main in expand.cpp
Allows eliminating find_job_data_t
2017-01-23 10:44:36 -08:00
ridiculousfish
e0abfee370 Adopt lambda-style perform_on_main in complete.cpp
Allows eliminating complete_load_no_reload
2017-01-23 10:43:34 -08:00
ridiculousfish
66a0f18410 Another fix for Linux build 2017-01-23 10:39:53 -08:00
ridiculousfish
3181bdcb9b Attempt to fix the Linux build 2017-01-23 10:38:55 -08:00
ridiculousfish
e1adc3a6b2 Make iothread's perform_on_main use std::function
This will allow clients to use lambdas instead of having to
define an out-of-line function
2017-01-23 10:37:16 -08:00
ridiculousfish
7a76efa629 Use set_cloexec instead of fcntl directly in iothread.cpp 2017-01-23 09:59:56 -08:00
ridiculousfish
216f7d912a Clean up some of the memory management in iothread.cpp
Store requests directly on the queue, instead of via a heap allocation
2017-01-23 09:56:02 -08:00
ridiculousfish
d373f1fc1d Lower-snake-case for MainThreadRequest_t and SpawnRequest_t
Matches style of rest of the project
2017-01-23 09:34:30 -08:00
ridiculousfish
36a0f745cd Fix some bogus error messages in builtin_commandline 2017-01-23 09:32:50 -08:00
ridiculousfish
ab189a75ab Switch a job's process list from a linked list to a vector of pointers
Clarifies and simplifies the memory management around process handling.
2017-01-23 09:28:34 -08:00
ridiculousfish
f4476100f2 Remove comment about job_iterator_t being used from signal handlers
It is no longer used from signal handlers, and has not been for a while
2017-01-22 00:59:50 -08:00
ridiculousfish
6bdab62358 Make io_buffer_t::create return a shared_ptr
Eliminates some manual memory management
2017-01-22 00:44:04 -08:00
ridiculousfish
009a677e0d Use the STL's make_unique if available
Fixes a build error with g++ 6.1

Fixes #3759
2017-01-22 00:32:08 -08:00
ridiculousfish
2e47817adf Second attempt to fix Xcode build for PCRE2 changes
Update osx/shared_headers/pcre2.h

Fixes #3755
2017-01-22 00:11:40 -08:00
Kurtis Rader
176a291ed2 deal with multiline commands which have flags
Fixes #3758
2017-01-21 20:23:06 -08:00
Guilhem Saurel
1350b44ecf systemctl completions: add cat & edit commands 2017-01-22 03:22:29 +01:00
ridiculousfish
1875222e93 Use one invocation of $INSTALL instead of looping
Speed up our Makefile by using $INSTALL once per type of file,
rather than passing them individually.
2017-01-21 17:39:00 -08:00
ridiculousfish
439f233ccc Make fire_event_callback take a std::function instead of function pointer 2017-01-21 17:15:45 -08:00
ridiculousfish
a91dad35db Use unique_ptr instead of new for history tests 2017-01-21 17:14:56 -08:00
ridiculousfish
6f745762bb Make universal_notifier_t use unique_ptr instead of raw pointers 2017-01-21 16:56:45 -08:00
ridiculousfish
f0065cda13 Clean up event_t handling
Use shared_ptr instead of the silly killme list
2017-01-21 16:48:07 -08:00
ridiculousfish
8a0d4854e8 Replace auto_ptr with unique_ptr 2017-01-21 16:10:42 -08:00
ridiculousfish
b3fff2d779 Switch to using unique_ptr for builtin_test
Removes a lot of terrifying manual memory management
2017-01-21 16:08:53 -08:00
ridiculousfish
754b0e9b91 Use unique_ptr in string_replace()
Eliminates some manual calls to delete
2017-01-21 15:47:12 -08:00
ridiculousfish
3139ad0d4d Use unique_ptr in builtin_commandline_scoped_transient_t
Allows removing a manual call to delete
2017-01-21 15:45:38 -08:00
ridiculousfish
3272505891 Eliminate the "Clean up the block stack" logic in eval_block_node
The block stack is now sound, and no longer needs this ancient
cleanup logic, which tried to account for cases where blocks
were pushed but never popped.
2017-01-21 15:42:35 -08:00
ridiculousfish
0991e398bb Clean up parser_t's block stack
Currently the block stack is just a vector of pointers.
Clients must manually use new() to allocate a block, and then
transfer ownership to the stack (so must NOT delete it).

Give the parser itself responsibility for allocating blocks too,
so that it takes over both allocation and deletion. Use unique_ptr
to make deletion less error-prone.
2017-01-21 15:35:35 -08:00
ridiculousfish
ac8b27fcb1 Implement and use make_unique
Allows avoiding some explicit calls to new(), which can look suspicious
2017-01-21 15:02:41 -08:00
ridiculousfish
5b108efde4 Use unique_ptr in builtin_string
Avoids manual calls to delete
2017-01-21 14:54:01 -08:00
ridiculousfish
f2884343b3 Use unique_ptr in a parser's execution_context list
Avoids requiring manual calls to delete
2017-01-21 14:53:52 -08:00
ridiculousfish
16bc7b48b5 Make profile_items use unique_ptr instead of raw pointers 2017-01-21 14:33:17 -08:00
ridiculousfish
9efa897d0d Early steps towards rationalizing SIGINT handling
Previously we would try to walk all the blocks (from within the
signal handler!) and mark them as skipped. Stop doing that, it's
wildly unsafe.

Also rationalize how the skip flag is set per block. Remove places
that shouldn't set it (e.g. break and continue shouldn't set skip
on the loop block).
2017-01-21 14:15:03 -08:00
ridiculousfish
d8a6c0a91b Add a SIGALRM handler that does nothing
This will be part of a future signal torture-test, to ensure
we are handling EINTR correctly
2017-01-21 14:07:54 -08:00
ridiculousfish
7e3db843cd Remove FUNCTION_DEF_BLOCK and FAKE_BLOCK
These are old-parser block types that are no longer used.
2017-01-21 13:57:05 -08:00
ridiculousfish
bb65b82c56 Mark some signal-related variables as 'volatile sig_atomic_t' 2017-01-21 13:33:46 -08:00
ridiculousfish
bb686a2236 Enable some test_illegal_command_exit_code tests
A comment suggests these cause bad_alloc, but this
doesn't seem to happen. If it does happen, we want to hit
it so we can track it down!
2017-01-21 12:56:22 -08:00
ridiculousfish
fc803c75a6 Remove some errant newlines in fish_tests.cpp 2017-01-21 12:55:01 -08:00
ridiculousfish
812e977e62 Clean up /tmp/fish_chunked_read_test.txt after tests 2017-01-21 12:47:05 -08:00
ridiculousfish
5a5a6a6968 Correctly handle multiple chunks from read_in_chunks
read_in_chunks does not clear the intermediate string 'str'
between iterations, so every chunk has every other chunk prepended
to it.

A secondary issue is that it calls str2wcstring() on an intermediate
chunk, which may split multi-byte sequences. This needs to be deferred
to the end.

Test added. Fixes #3756
2017-01-21 12:43:20 -08:00
ridiculousfish
f7c133da00 Use long instead of int in read_in_chunks()
Fixes warnings about narrowing conversions
2017-01-21 11:53:49 -08:00
ridiculousfish
4c56c89afc Use wcscmp instead of comparing against a string literal
Should fix OpenSUSE build
2017-01-21 11:51:06 -08:00
ridiculousfish
9361470070 Update Xcode build in response to PCRE2 upgrade
Replace the osx/pcre2/config.h with a new config.h
from the PCRE2 upgrade

Fixes #3755
2017-01-21 11:48:09 -08:00
Fabian Homborg
ab3149257b Make test errors redirectable
This can't use `fwprintf`, since that goes directly to actual stderr.

It needs to use the passed stream.
2017-01-21 13:11:54 +01:00
Kurtis Rader
2e38cf2a4b implement means to learn about a functions source
This implements a way to use the `functions` command to perform
introspection to learn about the characteristics of a function. Such as
where it came from.

Fixes #3295
2017-01-20 21:48:41 -08:00
Kurtis Rader
2be1288cac handling when stty reports zero for termsize
If the kernel reports a size of zero for the rows or columns (i.e., what
`stty -a` reports) fall back to the `COLUMNS` and `LINES` variables. If
the resulting values are not reasonable fallback to using 80x24.

Fixes #3740
2017-01-20 15:34:29 -08:00
Clément Martinez
082d4b5a7e Add light completions 2017-01-21 00:33:58 +01:00
Fabian Homborg
c111a65622 Stack completions: Fix dead link
This was just reshuffled a bit. Now it uses the main page (which then
redirects to the docs anyway), which should be a bit more stable.
2017-01-20 21:46:59 +01:00
Fabian Homborg
e89c66a224 git completions: git push uses set-upstream
This was a misunderstanding in 96a28df. git _branch_ now uses
set-upstream-to, while git _pull_ still only has set-upstream.

Thanks @moverest.
2017-01-20 15:55:39 +01:00
Clément Martinez
85212c57e8 Add castnow completions 2017-01-19 21:59:59 -08:00
Kurtis Rader
d6ceeb915d fix interaction of buffered/unbuffered output
Fixes #3747
2017-01-19 20:58:12 -08:00
David Adam
bc57c7710f pcre2: add maintainer mode and disable by default 2017-01-18 16:44:48 -08:00
mathbunnyru
9768653df7 New pcre2 2017-01-18 16:44:48 -08:00
Mehul Tikekar
59eb75021b Remove cd in __fish_print_interfaces 2017-01-18 15:44:28 -08:00
Kurtis Rader
d905ed33fe another glibc EIO workaround
Partial fix for #3737 and #3644
2017-01-15 19:27:53 -08:00
mathbunnyru
7a80610300 Delete trailing spaces 2017-01-15 14:57:21 -08:00
Kurtis Rader
d37e7bcc25 reinstate some bindings for vi mode
Fixes #3731
2017-01-15 11:11:38 -08:00
Kurtis Rader
5809608bd2 implement chunked reads
Provide a more efficient method for reading lines (or null terminated
sequences) when the input is seekable.

Another partial fix for #2007
2017-01-14 20:51:54 -08:00
Kurtis Rader
2e65e27189 refactor builtin_read
Refactor `builtin_read()` to split the code that does the actual reading
into separate functions. This introduces the `read_in_chunks()` function
but in this change it is just a clone of `read_one_char_at_a_time()`. It
will be modified to actually read in chunks in the next change.

Partial fix for #2007
2017-01-14 20:51:54 -08:00
Kurtis Rader
fd6d814ea4 remove unnecessary signal management
The shell was doing a log of signal blocking/unblocking that hurts
performance and can be avoided. This reduced the elapsed time for a
simple benchmark by 25%.

Partial fix for #2007
2017-01-14 20:51:54 -08:00
Kurtis Rader
51adf815aa Dragonfly BSD needs sys/socket.h
Commit 4bc220f removed `#include <sys/socket.h>` which breaks compiling
on Dragonfly BSD.
2017-01-14 19:53:27 -08:00
Kurtis Rader
56e05dab02 another attempt to workaround a glibc bug
This is another attempt to fix issue #3644 that we believe is due to issue
https://sourceware.org/bugzilla/show_bug.cgi?id=20632.
2017-01-13 21:18:34 -08:00
Kurtis Rader
2e9a349dd0 normalize use of stdio functions taking a stream
We should never use stdio functions that use stdout implicitly. Saving a
few characters isn't worth the inconsistency. Too, using the forms such
as `fwprintf()` which take an explicit stream makes it easier to find
the places we write to stdout versus stderr.

Fixes #3728
2017-01-13 20:48:55 -08:00
699 changed files with 478765 additions and 64590 deletions

View File

@@ -24,12 +24,3 @@
</rule>
<--!>
]]>
<rule>
<pattern>flock \(</pattern>
<message>
<id>flockSemanticsWarning</id>
<severity>warning</severity>
<summary>flock has a fallback implemented in terms of fcntl; ensure that the fcntl semantics will apply (see http://0pointer.de/blog/projects/locking.html)</summary>
</message>
</rule>

View File

@@ -8,7 +8,3 @@ varFuncNullUB
// the warning being suppressed. In other words this unmatchedSuppression
// warnings are false positives.
unmatchedSuppression
memleak:src/env_universal_common.cpp
flockSemanticsWarning:src/env_universal_common.cpp
flockSemanticsWarning:src/history.cpp

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

20
.gitattributes vendored
View File

@@ -13,30 +13,16 @@
# 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
/.github/* export-ignore
# for linguist; let github identify our project as C++ instead of C due to pcre2
/pcre2-10.21/ linguist-vendored
/pcre2-10.21/* linguist-vendored
/pcre2-10.22/ linguist-vendored
/pcre2-10.22/* linguist-vendored
angular.js linguist-vendored
/doc_src/* linguist-documentation
*.fish linguist-language=fish
tests/*.in linguist-language=fish
tests/*.in linguist-language=fish

View File

@@ -1,21 +1,14 @@
<!-- check if this problem is already solved! github.com/issues?q=is:issue+user:fish-shell -->
- [ ] Have you checked if problem occurs with [fish 2.4.0](/fish-shell/fish-shell/releases/tag/2.4.0)?
- [ ] Tried fish without third-party customizations *(check `sh -c 'env HOME=$(mktemp -d) fish'`)*?
<!--
Please tell us which fish version you are using by executing the following:
**fish version installed** *(`fish --version`)*:
fish --version
echo $version
**OS/terminal used**:
Please tell us which operating system and terminal you are using. The output of `uname -a` and `echo $TERM` may be helpful in this regard although other commands might be relevant in your specific situation.
Talk about the the issue here.
Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:
## Reproduction steps
1. step one
2.
sh -c 'env HOME=$(mktemp -d) fish'
<!-- Hard to explain? Post a screen recording on asciinema.org then link it here -->
## Results
```console
~ $ math 2 + 2
5
```
Tell us how to reproduce the problem. Including an asciinema.org recording is useful for problems that involve the visual display of fish output such as its prompt.
-->

View File

@@ -6,5 +6,6 @@ Fixes issue #
## TODOs:
<!-- Just check off what what we know been done so far. We can help you with this stuff. -->
- [ ] Changes to fish usage are reflected in user documenation/manpages.
- [ ] Changes to fish usage are reflected in user documentation/manpages.
- [ ] Tests have been added for regressions fixed
- [ ] User-visible changes noted in CHANGELOG.md

4
.gitignore vendored
View File

@@ -88,7 +88,7 @@ messages.pot
/tests/*.tmp.*
/share/pkgconfig
# xcode
# xcode
## Build generated
build/
DerivedData/
@@ -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,140 @@
# fish 2.7.1 (released December 23, 2017)
This release of fish fixes an issue where iTerm 2 on macOS would display a warning about paste bracketing being left on when starting a new fish session (#4521).
If you are upgrading from version 2.6.0 or before, please also review the release notes for 2.7.0 and 2.7b1 (included below).
--
# 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.
## Known issues
- Apple macOS Sierra 10.12.5 introduced a problem with launching web browsers from other programs using AppleScript. This affects the fish Web configuration (`fish_config`); users on these platforms will need to manually open the address displayed in the terminal, such as by copying and pasting it into a browser. This problem will be fixed with macOS 10.12.6.
If you are upgrading from version 2.5.0 or before, please also review the release notes for 2.6b1 (included below).
---
# fish 2.6b1 (released May 14, 2017)
## Notable fixes and improvements
- Jobs running in the background can now be removed from the list of jobs with the new `disown` builtin, which behaves like the same command in other shells (#2810).
- Command substitutions now have access to the terminal, like in other shells. This allows tools like `fzf` to work properly (#1362, #3922).
- In cases where the operating system does not report the size of the terminal, the `COLUMNS` and `LINES` environment variables are used; if they are unset, a default of 80x24 is assumed.
- New French (#3772 & #3788) and improved German (#3834) translations.
- fish no longer depends on the `which` external command.
## Other significant changes
- Performance improvements in launching processes, including major reductions in signal blocking. Although this has been heavily tested, it may cause problems in some circumstances; set the `FISH_NO_SIGNAL_BLOCK` variable to 0 in your fish configuration file to return to the old behaviour (#2007).
- Performance improvements in prompts and functions that set lots of colours (#3793).
- The Delete key no longer deletes backwards (a regression in 2.5.0).
- `functions` supports a new `--details` option, which identifies where the function was loaded from (#3295), and a `--details --verbose` option which includes the function description (#597).
- `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).
- `printf` correctly outputs "long long" integers (#3352).
- `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).
- 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).
- Under terminals which support it, bracketed paste is enabled, escaping problematic characters for security and convience (#3871). Inside single quotes (`'`), single quotes and backslashes in pasted text are escaped (#967). The `fish_clipboard_paste` function (bound to `C-v` by default) is still the recommended pasting method where possible as it includes this functionality and more.
- Processes in pipelines are no longer signalled as soon as one command in the pipeline has completed (#1926). This behaviour matches other shells mre closely.
- All functions requiring Python work with whichever version of Python is installed (#3970). Python 3 is preferred, but Python 2.6 remains the minimum version required.
- The color of the cancellation character can be controlled by the `fish_color_cancel` variable (#3963).
- Added completions for:
- `caddy` (#4008)
- `castnow` (#3744)
- `climate` (#3760)
- `flatpak`
- `gradle` (#3859)
- `gsettings` (#4001)
- `helm` (#3829)
- `i3-msg` (#3787)
- `ipset` (#3924)
- `jq` (#3804)
- `light` (#3752)
- `minikube` (#3778)
- `mocha` (#3828)
- `mkdosfs` (#4017)
- `pv` (#3773)
- `setsid` (#3791)
- `terraform` (#3960)
- `usermod` (#3775)
- `xinput`
- `yarn` (#3816)
- Improved completions for `adb` (#3853), `apt` (#3771), `bzr` (#3769), `dconf`, `git` (including #3743), `grep` (#3789), `go` (#3789), `help` (#3789), `hg` (#3975), `htop` (#3789), `killall` (#3996), `lua`, `man` (#3762), `mount` (#3764 & #3841), `obnam` (#3924), `perl` (#3856), `portmaster` (#3950), `python` (#3840), `ssh` (#3781), `scp` (#3781), `systemctl` (#3757) and `udisks` (#3764).
---
# fish 2.5.0 (released February 3, 2017)
There are no major changes between 2.5b1 and 2.5.0. If you are upgrading from version 2.4.0 or before, please also review the release notes for 2.5b1 (included below).
@@ -6,6 +143,8 @@ There are no major changes between 2.5b1 and 2.5.0. If you are upgrading from ve
- The Home, End, Insert, Delete, Page Up and Page Down keys work in Vi-style key bindings (#3731).
---
# fish 2.5b1 (released January 14, 2017)
## Platform Changes
@@ -45,7 +184,7 @@ This is only necessary on 10.6. OS X 10.7 and later include the required library
- A new key bindings preset, `fish_hybrid_key_bindings`, including all the Emacs-style and Vi-style bindings, which behaves like `fish_vi_key_bindings` in fish 2.3.0 (#3556).
- `function` now returns an error when called with invalid options, rather than defining the function anyway (#3574). This was a regression present in fish 2.3 and 2.4.0.
- fish no longer prints a warning when it identifies a running instance of an old version (2.1.0 and earlier). Changes to universal variables may not propagate between these old versions and 2.5b1.
- Improved compatiblity with Android (#3585), MSYS/mingw (#2360), Solaris (#3456, #3340)
- Improved compatiblity with Android (#3585), MSYS/mingw (#2360), and Solaris (#3456, #3340).
- Like other shells, the `test` builting now returns an error for numeric operations on invalid integers (#3346, #3581).
- `complete` no longer recognises `--authoritative` and `--unauthoritative` options, and they are marked as obsolete.
- `status` accepts subcommands, and should be used like `status is-interactive`. The old options continue to be supported for the foreseeable future (#3526), although only one subcommand or option can be specified at a time.
@@ -514,7 +653,7 @@ Bug Fixes
* **fish_indent is fixed.** In particular, the `funced` and `funcsave` functions work again.
* A SIGTERM now ends the whole execution stack again (resolving #13).
* Bumped the __fish_config_interactive version number so the default fish_color_autosuggestion kicks in.
* fish_config better handles combined term256 and classic colors like "555 yellow".
* fish_config better handles combined term256 and classic colors like "555 yellow".
New Features
------------
@@ -572,4 +711,4 @@ The large number of forks relative to bash are due to fish's insanely expensive
The large reduction in lstat() numbers is due to fish no longer needing to call ttyname() on OS X.
We've got some work to do to be as lean as bash, but we're on the right track.
We've got some work to do to be as lean as bash, but we're on the right track.

View File

@@ -1,17 +1,23 @@
# 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, etc. 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.
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.
See the bottom of this document for help on installing the linting and style reformatting tools discussed in the following sections.
Fish source should limit the C++ features it uses to those available in C++03. That allows fish to use a few components from [C++TR1](https://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1) such as `shared_ptr`. It also allows fish to be built and run on OS X Snow Leopard (released in 2009); the oldest OS X release we still support.
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 pretend that sub-include is not 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.
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.
To help enforce this rule the `make lint` (and `make lint-all`) command will run the [include-what-you-use](http://include-what-you-use.org/) tool. The IWYU you project is on [github](https://github.com/include-what-you-use/include-what-you-use).
To help enforce this rule the `make lint` (and `make lint-all`) command will run the [include-what-you-use](http://include-what-you-use.org/) tool. You can find the IWYU project on [github](https://github.com/include-what-you-use/include-what-you-use).
To install the tool on OS X you'll need to add a [formula](https://github.com/jasonmp85/homebrew-iwyu) then install it:
@@ -24,7 +30,7 @@ On Ubuntu you can install it via `sudo apt-get install iwyu`.
## Lint Free Code
Automated analysis tools like cppcheck and oclint can point out potential bugs. They also help ensure the code has a consistent style and that it avoids patterns that tend to confuse people.
Automated analysis tools like cppcheck and oclint can point out potential bugs or code that is extremely hard to understand. They also help ensure the code has a consistent style and that it avoids patterns that tend to confuse people.
Ultimately we want lint free code. However, at the moment a lot of cleanup is required to reach that goal. For now simply try to avoid introducing new lint.
@@ -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,9 +139,11 @@ 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. Fish scripts such as those in the *share/functions* and *tests* directories should be formatted using the `fish_indent` command.
1. All fish scripts, such as those in the *share/functions* and *tests* directories, should be formatted using the `fish_indent` command.
1. Function names should be all lowercase with undescores separating words. Private functions should begin with an underscore. The first word should be `fish` if the function is unique to fish.
@@ -125,7 +153,7 @@ code to ignore
1. The [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) forms the basis of the fish C++ style guide. There are two major deviations for the fish project. First, a four, rather than two, space indent. Second, line lengths up to 100, rather than 80, characters.
1. The `clang-format` command is authoritative with respect to indentation, whitespace around operators, etc. **Note**: this rule should be ignored at this time. After the code is cleaned up this rule will become mandatory.
1. The `clang-format` command is authoritative with respect to indentation, whitespace around operators, etc.
1. All names in code should be `small_snake_case`. No Hungarian notation is used. Classes and structs names should be followed by `_t`.
@@ -135,13 +163,13 @@ code to ignore
1. Comments should always use the C++ style; i.e., each line of the comment should begin with a `//` and should be limited to 100 characters. Comments that do not begin a line should be separated from the previous text by two spaces.
1. Comments that document the purpose of a function or class should begin with three slashes, `///`, so that OS X Xcode (and possibly other ideas) will extract the comment and show it in the "Quick Help" window when the cursor is on the symbol.
1. Comments that document the purpose of a function or class should begin with three slashes, `///`, so that OS X Xcode (and possibly other IDE's) will extract the comment and show it in the "Quick Help" window when the cursor is on the symbol.
## Testing
The source code for fish includes a large collection of tests. If you are making any changes to fish, running these tests is highly recommended to make sure the behaviour remains consistent.
The source code for fish includes a large collection of tests. If you are making any changes to fish, running these tests is mandatory to make sure the behaviour remains consistent and regressions are not introduced. Even if you don't run the tests they will be run via the [Travis CI](https://travis-ci.org/fish-shell/fish-shell) service.
You are also strongly encouraged to add tests when changing the functionality of fish. Especially if you are fixing a bug to help ensure there are no regressions in the future (i.e., we don't reintroduce the bug).
You are strongly encouraged to add tests when changing the functionality of fish. Especially if you are fixing a bug to help ensure there are no regressions in the future (i.e., we don't reintroduce the bug).
### Local testing
@@ -151,7 +179,7 @@ Running the tests is only supported from the autotools build and not xcodebuild.
autoconf
./configure
make test [gmake on BSD]
make test # or "gmake test" on BSD
### Travis CI Build and Test
@@ -206,11 +234,7 @@ To install the hook, put it in .git/hooks/pre-push and make it executable.
### Coverity Scan
We use Coverity's static analysis tool which offers free access to open source projects. While access to the tool itself is
restricted, fish-shell organization members should know that they can login
[here with their GitHub account](https://scan.coverity.com/projects/fish-shell-fish-shell?tab=overview).
Currently, tests are triggered upon merging the `master` branch into `coverity_scan_master`.
Even if you are not a fish developer, you can keep an eye on our statistics there.
We use Coverity's static analysis tool which offers free access to open source projects. While access to the tool itself is restricted, fish-shell organization members should know that they can login [here](https://scan.coverity.com/projects/fish-shell-fish-shell?tab=overview) with their GitHub account. Currently, tests are triggered upon merging the `master` branch into `coverity_scan_master`. Even if you are not a fish developer, you can keep an eye on our statistics there.
## Installing the Required Tools
@@ -243,13 +267,36 @@ brew install clang-format
To install the reformatting tool on Linux distros that use Apt:
```
apt-cache search clang-format
apt-cache install clang-format
```
That will list the versions available. Pick the newest one available (3.6 for Ubuntu 14.04 as I write this) and install it:
That will list the versions available. Pick the newest one available (3.9 for Ubuntu 16.10 as I write this) and install it:
```
sudo apt-get install clang-format-3.6
sudo ln -s /usr/bin/clang-format-3.6 /usr/bin/clang-format
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

@@ -837,7 +837,7 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded

View File

@@ -70,7 +70,7 @@ extra_confdir = @extra_confdir@
# pcre2
#
PCRE2_WIDTH = @WCHAR_T_BITS@
PCRE2_DIR = pcre2-10.21
PCRE2_DIR = pcre2-10.22
PCRE2_LIBDIR = $(PCRE2_DIR)/.libs
PCRE2_LIB = $(PCRE2_LIBDIR)/libpcre2-$(PCRE2_WIDTH).a
PCRE2_H = $(PCRE2_DIR)/src/pcre2.h
@@ -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/
@@ -181,7 +185,7 @@ PROGRAMS := fish fish_indent fish_key_reader
# Manual pages to install
#
MANUALS := $(addsuffix .1, $(addprefix share/man/man1/, $(PROGRAMS)))
HELP_MANPAGES := $(wildcard share/man/man1/*.1)
HELP_MANPAGES = $(wildcard share/man/man1/*.1)
# Determine which man pages we don't want to install
# On OS X, don't install a man page for open, since we defeat fish's open
@@ -190,15 +194,21 @@ HELP_MANPAGES := $(wildcard share/man/man1/*.1)
# tarball includes this page, we need to skip it in the Makefile too (see
# https://github.com/fish-shell/fish-shell/issues/2561).
ifeq ($(shell uname), Darwin)
HELP_MANPAGES := $(filter-out share/man/man1/open.1, $(HELP_MANPAGES))
CONDEMNED_PAGES := open.1
HELP_MANPAGES = $(filter-out share/man/man1/open.1, $(wildcard share/man/man1/*.1))
endif
#
# All translation message catalogs
# All translation message catalogs, filter files based on LINGUAS.
#
TRANSLATIONS_SRC := $(wildcard po/*.po)
ifdef HAVE_GETTEXT
ifeq ($(HAVE_GETTEXT), 1)
TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo)
ifdef LINGUAS
TRANSLATIONS_ALL := $(TRANSLATIONS)
TRANSLATIONS_WANTED = $(patsubst %,po/%.gmo,$(LINGUAS))
TRANSLATIONS = $(filter $(TRANSLATIONS_WANTED),$(TRANSLATIONS_ALL))
endif
else
TRANSLATIONS :=
endif
@@ -243,13 +253,13 @@ 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
#
all: show-CXX show-CXXFLAGS $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc share/__fish_build_paths.fish
ifneq (,$(findstring install,$(MAKECMDGOALS)))
# Fish has been built, but if the goal was 'install', we aren't done yet and this output isnt't desirable
# Fish has been built, but if the goal was 'install', we aren't done yet and this output isnt't desirable
@echo "$(green)fish has now been built.$(sgr0)"
@echo "Run $(yellow)$(notdir $(MAKE)) install$(sgr0) to install fish.$(sgr0)"
endif
@@ -343,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:=))))
@@ -362,9 +372,15 @@ test_low_level: fish_tests $(call filter_up_to,test_low_level,$(active_test_goal
env XDG_DATA_HOME=test/data XDG_CONFIG_HOME=test/home ./fish_tests
.PHONY: test_low_level
test_high_level: test_fishscript test_interactive
test_high_level: DESTDIR = $(PWD)/test/root/
test_high_level: prefix = .
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
@@ -373,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
@@ -380,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; \
@@ -440,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;
@@ -465,7 +482,7 @@ lexicon_filter: lexicon.txt lexicon_filter.in | show-SED
else \
WORDBL='\\<'; WORDBR='\\>'; \
fi; $(SED) <lexicon.txt >>$@.tmp -n -e "s|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\)$$|s,$$WORDBL\2$$WORDBR,@\1{\2},g|p" -e '$$G;s/.*\n/b tidy/p';
$v mv $@.tmp $@; test -x $@ || chmod a+x $@;
$v mv $@.tmp $@; test -x $@ || chmod a+x $@;
#
@@ -508,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
@@ -530,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)
@@ -608,20 +628,21 @@ check-legacy-binaries:
.PHONY: check-legacy-binaries
install: all install-force | check-legacy-binaries
@echo
@echo
@echo "$(bo)fish is now installed on your system.$(sgr0)"
@echo "To run fish, type $(bo)$(green)fish$(sgr0) in your terminal."
@echo "$(T_YELLOW)Even if you are already in fish, you should now start a new fish session.$(sgr0)"
@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)"
@@ -637,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);\
@@ -671,61 +690,33 @@ 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)...";
$v for i in $(COMPLETIONS_DIR_FILES:%='%'); do \
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/completions/; \
done;
$v $(INSTALL) -m 644 $(COMPLETIONS_DIR_FILES:%='%') $(DESTDIR)$(datadir)/fish/completions/
@echo "Installing $(bo)fish functions$(sgr0)";
$v for i in $(FUNCTIONS_DIR_FILES:%='%'); do \
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/functions/; \
done;
$v $(INSTALL) -m 644 $(FUNCTIONS_DIR_FILES:%='%') $(DESTDIR)$(datadir)/fish/functions/
@echo "Installing $(bo)man pages$(sgr0)";
$v $(INSTALL) -m 644 share/groff/* $(DESTDIR)$(datadir)/fish/groff/
$v for i in $(HELP_MANPAGES); do \
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/man/man1/; \
done;
$v test -z "$(wildcard share/man/man1/*.1)" || $(INSTALL) -m 644 $(filter-out $(addprefix share/man/man1/, $(CONDEMNED_PAGES)), $(wildcard share/man/man1/*.1)) $(DESTDIR)$(datadir)/fish/man/man1/
@echo "Installing helper tools";
$v for i in $(wildcard share/tools/*.py); do\
$(INSTALL) -m 755 $$i $(DESTDIR)$(datadir)/fish/tools/; \
done;
$v for i in share/tools/web_config/*.*; do\
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/tools/web_config/; \
true; \
done;
$v for i in share/tools/web_config/js/*.*; do\
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/tools/web_config/js/; \
true; \
done;
$v for i in share/tools/web_config/partials/*; do\
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/tools/web_config/partials/; \
true; \
done;
$v for i in share/tools/web_config/sample_prompts/*.fish; do\
$(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/tools/web_config/sample_prompts/; \
true; \
done;
$v for i in share/tools/web_config/*.py; do\
$(INSTALL) -m 755 $$i $(DESTDIR)$(datadir)/fish/tools/web_config/; \
true; \
done;
@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;
$v $(INSTALL) -m 755 share/tools/*.py $(DESTDIR)$(datadir)/fish/tools/
$v $(INSTALL) -m 644 share/tools/web_config/*.* $(DESTDIR)$(datadir)/fish/tools/web_config/
$v $(INSTALL) -m 644 share/tools/web_config/js/*.* $(DESTDIR)$(datadir)/fish/tools/web_config/js/
$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 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
#
@@ -735,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
@echo $$"If you put things there, $(red)stop now!$(sgr0) $(bo)\\c"
@echo $$"$(bo)5$(sgr0) \\c"
@echo $$'\t$(bo)$(DESTDIR)$(datadir)/fish$(sgr0) will be deleted!'
@echo
@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
@@ -762,31 +746,32 @@ 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
install-translations: $(TRANSLATIONS) | show-HAVE_GETTEXT
ifdef HAVE_GETTEXT
ifeq ($(HAVE_GETTEXT), 1)
@echo "Installing translations..."
$v for i in $(TRANSLATIONS); do \
$(INSTALL) -m 755 -d $(DESTDIR)$(localedir)/`basename $$i .gmo`/LC_MESSAGES; \
@@ -799,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
#
@@ -806,7 +800,7 @@ uninstall-translations: show-DESTDIR show-localedir
#
# How basic files get compiled
#
obj/%.o: src/%.cpp | show-CXX show-CXXFLAGS show-CPPFLAGS obj
obj/%.o: src/%.cpp | show-CXX show-CXXFLAGS show-CPPFLAGS obj
@echo " CXX $(em)$@$(sgr0)"
$v $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
@@ -847,7 +841,7 @@ fish_indent: $(FISH_INDENT_OBJS) $(EXTRA_PCRE2)
$v $(CXX) $(CXXFLAGS) $(LDFLAGS) $(FISH_INDENT_OBJS) $(LIBS) -o $@
#
# Build the fish_key_reader program to show input from the terminal.
# Build the fish_key_reader program to show input from the terminal.
#
fish_key_reader: $(FISH_KEYREAD_OBJS) $(EXTRA_PCRE2)
@echo " CXX LD $(em)$@$(sgr0)"
@@ -864,7 +858,7 @@ fish_key_reader: $(FISH_KEYREAD_OBJS) $(EXTRA_PCRE2)
# exactly the files that result in objects, leaving the #include'd files
# behind.
#
depend: | show-MKDIR_P
depend: | show-MKDIR_P
@echo " CXX LD $(em)$@$(sgr0)"
$v $(MKDIR_P) /tmp/fish_make_depend/src
# This is ran only once in a blue moon - full verbosity so we are reminded what it does.
@@ -900,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
@@ -918,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
@@ -951,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/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: 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
@@ -1039,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
@@ -1057,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
@@ -1076,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
@@ -1090,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
@@ -1098,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
@@ -1140,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

188
README.md
View File

@@ -1,36 +1,145 @@
[fish](http://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](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](http://fishshell.com/docs/current/design.html).
For more on fish's design philosophy, see the [design document](https://fishshell.com/docs/current/design.html).
## Quick Start
fish generally works like other shells, like bash or zsh. A few important differences can be found at <http://fishshell.com/docs/current/tutorial.html> by searching for the magic phrase "unlike other shells".
fish generally works like other shells, like bash or zsh. A few important differences can be found at <https://fishshell.com/docs/current/tutorial.html> by searching for the magic phrase "unlike other shells".
Detailed user documentation is available by running `help` within fish, and also at <http://fishshell.com/docs/current/index.html>
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,52 +164,12 @@ 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, which, 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).
## Contact Us
Questions, comments, rants and raves can be posted to the official fish mailing list at <https://lists.sourceforge.net/lists/listinfo/fish-users> or join us on our [gitter.im channel](https://gitter.im/fish-shell/fish-shell) or IRC channel [#fish at irc.oftc.net](https://webchat.oftc.net/?channels=fish). Or use the [fish tag on Stackoverflow](https://stackoverflow.com/questions/tagged/fish).
Questions, comments, rants and raves can be posted to the official fish mailing list at <https://lists.sourceforge.net/lists/listinfo/fish-users> or join us on our [gitter.im channel](https://gitter.im/fish-shell/fish-shell) or IRC channel [#fish at irc.oftc.net](https://webchat.oftc.net/?channels=fish). Or use the [fish tag on Stackoverflow](https://stackoverflow.com/questions/tagged/fish) for questions related to fish script and the [fish tag on Superuser](https://superuser.com/questions/tagged/fish) for all other questions (e.g., customizing colors, changing key bindings).
Found a bug? Have an awesome idea? Please open an issue on this github page.

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,6 +1,6 @@
# Map file for the include-what-you-use tool on OS X. For some reason
# the version installed by HomeBrew doesn't have useful mappings for the
# system provided private headers.
# system provided headers. This also has mappings for FreeBSD.
[
{ include: ["<sys/_pthread/_pthread_once_t.h>", "private", "<pthread.h>", "public"] },
{ include: ["<sys/_pthread/_pthread_mutex_t.h>", "private", "<pthread.h>", "public"] },
@@ -9,6 +9,7 @@
{ include: ["<sys/_pthread/_pthread_cond_t.h>", "private", "<pthread.h>", "public"] },
{ include: ["<sys/_pthread/_pthread_t.h>", "private", "<pthread.h>", "public"] },
{ include: ["<sys/_pthread/_pthread_key_t.h>", "private", "<pthread.h>", "public"] },
{ include: ["<sys/_pthreadtypes.h>", "private", "<pthread.h>", "public"] },
{ include: ["<sys/_types/_posix_vdisable.h>", "private", "<pthread.h>", "public"] },
{ include: ["<sys/_types/_time_t.h>", "private", "<time.h>", "public"] },
{ include: ["<sys/_types/_suseconds_t.h>", "private", "<time.h>", "public"] },
@@ -20,6 +21,7 @@
{ include: ["<sys/_types/_seek_set.h>", "private", "<fcntl.h>", "public"] },
{ include: ["<sys/_types/_mbstate_t.h>", "private", "<wchar.h>", "public"] },
{ include: ["<iosfwd>", "private", "<string>", "public"] },
{ include: ["<sys/_stdint.h>", "private", "<stdint.h>", "public"] },
{ include: ["<sys/_types/_s_ifmt.h>", "private", "<sys/types.h>", "public"] },
{ include: ["<sys/_types/_size_t.h>", "private", "<sys/types.h>", "public"] },
{ include: ["<sys/_types/_size_t.h>", "private", "<stdlib.h>", "public"] },
@@ -51,32 +53,35 @@
{ include: ["<sys/signal.h>", "private", "<signal.h>", "public"] },
{ include: ["<strings.h>", "private", "<string.h>", "public"] },
{ include: ["<sys/termios.h>", "private", "<termios.h>", "public"] },
{ include: ["<sys/_termios.h>", "private", "<termios.h>", "public"] },
{ include: ["<sys/ttycom.h>", "private", "<termios.h>", "public"] },
{ include: ["<sys/syslimits.h>", "private", "<limits.h>", "public"] },
{ include: ["<i386/limits.h>", "private", "<limits.h>", "public"] },
{ include: ["<sys/limits.h>", "private", "<limits.h>", "public"] },
{ include: ["<sys/_types/_wint_t.h>", "private", "<stddef.h>", "public"] },
{ include: ["<sys/_select.h>", "private", "<select.h>", "public"] },
{ include: ["<sys/cdefs.h>", "private", "<unistd.h>", "public"] },
{ include: ["<istream>", "private", "<iostream>", "public"] },
{ include: ["<sys/_endian.h>", "private", "<netinet/in.h>", "public"] },
{ include: ["<sys/_types/_timespec.h>", "private", "<time.h>", "public"] },
{ include: ["<sys/_timespec.h>", "private", "<time.h>", "public"] },
{ include: ["<sys/spawn.h>", "private", "<spawn.h>", "public"] },
{ include: ["<sys/dirent.h>", "private", "<dirent.h>", "public"] },
# { include: ["<>", "private", "<>", "public"] },
{ symbol: ["sig_atomic_t", "private", "<csignal>", "public"] },
{ symbol: ["va_end", "private", "<stdarg.h>", "public"] },
{ symbol: ["va_list", "private", "<stdarg.h>", "public"] },
{ symbol: ["va_start", "private", "<stdarg.h>", "public"] },
{ symbol: ["NULL", "private", "<stddef.h>", "public"] },
{ symbol: ["NULL", "private", "<stdlib.h>", "public"] },
{ symbol: ["NULL", "private", "<stdio.h>", "public"] },
{ symbol: ["NULL", "private", "<unistd.h>", "public"] },
{ symbol: ["off_t", "private", "<unistd.h>", "public"] },
{ symbol: ["size_t", "private", "<unistd.h>", "public"] },
{ symbol: ["size_t", "private", "<stddef.h>", "public"] },
{ symbol: ["size_t", "private", "<stdlib.h>", "public"] },
{ symbol: ["off_t", "private", "<sys/types.h>", "public"] },
{ symbol: ["size_t", "private", "<sys/types.h>", "public"] },
{ symbol: ["ssize_t", "private", "<sys/types.h>", "public"] },
{ symbol: ["size_t", "private", "<stddef.h>", "public"] },
{ symbol: ["ssize_t", "private", "<stddef.h>", "public"] },
{ symbol: ["intptr_t", "private", "<unistd.h>", "public"] },
{ symbol: ["ssize_t", "private", "<unistd.h>", "public"] },
{ symbol: ["gid_t", "private", "<unistd.h>", "public"] },
{ symbol: ["uid_t", "private", "<unistd.h>", "public"] },
{ symbol: ["pid_t", "private", "<unistd.h>", "public"] },
@@ -84,12 +89,13 @@
{ symbol: ["uid_t", "private", "<sys/types.h>", "public"] },
{ symbol: ["gid_t", "private", "<sys/types.h>", "public"] },
{ symbol: ["timeval", "private", "<sys/time.h>", "public"] },
{ symbol: ["uint32_t", "private", "<sys/types.h>", "public"] },
{ symbol: ["__uint32_t", "private", "<stdint.h>", "public"] },
{ symbol: ["uint32_t", "private", "<stdint.h>", "public"] },
{ symbol: ["intptr_t", "private", "<stdint.h>", "public"] },
{ symbol: ["size_t", "private", "<stdint.h>", "public"] },
{ symbol: ["tparm", "private", "<ncurses.h>", "public"] },
{ symbol: ["tigetflag", "private", "<ncurses.h>", "public"] },
{ symbol: ["ERR", "private", "<ncurses.h>", "public"] },
{ symbol: ["OK", "private", "<ncurses.h>", "public"] },
{ symbol: ["select", "private", "<sys/select.h>", "public"] },
{ symbol: ["_LIBCPP_VERSION", "private", "<stddef.h>", "public"] },
{ symbol: ["_LIBCPP_VERSION", "private", "<unistd.h>", "public"] },

View File

@@ -35,13 +35,15 @@ for arg in $argv
set cppcheck_args $cppcheck_args $arg
else if string match -q -- '-I*' $arg
set cppcheck_args $cppcheck_args $arg
else if string match -q -- '-iquote*' $arg
set cppcheck_args $cppcheck_args $arg
end
end
# Not sure when this became necessary but without these flags cppcheck no longer works on macOS.
# It complains that "Cppcheck cannot find all the include files." It appears that cppcheck used
# to, but no longer, recognizes the -iquote flag. So switch to hardcoding the appropriate -I flags.
set cppcheck_args $cppcheck_args -I . -I ./src
# It complains that "Cppcheck cannot find all the include files." Adding these include paths should
# be harmless everywhere else.
set cppcheck_args $cppcheck_args -I /usr/include -I .
if test "$machine_type" = "x86_64"
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
@@ -69,17 +71,14 @@ end
# We now have a list of files to check so run the linters.
if set -q c_files[1]
if type -q iwyu
if type -q include-what-you-use
echo
echo ========================================
echo Running IWYU
echo ========================================
# The stderr to stdout redirection is because cppcheck, incorrectly IMHO, writes its
# diagnostic messages to stderr. Anyone running this who wants to capture its output will
# expect those messages to be written to stdout.
for c_file in $c_files
switch $kernel_name
case Darwin
case Darwin FreeBSD
include-what-you-use -Xiwyu --no_default_mappings -Xiwyu \
--mapping_file=build_tools/iwyu.osx.imp --std=c++11 \
$cppcheck_args $c_file 2>&1
@@ -87,7 +86,7 @@ if set -q c_files[1]
include-what-you-use -Xiwyu --mapping_file=build_tools/iwyu.linux.imp \
$cppcheck_args $c_file 2>&1
case '*' # hope for the best
include-what-you-use $cppcheck_args $c_file 2>&1
include-what-you-use --std=c++11 $cppcheck_args $c_file 2>&1
end
end
end
@@ -114,7 +113,7 @@ if set -q c_files[1]
echo
echo ========================================
echo 'Running `cppcheck --check-config` to identify missing includes similar problems.'
echo 'Running `cppcheck --check-config` to identify missing includes and similar problems.'
echo 'Ignore unmatchedSuppression warnings as they are probably false positives we'
echo 'cannot suppress.'
echo ========================================
@@ -135,14 +134,14 @@ if set -q c_files[1]
oclint-xcodebuild xcodebuild.log >/dev/null
end
if test $all = yes
oclint-json-compilation-database -e '/pcre2-10.21/' -- -enable-global-analysis 2>&1
oclint-json-compilation-database -e '/pcre2-10.22/' -- -enable-global-analysis 2>&1
else
set i_files
for f in $c_files
set i_files $i_files -i $f
end
echo oclint-json-compilation-database -e '/pcre2-10.21/' $i_files
oclint-json-compilation-database -e '/pcre2-10.21/' $i_files 2>&1
echo oclint-json-compilation-database -e '/pcre2-10.22/' $i_files
oclint-json-compilation-database -e '/pcre2-10.22/' $i_files 2>&1
end
else
# Presumably we're on Linux or other platform not requiring special

View File

@@ -0,0 +1,34 @@
#! /usr/bin/env fish
set TAG $argv[1]
if test -z "$TAG"
echo "Tag name required."
exit 1
end
if not contains -- $TAG (git tag)
echo "$TAG is not a valid tag name."
exit 1
end
set committers_to_tag (mktemp)
set committers_from_tag (mktemp)
# You might think it would be better to case-insensitively sort/compare the names
# to produce a more natural-looking list.
# Unicode collation tables mean that this is fraught with danger; for example, the
# "“" character will not case-fold in UTF-8 locales. sort suggests using the C locale!
git log "$TAG" --format="%aN" --reverse | sort | uniq > $committers_to_tag
git log "$TAG".. --format="%aN" --reverse | sort | uniq > $committers_from_tag
echo New committers:
echo (comm -13 $committers_to_tag $committers_from_tag)','
echo
echo Returning committers:
echo (comm -12 $committers_to_tag $committers_from_tag)','
rm $committers_to_tag $committers_from_tag

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

@@ -8,13 +8,13 @@
\f0\fs30 \cf0 Fish is a smart and user friendly command line shell. For more information, visit {\field{\*\fldinst{HYPERLINK "https://fishshell.com"}}{\fldrslt https://fishshell.com}}\
\
fish will be installed into
fish will be installed into
\f1\fs26 /usr/local/
\f0\fs30 , and fish will be added to
\f0\fs30 , and fish will be added to
\f1\fs26 /etc/shells
\f0\fs30 if necessary.\
\
Your default shell will
Your default shell will
\i not
\i0 be changed. To make fish your default, run:\
\

View File

@@ -79,7 +79,6 @@ if set -q c_files[1]
cp $file $file.new # preserves mode bits
clang-format $file >$file.new
if cmp --quiet $file $file.new
echo $file was correctly formatted
rm $file.new
else
echo $file was NOT correctly formatted
@@ -107,7 +106,6 @@ if set -q f_files[1]
cp $file $file.new # preserves mode bits
fish_indent <$file >$file.new
if cmp --quiet $file $file.new
echo $file was correctly formatted
rm $file.new
else
echo $file was NOT correctly formatted

View File

@@ -37,7 +37,7 @@ AC_SUBST(EXTRA_PCRE2)
AC_MSG_CHECKING([if autoreconf needs to be run])
if test configure -ot configure.ac; then
AC_MSG_RESULT([yes])
if which autoreconf >/dev/null; then
if command -v autoreconf >/dev/null; then
# No need to provide any error messages if autoreconf fails, the
# shell and autconf should take care of that themselves
AC_MSG_NOTICE([running autoreconf --no-recursive])
@@ -68,7 +68,7 @@ fi
AC_MSG_CHECKING([if autoheader needs to be run])
if test ! -f ./config.h.in -o config.h.in -ot configure.ac; then
AC_MSG_RESULT([yes])
if which autoheader >/dev/null; then
if command -v autoheader >/dev/null; then
AC_MSG_NOTICE([running autoheader])
autoheader || exit 1
else
@@ -217,11 +217,12 @@ CXXFLAGS="$CXXFLAGS -fno-exceptions"
#
# -Wall is there to keep me on my toes
# But signed comparison warnings are way too aggressive
# Set some warning flags
# Don't warn about missing field initializers, it has too many
# false positives for code like `struct termios tmodes = {};`
#
CXXFLAGS="$CXXFLAGS -Wextra"
CXXFLAGS="$CXXFLAGS -Wextra -Wno-missing-field-initializers"
#
# This is needed in order to get the really cool backtraces on Linux
@@ -326,6 +327,25 @@ AC_CHECK_FUNCS( dirfd )
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
#
# Although setupterm is linkable thanks to SEARCH_LIBS above, some
# builds of ncurses include the actual headers in a different package
#
AC_CHECK_DECL( [setupterm], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish. If this is Linux, try running 'sudo apt-get install libncurses5-dev' or 'sudo yum install ncurses-devel'])], [
#if HAVE_NCURSES_H
#include <ncurses.h>
#elif HAVE_NCURSES_CURSES_H
#include <ncurses/curses.h>
#else
#include <curses.h>
#endif
#if HAVE_TERM_H
#include <term.h>
#elif HAVE_NCURSES_TERM_H
#include <ncurses/term.h>
#endif
] )
dnl AC_CHECK_FUNCS uses C linkage, but sometimes (Solaris!) the behaviour is
dnl different with C++.
AC_MSG_CHECKING([for wcsdup])
@@ -397,6 +417,17 @@ fi
# features that Autoconf doesn't tell us about
#
dnl AC_CHECK_FUNCS uses C linkage, but sometimes (Solaris!) the behaviour is
dnl different with C++.
AC_MSG_CHECKING([if ctermid_r() available])
AC_TRY_LINK( [ #include <stdio.h> ],
[ char buf[L_ctermid]; char *foo = ctermid_r(buf); ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_CTERMID_R, 1, Define to 1 if you have the `ctermid_r' function.)
],
[AC_MSG_RESULT(no)],
)
#
# Check if struct winsize and TIOCGWINSZ exist
#
@@ -548,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(
@@ -659,7 +662,7 @@ if test "x$included_pcre2" = "xyes"; then
AC_MSG_NOTICE([using included PCRE2 library])
# unfortunately these get added to the global configuration
ac_configure_args="$ac_configure_args --disable-pcre2-8 --enable-pcre2-$WCHAR_T_BITS --disable-shared"
AC_CONFIG_SUBDIRS([pcre2-10.21])
AC_CONFIG_SUBDIRS([pcre2-10.22])
PCRE2_CXXFLAGS='-I$(PCRE2_DIR)/src'
PCRE2_LIBS='-L$(PCRE2_LIBDIR) -lpcre2-$(PCRE2_WIDTH)'

4
debian/control vendored
View File

@@ -6,8 +6,8 @@ Uploaders: David Adam <zanchey@ucc.gu.uwa.edu.au>
Build-Depends: debhelper (>= 9.0.0), libncurses5-dev, autoconf, autotools-dev, dh-autoreconf, gettext
# When libpcre2-dev is available on all supported Debian versions, add a dependency on that.
Standards-Version: 3.9.4
Homepage: http://fishshell.com/
Vcs-Git: git://github.com/fish-shell/fish-shell.git
Homepage: https://fishshell.com/
Vcs-Git: https://github.com/fish-shell/fish-shell.git
Vcs-Browser: https://github.com/fish-shell/fish-shell
Package: fish

View File

@@ -8,7 +8,7 @@ While the documentation is pretty robust to variations in the documentation sour
## Line breaks and wrapping
Contrary to the rest of the fish source code, the documentation greatly benefits from the use of long lines and soft wrapping. It allows paragraphs to be treated as complete blocks by Doxygen, means that the semantic filter can see complete lines when deciding on how to apply syntax highlighting, and means that man pages will consistently wrap to the width of the users console in advanced pagers, such as 'most'.
Contrary to the rest of the fish source code, the documentation greatly benefits from the use of long lines and soft wrapping. It allows paragraphs to be treated as complete blocks by Doxygen, means that the semantic filter can see complete lines when deciding on how to apply syntax highlighting, and means that man pages will consistently wrap to the width of the users console in advanced pagers, such as 'most'.
## Doxygen special commands and aliases
@@ -16,7 +16,7 @@ While Markdown syntax forms the basis of the documentation content, there are so
### Structure: \\page, \\section and \\subsection
Use of Doxygen sections markers are important, as these determine what will be eventually output as a web page, man page or included in the developer docs.
Use of Doxygen sections markers are important, as these determine what will be eventually output as a web page, man page or included in the developer docs.
Currently the make process for the documentation is quite convoluted, but basically the HTML docs are produced from a single, compiled file, doc.h. This contains a number of \\page markers that produce the various pages used in the documentation. The format of a \\page mark is:
@@ -156,7 +156,7 @@ The following can be used in \\fish blocks to render some fish scenarios. These
<m>: <m>Matched</m> items, such as tab completions.
<sm>: Matched items <sm>searched</sm> for, like grep results.
<bs>: Render the contents with a preceding backslash. Useful when presenting output.
<error>: <error>This would be shown as an error.</error>
<eror>: <eror>This would be shown as an error. (Note eror, not error).</eror>
<asis>: <asis>This text will not be parsed for fish markup.</asis>
<outp>: <outp>This would be rendered as command/script output.</outp>
{{ and }}: Required when wanting curly braces in regular expression example.
@@ -175,7 +175,7 @@ ___ (3 underscores): Display a cursor.
Graphical keyboard shortcuts can be defined using the following special commands. These allow for the different text requirements across the html and man pages. The HTML uses CSS to create a keyboard style, whereas the man page would display the key as text.
- `@key{lable}`
Displays a key with a purely textual lable, such as: 'Tab', 'Page Up', 'Page Down', 'Home', 'End', 'F1', 'F19' and so on.
Displays a key with a purely textual lable, such as: 'Tab', 'Page Up', 'Page Down', 'Home', 'End', 'F1', 'F19' and so on.
- `@key{modifier,lable}`
Displays a keystroke requiring the use of a 'modifier' key, such as 'Control-A', 'Shift-X', 'Alt-Tab' etc.
@@ -204,7 +204,7 @@ Some useful Unicode/HTML5 entities:
Tested on:
- Ubuntu 14.04 with Doxygen 1.8.8, built from [GitHub source](https://github.com/doxygen/doxygen.git).
- CentOS 6.5 with Doxygen 1.8.8, built from [GitHub source](https://github.com/doxygen/doxygen.git).
- Mac OS X 10.9 with Homebrew install Doxygen 1.8.7 and 1.8.8.
- Mac OS X 10.9 with Homebrew install Doxygen 1.8.7 and 1.8.8.
Graphviz was also installed in all the above testing.

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

@@ -11,7 +11,17 @@ bg [PID...]
The PID of the desired process is usually found by using <a href="index.html#expand-process">process expansion</a>.
When at least one of the arguments isn't a valid job specifier (i.e. PID),
`bg` will print an error without backgrounding anything.
When all arguments are valid job specifiers, bg will background all matching jobs that exist.
\subsection bg-example Example
`bg %1` will put the job with job ID 1 in the background.
`bg 123 456 789` will background 123, 456 and 789.
If only 123 and 789 exist, it will still background them and print an error about 456.
`bg 123 banana` or `bg banana 123` will complain that "banana" is not a valid job specifier.

View File

@@ -7,6 +7,7 @@ bind [(-M | --mode) MODE] [(-m | --sets-mode) NEW_MODE]
bind [(-M | --mode) MODE] [(-k | --key)] SEQUENCE
bind (-K | --key-names) [(-a | --all)]
bind (-f | --function-names)
bind (-L | --list-modes)
bind (-e | --erase) [(-M | --mode) MODE]
(-a | --all | [(-k | --key)] SEQUENCE [SEQUENCE...])
\endfish
@@ -27,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.
@@ -43,6 +44,8 @@ The following parameters are available:
- `-f` or `--function-names` Display a list of available input functions
- `-L` or `--list-modes` Display a list of defined bind modes
- `-M MODE` or `--mode MODE` Specify a bind mode that the bind is used in. Defaults to "default"
- `-m NEW_MODE` or `--sets-mode NEW_MODE` Change the current mode to `NEW_MODE` after this binding is executed

View File

@@ -39,3 +39,8 @@ emit foo
block -e
# 'foo fired' will now be printed
\endfish
\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:

26
doc_src/disown.txt Normal file
View File

@@ -0,0 +1,26 @@
\section disown disown - remove a process from the list of jobs
\subsection disown-synopsis Synopsis
\fish{synopsis}
disown [ PID ... ]
\endfish
\subsection disown-description Description
`disown` removes the specified <a href="index.html#syntax-job-control">job</a> from the list of jobs. The job itself continues to exist, but fish does not keep track of it any longer.
Jobs in the list of jobs are sent a hang-up signal when fish terminates, which usually causes the job to terminate; `disown` allows these processes to continue regardless.
If no process is specified, the most recently-used job is removed (like `bg` and `fg`). If one or more `PID`s are specified, jobs with the specified process IDs are removed from the job list. Invalid jobs are ignored and a warning is printed.
If a job is stopped, it is sent a signal to continue running, and a warning is printed. It is not possible to use the `bg` builtin to continue a job once it has been disowned.
The PID of the desired process is usually found by using <a href="index.html#expand-process">process expansion</a>, which can specify jobs or search by process name.
`disown` returns 0 if all specified jobs were disowned successfully, and 1 if any problems were encountered.
\subsection disown-example Example
`firefox &; disown` will start the Firefox web browser in the background and remove it from the job list, meaning it will not be closed when the fish process is closed.
`disown (jobs -p)` removes all jobs from the job list without terminating them.

View File

@@ -20,4 +20,9 @@ function event_test --on-event test_event
end
emit test_event something
\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,6 +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-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>
@@ -85,6 +88,25 @@ end
Use the `$status` variable. This replaces the `$?` variable used in some other shells.
\fish{cli-dark}
somecommand
if test $status -eq 7
echo "That's my lucky number!"
end
\endfish
If you are just interested in success or failure, you can run the command directly as the if-condition:
\fish{cli-dark}
if somecommand
echo "Command succeeded"
else
echo "Command failed"
end
\endfish
See the documentation for <a href="commands.html#test">`test`</a> and <a href="commands.html#if">`if`</a> for more information.
<hr>
\section faq-single-env How do I set an environment variable for just one command?
@@ -103,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?
@@ -183,7 +225,7 @@ Change the value of the variable `fish_greeting` or create a `fish_greeting` fun
set fish_greeting
\endfish
<hr>
\section faq-history Why doesn't history substitution ("!$" etc.) work?
Because history substitution is an awkward interface that was invented before interactive line editing was even possible. Fish drops it in favor of perfecting the interactive history recall interface. Switching requires a small change of habits: if you want to modify an old line/word, first recall it, then edit. E.g. don't type "sudo !!" - first press Up, then Home, then type "sudo ".
@@ -202,6 +244,30 @@ 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-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:
\fish{cli-dark}
abbr -a -- - 'cd -'
\endfish
<hr>
\section faq-uninstalling Uninstalling fish

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

@@ -9,10 +9,10 @@ funced [OPTIONS] NAME
`funced` provides an interface to edit the definition of the function `NAME`.
If the `$VISUAL` environment variable is set, it will be used as the program to edit the function. If `$VISUAL` is unset but `$EDITOR` is set, that will be used. Otherwise, a built-in editor will be used.
If the `$VISUAL` environment variable is set, it will be used as the program to edit the function. If `$VISUAL` is unset but `$EDITOR` is set, that will be used. Otherwise, a built-in editor will be used. Note that to enter a literal newline using the built-in editor you should press @key{Alt,Enter}. Pressing @key{Enter} signals that you are done editing the function. This does not apply to an external editor like emacs or vim.
If there is no function called `NAME` a new function will be created with the specified name
- `-e command` or `--editor command` Open the function body inside the text editor given by the command (for example, "vi"). The command 'fish' will use the built-in editor.
- `-e command` or `--editor command` Open the function body inside the text editor given by the command (for example, `-e vi`). The special command `fish` will use the built-in editor (same as specifying `-i`).
- `-i` or `--interactive` Open function body in the built-in editor.
- `-i` or `--interactive` Force opening the function body in the built-in editor even if `$VISUAL` or `$EDITOR` is defined.

View File

@@ -91,3 +91,7 @@ end
This will beep when the most recent job completes.
\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

@@ -3,6 +3,7 @@
\subsection functions-synopsis Synopsis
\fish{synopsis}
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
@@ -14,7 +15,7 @@ functions [ -e | -q ] FUNCTIONS...
The following options are available:
- `-a` or `--all` lists all functions, even those whose name start with an underscore.
- `-a` or `--all` lists all functions, even those whose name starts with an underscore.
- `-c OLDNAME NEWNAME` or `--copy OLDNAME NEWNAME` creates a new function named NEWNAME, using the definition of the OLDNAME function.
@@ -22,10 +23,22 @@ The following options are available:
- `-e` or `--erase` causes the specified functions to be erased.
- `-D` or `--details` reports the path name where each function is defined or could be autoloaded, `stdin` if the function was defined interactively or on the command line or by reading stdin, and `n/a` if the function isn't available. If the `--verbose` option is also specified then five lines are written:
-# the pathname as already described,
-# `autoloaded`, `not-autoloaded` or `n/a`,
-# the line number within the file or zero if not applicable,
-# `scope-shadowing` if the function shadows the vars in the calling function (the normal case if it wasn't defined with `--no-scope-shadowing`), else `no-scope-shadowing`, or `n/a` if the function isn't defined,
-# the function description minimally escaped so it is a single line or `n/a` if the function isn't defined.
You should not assume that only five lines will be written since we may add additional information to the output in the future.
- `-n` or `--names` lists the names of all defined functions.
- `-q` or `--query` tests if the specified functions exist.
- `-v` or `--verbose` will make some output more verbose.
The default behavior of `functions`, when called with no arguments, is to print the names of all defined functions. Unless the `-a` option is given, no functions starting with underscores are not included in the output.
If any non-option parameters are given, the definition of the specified functions are printed.

View File

@@ -49,17 +49,27 @@ These flags can appear before or immediately after one of the sub-commands liste
\subsection history-examples Example
\fish
history --clear
history clear
# Deletes all history items
history --search --contains "foo"
history search --contains "foo"
# Outputs a list of all previous commands containing the string "foo".
history --delete --prefix "foo"
history delete --prefix "foo"
# Interactively deletes commands which start with "foo" from the history.
# 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

@@ -17,7 +17,7 @@
\section introduction Introduction
This is the documentation for `fish`, the friendly interactive shell. `fish` is a user friendly commandline shell intended mostly for interactive use. A shell is a program used to execute other programs. For the latest information on `fish`, please visit the <a href="http://fishshell.com/">`fish` homepage</a>.
This is the documentation for `fish`, the friendly interactive shell. `fish` is a user friendly commandline shell intended mostly for interactive use. A shell is a program used to execute other programs. For the latest information on `fish`, please visit the <a href="https://fishshell.com/">`fish` homepage</a>.
\section syntax Syntax overview
@@ -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:
@@ -667,11 +668,22 @@ Example:
If the current directory contains the files 'foo' and 'bar', the command `echo a(ls){1,2,3} ` will output 'abar1 abar2 abar3 afoo1 afoo2 afoo3'.
\section identifiers Shell variable and function names
The names given to shell objects such as variables and function names are known as "identifiers". Each type of identifier has rules that define the valid sequence of characters which compose the identifier.
A variable name cannot be empty. It can contain only letters, digits, and underscores. It may begin and end with any of those characters.
A function name cannot be empty. It may not begin with a hyphen ("-") and may not contain a slash ("/"). All other characters, including a space, are valid.
A bind mode name (e.g., `bind -m abc ...`) is restricted to the rules for valid variable names.
\section variables Shell variables
Shell variables are named pieces of data, which can be created, deleted and their values changed and used by the user. Variables may optionally be "exported", so that a copy of the variable is available to any subprocesses the shell creates. An exported variable is referred to as an "environment variable".
To set a variable value, use the <a href="commands.html#set">`set` command</a>.
To set a variable value, use the <a href="commands.html#set">`set` command</a>. A variable name can not be empty and can contain only letters, digits, and underscores. It may begin and end with any of those characters.
Example:
@@ -681,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
@@ -767,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:
@@ -811,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.
@@ -821,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.
@@ -849,12 +867,10 @@ The user can change the settings of `fish` by changing the values of certain var
- `FISH_VERSION`, the version of the currently running fish
- `COLUMNS`, the current width of the terminal
- `LINES`, the current height of the terminal
- `SHLVL`, the level of nesting of shells
- `COLUMNS` and `LINES`, the current size of the terminal in height and width. These values are only used by fish if the operating system does not report the size of the terminal. Both variables must be set in that case otherwise a default of 80x24 will be used. They are updated when the window size changes.
The names of these variables are mostly derived from the csh family of shells and differ from the ones used by Bourne style shells such as bash.
Variables whose name are in uppercase are exported to the commands started by fish, while those in lowercase are not exported. This rule is not enforced by fish, but it is good coding practice to use casing to distinguish between exported and unexported variables. `fish` also uses several variables internally. Such variables are prefixed with the string `__FISH` or `__fish.` These should never be used by the user. Changing their value may break fish.
@@ -867,17 +883,21 @@ Fish stores the exit status of the last process in the last job to exit in the `
If `fish` encounters a problem while executing a command, the status variable may also be set to a specific value:
- 1 is the generally the exit status from fish builtin commands if they were supplied with invalid arguments
- 0 is generally the exit status of fish commands if they successfully performed the requested operation.
- 123 means that the command was not executed because the command name contained invalid characters
- 1 is generally the exit status of fish commands if they failed to perform the requested operation.
- 124 means that the command was not executed because none of the wildcards in the command produced any matches
- 121 is generally the exit status of fish commands if they were supplied with invalid arguments.
- 125 means that while an executable with the specified name was located, the operating system could not actually execute the command
- 123 means that the command was not executed because the command name contained invalid characters.
- 126 means that while a file with the specified name was located, it was not executable
- 124 means that the command was not executed because none of the wildcards in the command produced any matches.
- 127 means that no function, builtin or command with the given name could be located
- 125 means that while an executable with the specified name was located, the operating system could not actually execute the command.
- 126 means that while a file with the specified name was located, it was not executable.
- 127 means that no function, builtin or command with the given name could be located.
If a process exits through a signal, the exit status will be 128 plus the number of the signal.
@@ -920,6 +940,8 @@ The following variables are available to change the highlighting colors in fish:
- `fish_color_host`, the color used to print the current host system in some of fish default prompts
- `fish_color_cancel`, the color for the '^C' indicator on a canceled command
Additionally, the following variables are available to change the highlighting in the completion pager:
- `fish_pager_color_prefix`, the color of the prefix string, i.e. the string that is to be completed
@@ -979,7 +1001,7 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
- @key{Alt,&larr;,Left} and @key{Alt,&rarr;,Right} move the cursor one word left or right, or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, @key{Alt,&rarr;,Right} (or @key{Alt,F}) accepts the first word in the suggestion.
- @cursor_key{&uarr;,Up} and @cursor_key{&darr;,Down} search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the <a href='#history'>history</a> section for more information on history searching.
- @cursor_key{&uarr;,Up} and @cursor_key{&darr;,Down} (or @key{Control,P} and @key{Control,N} for emacs aficionados) search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the <a href='#history'>history</a> section for more information on history searching.
- @key{Alt,&uarr;,Up} and @key{Alt,&darr;,Down} search the command history for the previous/next token containing the token under the cursor before the search was started. If the commandline was not on a token when the search started, all tokens match. See the <a href='#history'>history</a> section for more information on history searching.
@@ -1076,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.
@@ -1102,6 +1124,8 @@ Command mode is also known as normal mode.
`fish` uses an Emacs style kill ring for copy and paste functionality. Use @key{Control,K} to cut from the current cursor position to the end of the line. The string that is cut (a.k.a. killed) is inserted into a linked list of kills, called the kill ring. To paste the latest value from the kill ring use @key{Control,Y}. After pasting, use @key{Alt,Y} to rotate to the previous kill.
Copy and paste from outside are also supported, both via the @key{Control,X} / @key{Control,V} bindings and via the terminal's paste function, for which fish enables "Bracketed Paste Mode". When pasting inside single quotes, pasted single quotes and backslashes are automatically escaped so that the result can be used as a single token simply by closing the quote after.
\subsection history-search Searchable history
After a command has been entered, it is inserted at the end of a history list. Any duplicate history items are automatically removed. By pressing the up and down keys, the user can search forwards and backwards in the history. If the current command line is not empty when starting a history search, only the commands containing the string entered into the command line are shown.
@@ -1112,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:
@@ -1160,6 +1187,7 @@ Configuration files are evaluated in the following order:
- `/usr/share/fish/vendor_conf.d` (set at compile time; by default, `$__fish_datadir/conf.d`)
If there are multiple files with the same name in these directories, only the first will be executed.
They are executed in order of their filename, sorted (like globs) in a natural order (i.e. "01" sorts before "2").
- User initialization, usually in `~/.config/fish/config.fish` (controlled by the `XDG_CONFIG_HOME` environment variable).
@@ -1167,6 +1195,8 @@ These paths are controlled by parameters set at build, install, or run time, and
This wide search may be confusing. If you are unsure where to put your own customisations, use `~/.config/fish/config.fish`.
Note that ~/.config/fish/config.fish is sourced _after_ the snippets. This is so users can copy snippets and override some of their behavior.
These files are all executed on the startup of every shell. If you want to run a command only on starting an interactive shell, use the exit status of the command `status --is-interactive` to determine if the shell is interactive. If you want to run a command only when using a login shell, use `status --is-login` instead. This will speed up the starting of non-interactive or non-login shells.
If you are developing another program, you may wish to install configuration which is run for all users of the fish shell on a system. This is discouraged; if not carefully written, they may have side-effects or slow the startup of the shell. Additionally, users of other shells will not benefit from the Fish-specific configuration. However, if they are absolutely required, you may install them to the "vendor" configuration directory. As this path may vary from system to system, the `pkgconfig` framework should be used to discover this path with the output of `pkg-config --variable confdir fish`.
@@ -1267,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

@@ -7,7 +7,7 @@
\endhtmlonly
`fish` Copyright © 2005-2009 Axel Liljencrantz. `fish` is released under the GNU General Public License, version 2.
`fish` Copyright © 2005-2009 Axel Liljencrantz. `fish` is released under the GNU General Public License, version 2.
`fish` includes other code licensed under the GNU General Public License, version 2, including GNU `printf`:

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 one line from standard input and stores the result in one or more shell variables.
`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:
@@ -15,14 +15,17 @@ The following options are available:
- `-g` or `--global` makes the variables global.
- `-i` or `--silent` makes the characters typed obfuscated. This is useful for reading things like passwords or other sensitive information. Note that in bash the short flag is `-s`. We can't use that due to the existing use as an alias for `--shell`.
- `-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.
- `-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>.
- `-P PROMPT_STR` or `--prompt-str=PROMPT_STR` uses the string as the prompt for the interactive mode. It is equivalent to <code>echo PROMPT_STR</code> and is provided solely to avoid the need to frame the prompt as a command. All special characters in the string are automatically escaped before being passed to the <code>echo</code> command.
- `-R RIGHT_PROMPT_CMD` or `--right-prompt=RIGHT_PROMPT_CMD` uses the output of the shell command `RIGHT_PROMPT_CMD` as the right prompt for the interactive mode. There is no default right prompt command.
- `-s` or `--shell` enables syntax highlighting, tab completions and command termination suitable for entering shellscript code in the interactive mode.
@@ -33,9 +36,10 @@ The following options are available:
- `-x` or `--export` exports the variables to child processes.
- `-a` or `--array` stores the result as an array.
- `-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.
@@ -43,7 +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 returns 1. If not, it returns 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.
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,13 +8,14 @@ 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
`set` manipulates <a href="index.html#variables">shell variables</a>.
If set is called with no arguments, the names and values of all shell variables are printed. If some of the scope or export flags have been given, only the variables matching the specified scope are printed.
If set is called with no arguments, the names and values of all shell variables are printed in sorted order. If some of the scope or export flags have been given, only the variables matching the specified scope are printed.
With both variable names and values provided, `set` assigns the variable `VARIABLE_NAME` the values `VALUES...`.
@@ -37,14 +38,16 @@ The following options are available:
- `-q` or `--query` test if the specified variable names are defined. Does not output anything, but the builtins exit status is the number of variables specified that were not defined.
- `-n` or `--names` List only the names of all defined variables, not their value
- `-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:
@@ -70,7 +73,7 @@ In erase mode, if variable indices are specified, only the specified slices of t
`set` requires all options to come before any other arguments. For example, `set flags -l` will have the effect of setting the value of the variable `flags` to '-l', not making the variable local.
In assignment mode, `set` exits with a non-zero exit status if variable assignments could not be successfully performed. If the variable assignments were performed, the exit status is unchanged. This allows simultaneous capture of the output and exit status of a subcommand, e.g. `if set output (command)`. In query mode, the exit status is the number of variables that were not found. In erase mode, `set` exits with a zero exit status in case of success, with a non-zero exit status if the commandline was invalid, if the variable was write-protected or if the variable did not exist.
In assignment mode, `set` does not modify the exit status. This allows simultaneous capture of the output and exit status of a subcommand, e.g. `if set output (command)`. In query mode, the exit status is the number of variables that were not found. In erase mode, `set` exits with a zero exit status in case of success, with a non-zero exit status if the commandline was invalid, if the variable was write-protected or if the variable did not exist.
\subsection set-example Example
@@ -87,8 +90,8 @@ set -e smurf
set PATH[4] ~/bin
# Changes the fourth element of the $PATH array to ~/bin
if set python_path (which python)
if set python_path (type -p python)
echo "Python is at $python_path"
end
# Outputs the path to Python if `which` returns true.
# Outputs the path to Python if `type -p` returns true.
\endfish

View File

@@ -6,13 +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-line-number
status print-stack-trace
status filename
status function
status line-number
status stack-trace
status job-control CONTROL-TYPE
\endfish
@@ -26,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`.
@@ -36,13 +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-line-number` prints the line number of the currently running script. Also `-n` or `--current-line-number`.
- `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`.
- `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,19 +2,24 @@
\subsection string-synopsis Synopsis
\fish{synopsis}
string escape [(-n | --no-quoted)] [--style=xxx] [STRING...]
string join [(-q | --quiet)] SEP [STRING...]
string length [(-q | --quiet)] [STRING...]
string sub [(-s | --start) START] [(-l | --length) 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 split [(-m | --max) MAX] [(-r | --right)] [(-q | --quiet)] SEP
[STRING...]
string join [(-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 escape [(-n | --no-quoted)] [STRING...]
string match [(-a | --all)] [(-i | --ignore-case)] [(-r | --regex)]
[(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...]
string replace [(-a | --all)] [(-i | --ignore-case)] [(-r | --regex)]
[(-q | --quiet)] PATTERN REPLACEMENT [STRING...]
string unescape [--style=xxx] [STRING...]
string upper [(-q | --quiet)] [STRING...]
\endfish
@@ -28,25 +33,75 @@ Arguments beginning with `-` are normally interpreted as switches; `--` causes t
Most subcommands accept a `-q` or `--quiet` switch, which suppresses the usual output but exits with the documented status.
In addition to the exit codes documented below, all the string subcommands exit with a value of 2 to indicate that an error occurred.
The following subcommands are available.
The following subcommands are available:
\subsection string-escape "escape" subcommand
- `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.
- `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 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.
- `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.
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.
- `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.
`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.
- `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-join "join" subcommand
- `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 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.
- `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. Matching can be made case-insensitive with `-i` or `--ignore-case`. If `-n` or `--index` 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 `-r` or `--regex` 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 --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-length "length" subcommand
- `replace` is similar to `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. If `-r` or `--regex` is given, PATTERN is interpreted as a Perl-compatible regular expression, and REPLACEMENT can contain C-style escape sequences like `\t` as well as references to capturing groups by number or name as `$n` or `${n}`. Exit status: 0 if at least one replacement was performed, 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-lower "lower" subcommand
`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.
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. 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.
If `-r` or `--regex` is given, PATTERN is interpreted as a Perl-compatible regular expression, and REPLACEMENT can contain C-style escape sequences like `\t` as well as references to capturing groups by number or name as `$n` or `${n}`.
If you specify the `-f` or `--filter` flag then each input string is printed only if a replacement was done. This is useful where you would otherwise use this idiom: `a_cmd | string match pattern | string replace pattern new_pattern`. You can instead just write `a_cmd | string replace --filter pattern new_pattern`.
Exit status: 0 if at least one replacement was performed, or 1 otherwise.
\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.
\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
@@ -111,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}
@@ -124,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
@@ -190,3 +266,19 @@ In general, special characters are special by default, so `a+` matches one or mo
<outp>put a</outp>
<outp>here</outp>
\endfish
\subsection string-example-repeat Repeat Examples
\fish{cli-dark}
>_ string repeat -n 2 'foo '
<outp>foo foo</outp>
>_ echo foo | string repeat -n 2
<outp>foofoo</outp>
>_ string repeat -n 2 -m 5 'foo'
<outp>foofo</outp>
>_ string repeat -m 5 'foo'
<outp>foofo</outp>
\endfish

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.
@@ -30,6 +32,8 @@ This test is mostly POSIX-compatible.
- `-G FILE` returns true if `FILE` exists and has the same group ID as the current user.
- `-k FILE` returns true if `FILE` has the sticky bit set. If the OS does not support the concept it returns false. See https://en.wikipedia.org/wiki/Sticky_bit.
- `-L FILE` returns true if `FILE` is a symbolic link.
- `-O FILE` returns true if `FILE` exists and is owned by the current user.
@@ -135,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

@@ -2,7 +2,7 @@
\subsection trap-synopsis Synopsis
\fish{synopsis}
trap [OPTIONS] [[ARG] SIGSPEC ... ]
trap [OPTIONS] [[ARG] REASON ... ]
\endfish
\subsection trap-description Description
@@ -13,25 +13,25 @@ The following parameters are available:
- `ARG` is the command to be executed on signal delivery.
- `SIGSPEC` is the name of the signal to trap.
- `REASON` is the name of the event to trap. For example, a signal like `INT` or `SIGINT`, or the special symbol `EXIT`.
- `-l` or `--list-signals` prints a list of signal names.
- `-p` or `--print` prints all defined signal handlers.
If `ARG` and `SIGSPEC` are both specified, `ARG` is the command to be executed when the signal specified by `SIGSPEC` is delivered.
If `ARG` and `REASON` are both specified, `ARG` is the command to be executed when the event specified by `REASON` occurs (e.g., the signal is delivered).
If `ARG` is absent (and there is a single SIGSPEC) or -, each specified signal is reset to its original disposition (the value it had upon entrance to the shell). If `ARG` is the null string the signal specified by each `SIGSPEC` is ignored by the shell and by the commands it invokes.
If `ARG` is absent (and there is a single REASON) or -, each specified signal is reset to its original disposition (the value it had upon entrance to the shell). If `ARG` is the null string the signal specified by each `REASON` is ignored by the shell and by the commands it invokes.
If `ARG` is not present and `-p` has been supplied, then the trap commands associated with each `SIGSPEC` are displayed. If no arguments are supplied or if only `-p` is given, `trap` prints the list of commands associated with each signal.
If `ARG` is not present and `-p` has been supplied, then the trap commands associated with each `REASON` are displayed. If no arguments are supplied or if only `-p` is given, `trap` prints the list of commands associated with each signal.
Signal names are case insensitive and the `SIG` prefix is optional.
The return status is 1 if any `SIGSPEC` is invalid; otherwise trap returns 0.
The return status is 1 if any `REASON` is invalid; otherwise trap returns 0.
\subsection trap-example Example
\fish
trap "status --print-stack-trace" SIGUSR1
# Prints a stack trace each time the SIGUSR1 signal is sent to the shell.
\endfish
\endfish

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>
@@ -300,6 +301,8 @@ Other variables, like `$PATH`, really do have multiple values. During variable e
<outp>/usr/bin /bin /usr/sbin /sbin /usr/local/bin</outp>
\endfish
Note that there are three environment variables that are automatically split on colons to become lists when fish starts running: `PATH`, `CDPATH`, `MANPATH`. Conversely, they are joined on colons when exported to subcommands. All other environment variables (e.g., `LD_LIBRARY_PATH`) which have similar semantics are treated as simple strings.
Lists cannot contain other lists: there is no recursion. A variable is a list of strings, full stop.
Get the length of a list with `count`:
@@ -389,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)
@@ -399,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)
@@ -414,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}
@@ -535,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

@@ -215,7 +215,7 @@ tt, code, pre, .fish {
.cli-dark .prompt { color: #999; }
.cli-dark .cursor { border-bottom: 2px solid #3F3; }
.cli-dark .underline { color: #00afff; text-decoration: underline; }
.cli-dark .error, .cli-dark .error .path { color: #f33; font-weight: bold; }
.cli-dark .error, .cli-dark .error .path { color: #f55; font-weight: bold; }
/*Menus*/

View File

@@ -9,7 +9,7 @@ $extrastylesheet
</head>
<body>
<div id="top" class="qindex"><!-- do not close this div here, it is closed by doxygen! -->
<a href="http://fishshell.com/"><code>fish</code> shell</a>
<a href="https://fishshell.com/"><code>fish</code> shell</a>
|
<a href="index.html">Documentation</a>
|

View File

@@ -6,5 +6,5 @@ confdir=@extra_confdir@
Name: fish
Description: fish, the friendly interactive shell
URL: http://fishshell.com/
URL: https://fishshell.com/
Version: @fish_build_version@

View File

@@ -6,7 +6,7 @@ Release: 0.%{?dist}
License: GPL-2.0
Group: System/Shells
URL: http://fishshell.com/
URL: https://fishshell.com/
Source0: %{name}_@VERSION@.orig.tar.gz
BuildRequires: ncurses-devel gettext gcc-c++ autoconf
@@ -15,11 +15,14 @@ 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
Requires: python
Requires: which
Requires: man
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora} || 0%{?is_opensuse}

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>"; };
@@ -817,7 +960,7 @@
D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */,
);
name = pcre;
path = "pcre2-10.21/src";
path = "pcre2-10.22/src";
sourceTree = SOURCE_ROOT;
};
D08A328E17B4455100F3A533 /* fish_tests */ = {
@@ -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

@@ -135,9 +135,9 @@ s|<sm [^>]*>|@smtc{|
s|</sm>|}|
#.
# ERrOR
s|<error>|@eror{|
s|<error [^>]*>|@eror{|
s|</error>|}|
s|<eror>|@eror{|
s|<eror [^>]*>|@eror{|
s|</eror>|}|
#.
# AsIs - protect from auto-formatting
s|<asis>|@asis{|

View File

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

View File

@@ -7,6 +7,9 @@
/* Define to 1 if you have the `clock_gettime' function. */
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 if you have the `ctermid_r' function. */
#define HAVE_CTERMID_R 1
/* Define to 1 if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
@@ -197,7 +200,7 @@
#define PACKAGE_NAME "fish"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "fish 2.5.0"
#define PACKAGE_STRING "fish 2.7.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fish"
@@ -206,7 +209,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.5.0"
#define PACKAGE_VERSION "2.7.1"
/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4

View File

@@ -112,6 +112,9 @@ sure both macros are undefined; an emulation function will then be used. */
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
@@ -170,6 +173,9 @@ sure both macros are undefined; an emulation function will then be used. */
overflow caused by enormously large patterns. */
#define MAX_NAME_SIZE 32
/* Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns. */
/* #undef NEVER_BACKSLASH_C */
/* The value of NEWLINE_DEFAULT determines the default newline character
sequence. PCRE2 client programs can override this by selecting other values
at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY), and 5
@@ -186,7 +192,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE2"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "PCRE2 10.20"
#define PACKAGE_STRING "PCRE2 10.22"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre2"
@@ -195,7 +201,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "10.20"
#define PACKAGE_VERSION "10.22"
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
parentheses (of any kind) in a pattern. This limits the amount of system
@@ -234,7 +240,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PCRE2_EXP_DEFN __attribute__ ((visibility ("default")))
/* Define to any value if linking statically (TODO: make nice with Libtool) */
#define PCRE2_STATIC 1
/* #undef PCRE2_STATIC */
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
@@ -260,6 +266,9 @@ sure both macros are undefined; an emulation function will then be used. */
is able to handle .gz files. */
/* #undef SUPPORT_LIBZ */
/* Define to any value to enable callout script support in pcre2grep. */
#define SUPPORT_PCRE2GREP_CALLOUT /**/
/* Define to any value to enable JIT support in pcre2grep. */
/* #undef SUPPORT_PCRE2GREP_JIT */
@@ -267,10 +276,10 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_PCRE2_16 */
/* Define to any value to enable the 32 bit PCRE2 library. */
#define SUPPORT_PCRE2_32 /**/
/* #undef SUPPORT_PCRE2_32 */
/* Define to any value to enable the 8 bit PCRE2 library. */
/* #undef SUPPORT_PCRE2_8 */
#define SUPPORT_PCRE2_8 /**/
/* Define to any value to enable support for Unicode and UTF encoding. This
will work even in an EBCDIC environment, but it is incompatible with the
@@ -282,7 +291,7 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_VALGRIND */
/* Version number of package */
#define VERSION "10.20"
#define VERSION "10.22"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

View File

@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE2_MAJOR 10
#define PCRE2_MINOR 21
#define PCRE2_MINOR 22
#define PCRE2_PRERELEASE
#define PCRE2_DATE 2016-01-12
#define PCRE2_DATE 2016-07-29
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE2, the appropriate
@@ -146,7 +146,8 @@ sanity checks). */
#define PCRE2_DFA_RESTART 0x00000040u
#define PCRE2_DFA_SHORTEST 0x00000080u
/* These are additional options for pcre2_substitute(). */
/* These are additional options for pcre2_substitute(), which passes any others
through to pcre2_match(). */
#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u
@@ -154,6 +155,11 @@ sanity checks). */
#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u
#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u
/* A further option for pcre2_match(), not allowed for pcre2_dfa_match(),
ignored for pcre2_jit_match(). */
#define PCRE2_NO_JIT 0x00002000u
/* Newline and \R settings, for use in compile contexts. The newline values
must be kept in step with values set in config.h and both sets must all be
greater than zero. */
@@ -245,6 +251,7 @@ numbers must not be changed. */
#define PCRE2_ERROR_BADSUBSTITUTION (-59)
#define PCRE2_ERROR_BADSUBSPATTERN (-60)
#define PCRE2_ERROR_TOOMANYREPLACE (-61)
#define PCRE2_ERROR_BADSERIALIZEDDATA (-62)
/* Request types for pcre2_pattern_info() */
@@ -436,7 +443,9 @@ PCRE2_EXP_DECL int pcre2_set_recursion_memory_management( \
PCRE2_EXP_DECL \
pcre2_code *pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, \
int *, PCRE2_SIZE *, pcre2_compile_context *); \
PCRE2_EXP_DECL void pcre2_code_free(pcre2_code *);
PCRE2_EXP_DECL void pcre2_code_free(pcre2_code *); \
PCRE2_EXP_DECL \
pcre2_code *pcre2_code_copy(const pcre2_code *);
/* Functions that give information about a compiled pattern. */
@@ -585,6 +594,7 @@ pcre2_compile are called by application code. */
/* Functions: the complete list in alphabetical order */
#define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_)
#define pcre2_code_copy PCRE2_SUFFIX(pcre2_code_copy_)
#define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_)
#define pcre2_compile PCRE2_SUFFIX(pcre2_compile_)
#define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_)

View File

@@ -71,6 +71,9 @@
# 2015-07-16 PH updated for new pcre2_find_bracket source module
# 2015-08-24 PH correct C_FLAGS setting (patch from Roy Ivy III)
# 2015-10=16 PH added support for never-backslash-C
# 2016-03-01 PH applied Chris Wilson's patch for MSVC static
# 2016-06-24 PH applied Chris Wilson's second patch, putting the first under
# a new option instead of being unconditional.
PROJECT(PCRE2 C)
@@ -157,6 +160,9 @@ SET(PCRE2_SUPPORT_JIT OFF CACHE BOOL
SET(PCRE2_SUPPORT_PCRE2GREP_JIT ON CACHE BOOL
"Enable use of Just-in-time compiling in pcre2grep.")
SET(PCRE2_SUPPORT_PCRE2GREP_CALLOUT ON CACHE BOOL
"Enable callout string support in pcre2grep.")
SET(PCRE2_SUPPORT_UNICODE ON CACHE BOOL
"Enable support for Unicode and UTF-8/UTF-16/UTF-32 encoding.")
@@ -184,6 +190,9 @@ IF (MINGW)
ENDIF(MINGW)
IF(MSVC)
OPTION(PCRE_STATIC_RUNTIME OFF CACHE BOOL
"ON=Compile against the static runtime (/MT)."
OFF)
OPTION(INSTALL_MSVC_PDB
"ON=Install .pdb files built by MSVC, if generated"
OFF)
@@ -272,6 +281,10 @@ IF(PCRE2_SUPPORT_PCRE2GREP_JIT)
SET(SUPPORT_PCRE2GREP_JIT 1)
ENDIF(PCRE2_SUPPORT_PCRE2GREP_JIT)
IF(PCRE2_SUPPORT_PCRE2GREP_CALLOUT)
SET(SUPPORT_PCRE2GREP_CALLOUT 1)
ENDIF(PCRE2_SUPPORT_PCRE2GREP_CALLOUT)
IF(PCRE2_SUPPORT_VALGRIND)
SET(SUPPORT_VALGRIND 1)
ENDIF(PCRE2_SUPPORT_VALGRIND)
@@ -456,6 +469,18 @@ SET(PCRE2POSIX_SOURCES
ENDIF (EXISTS ${PROJECT_SOURCE_DIR}/pcre2posix.rc)
ENDIF(MSVC AND NOT PCRE2_STATIC)
# Fix static compilation with MSVC: https://bugs.exim.org/show_bug.cgi?id=1681
# This code was taken from the CMake wiki, not from WebM.
IF(MSVC AND PCRE2_STATIC_RUNTIME)
MESSAGE(STATUS "** MSVC and PCRE2_STATIC_RUNTIME: modifying compiler flags to use static runtime library")
foreach(flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()
ENDIF(MSVC AND PCRE2_STATIC_RUNTIME)
# Build setup
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
@@ -740,6 +765,7 @@ IF(PCRE2_SHOW_REPORT)
MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}")
MESSAGE(STATUS " Build pcre2grep ................. : ${PCRE2_BUILD_PCRE2GREP}")
MESSAGE(STATUS " Enable JIT in pcre2grep ......... : ${PCRE2_SUPPORT_PCRE2GREP_JIT}")
MESSAGE(STATUS " Enable callouts in pcre2grep .... : ${PCRE2_SUPPORT_PCRE2GREP_CALLOUT}")
MESSAGE(STATUS " Buffer size for pcre2grep ....... : ${PCRE2GREP_BUFSIZE}")
MESSAGE(STATUS " Build tests (implies pcre2test . : ${PCRE2_BUILD_TESTS}")
MESSAGE(STATUS " and pcre2grep)")

View File

@@ -1,6 +1,182 @@
Change Log for PCRE2
--------------------
Version 10.22 29-July-2016
--------------------------
1. Applied Jason Hood's patches to RunTest.bat and testdata/wintestoutput3
to fix problems with running the tests under Windows.
2. Implemented a facility for quoting literal characters within hexadecimal
patterns in pcre2test, to make it easier to create patterns with just a few
non-printing characters.
3. Binary zeros are not supported in pcre2test input files. It now detects them
and gives an error.
4. Updated the valgrind parameters in RunTest: (a) changed smc-check=all to
smc-check=all-non-file; (b) changed obj:* in the suppression file to obj:??? so
that it matches only unknown objects.
5. Updated the maintenance script maint/ManyConfigTests to make it easier to
select individual groups of tests.
6. When the POSIX wrapper function regcomp() is called, the REG_NOSUB option
used to set PCRE2_NO_AUTO_CAPTURE when calling pcre2_compile(). However, this
disables the use of back references (and subroutine calls), which are supported
by other implementations of regcomp() with RE_NOSUB. Therefore, REG_NOSUB no
longer causes PCRE2_NO_AUTO_CAPTURE to be set, though it still ignores nmatch
and pmatch when regexec() is called.
7. Because of 6 above, pcre2test has been modified with a new modifier called
posix_nosub, to call regcomp() with REG_NOSUB. Previously the no_auto_capture
modifier had this effect. That option is now ignored when the POSIX API is in
use.
8. Minor tidies to the pcre2demo.c sample program, including more comments
about its 8-bit-ness.
9. Detect unmatched closing parentheses and give the error in the pre-scan
instead of later. Previously the pre-scan carried on and could give a
misleading incorrect error message. For example, /(?J)(?'a'))(?'a')/ gave a
message about invalid duplicate group names.
10. It has happened that pcre2test was accidentally linked with another POSIX
regex library instead of libpcre2-posix. In this situation, a call to regcomp()
(in the other library) may succeed, returning zero, but of course putting its
own data into the regex_t block. In one example the re_pcre2_code field was
left as NULL, which made pcre2test think it had not got a compiled POSIX regex,
so it treated the next line as another pattern line, resulting in a confusing
error message. A check has been added to pcre2test to see if the data returned
from a successful call of regcomp() are valid for PCRE2's regcomp(). If they
are not, an error message is output and the pcre2test run is abandoned. The
message points out the possibility of a mis-linking. Hopefully this will avoid
some head-scratching the next time this happens.
11. A pattern such as /(?<=((?C)0))/, which has a callout inside a lookbehind
assertion, caused pcre2test to output a very large number of spaces when the
callout was taken, making the program appearing to loop.
12. A pattern that included (*ACCEPT) in the middle of a sufficiently deeply
nested set of parentheses of sufficient size caused an overflow of the
compiling workspace (which was diagnosed, but of course is not desirable).
13. Detect missing closing parentheses during the pre-pass for group
identification.
14. Changed some integer variable types and put in a number of casts, following
a report of compiler warnings from Visual Studio 2013 and a few tests with
gcc's -Wconversion (which still throws up a lot).
15. Implemented pcre2_code_copy(), and added pushcopy and #popcopy to pcre2test
for testing it.
16. Change 66 for 10.21 introduced the use of snprintf() in PCRE2's version of
regerror(). When the error buffer is too small, my version of snprintf() puts a
binary zero in the final byte. Bug #1801 seems to show that other versions do
not do this, leading to bad output from pcre2test when it was checking for
buffer overflow. It no longer assumes a binary zero at the end of a too-small
regerror() buffer.
17. Fixed typo ("&&" for "&") in pcre2_study(). Fortunately, this could not
actually affect anything, by sheer luck.
18. Two minor fixes for MSVC compilation: (a) removal of apparently incorrect
"const" qualifiers in pcre2test and (b) defining snprintf as _snprintf for
older MSVC compilers. This has been done both in src/pcre2_internal.h for most
of the library, and also in src/pcre2posix.c, which no longer includes
pcre2_internal.h (see 24 below).
19. Applied Chris Wilson's patch (Bugzilla #1681) to CMakeLists.txt for MSVC
static compilation. Subsequently applied Chris Wilson's second patch, putting
the first patch under a new option instead of being unconditional when
PCRE_STATIC is set.
20. Updated pcre2grep to set stdout as binary when run under Windows, so as not
to convert \r\n at the ends of reflected lines into \r\r\n. This required
ensuring that other output that is written to stdout (e.g. file names) uses the
appropriate line terminator: \r\n for Windows, \n otherwise.
21. When a line is too long for pcre2grep's internal buffer, show the maximum
length in the error message.
22. Added support for string callouts to pcre2grep (Zoltan's patch with PH
additions).
23. RunTest.bat was missing a "set type" line for test 22.
24. The pcre2posix.c file was including pcre2_internal.h, and using some
"private" knowledge of the data structures. This is unnecessary; the code has
been re-factored and no longer includes pcre2_internal.h.
25. A racing condition is fixed in JIT reported by Mozilla.
26. Minor code refactor to avoid "array subscript is below array bounds"
compiler warning.
27. Minor code refactor to avoid "left shift of negative number" warning.
28. Add a bit more sanity checking to pcre2_serialize_decode() and document
that it expects trusted data.
29. Fix typo in pcre2_jit_test.c
30. Due to an oversight, pcre2grep was not making use of JIT when available.
This is now fixed.
31. The RunGrepTest script is updated to use the valgrind suppressions file
when testing with JIT under valgrind (compare 10.21/51 below). The suppressions
file is updated so that is now the same as for PCRE1: it suppresses the
Memcheck warnings Addr16 and Cond in unknown objects (that is, JIT-compiled
code). Also changed smc-check=all to smc-check=all-non-file as was done for
RunTest (see 4 above).
32. Implemented the PCRE2_NO_JIT option for pcre2_match().
33. Fix typo that gave a compiler error when JIT not supported.
34. Fix comment describing the returns from find_fixedlength().
35. Fix potential negative index in pcre2test.
36. Calls to pcre2_get_error_message() with error numbers that are never
returned by PCRE2 functions were returning empty strings. Now the error code
PCRE2_ERROR_BADDATA is returned. A facility has been added to pcre2test to
show the texts for given error numbers (i.e. to call pcre2_get_error_message()
and display what it returns) and a few representative error codes are now
checked in RunTest.
37. Added "&& !defined(__INTEL_COMPILER)" to the test for __GNUC__ in
pcre2_match.c, in anticipation that this is needed for the same reason it was
recently added to pcrecpp.cc in PCRE1.
38. Using -o with -M in pcre2grep could cause unnecessary repeated output when
the match extended over a line boundary, as it tried to find more matches "on
the same line" - but it was already over the end.
39. Allow \C in lookbehinds and DFA matching in UTF-32 mode (by converting it
to the same code as '.' when PCRE2_DOTALL is set).
40. Fix two clang compiler warnings in pcre2test when only one code unit width
is supported.
41. Upgrade RunTest to automatically re-run test 2 with a large (64M) stack if
it fails when running the interpreter with a 16M stack (and if changing the
stack size via pcre2test is possible). This avoids having to manually set a
large stack size when testing with clang.
42. Fix register overwite in JIT when SSE2 acceleration is enabled.
43. Detect integer overflow in pcre2test pattern and data repetition counts.
44. In pcre2test, ignore "allcaptures" after DFA matching.
45. Fix unaligned accesses on x86. Patch by Marc Mutz.
46. Fix some more clang compiler warnings.
Version 10.21 12-January-2016
-----------------------------
@@ -371,7 +547,7 @@ space or a #-type comment that was followed by (?-x), which turns off
PCRE2_EXTENDED, and there was no subsequent (?x) to turn it on again,
pcre2_compile() assumed that (?-x) applied to the whole pattern and
consequently mis-compiled it. This bug was found by the LLVM fuzzer. The fix
for this bug means that a setting of any of the (?imsxU) options at the start
for this bug means that a setting of any of the (?imsxJU) options at the start
of a pattern is no longer transferred to the options that are returned by
PCRE2_INFO_ALLOPTIONS. In fact, this was an anachronism that should have
changed when the effects of those options were all moved to compile time.

View File

@@ -228,6 +228,11 @@ OP_ASSERT_ACCEPT is used when (*ACCEPT) is encountered within an assertion.
This ends the assertion, not the entire pattern match. The assertion (?!) is
always optimized to OP_FAIL.
OP_ALLANY is used for '.' when PCRE2_DOTALL is set. It is also used for \C in
non-UTF modes and in UTF-32 mode (since one code unit still equals one
character). Another use is for [^] when empty classes are permitted
(PCRE2_ALLOW_EMPTY_CLASS is set).
Backtracking control verbs with optional data
---------------------------------------------
@@ -601,4 +606,4 @@ not a real opcode, but is used to check that tables indexed by opcode are the
correct length, in order to catch updating errors.
Philip Hazel
June 2015
June 2016

View File

@@ -25,6 +25,7 @@ dist_html_DATA = \
doc/html/pcre2-config.html \
doc/html/pcre2.html \
doc/html/pcre2_callout_enumerate.html \
doc/html/pcre2_code_copy.html \
doc/html/pcre2_code_free.html \
doc/html/pcre2_compile.html \
doc/html/pcre2_compile_context_copy.html \
@@ -105,6 +106,7 @@ dist_man_MANS = \
doc/pcre2-config.1 \
doc/pcre2.3 \
doc/pcre2_callout_enumerate.3 \
doc/pcre2_code_copy.3 \
doc/pcre2_code_free.3 \
doc/pcre2_compile.3 \
doc/pcre2_compile_context_copy.3 \
@@ -568,6 +570,7 @@ EXTRA_DIST += \
testdata/greplist \
testdata/grepoutput \
testdata/grepoutput8 \
testdata/grepoutputC \
testdata/grepoutputN \
testdata/greppatN4 \
testdata/testinput1 \

View File

@@ -832,6 +832,7 @@ dist_html_DATA = \
doc/html/pcre2-config.html \
doc/html/pcre2.html \
doc/html/pcre2_callout_enumerate.html \
doc/html/pcre2_code_copy.html \
doc/html/pcre2_code_free.html \
doc/html/pcre2_compile.html \
doc/html/pcre2_compile_context_copy.html \
@@ -912,6 +913,7 @@ dist_man_MANS = \
doc/pcre2-config.1 \
doc/pcre2.3 \
doc/pcre2_callout_enumerate.3 \
doc/pcre2_code_copy.3 \
doc/pcre2_code_free.3 \
doc/pcre2_compile.3 \
doc/pcre2_compile_context_copy.3 \
@@ -1053,16 +1055,17 @@ EXTRA_DIST = m4/ax_pthread.m4 m4/pcre2_visibility.m4 \
testdata/grepfilelist testdata/grepinput testdata/grepinput3 \
testdata/grepinput8 testdata/grepinputv testdata/grepinputx \
testdata/greplist testdata/grepoutput testdata/grepoutput8 \
testdata/grepoutputN testdata/greppatN4 testdata/testinput1 \
testdata/testinput2 testdata/testinput3 testdata/testinput4 \
testdata/testinput5 testdata/testinput6 testdata/testinput7 \
testdata/testinput8 testdata/testinput9 testdata/testinput10 \
testdata/testinput11 testdata/testinput12 testdata/testinput13 \
testdata/testinput14 testdata/testinput15 testdata/testinput16 \
testdata/testinput17 testdata/testinput18 testdata/testinput19 \
testdata/testinput20 testdata/testinput21 testdata/testinput22 \
testdata/testinput23 testdata/testinputEBC \
testdata/testoutput1 testdata/testoutput2 testdata/testoutput3 \
testdata/grepoutputC testdata/grepoutputN testdata/greppatN4 \
testdata/testinput1 testdata/testinput2 testdata/testinput3 \
testdata/testinput4 testdata/testinput5 testdata/testinput6 \
testdata/testinput7 testdata/testinput8 testdata/testinput9 \
testdata/testinput10 testdata/testinput11 testdata/testinput12 \
testdata/testinput13 testdata/testinput14 testdata/testinput15 \
testdata/testinput16 testdata/testinput17 testdata/testinput18 \
testdata/testinput19 testdata/testinput20 testdata/testinput21 \
testdata/testinput22 testdata/testinput23 \
testdata/testinputEBC testdata/testoutput1 \
testdata/testoutput2 testdata/testoutput3 \
testdata/testoutput3A testdata/testoutput3B \
testdata/testoutput4 testdata/testoutput5 testdata/testoutput6 \
testdata/testoutput7 testdata/testoutput8-16-2 \

View File

@@ -1,6 +1,28 @@
News about PCRE2 releases
-------------------------
Version 10.22 29-July-2016
--------------------------
1. ChangeLog has the details of a number of bug fixes.
2. The POSIX wrapper function regcomp() did not used to support back references
and subroutine calls if called with the REG_NOSUB option. It now does.
3. A new function, pcre2_code_copy(), is added, to make a copy of a compiled
pattern.
4. Support for string callouts is added to pcre2grep.
5. Added the PCRE2_NO_JIT option to pcre2_match().
6. The pcre2_get_error_message() function now returns with a negative error
code if the error number it is given is unknown.
7. Several updates have been made to pcre2test and test scripts (see
ChangeLog).
Version 10.21 12-January-2016
-----------------------------

View File

@@ -168,15 +168,12 @@ library. They are also documented in the pcre2build man page.
built. If you want only the 16-bit or 32-bit library, use --disable-pcre2-8
to disable building the 8-bit library.
. If you want to include support for just-in-time compiling, which can give
large performance improvements on certain platforms, add --enable-jit to the
"configure" command. This support is available only for certain hardware
. If you want to include support for just-in-time (JIT) compiling, which can
give large performance improvements on certain platforms, add --enable-jit to
the "configure" command. This support is available only for certain hardware
architectures. If you try to enable it on an unsupported architecture, there
will be a compile time error.
. When JIT support is enabled, pcre2grep automatically makes use of it, unless
you add --disable-pcre2grep-jit to the "configure" command.
. If you do not want to make use of the support for UTF-8 Unicode character
strings in the 8-bit library, UTF-16 Unicode character strings in the 16-bit
library, or UTF-32 Unicode character strings in the 32-bit library, you can
@@ -324,6 +321,14 @@ library. They are also documented in the pcre2build man page.
running "make" to build PCRE2. There is more information about coverage
reporting in the "pcre2build" documentation.
. When JIT support is enabled, pcre2grep automatically makes use of it, unless
you add --disable-pcre2grep-jit to the "configure" command.
. On non-Windows sytems there is support for calling external scripts during
matching in the pcre2grep command via PCRE2's callout facility with string
arguments. This support can be disabled by adding --disable-pcre2grep-callout
to the "configure" command.
. The pcre2grep program currently supports only 8-bit data files, and so
requires the 8-bit PCRE2 library. It is possible to compile pcre2grep to use
libz and/or libbz2, in order to read .gz and .bz2 files (respectively), by
@@ -840,4 +845,4 @@ The distribution should contain the files listed below.
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
Last updated: 16 October 2015
Last updated: 01 April 2016

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