mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-10 01:21:16 -03:00
Compare commits
419 Commits
2.5b1
...
Integratio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0389cb77d | ||
|
|
eb01106751 | ||
|
|
80d9c3ec8b | ||
|
|
4a724ce40e | ||
|
|
1c06067d0d | ||
|
|
8ed63d63a4 | ||
|
|
06ea31d0ab | ||
|
|
44830589ab | ||
|
|
ee572a13c8 | ||
|
|
8d4d47b548 | ||
|
|
80afc31ff8 | ||
|
|
0bf4d398ab | ||
|
|
4b53cd583d | ||
|
|
fdea1abf70 | ||
|
|
3cca94b268 | ||
|
|
291d88a72f | ||
|
|
40679560a6 | ||
|
|
c9c802d3fc | ||
|
|
ec1f00e59b | ||
|
|
a5d3ac8444 | ||
|
|
4050166738 | ||
|
|
426653a9d7 | ||
|
|
910f78dd74 | ||
|
|
611cf852aa | ||
|
|
c179e447a6 | ||
|
|
573c539956 | ||
|
|
9e64571de0 | ||
|
|
63bb2da4d8 | ||
|
|
573e1ad4b1 | ||
|
|
c114cbc9af | ||
|
|
f10e4f88b6 | ||
|
|
a92a7cbb9c | ||
|
|
9b78857894 | ||
|
|
edf745232f | ||
|
|
5659898331 | ||
|
|
f00084f28b | ||
|
|
3a0bb6b19a | ||
|
|
f0a00ab2f2 | ||
|
|
6620b9ec72 | ||
|
|
e84200b847 | ||
|
|
e6e1805c5f | ||
|
|
be2b6bfdc9 | ||
|
|
8814f34dc1 | ||
|
|
09ce297352 | ||
|
|
4c38867768 | ||
|
|
23978aee81 | ||
|
|
fddd5fd045 | ||
|
|
084a820de3 | ||
|
|
c06a71bfbe | ||
|
|
044d45a0ff | ||
|
|
4c798ce3b4 | ||
|
|
107127afb7 | ||
|
|
d3cfab1391 | ||
|
|
1e9caecbcb | ||
|
|
fb54d34788 | ||
|
|
16816a1202 | ||
|
|
48d5342601 | ||
|
|
46d86766c4 | ||
|
|
6b1c939b67 | ||
|
|
65c762f1e1 | ||
|
|
4fde67fa50 | ||
|
|
f52708a20f | ||
|
|
16931f724b | ||
|
|
8f77b1cdd2 | ||
|
|
10e64fd548 | ||
|
|
d32e7f5ad7 | ||
|
|
8612ac592d | ||
|
|
b8bf567514 | ||
|
|
c32032757e | ||
|
|
1cb69e6f5c | ||
|
|
f5fac096c0 | ||
|
|
a26419557f | ||
|
|
980af4aa5b | ||
|
|
2565c5c15b | ||
|
|
5604bb238e | ||
|
|
a1d5a19e24 | ||
|
|
77201ade34 | ||
|
|
49d3a58a9e | ||
|
|
937c229b2e | ||
|
|
5b6814d6ad | ||
|
|
37508d1f1e | ||
|
|
bea0b17c9e | ||
|
|
30e02383a5 | ||
|
|
ec92e91ddc | ||
|
|
cc7d83fa94 | ||
|
|
17ba21cfe4 | ||
|
|
f1d40a3c7c | ||
|
|
275d658616 | ||
|
|
15e1f4349b | ||
|
|
f30c50cec5 | ||
|
|
805a177673 | ||
|
|
e410d47565 | ||
|
|
7ef2d5e86f | ||
|
|
3c95e00e8a | ||
|
|
b9d2e4d897 | ||
|
|
cb9f4e621f | ||
|
|
7c6600895e | ||
|
|
c0d80ab996 | ||
|
|
ffbda7fe64 | ||
|
|
8b201d8077 | ||
|
|
9e2776af0e | ||
|
|
3fa5d6c794 | ||
|
|
3ade72266c | ||
|
|
349eff0df7 | ||
|
|
a9db99ac52 | ||
|
|
e7d686461e | ||
|
|
dd69ca5a81 | ||
|
|
e332573fe1 | ||
|
|
dcc081a594 | ||
|
|
75f1e36b44 | ||
|
|
b3617cfd86 | ||
|
|
a381d959f2 | ||
|
|
ae03df4bc4 | ||
|
|
9d25b52208 | ||
|
|
d48c872913 | ||
|
|
4936de29e7 | ||
|
|
3463e81dda | ||
|
|
a3cd5bf170 | ||
|
|
6bd47b8662 | ||
|
|
cc3efcc3ab | ||
|
|
0be8d0d385 | ||
|
|
c3584111d6 | ||
|
|
095e04cb0d | ||
|
|
ef313dc8c5 | ||
|
|
c272584fec | ||
|
|
f20c7deaf1 | ||
|
|
08d42a0507 | ||
|
|
89efa9a8b1 | ||
|
|
fae1a398bd | ||
|
|
8213885491 | ||
|
|
da09a915f2 | ||
|
|
2a2ccea24e | ||
|
|
ed6298ad17 | ||
|
|
252c821cb3 | ||
|
|
8440308470 | ||
|
|
49518b71ab | ||
|
|
702de29549 | ||
|
|
757a95123d | ||
|
|
6ab46bb8db | ||
|
|
ddb9350ea9 | ||
|
|
03571b82be | ||
|
|
75600b6b53 | ||
|
|
35e1d1e2d8 | ||
|
|
a4f925d822 | ||
|
|
3edb7d538f | ||
|
|
b5a38ca96b | ||
|
|
cd16676911 | ||
|
|
d7ef7eb484 | ||
|
|
2105bae1fc | ||
|
|
0c265c0f52 | ||
|
|
cd8982b645 | ||
|
|
c0de8afaf3 | ||
|
|
62244f01c2 | ||
|
|
2b4ab19d47 | ||
|
|
4b9424eb20 | ||
|
|
c4d69ea8a1 | ||
|
|
a3f28e221f | ||
|
|
765891cc4e | ||
|
|
dec0f7aa84 | ||
|
|
44b3554a11 | ||
|
|
9f13edbe4a | ||
|
|
3d6c4adda9 | ||
|
|
38c851f4cf | ||
|
|
e1c3ec25ab | ||
|
|
542962bc69 | ||
|
|
ae0321778f | ||
|
|
570a6430ad | ||
|
|
83791a26c3 | ||
|
|
2118973251 | ||
|
|
70354f9f5e | ||
|
|
536b1220fd | ||
|
|
b6517250c7 | ||
|
|
a811ae25dc | ||
|
|
29429874b3 | ||
|
|
99e87dded3 | ||
|
|
84cf391faa | ||
|
|
f0469d829a | ||
|
|
6fd8dc44fb | ||
|
|
6123d3cb50 | ||
|
|
516e989464 | ||
|
|
085a9b9267 | ||
|
|
d9b30ab090 | ||
|
|
7ab1c6c7ad | ||
|
|
1afea1b650 | ||
|
|
8efe88201e | ||
|
|
b4f70cb98b | ||
|
|
98f4e49669 | ||
|
|
e0f62c178f | ||
|
|
6d02bec4c7 | ||
|
|
42a320064c | ||
|
|
002757225a | ||
|
|
db63be7909 | ||
|
|
3444fe87fb | ||
|
|
fac9b2393f | ||
|
|
f17ddb6770 | ||
|
|
ea9e05568e | ||
|
|
e30f3fee88 | ||
|
|
7d65141137 | ||
|
|
64fe617c63 | ||
|
|
b2174bc9c0 | ||
|
|
7a9efa7930 | ||
|
|
9dd0c47d0b | ||
|
|
992e1d0059 | ||
|
|
3d0a377e26 | ||
|
|
9f5ce04229 | ||
|
|
a9617f97b6 | ||
|
|
0a8c922d92 | ||
|
|
40de253b3a | ||
|
|
ce61ada623 | ||
|
|
06b2775131 | ||
|
|
4ad5b756e4 | ||
|
|
509ee64fc9 | ||
|
|
7fc1994339 | ||
|
|
22a2098c34 | ||
|
|
0cc307fbd9 | ||
|
|
69731f6642 | ||
|
|
ce2d1c4e83 | ||
|
|
ad6ea1691e | ||
|
|
2ea2a4c831 | ||
|
|
67c18c77d0 | ||
|
|
813415302a | ||
|
|
cbea0b9378 | ||
|
|
d93e57a3f9 | ||
|
|
f38646593c | ||
|
|
9598218a94 | ||
|
|
afdd1a98c1 | ||
|
|
9cae25d1eb | ||
|
|
4ffb0adb78 | ||
|
|
52648acdc8 | ||
|
|
f9664f224d | ||
|
|
0a929f7a0b | ||
|
|
3e35e6e488 | ||
|
|
af7f5f42b6 | ||
|
|
f27407bbf9 | ||
|
|
214c677032 | ||
|
|
2bbecf4292 | ||
|
|
0541a34201 | ||
|
|
cf63d1b2a7 | ||
|
|
85ba4e0142 | ||
|
|
9b24d26972 | ||
|
|
0970cc8736 | ||
|
|
616d301083 | ||
|
|
162053ed8d | ||
|
|
f9371899a1 | ||
|
|
56b60fab4b | ||
|
|
b91a2dd0bb | ||
|
|
83f386347f | ||
|
|
6eb1e31070 | ||
|
|
e3c538a991 | ||
|
|
908ed493cc | ||
|
|
a5e8b81ee3 | ||
|
|
c4f2210cc5 | ||
|
|
6d72d538a6 | ||
|
|
279ec88351 | ||
|
|
8a09c99f36 | ||
|
|
56161250de | ||
|
|
41a49b014a | ||
|
|
8339e28cfe | ||
|
|
b3d5fb71f4 | ||
|
|
94b71353ef | ||
|
|
3e17b8fccc | ||
|
|
40428f592d | ||
|
|
49e98cde4c | ||
|
|
708d6b6911 | ||
|
|
c3dddee804 | ||
|
|
47ad707bba | ||
|
|
bf84879134 | ||
|
|
b7cdb6d586 | ||
|
|
088b10f4c2 | ||
|
|
eff6b98813 | ||
|
|
949fc7bdd7 | ||
|
|
44cfe3e340 | ||
|
|
2b13472419 | ||
|
|
9d5471722f | ||
|
|
0447ee7b96 | ||
|
|
cd58e6129c | ||
|
|
f48291b70c | ||
|
|
2a472af7b8 | ||
|
|
927a678056 | ||
|
|
2565ffab25 | ||
|
|
cb70ac6932 | ||
|
|
e8d90dbf4b | ||
|
|
6db372133d | ||
|
|
f220250ada | ||
|
|
4ac2cfba61 | ||
|
|
0df65a106d | ||
|
|
0fefdb458f | ||
|
|
8aab725782 | ||
|
|
c5d9e7e391 | ||
|
|
3569987c81 | ||
|
|
10a2275c34 | ||
|
|
017836cffa | ||
|
|
eaf143dd8a | ||
|
|
03e0f1eb21 | ||
|
|
06282f02fd | ||
|
|
973097f025 | ||
|
|
e52a04e341 | ||
|
|
61f272495d | ||
|
|
0d170222a6 | ||
|
|
7edfcd5c63 | ||
|
|
5b6cc5af6d | ||
|
|
05d569ee44 | ||
|
|
a40f491c93 | ||
|
|
e78cefd759 | ||
|
|
07c9f0de9d | ||
|
|
1efb81456b | ||
|
|
fec83fa975 | ||
|
|
1634c9df78 | ||
|
|
14fb38f952 | ||
|
|
1d9cc12984 | ||
|
|
98b561929f | ||
|
|
f513f4e53a | ||
|
|
67a661c19f | ||
|
|
2fb1d5900d | ||
|
|
59a3968fd2 | ||
|
|
8e577b01bc | ||
|
|
7d44f8e871 | ||
|
|
8d2dfdf2c9 | ||
|
|
dabc34e0f9 | ||
|
|
3525a9d7ee | ||
|
|
61887c061b | ||
|
|
e4fd1d5f5a | ||
|
|
afe54df843 | ||
|
|
dddb0bb24b | ||
|
|
37578d8b39 | ||
|
|
2f29473efc | ||
|
|
f29139e853 | ||
|
|
87152877b2 | ||
|
|
8af00d2b78 | ||
|
|
a3dbca90d5 | ||
|
|
e07928062f | ||
|
|
ec19159580 | ||
|
|
b7d60dc7bb | ||
|
|
fab4399b8c | ||
|
|
e468b71459 | ||
|
|
a447a9aeff | ||
|
|
319e65af05 | ||
|
|
3e10640c04 | ||
|
|
405ec12940 | ||
|
|
730086b0f0 | ||
|
|
1040b255c7 | ||
|
|
41f87e82a8 | ||
|
|
bf2d61c6fd | ||
|
|
64485167e9 | ||
|
|
31adc221d9 | ||
|
|
7e6543c4cd | ||
|
|
ac9a0f0dbf | ||
|
|
699d294ac1 | ||
|
|
1cfbd62266 | ||
|
|
02ddc20c87 | ||
|
|
520e567390 | ||
|
|
144e7b0616 | ||
|
|
fe8e99138d | ||
|
|
e0abfee370 | ||
|
|
66a0f18410 | ||
|
|
3181bdcb9b | ||
|
|
e1adc3a6b2 | ||
|
|
7a76efa629 | ||
|
|
216f7d912a | ||
|
|
d373f1fc1d | ||
|
|
36a0f745cd | ||
|
|
ab189a75ab | ||
|
|
c9a409dcf3 | ||
|
|
f4476100f2 | ||
|
|
6bdab62358 | ||
|
|
009a677e0d | ||
|
|
2e47817adf | ||
|
|
176a291ed2 | ||
|
|
1350b44ecf | ||
|
|
1875222e93 | ||
|
|
439f233ccc | ||
|
|
a91dad35db | ||
|
|
6f745762bb | ||
|
|
f0065cda13 | ||
|
|
8a0d4854e8 | ||
|
|
b3fff2d779 | ||
|
|
754b0e9b91 | ||
|
|
3139ad0d4d | ||
|
|
3272505891 | ||
|
|
0991e398bb | ||
|
|
ac8b27fcb1 | ||
|
|
5b108efde4 | ||
|
|
f2884343b3 | ||
|
|
16bc7b48b5 | ||
|
|
9efa897d0d | ||
|
|
d8a6c0a91b | ||
|
|
7e3db843cd | ||
|
|
bb65b82c56 | ||
|
|
bb686a2236 | ||
|
|
fc803c75a6 | ||
|
|
812e977e62 | ||
|
|
5a5a6a6968 | ||
|
|
f7c133da00 | ||
|
|
4c56c89afc | ||
|
|
9361470070 | ||
|
|
ab3149257b | ||
|
|
2e38cf2a4b | ||
|
|
2be1288cac | ||
|
|
082d4b5a7e | ||
|
|
c111a65622 | ||
|
|
e89c66a224 | ||
|
|
85212c57e8 | ||
|
|
0297e5a105 | ||
|
|
d6ceeb915d | ||
|
|
5996962749 | ||
|
|
bc57c7710f | ||
|
|
9768653df7 | ||
|
|
59eb75021b | ||
|
|
d905ed33fe | ||
|
|
7a80610300 | ||
|
|
8d32eb62ae | ||
|
|
446f5d6134 | ||
|
|
d37e7bcc25 | ||
|
|
5809608bd2 | ||
|
|
2e65e27189 | ||
|
|
fd6d814ea4 | ||
|
|
51adf815aa | ||
|
|
56e05dab02 | ||
|
|
2e9a349dd0 |
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -34,8 +34,8 @@ fish.spec.in 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
|
||||
|
||||
25
.github/ISSUE_TEMPLATE.md
vendored
25
.github/ISSUE_TEMPLATE.md
vendored
@@ -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.
|
||||
-->
|
||||
|
||||
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -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
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -88,7 +88,7 @@ messages.pot
|
||||
/tests/*.tmp.*
|
||||
/share/pkgconfig
|
||||
|
||||
# xcode
|
||||
# xcode
|
||||
## Build generated
|
||||
build/
|
||||
DerivedData/
|
||||
|
||||
87
CHANGELOG.md
87
CHANGELOG.md
@@ -1,3 +1,84 @@
|
||||
# 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.
|
||||
- `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).
|
||||
|
||||
## Notable fixes and improvements
|
||||
|
||||
- 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
|
||||
@@ -37,7 +118,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.
|
||||
@@ -506,7 +587,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
|
||||
------------
|
||||
@@ -564,4 +645,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.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
# 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.
|
||||
|
||||
## 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 +24,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.
|
||||
|
||||
@@ -115,7 +115,7 @@ code to ignore
|
||||
|
||||
## 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 +125,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 +135,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 +151,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 +206,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 +239,12 @@ 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
|
||||
```
|
||||
|
||||
2
Doxyfile
2
Doxyfile
@@ -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
|
||||
|
||||
81
Makefile.in
81
Makefile.in
@@ -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
|
||||
@@ -181,7 +181,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 +190,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
|
||||
@@ -249,7 +255,7 @@ show-%:
|
||||
#
|
||||
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
|
||||
@@ -362,7 +368,9 @@ 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_fishscript test_interactive
|
||||
.PHONY: test_high_level
|
||||
|
||||
test_fishscript: $(call filter_up_to,test_fishscript,$(active_test_goals))
|
||||
@@ -465,7 +473,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 $@;
|
||||
|
||||
|
||||
#
|
||||
@@ -608,7 +616,7 @@ 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)"
|
||||
@@ -677,42 +685,19 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr
|
||||
@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;
|
||||
$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 online user documentation";
|
||||
$v $(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
|
||||
$v for i in user_doc/html/* CHANGELOG.md; do \
|
||||
@@ -744,7 +729,7 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
|
||||
@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
|
||||
@echo $$"If you put things there, $(red)stop now!$(sgr0) $(bo)\\c"
|
||||
@echo $$"$(bo)5$(sgr0) \\c"
|
||||
@sleep 1
|
||||
@@ -777,7 +762,7 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
|
||||
@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 .*);
|
||||
rm -rf "$(DESTDIR)$(mandir)/man1/"$$$(basename $i)$$$(wildcard .*);
|
||||
done;
|
||||
@echo
|
||||
@echo "$(green)Fish (likely) unintalled$(sgr0)"
|
||||
@@ -786,7 +771,7 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
|
||||
.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; \
|
||||
@@ -806,7 +791,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 +832,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 +849,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.
|
||||
@@ -989,7 +974,7 @@ 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: config.h src/builtin.h src/common.h src/env.h src/fallback.h
|
||||
obj/builtin_set_color.o: src/signal.h src/color.h src/io.h src/output.h
|
||||
obj/builtin_set_color.o: src/proc.h src/parse_tree.h src/parse_constants.h
|
||||
obj/builtin_set_color.o: src/tokenizer.h src/wgetopt.h src/wutil.h
|
||||
|
||||
12
README.md
12
README.md
@@ -1,15 +1,15 @@
|
||||
[fish](http://fishshell.com/) - the friendly interactive shell [](https://travis-ci.org/fish-shell/fish-shell)
|
||||
[fish](https://fishshell.com/) - the friendly interactive shell [](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.
|
||||
|
||||
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>
|
||||
|
||||
## Building
|
||||
|
||||
@@ -60,7 +60,7 @@ 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.
|
||||
fish requires a number of utilities to operate, which should be present on any Unix, GNU/Linux or OS X system. These include (but are not limited to) hostname, grep, awk, sed, and getopt. fish also requires the bc program.
|
||||
|
||||
Translation support requires the gettext program.
|
||||
|
||||
@@ -100,6 +100,6 @@ 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.
|
||||
|
||||
@@ -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"] },
|
||||
|
||||
@@ -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
|
||||
|
||||
34
build_tools/list_committers_since.fish
Executable file
34
build_tools/list_committers_since.fish
Executable 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
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/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
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/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
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
@@ -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:\
|
||||
\
|
||||
|
||||
@@ -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
|
||||
|
||||
43
configure.ac
43
configure.ac
@@ -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
|
||||
#
|
||||
@@ -659,7 +690,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
4
debian/control
vendored
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -39,3 +39,8 @@ emit foo
|
||||
block -e
|
||||
# 'foo fired' will now be printed
|
||||
\endfish
|
||||
|
||||
|
||||
\subsection 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.
|
||||
|
||||
26
doc_src/disown.txt
Normal file
26
doc_src/disown.txt
Normal 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.
|
||||
@@ -20,4 +20,9 @@ function event_test --on-event test_event
|
||||
end
|
||||
|
||||
emit test_event something
|
||||
|
||||
|
||||
\subsection 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
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
- <a href='#faq-titlebar'>I'm seeing weird output before each prompt when using screen. What's wrong?</a>
|
||||
- <a href='#faq-greeting'>How do I change the greeting message?</a>
|
||||
- <a href='#faq-history'>Why doesn't history substitution ("!$" etc.) work?</a>
|
||||
- <a href='#faq-cd-minus'>How to make `-` a shortcut for `cd -`?</a>
|
||||
- <a href='#faq-uninstalling'>How do I uninstall fish?</a>
|
||||
- <a href='#faq-third-party'>Where can I find extra tools for fish?</a>
|
||||
|
||||
@@ -85,6 +86,26 @@ 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.
|
||||
|
||||
Use the <a href="commands.html#fish_update_completions">`fish_update_completions`</a> command.
|
||||
<hr>
|
||||
\section faq-single-env How do I set an environment variable for just one command?
|
||||
|
||||
@@ -183,7 +204,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 +223,15 @@ Fish history recall is very simple yet effective:
|
||||
|
||||
See <a href='index.html#editor'>documentation</a> for more details about line editing in fish.
|
||||
|
||||
<hr>
|
||||
\section faq-cd-minus How to make `-` a shortcut for `cd -`?
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -91,3 +91,7 @@ end
|
||||
|
||||
This will beep when the most recent job completes.
|
||||
|
||||
|
||||
\subsection 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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -49,13 +49,13 @@ 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
|
||||
|
||||
@@ -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
|
||||
@@ -667,11 +667,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:
|
||||
|
||||
@@ -849,12 +860,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 +876,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 +933,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 +994,7 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
|
||||
|
||||
- @key{Alt,←,Left} and @key{Alt,→,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,→,Right} (or @key{Alt,F}) accepts the first word in the suggestion.
|
||||
|
||||
- @cursor_key{↑,Up} and @cursor_key{↓,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{↑,Up} and @cursor_key{↓,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,↑,Up} and @key{Alt,↓,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.
|
||||
|
||||
@@ -1102,6 +1117,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.
|
||||
@@ -1160,6 +1177,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 +1185,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`.
|
||||
|
||||
@@ -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`:
|
||||
|
||||
|
||||
@@ -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 it reads one line terminated by a newline but options are available to read up to a null character and to limit each "line" to a maximum number of characters.
|
||||
|
||||
The following options are available:
|
||||
|
||||
@@ -15,14 +15,18 @@ 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` causes `read` to return after reading NCHARS characters rather than waiting for a complete line of input (either newline or null terminated).
|
||||
|
||||
- `-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,7 +37,7 @@ 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.
|
||||
|
||||
@@ -43,7 +47,9 @@ 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 separator, it sets `$status` to 1. If not, it sets it to 0.
|
||||
|
||||
Fish has a default limit of 10 MiB on the number of characters each `read` will consume. If you attempt to read more than that `$status` is set to 122 and the variable will be empty. You can modify that limit by setting the `FISH_READ_BYTE_LIMIT` variable at any time including in the environment before fish starts running. This is a safety mechanism to keep the shell from consuming an unreasonable amount of memory if the input is malformed.
|
||||
|
||||
\subsection read-example Example
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
|
||||
|
||||
`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,7 +37,7 @@ 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.
|
||||
|
||||
- `-L` or `--long` do not abbreviate long values when printing set variables
|
||||
|
||||
@@ -70,7 +70,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 +87,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
|
||||
|
||||
@@ -11,6 +11,7 @@ status is-no-job-control
|
||||
status is-full-job-control
|
||||
status is-interactive-job-control
|
||||
status current-filename
|
||||
status current-function
|
||||
status current-line-number
|
||||
status print-stack-trace
|
||||
status job-control CONTROL-TYPE
|
||||
@@ -38,6 +39,8 @@ The following operations (sub-commands) are available:
|
||||
|
||||
- `current-filename` prints the filename of the currently running script. Also `-f` or `--current-filename`.
|
||||
|
||||
- `current-function` prints the name of the currently called function if able, when missing displays "Not a function". Also `-u` or `--current-function`.
|
||||
|
||||
- `current-line-number` prints the line number of the currently running script. Also `-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`.
|
||||
|
||||
@@ -11,10 +11,12 @@ string join [(-q | --quiet)] SEP [STRING...]
|
||||
string trim [(-l | --left)] [(-r | --right)] [(-c | --chars CHARS)]
|
||||
[(-q | --quiet)] [STRING...]
|
||||
string escape [(-n | --no-quoted)] [STRING...]
|
||||
string match [(-a | --all)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
string match [(-a | --all)] [((-e | --entire)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
[(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...]
|
||||
string replace [(-a | --all)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
string replace [(-a | --all)] [(-f | --filter)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
[(-q | --quiet)] PATTERN REPLACEMENT [STRING...]
|
||||
string repeat [(-n | --count)] [(-m | --max)] [(-N | --no-newline)]
|
||||
[(-q | --quiet)] [STRING...]
|
||||
\endfish
|
||||
|
||||
|
||||
@@ -28,25 +30,61 @@ 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-length "length" 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 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.
|
||||
|
||||
- `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-sub "sub" subcommand
|
||||
|
||||
- `split` splits each STRING on the separator SEP, which can be an empty string. If `-m` or `--max` is specified, at most MAX splits are done on each STRING. If `-r` or `--right` is given, splitting is performed right-to-left. This is useful in combination with `-m` or `--max`. Exit status: 0 if at least one split was performed, or 1 otherwise.
|
||||
`string 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.
|
||||
|
||||
- `join` joins its STRING arguments into a single string separated by SEP, which can be an empty string. Exit status: 0 if at least one join was performed, or 1 otherwise.
|
||||
\subsection string-split "split" subcommand
|
||||
|
||||
- `trim` removes leading and trailing whitespace from each STRING. If `-l` or `--left` is given, only leading whitespace is removed. If `-r` or `--right` is given, only trailing whitespace is trimmed. The `-c` or `--chars` switch causes the characters in CHARS to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
|
||||
`string 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.
|
||||
|
||||
- `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.
|
||||
\subsection string-join "join" subcommand
|
||||
|
||||
- `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.
|
||||
`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.
|
||||
|
||||
- `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.
|
||||
\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-escape "escape" subcommand
|
||||
|
||||
`string escape` escapes each STRING such that it can be passed back to `eval` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If `-n` or `--no-quoted` is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
|
||||
|
||||
\subsection string-match "match" subcommand
|
||||
|
||||
`string match` tests each STRING against PATTERN and prints matching substrings. Only the first match for each STRING is reported unless `-a` or `--all` is given, in which case all matches are reported.The default behavior is equivalent to `grep -o`.
|
||||
|
||||
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.
|
||||
|
||||
Matching can be made case-insensitive with `--ignore-case` or `-i`.
|
||||
|
||||
If `--index` or `-n` is given, each match is reported as a 1-based start position and a length. By default, PATTERN is interpreted as a glob pattern matched against each entire STRING argument. A glob pattern is only considered a valid match if it matches the entire STRING.
|
||||
|
||||
If `--regex` or `-r` is given, PATTERN is interpreted as a Perl-compatible regular expression, which does not have to match the entire STRING. For a regular expression containing capturing groups, multiple items will be reported for each match, one for the entire match and one for each capturing group.
|
||||
|
||||
If `--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-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-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 regular-expressions Regular Expressions
|
||||
|
||||
@@ -190,3 +228,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
|
||||
|
||||
@@ -30,6 +30,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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -300,6 +300,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`:
|
||||
|
||||
@@ -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*/
|
||||
|
||||
@@ -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>
|
||||
|
|
||||
|
||||
@@ -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@
|
||||
|
||||
@@ -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
|
||||
@@ -19,7 +19,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_
|
||||
|
||||
Requires: bc
|
||||
Requires: python
|
||||
Requires: which
|
||||
Requires: man
|
||||
|
||||
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora} || 0%{?is_opensuse}
|
||||
|
||||
@@ -817,7 +817,7 @@
|
||||
D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */,
|
||||
);
|
||||
name = pcre;
|
||||
path = "pcre2-10.21/src";
|
||||
path = "pcre2-10.22/src";
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
D08A328E17B4455100F3A533 /* fish_tests */ = {
|
||||
|
||||
@@ -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{|
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.4.900</string>
|
||||
<string>2.6.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
||||
@@ -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.5b1"
|
||||
#define PACKAGE_STRING "fish 2.6.0"
|
||||
|
||||
/* 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.5b1"
|
||||
#define PACKAGE_VERSION "2.6.0"
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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_)
|
||||
|
||||
@@ -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)")
|
||||
178
pcre2-10.21/ChangeLog → pcre2-10.22/ChangeLog
vendored
178
pcre2-10.21/ChangeLog → pcre2-10.22/ChangeLog
vendored
@@ -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.
|
||||
7
pcre2-10.21/HACKING → pcre2-10.22/HACKING
vendored
7
pcre2-10.21/HACKING → pcre2-10.22/HACKING
vendored
@@ -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
|
||||
@@ -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 \
|
||||
@@ -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 \
|
||||
22
pcre2-10.21/NEWS → pcre2-10.22/NEWS
vendored
22
pcre2-10.21/NEWS → pcre2-10.22/NEWS
vendored
@@ -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
|
||||
-----------------------------
|
||||
|
||||
19
pcre2-10.21/README → pcre2-10.22/README
vendored
19
pcre2-10.21/README → pcre2-10.22/README
vendored
@@ -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
|
||||
262
pcre2-10.21/RunGrepTest → pcre2-10.22/RunGrepTest
vendored
262
pcre2-10.21/RunGrepTest → pcre2-10.22/RunGrepTest
vendored
@@ -34,17 +34,22 @@ fi
|
||||
valgrind=
|
||||
while [ $# -gt 0 ] ; do
|
||||
case $1 in
|
||||
valgrind) valgrind="valgrind -q --leak-check=no --smc-check=all";;
|
||||
valgrind) valgrind="valgrind -q --leak-check=no --smc-check=all-non-file";;
|
||||
*) echo "RunGrepTest: Unknown argument $1"; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
vjs=
|
||||
pcre2grep_version=`$pcre2grep -V`
|
||||
if [ "$valgrind" = "" ] ; then
|
||||
echo "Testing $pcre2grep_version"
|
||||
else
|
||||
echo "Testing $pcre2grep_version using valgrind"
|
||||
$pcre2test -C jit >/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
vjs="--suppressions=./testdata/valgrind-jit.supp"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set up a suitable "diff" command for comparison. Some systems have a diff
|
||||
@@ -101,253 +106,253 @@ checkspecial()
|
||||
echo "Testing pcre2grep main features"
|
||||
|
||||
echo "---------------------------- Test 1 ------------------------------" >testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 2 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep '^PATTERN' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep '^PATTERN' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 3 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -in PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -in PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 4 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -ic PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -ic PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 5 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 6 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 7 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 8 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 9 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 10 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -q NEVER-PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -q NEVER-PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 11 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -vn pattern ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -vn pattern ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 12 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -ix pattern ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -ix pattern ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 13 -----------------------------" >>testtrygrep
|
||||
echo seventeen >testtemp1grep
|
||||
(cd $srcdir; $valgrind $pcre2grep -f./testdata/greplist -f $builddir/testtemp1grep ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -f./testdata/greplist -f $builddir/testtemp1grep ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 14 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 15 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep 'abc^*' ./testdata/grepinput) 2>>testtrygrep >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep 'abc^*' ./testdata/grepinput) 2>>testtrygrep >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 16 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtrygrep >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtrygrep >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 17 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -M 'the\noutput' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -M 'the\noutput' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 18 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 19 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -Mix 'Pattern' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -Mix 'Pattern' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 20 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 21 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -nA3 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -nA3 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 22 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -nB3 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -nB3 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 23 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -C3 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -C3 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 24 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -A9 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -A9 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 25 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -nB9 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -nB9 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 26 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -A9 -B9 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -A9 -B9 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 27 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -A10 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -A10 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 28 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -nB10 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -nB10 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 29 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -C12 -B10 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -C12 -B10 'four' ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 30 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 31 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 32 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 33 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep 'fox' ./testdata/grepnonexist) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep 'fox' ./testdata/grepnonexist) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 34 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -s 'fox' ./testdata/grepnonexist) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -s 'fox' ./testdata/grepnonexist) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 35 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --include=grepinputx --include grepinput8 --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinputx --include grepinput8 --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 36 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --include=grepinput --exclude 'grepinput$' --exclude=grepinput8 --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinput --exclude 'grepinput$' --exclude=grepinput8 --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 37 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep '^(a+)*\d' ./testdata/grepinput) >>testtrygrep 2>teststderrgrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep '^(a+)*\d' ./testdata/grepinput) >>testtrygrep 2>teststderrgrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
echo "======== STDERR ========" >>testtrygrep
|
||||
cat teststderrgrep >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 38 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep '>\x00<' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep '>\x00<' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 39 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -A1 'before the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -A1 'before the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 40 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -B1 'after the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -B1 'after the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 41 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 42 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 43 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -on 'before|zero|after' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -on 'before|zero|after' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 44 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -on -e before -ezero -e after ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -on -e before -ezero -e after ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 45 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 46 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtrygrep >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtrygrep >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 47 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -Fx "AB.VE
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -Fx "AB.VE
|
||||
elephant" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 48 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -F "AB.VE
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -F "AB.VE
|
||||
elephant" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 49 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -F -e DATA -e "AB.VE
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -F -e DATA -e "AB.VE
|
||||
elephant" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 50 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 51 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -Mv "brown\sfox" ./testdata/grepinputv) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -Mv "brown\sfox" ./testdata/grepinputv) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 52 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --colour=always jumps ./testdata/grepinputv) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --colour=always jumps ./testdata/grepinputv) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 53 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 54 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 55 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 56 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -c lazy ./testdata/grepinput*) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -c lazy ./testdata/grepinput*) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 57 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -c -l lazy ./testdata/grepinput*) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -c -l lazy ./testdata/grepinput*) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 58 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --regex=PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --regex=PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 59 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --regexp=PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --regexp=PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 60 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --regex PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --regex PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 61 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --regexp PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --regexp PATTERN ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 62 -----------------------------" >>testtrygrep
|
||||
@@ -359,196 +364,208 @@ echo "---------------------------- Test 63 -----------------------------" >>test
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 64 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 65 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 66 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 67 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 68 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 69 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -vn --colour=always pattern ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -vn --colour=always pattern ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 70 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 71 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 72 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 73 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 74 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o "^01|02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o "^01|02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 75 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --color=always "^01|02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --color=always "^01|02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 76 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 77 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o "^01|^02|03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o "^01|^02|03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 78 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --color=always "^01|^02|03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --color=always "^01|^02|03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 79 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 80 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o "\b01|\b02" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o "\b01|\b02" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 81 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 82 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 83 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --buffer-size=100 "^a" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --buffer-size=100 "^a" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 84 -----------------------------" >>testtrygrep
|
||||
echo testdata/grepinput3 >testtemp1grep
|
||||
(cd $srcdir; $valgrind $pcre2grep --file-list ./testdata/grepfilelist --file-list $builddir/testtemp1grep "fox|complete|t7") >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --file-list ./testdata/grepfilelist --file-list $builddir/testtemp1grep "fox|complete|t7") >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 85 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --file-list=./testdata/grepfilelist "dolor" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --file-list=./testdata/grepfilelist "dolor" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 86 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 87 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep "cat" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep "cat" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 88 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -v "cat" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -v "cat" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 89 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -I "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -I "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 90 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --binary-files=without-match "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --binary-files=without-match "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 91 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -a "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -a "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 92 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --binary-files=text "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --binary-files=text "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 93 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --text "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --text "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 94 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --include=grepinputx --include grepinput8 'fox' ./testdata/grepinput* | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinputx --include grepinput8 'fox' ./testdata/grepinput* | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 95 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --file-list ./testdata/grepfilelist --exclude grepinputv "fox|complete") >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --file-list ./testdata/grepfilelist --exclude grepinputv "fox|complete") >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 96 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --include-dir=testdata --exclude '^(?!grepinput)' 'fox' ./test* | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include-dir=testdata --exclude '^(?!grepinput)' 'fox' ./test* | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 97 -----------------------------" >>testtrygrep
|
||||
echo "grepinput$" >testtemp1grep
|
||||
echo "grepinput8" >>testtemp1grep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --include=grepinput --exclude-from $builddir/testtemp1grep --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinput --exclude-from $builddir/testtemp1grep --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 98 -----------------------------" >>testtrygrep
|
||||
echo "grepinput$" >testtemp1grep
|
||||
echo "grepinput8" >>testtemp1grep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --exclude=grepinput3 --include=grepinput --exclude-from $builddir/testtemp1grep --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --exclude=grepinput3 --include=grepinput --exclude-from $builddir/testtemp1grep --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 99 -----------------------------" >>testtrygrep
|
||||
echo "grepinput$" >testtemp1grep
|
||||
echo "grepinput8" >testtemp2grep
|
||||
(cd $srcdir; $valgrind $pcre2grep -L -r --include grepinput --exclude-from $builddir/testtemp1grep --exclude-from=$builddir/testtemp2grep --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include grepinput --exclude-from $builddir/testtemp1grep --exclude-from=$builddir/testtemp2grep --exclude-dir='^\.' 'fox' ./testdata | sort) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 100 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -Ho2 --only-matching=1 -o3 '(\w+) binary (\w+)(\.)?' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -Ho2 --only-matching=1 -o3 '(\w+) binary (\w+)(\.)?' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 101 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -o3 -Ho2 -o12 --only-matching=1 -o3 --colour=always --om-separator='|' '(\w+) binary (\w+)(\.)?' ./testdata/grepinput) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -o3 -Ho2 -o12 --only-matching=1 -o3 --colour=always --om-separator='|' '(\w+) binary (\w+)(\.)?' ./testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 102 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -n "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -n "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 103 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --only-matching "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --only-matching "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 104 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -n --only-matching "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -n --only-matching "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 105 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --colour=always "ipsum|" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --colour=always "ipsum|" ./testdata/grepinput3) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 106 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; echo "a" | $valgrind $pcre2grep -M "|a" ) >>testtrygrep 2>&1
|
||||
(cd $srcdir; echo "a" | $valgrind $vjs $pcre2grep -M "|a" ) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 107 -----------------------------" >>testtrygrep
|
||||
echo "a" >testtemp1grep
|
||||
echo "aaaaa" >>testtemp1grep
|
||||
(cd $srcdir; $valgrind $pcre2grep --line-offsets '(?<=\Ka)' $builddir/testtemp1grep) >>testtrygrep 2>&1
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets '(?<=\Ka)' $builddir/testtemp1grep) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 108 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -lq PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -lq PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 109 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -cq lazy ./testdata/grepinput*) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -cq lazy ./testdata/grepinput*) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 110 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --om-separator / -Mo0 -o1 -o2 'match (\d+):\n (.)\n' testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 111 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets -M 'match (\d+):\n (.)\n' testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 112 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --file-offsets -M 'match (\d+):\n (.)\n' testdata/grepinput) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
# Now compare the results.
|
||||
@@ -563,15 +580,15 @@ if [ $utf8 -ne 0 ] ; then
|
||||
echo "Testing pcre2grep UTF-8 features"
|
||||
|
||||
echo "---------------------------- Test U1 ------------------------------" >testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test U2 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test U3 ------------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $pcre2grep --line-offsets -u --newline=any '(?<=\K\x{17f})' ./testdata/grepinput8) >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets -u --newline=any '(?<=\K\x{17f})' ./testdata/grepinput8) >>testtrygrep
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
$cf $srcdir/testdata/grepoutput8 testtrygrep
|
||||
@@ -593,27 +610,38 @@ echo "Testing pcre2grep newline settings"
|
||||
printf "abc\rdef\r\nghi\njkl" >testNinputgrep
|
||||
|
||||
printf "%c--------------------------- Test N1 ------------------------------\r\n" - >testtrygrep
|
||||
$valgrind $pcre2grep -n -N CR "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
$valgrind $vjs $pcre2grep -n -N CR "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
|
||||
printf "%c--------------------------- Test N2 ------------------------------\r\n" - >>testtrygrep
|
||||
$valgrind $pcre2grep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
$valgrind $vjs $pcre2grep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
|
||||
printf "%c--------------------------- Test N3 ------------------------------\r\n" - >>testtrygrep
|
||||
pattern=`printf 'def\rjkl'`
|
||||
$valgrind $pcre2grep -n --newline=cr -F "$pattern" testNinputgrep >>testtrygrep
|
||||
$valgrind $vjs $pcre2grep -n --newline=cr -F "$pattern" testNinputgrep >>testtrygrep
|
||||
|
||||
printf "%c--------------------------- Test N4 ------------------------------\r\n" - >>testtrygrep
|
||||
$valgrind $pcre2grep -n --newline=crlf -F -f $srcdir/testdata/greppatN4 testNinputgrep >>testtrygrep
|
||||
$valgrind $vjs $pcre2grep -n --newline=crlf -F -f $srcdir/testdata/greppatN4 testNinputgrep >>testtrygrep
|
||||
|
||||
printf "%c--------------------------- Test N5 ------------------------------\r\n" - >>testtrygrep
|
||||
$valgrind $pcre2grep -n --newline=any "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
$valgrind $vjs $pcre2grep -n --newline=any "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
|
||||
printf "%c--------------------------- Test N6 ------------------------------\r\n" - >>testtrygrep
|
||||
$valgrind $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
$valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||
|
||||
$cf $srcdir/testdata/grepoutputN testtrygrep
|
||||
if [ $? != 0 ] ; then exit 1; fi
|
||||
|
||||
# If pcre2grep supports script callouts, run some tests on them.
|
||||
|
||||
if $valgrind $vjs $pcre2grep --help | $valgrind $vjs $pcre2grep -q 'Callout scripts in patterns are supported'; then
|
||||
echo "Testing pcre2grep script callouts"
|
||||
$valgrind $vjs $pcre2grep '(T)(..(.))(?C"/bin/echo|Arg1: [$1] [$2] [$3]|Arg2: $|${1}$| ($4) ($14) ($0)")()' $srcdir/testdata/grepinputv >testtrygrep
|
||||
$valgrind $vjs $pcre2grep '(T)(..(.))()()()()()()()(..)(?C"/bin/echo|Arg1: [$11] [${11}]")' $srcdir/testdata/grepinputv >>testtrygrep
|
||||
$cf $srcdir/testdata/grepoutputC testtrygrep
|
||||
if [ $? != 0 ] ; then exit 1; fi
|
||||
else
|
||||
echo "Script callouts are not supported"
|
||||
fi
|
||||
|
||||
# Finally, some tests to exercise code that is not tested above, just to be
|
||||
# sure that it runs OK. Doing this improves the coverage statistics. The output
|
||||
44
pcre2-10.21/RunTest → pcre2-10.22/RunTest
vendored
44
pcre2-10.21/RunTest → pcre2-10.22/RunTest
vendored
@@ -53,7 +53,7 @@
|
||||
|
||||
title0="Test 0: Unchecked pcre2test argument tests (to improve coverage)"
|
||||
title1="Test 1: Main non-UTF, non-UCP functionality (compatible with Perl >= 5.10)"
|
||||
title2="Test 2: API, errors, internals, and non-Perl stuff"
|
||||
title2="Test 2: API, errors, internals and non-Perl stuff"
|
||||
title3="Test 3: Locale-specific features"
|
||||
title4A="Test 4: UTF"
|
||||
title4B=" and Unicode property support (compatible with Perl >= 5.10)"
|
||||
@@ -74,7 +74,7 @@ title16="Test 16: JIT-specific features when JIT is not available"
|
||||
title17="Test 17: JIT-specific features when JIT is available"
|
||||
title18="Test 18: Tests of the POSIX interface, excluding UTF/UCP"
|
||||
title19="Test 19: Tests of the POSIX interface with UTF/UCP"
|
||||
title20="Test 20: Serialization tests"
|
||||
title20="Test 20: Serialization and code copy tests"
|
||||
title21="Test 21: \C tests without UTF (supported for DFA matching)"
|
||||
title22="Test 22: \C tests with UTF (not supported for DFA matching)"
|
||||
title23="Test 23: \C disabled test"
|
||||
@@ -265,8 +265,8 @@ while [ $# -gt 0 ] ; do
|
||||
bigstack|-bigstack) bigstack=yes;;
|
||||
nojit|-nojit) nojit=yes;;
|
||||
sim|-sim) shift; sim=$1;;
|
||||
valgrind|-valgrind) valgrind="valgrind --tool=memcheck -q --smc-check=all";;
|
||||
valgrind-log|-valgrind-log) valgrind="valgrind --tool=memcheck --num-callers=30 --leak-check=no --error-limit=no --smc-check=all --log-file=report.%p ";;
|
||||
valgrind|-valgrind) valgrind="valgrind --tool=memcheck -q --smc-check=all-non-file";;
|
||||
valgrind-log|-valgrind-log) valgrind="valgrind --tool=memcheck --num-callers=30 --leak-check=no --error-limit=no --smc-check=all-non-file --log-file=report.%p ";;
|
||||
~*)
|
||||
if expr "$1" : '~[0-9][0-9]*$' >/dev/null; then
|
||||
skip="$skip `expr "$1" : '~\([0-9]*\)*$'`"
|
||||
@@ -310,9 +310,12 @@ fi
|
||||
|
||||
# If it is possible to set the system stack size, arrange to set a value for
|
||||
# test 2, which needs more than the even the Linux default when PCRE2 has been
|
||||
# compiled by gcc with -fsanitize=address. When the compiler is clang, sanitize
|
||||
# options require an even bigger stack for test 2, and an increased stack for
|
||||
# some of the other tests.
|
||||
# compiled by gcc with -fsanitize=address. If "bigstack" is on the command
|
||||
# line, set even bigger numbers. When the compiler is clang, sanitize options
|
||||
# require an even bigger stack for test 2, and an increased stack for some of
|
||||
# the other tests. Test 2 now has code to automatically try again with a 64M
|
||||
# stack if it crashes when test2stack is "-S 16" when matching with the
|
||||
# interpreter.
|
||||
|
||||
$sim ./pcre2test -S 1 /dev/null /dev/null
|
||||
if [ $? -eq 0 ] ; then
|
||||
@@ -499,15 +502,32 @@ for bmode in "$test8" "$test16" "$test32"; do
|
||||
for opt in "" $jitopt; do
|
||||
$sim $valgrind ${opt:+$vjs} ./pcre2test -q $test2stack $bmode $opt $testdata/testinput2 testtry
|
||||
if [ $? = 0 ] ; then
|
||||
$sim $valgrind ${opt:+$vjs} ./pcre2test -q $bmode $opt -error -63,-62,-2,-1,0,100,188,189 >>testtry
|
||||
checkresult $? 2 "$opt"
|
||||
else
|
||||
echo " "
|
||||
echo "** Test 2 requires a lot of stack. If it has crashed with a"
|
||||
echo "** segmentation fault, it may be that you do not have enough"
|
||||
echo "** stack available by default. Please see the 'pcre2stack' man"
|
||||
echo "** page for a discussion of PCRE2's stack usage."
|
||||
echo "** Test 2, when run under the interpreter, requires a lot of stack."
|
||||
echo "** If it has crashed with a segmentation fault, it may be that you"
|
||||
echo "** do not have enough stack available by default. Please see the"
|
||||
echo "** 'pcre2stack' man page for a discussion of PCRE2's stack usage."
|
||||
if [ "$test2stack" != "-S 16" -o "$opt" != "" ]; then
|
||||
echo " "
|
||||
exit 1
|
||||
fi
|
||||
echo " "
|
||||
exit 1
|
||||
echo "** Trying again with an increased stack size."
|
||||
echo " "
|
||||
echo $title2 "(excluding UTF-$bits) (64M stack)"
|
||||
$sim $valgrind ${opt:+$vjs} ./pcre2test -q -S 64 $bmode $opt $testdata/testinput2 testtry
|
||||
if [ $? = 0 ] ; then
|
||||
$sim $valgrind ${opt:+$vjs} ./pcre2test -q $bmode $opt -error -63,-62,-2,-1,0,100,188,189 >>testtry
|
||||
checkresult $? 2 "$opt"
|
||||
else
|
||||
echo " "
|
||||
echo "** Failed with an increased stack size. Tests abandoned."
|
||||
echo " "
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
dnl serial 11 (pkg-config-0.29)
|
||||
dnl serial 11 (pkg-config-0.29.1)
|
||||
dnl
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
@@ -63,7 +63,7 @@ dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29])
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
0
pcre2-10.21/ar-lib → pcre2-10.22/ar-lib
vendored
0
pcre2-10.21/ar-lib → pcre2-10.22/ar-lib
vendored
79
pcre2-10.21/configure → pcre2-10.22/configure
vendored
79
pcre2-10.21/configure → pcre2-10.22/configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for PCRE2 10.21.
|
||||
# Generated by GNU Autoconf 2.69 for PCRE2 10.22.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -587,8 +587,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='PCRE2'
|
||||
PACKAGE_TARNAME='pcre2'
|
||||
PACKAGE_VERSION='10.21'
|
||||
PACKAGE_STRING='PCRE2 10.21'
|
||||
PACKAGE_VERSION='10.22'
|
||||
PACKAGE_STRING='PCRE2 10.22'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -825,6 +825,7 @@ enable_pcre2_32
|
||||
enable_debug
|
||||
enable_jit
|
||||
enable_pcre2grep_jit
|
||||
enable_pcre2grep_callout
|
||||
enable_rebuild_chartables
|
||||
enable_unicode
|
||||
enable_newline_is_cr
|
||||
@@ -1406,7 +1407,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures PCRE2 10.21 to adapt to many kinds of systems.
|
||||
\`configure' configures PCRE2 10.22 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1476,7 +1477,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of PCRE2 10.21:";;
|
||||
short | recursive ) echo "Configuration of PCRE2 10.22:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1505,6 +1506,8 @@ Optional Features:
|
||||
--enable-debug enable debugging code
|
||||
--enable-jit enable Just-In-Time compiling support
|
||||
--disable-pcre2grep-jit disable JIT support in pcre2grep
|
||||
--disable-pcre2grep-callout
|
||||
disable callout script support in pcre2grep
|
||||
--enable-rebuild-chartables
|
||||
rebuild character tables in current locale
|
||||
--disable-unicode disable Unicode support
|
||||
@@ -1645,7 +1648,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
PCRE2 configure 10.21
|
||||
PCRE2 configure 10.22
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2140,7 +2143,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by PCRE2 $as_me 10.21, which was
|
||||
It was created by PCRE2 $as_me 10.22, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3004,7 +3007,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='pcre2'
|
||||
VERSION='10.21'
|
||||
VERSION='10.22'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -13628,9 +13631,9 @@ _ACEOF
|
||||
# Versioning
|
||||
|
||||
PCRE2_MAJOR="10"
|
||||
PCRE2_MINOR="21"
|
||||
PCRE2_MINOR="22"
|
||||
PCRE2_PRERELEASE=""
|
||||
PCRE2_DATE="2016-01-12"
|
||||
PCRE2_DATE="2016-07-29"
|
||||
|
||||
if test "$PCRE2_MINOR" = "08" -o "$PCRE2_MINOR" = "09"
|
||||
then
|
||||
@@ -13738,6 +13741,20 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Handle --disable-pcre2grep-callout (enabled by default) but not supported
|
||||
# for Windows.
|
||||
if test "$HAVE_WINDOWS_H" != "1"; then
|
||||
# Check whether --enable-pcre2grep-callout was given.
|
||||
if test "${enable_pcre2grep_callout+set}" = set; then :
|
||||
enableval=$enable_pcre2grep_callout;
|
||||
else
|
||||
enable_pcre2grep_callout=yes
|
||||
fi
|
||||
|
||||
else
|
||||
enable_pcre2grep_callout=no
|
||||
fi
|
||||
|
||||
# Handle --enable-rebuild-chartables
|
||||
# Check whether --enable-rebuild-chartables was given.
|
||||
if test "${enable_rebuild_chartables+set}" = set; then :
|
||||
@@ -14154,6 +14171,18 @@ fi
|
||||
|
||||
done
|
||||
|
||||
for ac_header in sys/wait.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_sys_wait_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
_ACEOF
|
||||
HAVE_SYS_WAIT_H=1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
# Conditional compilation
|
||||
if test "x$enable_pcre2_8" = "xyes"; then
|
||||
@@ -15275,6 +15304,23 @@ $as_echo "#define SUPPORT_PCRE2GREP_JIT /**/" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# Currently pcre2grep callout string is not supported under Windows.
|
||||
|
||||
if test "$enable_pcre2grep_callout" = "yes"; then
|
||||
if test "$HAVE_WINDOWS_H" != "1"; then
|
||||
if test "$HAVE_SYS_WAIT_H" != "1"; then
|
||||
as_fn_error $? "Callout script support needs sys/wait.h." "$LINENO" 5
|
||||
fi
|
||||
|
||||
$as_echo "#define SUPPORT_PCRE2GREP_CALLOUT /**/" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Callout script support is not available for Windows: disabled" >&5
|
||||
$as_echo "$as_me: WARNING: Callout script support is not available for Windows: disabled" >&2;}
|
||||
enable_pcre2grep_callout=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$enable_unicode" = "yes"; then
|
||||
|
||||
$as_echo "#define SUPPORT_UNICODE /**/" >>confdefs.h
|
||||
@@ -15418,16 +15464,16 @@ esac
|
||||
# are m4 variables, assigned above.
|
||||
|
||||
EXTRA_LIBPCRE2_8_LDFLAGS="$EXTRA_LIBPCRE2_8_LDFLAGS \
|
||||
$NO_UNDEFINED -version-info 3:0:3"
|
||||
$NO_UNDEFINED -version-info 4:0:4"
|
||||
|
||||
EXTRA_LIBPCRE2_16_LDFLAGS="$EXTRA_LIBPCRE2_16_LDFLAGS \
|
||||
$NO_UNDEFINED -version-info 3:0:3"
|
||||
$NO_UNDEFINED -version-info 4:0:4"
|
||||
|
||||
EXTRA_LIBPCRE2_32_LDFLAGS="$EXTRA_LIBPCRE2_32_LDFLAGS \
|
||||
$NO_UNDEFINED -version-info 3:0:3"
|
||||
$NO_UNDEFINED -version-info 4:0:4"
|
||||
|
||||
EXTRA_LIBPCRE2_POSIX_LDFLAGS="$EXTRA_LIBPCRE2_POSIX_LDFLAGS \
|
||||
$NO_UNDEFINED -version-info 0:1:0"
|
||||
$NO_UNDEFINED -version-info 1:0:0"
|
||||
|
||||
|
||||
|
||||
@@ -16474,7 +16520,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by PCRE2 $as_me 10.21, which was
|
||||
This file was extended by PCRE2 $as_me 10.22, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -16540,7 +16586,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
PCRE2 config.status 10.21
|
||||
PCRE2 config.status 10.22
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -18284,6 +18330,7 @@ $PACKAGE-$VERSION configuration summary:
|
||||
Build shared libs ............... : ${enable_shared}
|
||||
Build static libs ............... : ${enable_static}
|
||||
Use JIT in pcre2grep ............ : ${enable_pcre2grep_jit}
|
||||
Enable callouts in pcre2grep .... : ${enable_pcre2grep_callout}
|
||||
Buffer size for pcre2grep ....... : ${with_pcre2grep_bufsize}
|
||||
Link pcre2grep with libz ........ : ${enable_pcre2grep_libz}
|
||||
Link pcre2grep with libbz2 ...... : ${enable_pcre2grep_libbz2}
|
||||
@@ -9,18 +9,18 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
|
||||
dnl be defined as -RC2, for example. For real releases, it should be empty.
|
||||
|
||||
m4_define(pcre2_major, [10])
|
||||
m4_define(pcre2_minor, [21])
|
||||
m4_define(pcre2_minor, [22])
|
||||
m4_define(pcre2_prerelease, [])
|
||||
m4_define(pcre2_date, [2016-01-12])
|
||||
m4_define(pcre2_date, [2016-07-29])
|
||||
|
||||
# NOTE: The CMakeLists.txt file searches for the above variables in the first
|
||||
# 50 lines of this file. Please update that if the variables above are moved.
|
||||
|
||||
# Libtool shared library interface versions (current:revision:age)
|
||||
m4_define(libpcre2_8_version, [3:0:3])
|
||||
m4_define(libpcre2_16_version, [3:0:3])
|
||||
m4_define(libpcre2_32_version, [3:0:3])
|
||||
m4_define(libpcre2_posix_version, [0:1:0])
|
||||
m4_define(libpcre2_8_version, [4:0:4])
|
||||
m4_define(libpcre2_16_version, [4:0:4])
|
||||
m4_define(libpcre2_32_version, [4:0:4])
|
||||
m4_define(libpcre2_posix_version, [1:0:0])
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(PCRE2, pcre2_major.pcre2_minor[]pcre2_prerelease, , pcre2)
|
||||
@@ -154,6 +154,17 @@ AC_ARG_ENABLE(pcre2grep-jit,
|
||||
[disable JIT support in pcre2grep]),
|
||||
, enable_pcre2grep_jit=yes)
|
||||
|
||||
# Handle --disable-pcre2grep-callout (enabled by default) but not supported
|
||||
# for Windows.
|
||||
if test "$HAVE_WINDOWS_H" != "1"; then
|
||||
AC_ARG_ENABLE(pcre2grep-callout,
|
||||
AS_HELP_STRING([--disable-pcre2grep-callout],
|
||||
[disable callout script support in pcre2grep]),
|
||||
, enable_pcre2grep_callout=yes)
|
||||
else
|
||||
enable_pcre2grep_callout=no
|
||||
fi
|
||||
|
||||
# Handle --enable-rebuild-chartables
|
||||
AC_ARG_ENABLE(rebuild-chartables,
|
||||
AS_HELP_STRING([--enable-rebuild-chartables],
|
||||
@@ -398,6 +409,7 @@ sure both macros are undefined; an emulation function will then be used. */])
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(limits.h sys/types.h sys/stat.h dirent.h)
|
||||
AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1])
|
||||
AC_CHECK_HEADERS([sys/wait.h], [HAVE_SYS_WAIT_H=1])
|
||||
|
||||
# Conditional compilation
|
||||
AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
|
||||
@@ -552,6 +564,21 @@ if test "$enable_pcre2grep_jit" = "yes"; then
|
||||
Define to any value to enable JIT support in pcre2grep.])
|
||||
fi
|
||||
|
||||
# Currently pcre2grep callout string is not supported under Windows.
|
||||
|
||||
if test "$enable_pcre2grep_callout" = "yes"; then
|
||||
if test "$HAVE_WINDOWS_H" != "1"; then
|
||||
if test "$HAVE_SYS_WAIT_H" != "1"; then
|
||||
AC_MSG_ERROR([Callout script support needs sys/wait.h.])
|
||||
fi
|
||||
AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT], [], [
|
||||
Define to any value to enable callout script support in pcre2grep.])
|
||||
else
|
||||
AC_MSG_WARN([Callout script support is not available for Windows: disabled])
|
||||
enable_pcre2grep_callout=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$enable_unicode" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_UNICODE], [], [
|
||||
Define to any value to enable support for Unicode and UTF encoding.
|
||||
@@ -914,6 +941,7 @@ $PACKAGE-$VERSION configuration summary:
|
||||
Build shared libs ............... : ${enable_shared}
|
||||
Build static libs ............... : ${enable_static}
|
||||
Use JIT in pcre2grep ............ : ${enable_pcre2grep_jit}
|
||||
Enable callouts in pcre2grep .... : ${enable_pcre2grep_callout}
|
||||
Buffer size for pcre2grep ....... : ${with_pcre2grep_bufsize}
|
||||
Link pcre2grep with libz ........ : ${enable_pcre2grep_libz}
|
||||
Link pcre2grep with libbz2 ...... : ${enable_pcre2grep_libbz2}
|
||||
@@ -111,6 +111,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. */
|
||||
/* #undef HAVE_SYS_TYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
@@ -203,7 +206,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.21"
|
||||
#define PACKAGE_STRING "PCRE2 10.22"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "pcre2"
|
||||
@@ -212,7 +215,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.21"
|
||||
#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
|
||||
@@ -271,6 +274,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. */
|
||||
/* #undef SUPPORT_PCRE2GREP_CALLOUT */
|
||||
|
||||
/* Define to any value to enable JIT support in pcre2grep. */
|
||||
/* #undef SUPPORT_PCRE2GREP_JIT */
|
||||
|
||||
@@ -293,7 +299,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* #undef SUPPORT_VALGRIND */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "10.21"
|
||||
#define VERSION "10.22"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user