mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 19:41:14 -03:00
Compare commits
539 Commits
Integratio
...
last_autot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44bb098404 | ||
|
|
fe79badaef | ||
|
|
f5f6e5307d | ||
|
|
ba64ec6e91 | ||
|
|
a0f785c90f | ||
|
|
e9b853e0c2 | ||
|
|
1a4bb50cd5 | ||
|
|
47ff060b89 | ||
|
|
ddc0e68f29 | ||
|
|
4b6c682b2d | ||
|
|
1711883e90 | ||
|
|
c66015c2c1 | ||
|
|
92b1f4df07 | ||
|
|
6239c94fd4 | ||
|
|
9a1cd9c8ce | ||
|
|
3674efad0b | ||
|
|
0e82fb8c47 | ||
|
|
2418e1e50b | ||
|
|
a5659132f6 | ||
|
|
bb36274e6b | ||
|
|
24efa45e3e | ||
|
|
0f6b3fd9e4 | ||
|
|
5e98259d95 | ||
|
|
2c3214cabd | ||
|
|
2c8abdf5cb | ||
|
|
e330dafd24 | ||
|
|
195020ff89 | ||
|
|
06f832aae1 | ||
|
|
e475b1a375 | ||
|
|
efa88b171a | ||
|
|
fa5d19a702 | ||
|
|
8ef316562f | ||
|
|
31dc1f9a8c | ||
|
|
a8120359c7 | ||
|
|
c99fa08f21 | ||
|
|
0b26b55676 | ||
|
|
4da38df43b | ||
|
|
2ec33be90f | ||
|
|
a1f122f603 | ||
|
|
2d75ab8e9b | ||
|
|
db90f421c0 | ||
|
|
6241bd8453 | ||
|
|
6cd8856484 | ||
|
|
9a35df059a | ||
|
|
2b89cbc678 | ||
|
|
d5e0392964 | ||
|
|
3debfe7534 | ||
|
|
fb75d0f848 | ||
|
|
c8dc306b18 | ||
|
|
0e936198db | ||
|
|
2a002a4ba1 | ||
|
|
c33d1a217c | ||
|
|
256c2dadee | ||
|
|
c213882511 | ||
|
|
afd035f8cc | ||
|
|
cb045d5e6a | ||
|
|
c46f02e01e | ||
|
|
0a29eb3142 | ||
|
|
47f1b026e6 | ||
|
|
4b292c777d | ||
|
|
144e37b8ba | ||
|
|
a81bfbb805 | ||
|
|
815e20066b | ||
|
|
5134949a14 | ||
|
|
9715db9434 | ||
|
|
130f2266d0 | ||
|
|
ec65ba3427 | ||
|
|
0ff4046b8c | ||
|
|
f1b208997c | ||
|
|
780b53ba73 | ||
|
|
1b8ddacfed | ||
|
|
003998c921 | ||
|
|
f015f930f1 | ||
|
|
0f30f05e16 | ||
|
|
6bddf2c83b | ||
|
|
da04f757f9 | ||
|
|
f451499aa6 | ||
|
|
c6ec423513 | ||
|
|
38d86acbc3 | ||
|
|
de0b64409c | ||
|
|
75e83cac29 | ||
|
|
13b2ff336d | ||
|
|
44ad92ef50 | ||
|
|
e234856190 | ||
|
|
50f6fa048e | ||
|
|
177adb6837 | ||
|
|
334eec94f8 | ||
|
|
11a1403219 | ||
|
|
28f57aa8ab | ||
|
|
d44308388f | ||
|
|
6e24061468 | ||
|
|
59955391ad | ||
|
|
6aa2f29901 | ||
|
|
8a93c7d0ea | ||
|
|
38f37b7abc | ||
|
|
3fe9353599 | ||
|
|
6fa8b028fc | ||
|
|
c2bc0c67f2 | ||
|
|
5c994b0d47 | ||
|
|
59cb2d02a8 | ||
|
|
8e41e3337c | ||
|
|
1c3fe7dc66 | ||
|
|
18a9141fb4 | ||
|
|
7eb6bee793 | ||
|
|
c242469e8b | ||
|
|
11009de431 | ||
|
|
7958e1d5c4 | ||
|
|
13ab9e541e | ||
|
|
0b3eca1743 | ||
|
|
4a2fd443b2 | ||
|
|
ada8ea954e | ||
|
|
061f8f49c6 | ||
|
|
ebe2dc2766 | ||
|
|
a95bc849c5 | ||
|
|
a4dc04a28e | ||
|
|
fc9d238642 | ||
|
|
ccc45235b0 | ||
|
|
78ed659151 | ||
|
|
8a0be93e50 | ||
|
|
05701a779b | ||
|
|
20c51b7da9 | ||
|
|
f6974e5a76 | ||
|
|
d48eb56aea | ||
|
|
fdbbe9f69d | ||
|
|
dbeaa0c8de | ||
|
|
b6b7550477 | ||
|
|
f75fe823b8 | ||
|
|
0f6720ef8e | ||
|
|
2a44517842 | ||
|
|
f10c0dde3b | ||
|
|
619a248a35 | ||
|
|
828a704282 | ||
|
|
552af31ab0 | ||
|
|
9796a331bc | ||
|
|
8811a10690 | ||
|
|
13eb01bc97 | ||
|
|
5814b1b8e2 | ||
|
|
f037b0f30f | ||
|
|
553bf47191 | ||
|
|
e707c530ee | ||
|
|
5607bc1396 | ||
|
|
4562f8f4e3 | ||
|
|
c0dc1870f0 | ||
|
|
4132bb1a19 | ||
|
|
fdc4246fff | ||
|
|
556ddfa456 | ||
|
|
2614deb138 | ||
|
|
c1d042051c | ||
|
|
84593e1519 | ||
|
|
3e2e44b673 | ||
|
|
7508865374 | ||
|
|
02ca7be416 | ||
|
|
1ee57e9244 | ||
|
|
c62d95e428 | ||
|
|
ca5b7c0ec4 | ||
|
|
c5a6d0bfde | ||
|
|
56309f1c2e | ||
|
|
6e9250425a | ||
|
|
b247c8d9ad | ||
|
|
717718353e | ||
|
|
8d9089c78b | ||
|
|
c931e33759 | ||
|
|
a19206036c | ||
|
|
c588d58663 | ||
|
|
dc0746bc45 | ||
|
|
fb7a6e5f34 | ||
|
|
3382a2145f | ||
|
|
016d83c3fc | ||
|
|
7200f7ff4a | ||
|
|
bbc3fecbeb | ||
|
|
43002f1822 | ||
|
|
1c6efc6378 | ||
|
|
bcc4240d2b | ||
|
|
4d6a97d35c | ||
|
|
634e97a85e | ||
|
|
1c9fe71240 | ||
|
|
038fea1a47 | ||
|
|
1701e2c558 | ||
|
|
6da9d96241 | ||
|
|
34c1f24716 | ||
|
|
ec290209db | ||
|
|
83884c2c13 | ||
|
|
28e2cfeb4b | ||
|
|
fe73fbdb9a | ||
|
|
df28f76698 | ||
|
|
b7e0f14fe0 | ||
|
|
b999ba7b47 | ||
|
|
3a320d7584 | ||
|
|
8c6ae4612b | ||
|
|
b19b1ee23a | ||
|
|
f7c981af63 | ||
|
|
9c82979459 | ||
|
|
c29023b3e8 | ||
|
|
c771334924 | ||
|
|
f2b08ec592 | ||
|
|
cb7762b7c0 | ||
|
|
34fa8ef2d2 | ||
|
|
e461858964 | ||
|
|
191e6679b3 | ||
|
|
aaa6cf4492 | ||
|
|
74685899cb | ||
|
|
662708e72d | ||
|
|
0377198fc8 | ||
|
|
a00ef4aa2e | ||
|
|
2445a76d2e | ||
|
|
c1504576f9 | ||
|
|
965fef739c | ||
|
|
0abcf9265e | ||
|
|
1049bed5f8 | ||
|
|
7c8b444927 | ||
|
|
1a3471fa7d | ||
|
|
8e60ebcd34 | ||
|
|
b03c62bd29 | ||
|
|
87e71bcde7 | ||
|
|
988283c717 | ||
|
|
d4e3f49571 | ||
|
|
26ada583a0 | ||
|
|
6025c28efc | ||
|
|
7f1dfb6284 | ||
|
|
23f8f1b6fb | ||
|
|
b952606430 | ||
|
|
0f5dc0b4e2 | ||
|
|
c869ab541d | ||
|
|
807f79df03 | ||
|
|
9396f79e3e | ||
|
|
ecb808fb39 | ||
|
|
e0396d8ef8 | ||
|
|
eaefed434d | ||
|
|
2e542d7822 | ||
|
|
a042a4cb62 | ||
|
|
c7656e6622 | ||
|
|
ddfad001eb | ||
|
|
eb8a93f499 | ||
|
|
9f469e576b | ||
|
|
4cc168ae11 | ||
|
|
d3fa58d621 | ||
|
|
6f682c8405 | ||
|
|
ec29a5b913 | ||
|
|
178b72b2fd | ||
|
|
084ff64f4f | ||
|
|
2742267b9e | ||
|
|
d62576ce22 | ||
|
|
6c22c8893b | ||
|
|
dbe906b79e | ||
|
|
e3dcb01e67 | ||
|
|
22d05dc18b | ||
|
|
6ba0d4c88a | ||
|
|
f4e1d7c97e | ||
|
|
38b4d47560 | ||
|
|
9a4153f5e2 | ||
|
|
6e0dd06f43 | ||
|
|
78bbcef356 | ||
|
|
7c256e7e51 | ||
|
|
4c0b6a6add | ||
|
|
d895075d9b | ||
|
|
b956f13880 | ||
|
|
88dc484858 | ||
|
|
b54f1842d5 | ||
|
|
fd1908e973 | ||
|
|
ff89c61afa | ||
|
|
df375ea12d | ||
|
|
b00f039489 | ||
|
|
371f67f1b5 | ||
|
|
0c17210f05 | ||
|
|
a2aab24db7 | ||
|
|
aebe040fdc | ||
|
|
0770fd1f89 | ||
|
|
c7635ed2c0 | ||
|
|
d15de117b9 | ||
|
|
09ca268d50 | ||
|
|
d9d2ad1cd6 | ||
|
|
38db3adbf6 | ||
|
|
276d00e0cf | ||
|
|
6b16975359 | ||
|
|
46c967903d | ||
|
|
4064ab8183 | ||
|
|
0e282deb92 | ||
|
|
ac3d3c399c | ||
|
|
d8d9cfdc10 | ||
|
|
aa32fc92ac | ||
|
|
7eee158292 | ||
|
|
c776414674 | ||
|
|
dc885d70b3 | ||
|
|
0047523cf4 | ||
|
|
730effa0d9 | ||
|
|
50448e4319 | ||
|
|
f73b4fb746 | ||
|
|
63c072e225 | ||
|
|
6b060a54e3 | ||
|
|
f01e8d9afe | ||
|
|
02628d1b02 | ||
|
|
a0fbb8dea7 | ||
|
|
1cad15b01f | ||
|
|
c775335b2a | ||
|
|
b8fd08811c | ||
|
|
0640e7bae9 | ||
|
|
7ad779ac00 | ||
|
|
882da75d29 | ||
|
|
1e3a46f423 | ||
|
|
354c6b1b67 | ||
|
|
15cf45a2a0 | ||
|
|
5c689bb50c | ||
|
|
6ef617f8e7 | ||
|
|
aafefb2300 | ||
|
|
290d07a833 | ||
|
|
4567d3ae52 | ||
|
|
e9f0a8cf2c | ||
|
|
5adc07bf28 | ||
|
|
d651cdacbe | ||
|
|
8079345207 | ||
|
|
4e391abe3c | ||
|
|
09d0f7741d | ||
|
|
a17e6fa4e8 | ||
|
|
432ed621fd | ||
|
|
4af2a681b8 | ||
|
|
eee4dd8248 | ||
|
|
71b5591f21 | ||
|
|
87b7b6b2bb | ||
|
|
24f251e044 | ||
|
|
91a9c98974 | ||
|
|
e97c27c177 | ||
|
|
82b4d7225c | ||
|
|
b23403ee6b | ||
|
|
23e94d8349 | ||
|
|
367661d4f1 | ||
|
|
0edaf42d10 | ||
|
|
07e03dd794 | ||
|
|
462cb6044c | ||
|
|
3115446a07 | ||
|
|
8743961301 | ||
|
|
a5e5f90f73 | ||
|
|
488e208cca | ||
|
|
5dc0ff0a90 | ||
|
|
3cc581fbb0 | ||
|
|
1680b741b2 | ||
|
|
fec10830d3 | ||
|
|
e490372fbf | ||
|
|
2a190c6f3b | ||
|
|
c66b3128ec | ||
|
|
f90cb3957f | ||
|
|
b1f5cb9bf4 | ||
|
|
3847d2e9d1 | ||
|
|
1398ee9bbb | ||
|
|
857561ca14 | ||
|
|
34ed958f72 | ||
|
|
02c32c638f | ||
|
|
58b696bed1 | ||
|
|
84339d5636 | ||
|
|
1b23814f8b | ||
|
|
dd31933c09 | ||
|
|
20cdcfadac | ||
|
|
53355885c8 | ||
|
|
333bf1fd9f | ||
|
|
bad3c5d79d | ||
|
|
fb74ccb1f2 | ||
|
|
de32665939 | ||
|
|
6c1a2c1f30 | ||
|
|
5779d99a81 | ||
|
|
c9fe59237b | ||
|
|
d7dac4d077 | ||
|
|
2b426c1047 | ||
|
|
2abd0cde85 | ||
|
|
c94adb9d3e | ||
|
|
7d16714dd3 | ||
|
|
03cdf89bfd | ||
|
|
027fc43736 | ||
|
|
2fdcc4544a | ||
|
|
6d11e46428 | ||
|
|
787f453ec2 | ||
|
|
73bae383e0 | ||
|
|
de145477be | ||
|
|
db1d694aec | ||
|
|
2d3e8ec0a9 | ||
|
|
82170b0862 | ||
|
|
59d62fdd53 | ||
|
|
455959ae7a | ||
|
|
6c9065e9ef | ||
|
|
6ea7aa8a00 | ||
|
|
56cedac3b5 | ||
|
|
848ca1c1cc | ||
|
|
34e104ca35 | ||
|
|
a333c2f01d | ||
|
|
92d3f5f548 | ||
|
|
77884bc21a | ||
|
|
b98812dd1a | ||
|
|
3b1709180f | ||
|
|
6f52e6bb1c | ||
|
|
038f3cca6d | ||
|
|
9f62a53077 | ||
|
|
50c83463f1 | ||
|
|
3eb15109cf | ||
|
|
abcd24f716 | ||
|
|
03b92ffe00 | ||
|
|
c1dd284b3e | ||
|
|
421fbdd52a | ||
|
|
26fc705c07 | ||
|
|
a00de96a57 | ||
|
|
ede66ccaac | ||
|
|
5055621e02 | ||
|
|
94adb53b1f | ||
|
|
e6b13c6bac | ||
|
|
e6872b83b0 | ||
|
|
a47f6859bd | ||
|
|
bba66a3ecc | ||
|
|
8d7cae63ff | ||
|
|
391af6af0c | ||
|
|
895c2c4af0 | ||
|
|
e7715eecf6 | ||
|
|
16a94db702 | ||
|
|
2bb53f7253 | ||
|
|
b402b635a9 | ||
|
|
f5893ba475 | ||
|
|
d518b01281 | ||
|
|
89d77df658 | ||
|
|
9743cd77d3 | ||
|
|
c15a702f18 | ||
|
|
a6fa237db2 | ||
|
|
4a8db53bcf | ||
|
|
b4365e972a | ||
|
|
5612f47e33 | ||
|
|
f553cedff1 | ||
|
|
827bce6c88 | ||
|
|
1f897d2c43 | ||
|
|
fc5e8f9fec | ||
|
|
9aa8740c36 | ||
|
|
d4be5f08f3 | ||
|
|
adb97772c5 | ||
|
|
e7bfd1d71c | ||
|
|
d776a366fa | ||
|
|
896d6f41f4 | ||
|
|
f4790a8767 | ||
|
|
40fa3c21f0 | ||
|
|
b8b0c39c77 | ||
|
|
4548f4f4b0 | ||
|
|
2c01e67a74 | ||
|
|
4f196eef64 | ||
|
|
5196a42165 | ||
|
|
490432c177 | ||
|
|
04f1ea0680 | ||
|
|
eabda835d5 | ||
|
|
9d4e460b29 | ||
|
|
3a885d5e82 | ||
|
|
9fb18f6322 | ||
|
|
72c0213d42 | ||
|
|
6b37ff0502 | ||
|
|
12d7c7feb6 | ||
|
|
f3e87b7996 | ||
|
|
380bae80bf | ||
|
|
3444e1db18 | ||
|
|
bc0a0b4bc8 | ||
|
|
7af0cad23d | ||
|
|
74422e476b | ||
|
|
41b3331175 | ||
|
|
7191a42ca0 | ||
|
|
6783c63eee | ||
|
|
ef23923c8d | ||
|
|
d1913f0df0 | ||
|
|
63e70d601d | ||
|
|
ea6631641f | ||
|
|
7afd7a1985 | ||
|
|
8b5fa6f572 | ||
|
|
a84d22b926 | ||
|
|
217486e547 | ||
|
|
ba8748877a | ||
|
|
54438f8dc1 | ||
|
|
e7221a21ef | ||
|
|
e83c0b1a53 | ||
|
|
b7369213e2 | ||
|
|
1074a59d75 | ||
|
|
7aca69780c | ||
|
|
9dc79cd8d5 | ||
|
|
4b8da10215 | ||
|
|
131f0f2de5 | ||
|
|
f871951a87 | ||
|
|
9b980f5e6e | ||
|
|
e9ad88d4b0 | ||
|
|
b77a909a4f | ||
|
|
58ceb00781 | ||
|
|
c5f9f59555 | ||
|
|
a608e5d581 | ||
|
|
3e03625113 | ||
|
|
e4b6007f33 | ||
|
|
ee5e4cf8e2 | ||
|
|
a3085a3059 | ||
|
|
aaee5dd32d | ||
|
|
a615151d91 | ||
|
|
7078aa4642 | ||
|
|
a8eb02f9f5 | ||
|
|
803619b19b | ||
|
|
0337588979 | ||
|
|
2ebdcf82ee | ||
|
|
bfe08a471d | ||
|
|
077d656b87 | ||
|
|
b4301ff54f | ||
|
|
8dddc62aeb | ||
|
|
840619197e | ||
|
|
259cf02aac | ||
|
|
b0072482e4 | ||
|
|
e33d29a5d8 | ||
|
|
2e11e6c692 | ||
|
|
b8697e7795 | ||
|
|
a433868363 | ||
|
|
e504faeb38 | ||
|
|
c3c1ae18c6 | ||
|
|
b193df8b42 | ||
|
|
3bbec871e4 | ||
|
|
4674784a0b | ||
|
|
26dfca67e5 | ||
|
|
84ca265b48 | ||
|
|
61e7f84e29 | ||
|
|
cbc25d7829 | ||
|
|
dabd05f2e3 | ||
|
|
a7998c4829 | ||
|
|
040d921fa1 | ||
|
|
4a3ac6e91e | ||
|
|
32e6bf6f64 | ||
|
|
8261eb18d2 | ||
|
|
b60a9d8c4a | ||
|
|
742fde0dd6 | ||
|
|
9e4ece8d89 | ||
|
|
05222a055a | ||
|
|
69a1c5a3a1 | ||
|
|
fb679ac9c3 | ||
|
|
50fbc36b73 | ||
|
|
082450b1e7 | ||
|
|
1adcd2d591 | ||
|
|
b8113f8e97 | ||
|
|
3855c2217f | ||
|
|
1634c0fa49 | ||
|
|
4aa069a8ff | ||
|
|
c1be3284c1 | ||
|
|
ba9c387590 | ||
|
|
f8338d63ed | ||
|
|
5959114103 | ||
|
|
40de04cc6c | ||
|
|
4cf3e62643 | ||
|
|
cf16d39872 | ||
|
|
7ebef0a396 | ||
|
|
d080182686 |
23
.builds/alpine.yml
Normal file
23
.builds/alpine.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
image: alpine/edge
|
||||
packages:
|
||||
- cmake
|
||||
- ninja
|
||||
- ncurses-dev
|
||||
- pcre2-dev
|
||||
- expect
|
||||
sources:
|
||||
- https://git.sr.ht/~faho/fish
|
||||
tasks:
|
||||
- build: |
|
||||
cd fish
|
||||
mkdir build || :
|
||||
cd build
|
||||
cmake -G Ninja .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DATADIR=share \
|
||||
-DCMAKE_INSTALL_DOCDIR=share/doc/fish \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc
|
||||
ninja
|
||||
- test: |
|
||||
cd fish/build
|
||||
env SHOW_INTERACTIVE_LOG=1 ninja test
|
||||
21
.builds/arch.yml
Normal file
21
.builds/arch.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
image: archlinux
|
||||
packages:
|
||||
- cmake
|
||||
- ninja
|
||||
- expect
|
||||
sources:
|
||||
- https://git.sr.ht/~faho/fish
|
||||
tasks:
|
||||
- build: |
|
||||
cd fish
|
||||
mkdir build || :
|
||||
cd build
|
||||
cmake -G Ninja .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DATADIR=share \
|
||||
-DCMAKE_INSTALL_DOCDIR=share/doc/fish \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc
|
||||
ninja
|
||||
- test: |
|
||||
cd fish/build
|
||||
env SHOW_INTERACTIVE_LOG=1 ninja test
|
||||
25
.builds/freebsd.yml
Normal file
25
.builds/freebsd.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
image: freebsd/latest
|
||||
packages:
|
||||
- ncurses
|
||||
- gcc
|
||||
- gettext
|
||||
- expect
|
||||
- cmake
|
||||
- gmake
|
||||
- pcre2
|
||||
sources:
|
||||
- https://git.sr.ht/~faho/fish
|
||||
tasks:
|
||||
- build: |
|
||||
cd fish
|
||||
mkdir build || :
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DATADIR=share \
|
||||
-DCMAKE_INSTALL_DOCDIR=share/doc/fish \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc
|
||||
gmake -j2
|
||||
- test: |
|
||||
cd fish/build
|
||||
gmake test SHOW_INTERACTIVE_LOG=1
|
||||
23
.builds/netbsd.yml
Normal file
23
.builds/netbsd.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
image: netbsd/latest
|
||||
packages:
|
||||
- ncurses
|
||||
- gettext
|
||||
- tcl-expect
|
||||
- cmake
|
||||
- gmake
|
||||
- pcre2
|
||||
tasks:
|
||||
- build: |
|
||||
git -c http.sslVerify=false clone https://git.sr.ht/~faho/fish
|
||||
cd fish
|
||||
mkdir build || :
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DATADIR=share \
|
||||
-DCMAKE_INSTALL_DOCDIR=share/doc/fish \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc
|
||||
gmake -j2
|
||||
- test: |
|
||||
cd fish/build
|
||||
gmake test SHOW_INTERACTIVE_LOG=1
|
||||
13
.gitattributes
vendored
13
.gitattributes
vendored
@@ -6,6 +6,7 @@
|
||||
# let git show off diff hunk headers, help git diff -L:
|
||||
# https://git-scm.com/docs/gitattributes
|
||||
*.cpp diff=cpp
|
||||
*.h diff=cpp
|
||||
*.py diff=py
|
||||
# add a [diff "fish"] to git config with pattern
|
||||
*.fish diff=fish
|
||||
@@ -18,12 +19,16 @@
|
||||
/debian/* export-ignore
|
||||
/.github export-ignore
|
||||
/.github/* export-ignore
|
||||
/.builds export-ignore
|
||||
/.builds/* export-ignore
|
||||
/.travis.yml export-ignore
|
||||
|
||||
# for linguist; let github identify our project as C++ instead of C due to pcre2
|
||||
/pcre2-10.22/ linguist-vendored
|
||||
/pcre2-10.22/* linguist-vendored
|
||||
/muparser-2.2.5/ linguist-vendored
|
||||
/muparser-2.2.5/* linguist-vendored
|
||||
/pcre2-10.32/* linguist-vendored
|
||||
install-sh linguist-vendored
|
||||
config.sub linguist-vendored
|
||||
config.guess linguist-vendored
|
||||
/m4/* linguist-vendored
|
||||
angular.js linguist-vendored
|
||||
/doc_src/* linguist-documentation
|
||||
*.fish linguist-language=fish
|
||||
|
||||
3
.github/ISSUE_TEMPLATE.md
vendored
3
.github/ISSUE_TEMPLATE.md
vendored
@@ -11,4 +11,7 @@ Please tell us if you tried fish without third-party customizations by executing
|
||||
sh -c 'env HOME=$(mktemp -d) fish'
|
||||
|
||||
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.
|
||||
|
||||
If you are reporting a bug in fish 3.0, please make sure to indicate whether or not this is a
|
||||
regression from fish 2.7.1.
|
||||
-->
|
||||
|
||||
50
.travis.yml
50
.travis.yml
@@ -1,5 +1,5 @@
|
||||
language: cpp
|
||||
dist: trusty
|
||||
dist: xenial
|
||||
sudo: required
|
||||
|
||||
matrix:
|
||||
@@ -9,16 +9,15 @@ matrix:
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bc
|
||||
- expect
|
||||
- gettext
|
||||
- libncurses5-dev
|
||||
- libpcre2-dev
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bc
|
||||
packages: # Don't use libpcre2-dev here, so that one build uses the vendored code
|
||||
- expect
|
||||
- gettext
|
||||
- lib32ncurses5-dev
|
||||
@@ -27,55 +26,30 @@ matrix:
|
||||
- CXXFLAGS="-g -O2 -m32" CFLAGS="-g -m32"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- CXXFLAGS="-g -O2 -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address"
|
||||
- ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1
|
||||
- UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1:suppressions=$TRAVIS_BUILD_DIR/build_tools/ubsan.blacklist
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bc
|
||||
- expect
|
||||
- gettext
|
||||
- libncurses5-dev
|
||||
- cmake
|
||||
env:
|
||||
- USE_CMAKE="1" # Dummy value, shows up in the Travis UI only
|
||||
script:
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=$HOME/prefix . || cat CMakeFiles/CMakeError.log &&
|
||||
make -j2 &&
|
||||
make install &&
|
||||
make test SHOW_INTERACTIVE_LOG=1
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- CXXFLAGS="-g -O2 -fno-omit-frame-pointer -fsanitize=address" ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1
|
||||
before_install: export CXX=clang++-3.8
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.8
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- clang-3.8
|
||||
- llvm-3.8 # for llvm-symbolizer
|
||||
- bc
|
||||
- expect
|
||||
- gettext
|
||||
- libncurses5-dev
|
||||
- libpcre2-dev
|
||||
- os: osx
|
||||
before_install:
|
||||
- brew update
|
||||
- brew install pcre2 # use system PCRE2
|
||||
- brew outdated xctool || brew upgrade xctool # for xcode... soon.
|
||||
env:
|
||||
- CXXFLAGS="-g -O2 -lstdc++"
|
||||
fast_finish: true
|
||||
|
||||
script:
|
||||
- autoreconf --no-recursive
|
||||
- ./configure --prefix=$HOME/prefix || cat config.log
|
||||
- make -j2 &&
|
||||
make test DESTDIR=$HOME/prefix/ SHOW_INTERACTIVE_LOG=1 &&
|
||||
make uninstall &&
|
||||
echo "Checking for leftover files after make uninstall" &&
|
||||
find $HOME/prefix/ -type f -print -exec false '{}' +
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=$HOME/prefix . || cat CMakeFiles/CMakeError.log &&
|
||||
make -j2 &&
|
||||
make install &&
|
||||
make test SHOW_INTERACTIVE_LOG=1
|
||||
|
||||
notifications:
|
||||
# Some items are encrypted so that notifications from other repositories
|
||||
|
||||
35
BSDmakefile
35
BSDmakefile
@@ -1,15 +1,23 @@
|
||||
# by default bmake will cd into ./obj first
|
||||
# This is a very basic `make` wrapper around the CMake build toolchain.
|
||||
#
|
||||
# Supported arguments:
|
||||
# PREFIX: sets the installation prefix
|
||||
# GENERATOR: explicitly specifies the CMake generator to use
|
||||
|
||||
# By default, bmake will try to cd into ./obj before anything else. Don't do that.
|
||||
.OBJDIR: ./
|
||||
|
||||
.BEGIN:
|
||||
# test for cmake, which is the only requirement to be able to run this Makefile
|
||||
# cmake will perform the remaining dependency tests on its own
|
||||
@which cmake >/dev/null 2>/dev/null || (echo 'Please install cmake and then re-run the `make` command!' 1>&2 && false)
|
||||
CMAKE?=cmake
|
||||
|
||||
# Use ninja, if it is installed
|
||||
_GENERATOR!=which ninja 2>/dev/null >/dev/null && echo Ninja || echo "'Unix Makefiles'"
|
||||
# Before anything else, test for CMake, which is the only requirement to be able to run
|
||||
# this Makefile CMake will perform the remaining dependency tests on its own.
|
||||
.BEGIN:
|
||||
@which $(CMAKE) >/dev/null 2>/dev/null || \
|
||||
(echo 'Please install CMake and then re-run the `make` command!' 1>&2 && false)
|
||||
|
||||
# Prefer to use ninja, if it is installed
|
||||
_GENERATOR!=which ninja 2>/dev/null >/dev/null && echo Ninja || echo "Unix Makefiles"
|
||||
GENERATOR?=$(_GENERATOR)
|
||||
PREFIX?=/usr/local
|
||||
|
||||
.if $(GENERATOR) == "Ninja"
|
||||
BUILDFILE=build/build.ninja
|
||||
@@ -17,19 +25,20 @@ BUILDFILE=build/build.ninja
|
||||
BUILDFILE=build/Makefile
|
||||
.endif
|
||||
|
||||
.DEFAULT: build/fish
|
||||
PREFIX?=/usr/local
|
||||
|
||||
build/fish: build/$(BUILDFILE)
|
||||
cmake --build build
|
||||
$(CMAKE) --build build
|
||||
|
||||
build:
|
||||
mkdir -p build
|
||||
|
||||
build/$(BUILDFILE): build
|
||||
cd build; cmake .. -G $(GENERATOR) -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_EXPORT_COMPILE_COMMANDS=1
|
||||
cd build; $(CMAKE) .. -G "$(GENERATOR)" -DCMAKE_INSTALL_PREFIX="$(PREFIX)" -DCMAKE_EXPORT_COMPILE_COMMANDS=1
|
||||
|
||||
.PHONY: install
|
||||
install: build/fish
|
||||
cmake --build build --target install
|
||||
$(CMAKE) --build build --target install
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@@ -37,7 +46,7 @@ clean:
|
||||
|
||||
.PHONY: test
|
||||
test: build/fish
|
||||
cmake --build build --target test
|
||||
$(CMAKE) --build build --target test
|
||||
|
||||
.PHONY: run
|
||||
run: build/fish
|
||||
|
||||
50
CHANGELOG.md
50
CHANGELOG.md
@@ -1,3 +1,48 @@
|
||||
# fish next-minor
|
||||
|
||||
## Deprecations
|
||||
- The vcs-prompt functions have been renamed to names without double-underscore, so __fish_git_prompt is now fish_git_prompt, __fish_vcs_prompt is now fish_vcs_prompt, __fish_hg_prompt is now fish_hg_prompt and __fish_svn_prompt is now fish_svn_prompt. Shims at the old names have been added, and the variables have kept their old names (#5586).
|
||||
|
||||
## Notable fixes and improvements
|
||||
- Fixed infinite recursion triggered if a custom `fish_title` function calls `read` interactively
|
||||
- Add `$pipestatus` support
|
||||
- `string split0` now returns 0 if it split something (#5701).
|
||||
|
||||
### Syntax changes and new commands
|
||||
- None yet.
|
||||
|
||||
### Interactive improvements
|
||||
- Major improvements in performance and functionality to the 'sorin' sample prompt (#5411).
|
||||
- Added completions for:
|
||||
- nothing yet...
|
||||
- Lots of improvements to completions.
|
||||
- fish_clipboard_* now supports wayland by means of [wl-clipboard](https://github.com/bugaevc/wl-clipboard).
|
||||
- mandoc can now be used to format the output from `--help` if nroff is not installed
|
||||
- New color options for the pager have been added (#5524).
|
||||
- The default escape delay (to differentiate between the escape key and an alt-combination) has been reduced to 30ms, down from 300ms for the default mode and 100ms for vi-mode (#3904).
|
||||
- In the interest of consistency, `builtin -q` and `command -q` can now be used to query if a builtin or command exists (#5631).
|
||||
- The `path_helper` on macOS now only runs in login shells, matching the bash implementation.
|
||||
- `math` now accepts `--scale=max` for the maximum scale (#5579).
|
||||
- The `forward-bigword` binding now interacts correctly with autosuggestions (#5336)
|
||||
- Added completions for
|
||||
- `cf`
|
||||
- `bosh`
|
||||
|
||||
---
|
||||
|
||||
# fish 3.0.2 (released February 19, 2019)
|
||||
|
||||
This release of fish fixes an issue discovered in fish 3.0.1.
|
||||
|
||||
### Fixes and improvements
|
||||
|
||||
- The PWD environment variable is now ignored if it does not resolve to the true working directory, fixing strange behaviour in terminals started by editors and IDEs (#5647).
|
||||
|
||||
If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0.1,
|
||||
3.0.0 and 3.0b1 (included below).
|
||||
|
||||
---
|
||||
|
||||
# fish 3.0.1 (released February 11, 2019)
|
||||
|
||||
This release of fish fixes a number of major issues discovered in fish 3.0.0.
|
||||
@@ -12,7 +57,7 @@ This release of fish fixes a number of major issues discovered in fish 3.0.0.
|
||||
- The `pager-toggle-search` binding (Ctrl-S by default) will now activate the search field, even when the pager is not focused.
|
||||
- The error when a command is not found is now printed a single time, instead of once per argument (#5588).
|
||||
- Fixes and improvements to the git completions, including printing correct paths with older git versions, fuzzy matching again, reducing unnecessary offers of root paths (starting with `:/`) (#5578, #5574, #5476), and ignoring shell aliases, so enterprising users can set up the wrapping command (via `set -g __fish_git_alias_$command $whatitwraps`) (#5412).
|
||||
- Significant performance improvements to core shell functions (#5447) and to the `kill` completions (#5541).
|
||||
- Significant performance improvements to core shell functions (#5447) and to the `kill` completions (#5541).
|
||||
- Starting in symbolically-linked working directories works correctly (#5525).
|
||||
- The default `fish_title` function no longer contains extra spaces (#5517).
|
||||
- The `nim` prompt now works correctly when chosen in the Web-based configuration (#5490).
|
||||
@@ -54,7 +99,7 @@ If you are upgrading from version 2.7.1 or before, please also review the releas
|
||||
fish 3 is a major release, which introduces some breaking changes alongside improved functionality. Although most existing scripts will continue to work, they should be reviewed against the list below.
|
||||
|
||||
## Notable non-backward compatible changes
|
||||
- Process and job expansion has largely been removed. `%` will no longer perform these expansions, except for `%self` for the PID of the current shell. Additionally, job management commands (`disown`, `wait`, `bg`, `fg` and `kill`) will expand job specifiers starting with `%` (#4230, #1202).
|
||||
- Process and job expansion has largely been removed. `%` will no longer perform these expansions, except for `%self` for the PID of the current shell. Additionally, job management commands (`disown`, `wait`, `bg`, `fg` and `kill`) will expand job specifiers starting with `%` (#4230, #1202).
|
||||
- `set x[1] x[2] a b`, to set multiple elements of an array at once, is no longer valid syntax (#4236).
|
||||
- A literal `{}` now expands to itself, rather than nothing. This makes working with `find -exec` easier (#1109, #4632).
|
||||
- Literally accessing a zero-index is now illegal syntax and is caught by the parser (#4862). (fish indices start at 1)
|
||||
@@ -114,7 +159,6 @@ A new feature flags mechanism is added for staging deprecations and breaking cha
|
||||
- `read` writes directly to stdout if called without arguments (#4407).
|
||||
- `read` can now read individual lines into separate variables without consuming the input in its entirety via the new `/--line` option.
|
||||
- `set` has new `--append` and `--prepend` options (#1326).
|
||||
- `set` has a new `--show` option to show lots of information about variables (#4265).
|
||||
- `string match` with an empty pattern and `--entire` in glob mode now matches everything instead of nothing (#4971).
|
||||
- `string split` supports a new `--no-empty` option to exclude empty strings from the result (#4779).
|
||||
- `string` has new subcommands `split0` and `join0` for working with NUL-delimited output.
|
||||
|
||||
@@ -45,6 +45,9 @@ SOURCE_GROUP("Builtins" REGULAR_EXPRESSION "builtin_.*")
|
||||
# Support folders.
|
||||
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Work around issue where archive-built libs go in the wrong place.
|
||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||
|
||||
IF(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
@@ -53,6 +56,14 @@ ELSE()
|
||||
SET(FISH_IN_TREE_BUILD FALSE)
|
||||
ENDIF()
|
||||
|
||||
# NetBSD does weird things with finding libraries,
|
||||
# making the tests fail by failing to find pcre.
|
||||
#
|
||||
# Keep the rpath used to build.
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL NetBSD)
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
ENDIF()
|
||||
|
||||
# All objects that the system needs to build fish, except fish.cpp
|
||||
SET(FISH_SRCS
|
||||
src/autoload.cpp src/builtin.cpp src/builtin_bg.cpp src/builtin_bind.cpp
|
||||
@@ -75,9 +86,9 @@ SET(FISH_SRCS
|
||||
src/parse_execution.cpp src/parse_productions.cpp src/parse_tree.cpp
|
||||
src/parse_util.cpp src/parser.cpp src/parser_keywords.cpp src/path.cpp
|
||||
src/postfork.cpp src/proc.cpp src/reader.cpp src/sanity.cpp src/screen.cpp
|
||||
src/signal.cpp src/tinyexpr.c src/tnode.cpp src/tokenizer.cpp src/utf8.cpp src/util.cpp
|
||||
src/signal.cpp src/tinyexpr.cpp src/tnode.cpp src/tokenizer.cpp src/utf8.cpp src/util.cpp
|
||||
src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp src/wutil.cpp
|
||||
src/future_feature_flags.cpp
|
||||
src/future_feature_flags.cpp src/redirection.cpp src/topic_monitor.cpp
|
||||
)
|
||||
|
||||
# Header files are just globbed.
|
||||
@@ -105,8 +116,10 @@ ADD_DEFINITIONS(-D_UNICODE=1
|
||||
INCLUDE(Version)
|
||||
|
||||
# Let fish pick up when we're running out of the build directory without installing
|
||||
ADD_DEFINITIONS(-DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}")
|
||||
ADD_DEFINITIONS(-DCMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
|
||||
GET_FILENAME_COMPONENT(REAL_CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}" REALPATH)
|
||||
GET_FILENAME_COMPONENT(REAL_CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH)
|
||||
ADD_DEFINITIONS(-DCMAKE_BINARY_DIR="${REAL_CMAKE_BINARY_DIR}")
|
||||
ADD_DEFINITIONS(-DCMAKE_SOURCE_DIR="${REAL_CMAKE_SOURCE_DIR}")
|
||||
|
||||
# Teach fish_version.o to rebuild when FBVF changes.
|
||||
# The standard C++ include detection machinery misses this.
|
||||
@@ -116,11 +129,14 @@ SET_SOURCE_FILES_PROPERTIES(src/fish_version.cpp
|
||||
|
||||
OPTION(INTERNAL_WCWIDTH "use fallback wcwidth" ON)
|
||||
IF(INTERNAL_WCWIDTH)
|
||||
add_definitions(-DHAVE_BROKEN_WCWIDTH=1)
|
||||
ADD_DEFINITIONS(-DHAVE_BROKEN_WCWIDTH=1)
|
||||
ELSE()
|
||||
add_definitions(-DHAVE_BROKEN_WCWIDTH=0)
|
||||
ADD_DEFINITIONS(-DHAVE_BROKEN_WCWIDTH=0)
|
||||
ENDIF()
|
||||
|
||||
# Enable thread-safe errno on Solaris (#5611)
|
||||
ADD_DEFINITIONS(-D_REENTRANT)
|
||||
|
||||
# Set up PCRE2
|
||||
INCLUDE(cmake/PCRE2.cmake)
|
||||
|
||||
@@ -159,5 +175,23 @@ INCLUDE(cmake/Tests.cmake)
|
||||
# Set up install.
|
||||
INCLUDE(cmake/Install.cmake)
|
||||
|
||||
# Mac app.
|
||||
INCLUDE(cmake/MacApp.cmake)
|
||||
|
||||
# Lint targets
|
||||
# This could be implemented as target properties, but the script has the useful feature of only
|
||||
# checking the currently-staged commands
|
||||
# The generator expressions below rebuild the command line for the fishlib targets
|
||||
# CMake does not support the "iquote" flag - https://gitlab.kitware.com/cmake/cmake/issues/15491
|
||||
SET(LINT_ARGS "-D$<JOIN:$<TARGET_PROPERTY:fishlib,COMPILE_DEFINITIONS>, -D>" "-I$<JOIN:$<TARGET_PROPERTY:fishlib,INCLUDE_DIRECTORIES>, -I>")
|
||||
ADD_CUSTOM_TARGET(lint
|
||||
COMMAND build_tools/lint.fish -- ${LINT_ARGS}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
)
|
||||
ADD_CUSTOM_TARGET(lint-all
|
||||
COMMAND build_tools/lint.fish --all -- ${LINT_ARGS}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
)
|
||||
|
||||
INCLUDE(FeatureSummary)
|
||||
FEATURE_SUMMARY(WHAT ALL)
|
||||
|
||||
@@ -69,7 +69,7 @@ Suppressing oclint warnings is more complicated to describe so I'll refer you to
|
||||
The following sections discuss the specific rules for the style that should be used when writing fish code. To ensure your changes conform to the style rules you simply need to run
|
||||
|
||||
```
|
||||
make style
|
||||
build_tools/style.fish
|
||||
```
|
||||
|
||||
before committing your change. That will run `git-clang-format` to rewrite only the lines you're modifying.
|
||||
@@ -79,7 +79,7 @@ If you've already committed your changes that's okay since it will then check th
|
||||
If you want to check the style of the entire code base run
|
||||
|
||||
```
|
||||
make style-all
|
||||
build_tools/style.fish --all
|
||||
```
|
||||
|
||||
That command will refuse to restyle any files if you have uncommitted changes.
|
||||
@@ -165,9 +165,24 @@ However, as I write this there are no places in the code where we use this and I
|
||||
|
||||
1. Indent with spaces, not tabs and use four spaces per indent.
|
||||
|
||||
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 IDEs) will extract the comment and show it in the "Quick Help" window when the cursor is on the symbol.
|
||||
1. Document the purpose of a function or class with doxygen-style comment blocks. e.g.:
|
||||
```
|
||||
/**
|
||||
* Sum numbers in a vector.
|
||||
*
|
||||
* @param values Container whose values are summed.
|
||||
* @return sum of `values`, or 0.0 if `values` is empty.
|
||||
*/
|
||||
double sum(std::vector<double> & const values) {
|
||||
...
|
||||
}
|
||||
*/
|
||||
```
|
||||
or
|
||||
```
|
||||
/// brief description of somefunction()
|
||||
void somefunction() {
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
@@ -179,12 +194,9 @@ You are strongly encouraged to add tests when changing the functionality of fish
|
||||
|
||||
The tests can be run on your local computer on all operating systems.
|
||||
|
||||
Running the tests is only supported from the autotools build and not xcodebuild. On OS X, you will need to install autoconf — we suggest using [Homebrew](https://brew.sh/) to install these tools.
|
||||
|
||||
```
|
||||
autoconf
|
||||
./configure
|
||||
make test # or "gmake test" on BSD
|
||||
cmake path/to/fish-shell
|
||||
make test
|
||||
```
|
||||
|
||||
### Travis CI Build and Test
|
||||
|
||||
@@ -2,7 +2,7 @@ FROM centos:latest
|
||||
|
||||
# Build dependency
|
||||
RUN yum update -y &&\
|
||||
yum install -y autoconf automake bc clang gcc-c++ make ncurses-devel &&\
|
||||
yum install -y clang cmake gcc-c++ make ncurses-devel &&\
|
||||
yum clean all
|
||||
|
||||
# Test dependency
|
||||
@@ -12,8 +12,7 @@ ADD . /src
|
||||
WORKDIR /src
|
||||
|
||||
# Build fish
|
||||
RUN autoreconf &&\
|
||||
./configure &&\
|
||||
RUN cmake . &&\
|
||||
make &&\
|
||||
make install
|
||||
|
||||
|
||||
2357
Doxyfile.help
2357
Doxyfile.help
File diff suppressed because it is too large
Load Diff
2357
Doxyfile.user
2357
Doxyfile.user
File diff suppressed because it is too large
Load Diff
785
Makefile.in
785
Makefile.in
@@ -71,7 +71,7 @@ extra_confdir = @extra_confdir@
|
||||
# pcre2
|
||||
#
|
||||
PCRE2_WIDTH = @WCHAR_T_BITS@
|
||||
PCRE2_DIR = pcre2-10.22
|
||||
PCRE2_DIR = pcre2-10.32
|
||||
PCRE2_LIBDIR = $(PCRE2_DIR)/.libs
|
||||
PCRE2_LIB = $(PCRE2_LIBDIR)/libpcre2-$(PCRE2_WIDTH).a
|
||||
PCRE2_H = $(PCRE2_DIR)/src/pcre2.h
|
||||
@@ -119,7 +119,7 @@ FISH_OBJS := obj/autoload.o obj/builtin.o obj/builtin_bg.o obj/builtin_bind.o ob
|
||||
obj/parser_keywords.o obj/path.o obj/postfork.o obj/proc.o obj/reader.o \
|
||||
obj/sanity.o obj/screen.o obj/signal.o obj/tinyexpr.o obj/tokenizer.o obj/tnode.o obj/utf8.o \
|
||||
obj/util.o obj/wcstringutil.o obj/wgetopt.o obj/wildcard.o obj/wutil.o \
|
||||
obj/future_feature_flags.o
|
||||
obj/future_feature_flags.o obj/redirection.o obj/topic_monitor.o
|
||||
|
||||
FISH_INDENT_OBJS := obj/fish_indent.o obj/print_help.o $(FISH_OBJS)
|
||||
|
||||
@@ -136,34 +136,6 @@ FISH_TESTS_OBJS := $(FISH_OBJS) obj/fish_tests.o
|
||||
#
|
||||
FISH_ALL_OBJS := $(sort $(FISH_OBJS) $(FISH_INDENT_OBJS) $(FISH_TESTS_OBJS) $(FISH_KEYREAD_OBJS) obj/fish.o)
|
||||
|
||||
#
|
||||
# Files containing user documentation
|
||||
#
|
||||
|
||||
#
|
||||
# These files are the source files, they contain a few @FOO@-style substitutions
|
||||
# Note that this order defines the order that they appear in the documentation
|
||||
#
|
||||
HDR_FILES_SRC := doc_src/index.hdr.in doc_src/tutorial.hdr doc_src/design.hdr doc_src/license.hdr doc_src/commands.hdr.in doc_src/faq.hdr
|
||||
|
||||
#
|
||||
# These are the generated result files
|
||||
#
|
||||
HDR_FILES := $(HDR_FILES_SRC:.hdr.in=.hdr)
|
||||
|
||||
# Use a pattern rule so that Make knows to only issue one invocation
|
||||
# per http://www.gnu.org/software/make/manual/make.html#Pattern-Intro
|
||||
|
||||
#
|
||||
# Files containing documentation for external commands.
|
||||
#
|
||||
HELP_SRC := $(wildcard doc_src/*.txt)
|
||||
|
||||
#
|
||||
# HTML includes needed for HTML help
|
||||
#
|
||||
HTML_SRC := doc_src/user_doc.header.html doc_src/user_doc.footer.html doc_src/user_doc.css
|
||||
|
||||
#
|
||||
# Files in the test directory
|
||||
#
|
||||
@@ -184,23 +156,6 @@ FUNCTIONS_DIR_FILES := $(wildcard share/functions/*.fish)
|
||||
#
|
||||
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)
|
||||
|
||||
# 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
|
||||
# function on OS X.
|
||||
# This is also done in build_tools/build_documentation.sh, but because the
|
||||
# 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)
|
||||
CONDEMNED_PAGES := open.1
|
||||
HELP_MANPAGES = $(filter-out share/man/man1/open.1, $(wildcard share/man/man1/*.1))
|
||||
endif
|
||||
|
||||
#
|
||||
# All translation message catalogs, filter files based on LINGUAS.
|
||||
#
|
||||
@@ -216,17 +171,6 @@ else
|
||||
TRANSLATIONS :=
|
||||
endif
|
||||
|
||||
#
|
||||
# If Doxygen is not available, don't attempt to build the documentation
|
||||
#
|
||||
ifeq ($(HAVE_DOXYGEN), 1)
|
||||
user_doc=doc
|
||||
share_man=share/man
|
||||
else
|
||||
user_doc=
|
||||
share_man=
|
||||
endif
|
||||
|
||||
|
||||
t_co:=$(shell tput colors || echo '') 2> /dev/null
|
||||
green := $(shell ( tput setaf 2 || tput AF 2 ) 2> /dev/null )
|
||||
@@ -260,7 +204,7 @@ show-%:
|
||||
#
|
||||
# Make everything needed for installing fish
|
||||
#
|
||||
all: show-CXX show-CXXFLAGS $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc share/__fish_build_paths.fish
|
||||
all: show-CXX show-CXXFLAGS $(PROGRAMS) $(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
|
||||
@echo "$(green)fish has now been built.$(sgr0)"
|
||||
@@ -301,26 +245,9 @@ prof: LDFLAGS += -pg
|
||||
prof: all
|
||||
.PHONY: prof
|
||||
|
||||
#
|
||||
# User documentation, describing the features of the fish shell.
|
||||
#
|
||||
# Depend on the sources (*.hdr.in) and manually make the intermediate *.hdr
|
||||
# and doc.h files if needed. The sed command deletes everything including and
|
||||
# after the first -, for simpler version numbers. Cleans up the user_doc/html
|
||||
# directory once Doxygen is done.
|
||||
#
|
||||
doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FILES) lexicon_filter
|
||||
@echo " doxygen $(em)user_doc$(sgr0)"
|
||||
$v env FISH_BUILD_VERSION=$(FISH_BUILD_VERSION) ./build_tools/build_user_doc.sh Doxyfile.user ./lexicon_filter
|
||||
|
||||
#
|
||||
# PDF version of the source code documentation.
|
||||
#
|
||||
doc/refman.pdf: doc
|
||||
@echo " MAKE $(em)doc/latex$(sgr0)"
|
||||
$v cd doc/latex
|
||||
$v $(MAKE) V=$(V)
|
||||
$v mv refman.pdf ..
|
||||
doc:
|
||||
@echo "Docs build from autotools is no longer supported - use CMake to build documentation"
|
||||
@false
|
||||
|
||||
#
|
||||
# Prep the environment for running the unit tests. When specifying DESTDIR on
|
||||
@@ -392,58 +319,11 @@ test_interactive: $(call filter_up_to,test_interactive,$(active_test_goals))
|
||||
.PHONY: test_interactive
|
||||
|
||||
|
||||
#
|
||||
# commands.hdr collects documentation on all commands, functions and
|
||||
# builtins
|
||||
#
|
||||
doc_src/commands.hdr:$(HELP_SRC) doc_src/commands.hdr.in build_tools/build_commands_hdr.sh
|
||||
build_tools/build_commands_hdr.sh ${HELP_SRC} < doc_src/commands.hdr.in > $@
|
||||
|
||||
toc.txt: $(HDR_FILES:index.hdr=index.hdr.in) build_tools/build_toc_txt.sh | show-SED
|
||||
FISH_BUILD_VERSION=${FISH_BUILD_VERSION} build_tools/build_toc_txt.sh \
|
||||
$(HDR_FILES:index.hdr=index.hdr.in) > toc.txt
|
||||
|
||||
doc_src/index.hdr: toc.txt doc_src/index.hdr.in | show-AWK
|
||||
@echo " AWK CAT $(em)$@$(sgr0)"
|
||||
$v build_tools/build_index_hdr.sh toc.txt < $@.in > $@
|
||||
|
||||
#
|
||||
# Compile Doxygen Input Filter from the lexicon. This is an executable sed
|
||||
# script as Doxygen opens it via popen()(3) Input (doc.h) is piped through and
|
||||
# matching words inside /fish../endfish blocks are marked up, contextually,
|
||||
# with custom Doxygen commands in the form of @word_type{content}. These are
|
||||
# trapped by ALIASES in the various Doxyfiles, allowing the content to be
|
||||
# transformed depending on output type (HTML, man page, developer docs). In
|
||||
# HTML, a style context can be applied through the /fish{style} block and
|
||||
# providing suitable CSS in user_doc.css.in
|
||||
#
|
||||
lexicon_filter: doc_src/commands.hdr $(FUNCTIONS_DIR_FILES) $(COMPLETIONS_DIR_FILES) \
|
||||
lexicon_filter.in build_tools/build_lexicon_filter.sh \
|
||||
share/functions/__fish_config_interactive.fish
|
||||
$v build_tools/build_lexicon_filter.sh share/functions/ share/completions/ lexicon_filter.in $(SED) > $@
|
||||
$v chmod a+x lexicon_filter
|
||||
|
||||
#
|
||||
# doc.h is a compilation of the various snipptes of text used both for
|
||||
# the user documentation and for internal help functions into a single
|
||||
# file that can be parsed by Doxygen to generate the user
|
||||
# documentation.
|
||||
#
|
||||
doc.h: $(HDR_FILES)
|
||||
@echo " HDR_FILES $(em)$@$(sgr0)"
|
||||
$v cat $(HDR_FILES) >$@
|
||||
|
||||
#
|
||||
# This rule creates complete doxygen headers from each of the various
|
||||
# snipptes of text used both for the user documentation and for
|
||||
# internal help functions, that can be parsed to Doxygen to generate
|
||||
# the internal help function text.
|
||||
#
|
||||
%.doxygen:%.txt
|
||||
@echo " cat * $(em)$@$(sgr0)"
|
||||
$v echo "/** \page " `basename $*` >$@;
|
||||
$v cat $*.txt >>$@;
|
||||
$v echo "*/" >>$@
|
||||
|
||||
#
|
||||
# Depend on Makefile because I don't see a better way of rebuilding
|
||||
@@ -497,39 +377,6 @@ ifdef EXTRA_PCRE2
|
||||
src/builtin_string.cpp: $(PCRE2_H)
|
||||
endif
|
||||
|
||||
#
|
||||
# Generate the internal help functions by making doxygen create
|
||||
# man-pages. The convertion path looks like this:
|
||||
#
|
||||
# .txt file
|
||||
# ||
|
||||
# (make)
|
||||
# ||
|
||||
# \/
|
||||
# .doxygen file
|
||||
# ||
|
||||
# (doxygen)
|
||||
# ||
|
||||
# \/
|
||||
# roff file
|
||||
# ||
|
||||
# (__fish_print_help)
|
||||
# ||
|
||||
# \/
|
||||
# formated text
|
||||
# with escape
|
||||
# sequences
|
||||
#
|
||||
#
|
||||
# There ought to be something simpler.
|
||||
#
|
||||
share/man: $(HELP_SRC) lexicon_filter | show-FISH_BUILD_VERSION show-SED
|
||||
-$v $(MKDIR_P) share/man
|
||||
@echo " doxygen $(em)$@$(sgr0)"
|
||||
$v touch share/man
|
||||
-$v rm -Rf share/man/man1
|
||||
$v echo "$(dim)" && FISH_BUILD_VERSION=${FISH_BUILD_VERSION} INPUT_FILTER=./lexicon_filter \
|
||||
build_tools/build_documentation.sh Doxyfile.help ./doc_src ./share;
|
||||
|
||||
#
|
||||
# The build rules for installing/uninstalling fish
|
||||
@@ -590,15 +437,6 @@ install: all install-force | check-legacy-binaries
|
||||
@echo "$(bo)Have fun! <><$(sgr0)"
|
||||
.PHONY: install
|
||||
|
||||
#
|
||||
# Xcode install
|
||||
#
|
||||
xcode-install:
|
||||
rm -Rf /tmp/fish_build
|
||||
xcrun xcodebuild install DSTROOT=/tmp/fish_build
|
||||
ditto /tmp/fish_build /
|
||||
.PHONY: xcode-install
|
||||
|
||||
#
|
||||
# Actually do the installation.
|
||||
#
|
||||
@@ -744,10 +582,6 @@ obj/%.o: src/%.cpp | show-CXX show-CXXFLAGS show-CPPFLAGS obj
|
||||
@echo " CXX $(em)$@$(sgr0)"
|
||||
$v $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
obj/tinyexpr.o: src/tinyexpr.c | obj
|
||||
@echo " CC $(em)$@$(sqr0)"
|
||||
$v $(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
#
|
||||
# obj directory
|
||||
#
|
||||
@@ -819,9 +653,9 @@ depend: | show-MKDIR_P
|
||||
# TODO - why not have the Makefile run lint.fish on actual files itself (generate a report target?)
|
||||
#
|
||||
lint:
|
||||
$v build_tools/lint.fish "$(CXX)" $(CXXFLAGS) $(CPPFLAGS)
|
||||
$v build_tools/lint.fish -- $(CXXFLAGS) $(CPPFLAGS)
|
||||
lint-all:
|
||||
$v build_tools/lint.fish "$(CXX)" --all $(CXXFLAGS) $(CPPFLAGS)
|
||||
$v build_tools/lint.fish --all -- $(CXXFLAGS) $(CPPFLAGS)
|
||||
.PHONY: lint lint-all
|
||||
|
||||
#
|
||||
@@ -892,8 +726,12 @@ v = $(V$(V))
|
||||
# DO NOT DELETE THIS LINE -- `make depend` depends on it.
|
||||
|
||||
obj/autoload.o: config.h src/autoload.h src/common.h src/fallback.h
|
||||
obj/autoload.o: src/signal.h src/env.h src/lru.h src/exec.h src/wutil.h
|
||||
obj/builtin.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/autoload.o: src/maybe.h src/signal.h src/env.h src/lru.h src/exec.h
|
||||
obj/autoload.o: src/parser.h src/event.h src/io.h src/expand.h
|
||||
obj/autoload.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/autoload.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/autoload.o: src/wutil.h
|
||||
obj/builtin.o: config.h src/builtin.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/builtin.o: src/signal.h src/builtin_argparse.h src/builtin_bg.h
|
||||
obj/builtin.o: src/builtin_bind.h src/builtin_block.h src/builtin_builtin.h
|
||||
obj/builtin.o: src/builtin_cd.h src/builtin_command.h
|
||||
@@ -906,318 +744,415 @@ obj/builtin.o: src/builtin_pwd.h src/builtin_random.h src/builtin_read.h
|
||||
obj/builtin.o: src/builtin_realpath.h src/builtin_return.h src/builtin_set.h
|
||||
obj/builtin.o: src/builtin_set_color.h src/builtin_source.h
|
||||
obj/builtin.o: src/builtin_status.h src/builtin_string.h src/builtin_test.h
|
||||
obj/builtin.o: src/builtin_ulimit.h src/complete.h src/exec.h src/intern.h
|
||||
obj/builtin.o: src/io.h src/env.h src/parse_constants.h src/parse_util.h
|
||||
obj/builtin.o: src/tokenizer.h src/parser.h src/event.h src/expand.h
|
||||
obj/builtin.o: src/parse_tree.h src/proc.h src/reader.h src/highlight.h
|
||||
obj/builtin.o: src/color.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin.o: src/builtin_ulimit.h src/builtin_wait.h src/complete.h
|
||||
obj/builtin.o: src/exec.h src/intern.h src/io.h src/env.h
|
||||
obj/builtin.o: src/parse_constants.h src/parse_util.h src/parse_tree.h
|
||||
obj/builtin.o: src/parse_grammar.h src/tokenizer.h src/parser.h src/event.h
|
||||
obj/builtin.o: src/expand.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/builtin.o: src/reader.h src/highlight.h src/color.h src/wgetopt.h
|
||||
obj/builtin.o: src/wutil.h
|
||||
obj/builtin_argparse.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_argparse.o: src/signal.h src/builtin_argparse.h src/env.h
|
||||
obj/builtin_argparse.o: src/exec.h src/io.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_argparse.o: src/maybe.h src/signal.h src/builtin_argparse.h
|
||||
obj/builtin_argparse.o: src/env.h src/exec.h src/io.h src/parser.h
|
||||
obj/builtin_argparse.o: src/event.h src/expand.h src/parse_constants.h
|
||||
obj/builtin_argparse.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_argparse.o: src/proc.h src/enum_set.h src/tnode.h src/wgetopt.h
|
||||
obj/builtin_argparse.o: src/wutil.h
|
||||
obj/builtin_bg.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_bg.o: src/signal.h src/builtin_bg.h src/io.h src/env.h src/proc.h
|
||||
obj/builtin_bg.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
|
||||
obj/builtin_bg.o: src/wutil.h
|
||||
obj/builtin_bg.o: src/maybe.h src/signal.h src/builtin_bg.h src/io.h
|
||||
obj/builtin_bg.o: src/env.h src/proc.h src/enum_set.h src/parse_tree.h
|
||||
obj/builtin_bg.o: src/parse_constants.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_bg.o: src/tnode.h src/wutil.h
|
||||
obj/builtin_bind.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_bind.o: src/signal.h src/builtin_bind.h src/input.h src/io.h
|
||||
obj/builtin_bind.o: src/env.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_bind.o: src/maybe.h src/signal.h src/builtin_bind.h src/input.h
|
||||
obj/builtin_bind.o: src/io.h src/env.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_block.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_block.o: src/signal.h src/builtin_block.h src/event.h src/io.h
|
||||
obj/builtin_block.o: src/env.h src/parser.h src/expand.h
|
||||
obj/builtin_block.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/builtin_block.o: src/proc.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_block.o: src/maybe.h src/signal.h src/builtin_block.h src/event.h
|
||||
obj/builtin_block.o: src/io.h src/env.h src/parser.h src/expand.h
|
||||
obj/builtin_block.o: src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_block.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_block.o: src/enum_set.h src/tnode.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_builtin.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_builtin.o: src/signal.h src/builtin_builtin.h src/io.h src/env.h
|
||||
obj/builtin_builtin.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_builtin.o: src/maybe.h src/signal.h src/builtin_builtin.h
|
||||
obj/builtin_builtin.o: src/io.h src/env.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_cd.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_cd.o: src/signal.h src/builtin_cd.h src/env.h src/io.h
|
||||
obj/builtin_cd.o: src/parser.h src/event.h src/expand.h src/parse_constants.h
|
||||
obj/builtin_cd.o: src/parse_tree.h src/tokenizer.h src/proc.h src/path.h
|
||||
obj/builtin_cd.o: src/wutil.h
|
||||
obj/builtin_cd.o: src/maybe.h src/signal.h src/builtin_cd.h src/env.h
|
||||
obj/builtin_cd.o: src/io.h src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_cd.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/builtin_cd.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/builtin_cd.o: src/path.h src/wutil.h
|
||||
obj/builtin_command.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_command.o: src/signal.h src/builtin_command.h src/io.h src/env.h
|
||||
obj/builtin_command.o: src/path.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_command.o: src/maybe.h src/signal.h src/builtin_command.h
|
||||
obj/builtin_command.o: src/io.h src/env.h src/parser.h src/event.h
|
||||
obj/builtin_command.o: src/expand.h src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_command.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_command.o: src/enum_set.h src/tnode.h src/path.h src/wgetopt.h
|
||||
obj/builtin_command.o: src/wutil.h
|
||||
obj/builtin_commandline.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_commandline.o: src/signal.h src/input.h src/builtin_bind.h
|
||||
obj/builtin_commandline.o: src/io.h src/env.h src/parse_util.h
|
||||
obj/builtin_commandline.o: src/parse_constants.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_commandline.o: src/parse_tree.h src/reader.h src/complete.h
|
||||
obj/builtin_commandline.o: src/maybe.h src/signal.h src/input.h
|
||||
obj/builtin_commandline.o: src/builtin_bind.h src/io.h src/env.h
|
||||
obj/builtin_commandline.o: src/parse_util.h src/parse_tree.h
|
||||
obj/builtin_commandline.o: src/parse_constants.h src/parse_grammar.h
|
||||
obj/builtin_commandline.o: src/tokenizer.h src/proc.h src/enum_set.h
|
||||
obj/builtin_commandline.o: src/tnode.h src/reader.h src/complete.h
|
||||
obj/builtin_commandline.o: src/highlight.h src/color.h src/util.h
|
||||
obj/builtin_commandline.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_complete.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_complete.o: src/signal.h src/complete.h src/env.h src/io.h
|
||||
obj/builtin_complete.o: src/parse_constants.h src/parse_util.h
|
||||
obj/builtin_complete.o: src/tokenizer.h src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_complete.o: src/parse_tree.h src/proc.h src/reader.h
|
||||
obj/builtin_complete.o: src/maybe.h src/signal.h src/complete.h src/env.h
|
||||
obj/builtin_complete.o: src/io.h src/parse_constants.h src/parse_util.h
|
||||
obj/builtin_complete.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_complete.o: src/parser.h src/event.h src/expand.h src/proc.h
|
||||
obj/builtin_complete.o: src/enum_set.h src/tnode.h src/reader.h
|
||||
obj/builtin_complete.o: src/highlight.h src/color.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_contains.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_contains.o: src/signal.h src/builtin_contains.h src/io.h
|
||||
obj/builtin_contains.o: src/env.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_contains.o: src/maybe.h src/signal.h src/builtin_contains.h
|
||||
obj/builtin_contains.o: src/io.h src/env.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_disown.o: config.h src/signal.h src/builtin.h src/common.h
|
||||
obj/builtin_disown.o: src/fallback.h src/builtin_disown.h src/io.h src/env.h
|
||||
obj/builtin_disown.o: src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_disown.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/builtin_disown.o: src/proc.h src/wutil.h
|
||||
obj/builtin_disown.o: src/fallback.h src/maybe.h src/builtin_disown.h
|
||||
obj/builtin_disown.o: src/io.h src/env.h src/parser.h src/event.h
|
||||
obj/builtin_disown.o: src/expand.h src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_disown.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_disown.o: src/enum_set.h src/tnode.h src/wutil.h
|
||||
obj/builtin_echo.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_echo.o: src/signal.h src/builtin_echo.h src/io.h src/env.h
|
||||
obj/builtin_echo.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_echo.o: src/maybe.h src/signal.h src/builtin_echo.h src/io.h
|
||||
obj/builtin_echo.o: src/env.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_emit.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_emit.o: src/signal.h src/builtin_emit.h src/event.h src/io.h
|
||||
obj/builtin_emit.o: src/env.h src/wutil.h
|
||||
obj/builtin_emit.o: src/maybe.h src/signal.h src/builtin_emit.h src/event.h
|
||||
obj/builtin_emit.o: src/io.h src/env.h src/wutil.h
|
||||
obj/builtin_exit.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_exit.o: src/signal.h src/builtin_exit.h src/io.h src/env.h
|
||||
obj/builtin_exit.o: src/proc.h src/parse_tree.h src/parse_constants.h
|
||||
obj/builtin_exit.o: src/tokenizer.h src/reader.h src/complete.h
|
||||
obj/builtin_exit.o: src/highlight.h src/color.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_exit.o: src/maybe.h src/signal.h src/builtin_exit.h src/io.h
|
||||
obj/builtin_exit.o: src/env.h src/proc.h src/enum_set.h src/parse_tree.h
|
||||
obj/builtin_exit.o: src/parse_constants.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_exit.o: src/tnode.h src/reader.h src/complete.h src/highlight.h
|
||||
obj/builtin_exit.o: src/color.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_fg.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_fg.o: src/signal.h src/builtin_fg.h src/env.h src/io.h src/proc.h
|
||||
obj/builtin_fg.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
|
||||
obj/builtin_fg.o: src/maybe.h src/signal.h src/builtin_fg.h src/env.h
|
||||
obj/builtin_fg.o: src/io.h src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_fg.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/builtin_fg.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/builtin_fg.o: src/reader.h src/complete.h src/highlight.h src/color.h
|
||||
obj/builtin_fg.o: src/wutil.h
|
||||
obj/builtin_function.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_function.o: src/signal.h src/builtin_function.h src/complete.h
|
||||
obj/builtin_function.o: src/event.h src/function.h src/env.h src/io.h
|
||||
obj/builtin_function.o: src/parser.h src/expand.h src/parse_constants.h
|
||||
obj/builtin_function.o: src/parse_tree.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_function.o: src/parser_keywords.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_function.o: src/maybe.h src/signal.h src/builtin_function.h
|
||||
obj/builtin_function.o: src/parse_tree.h src/parse_constants.h
|
||||
obj/builtin_function.o: src/parse_grammar.h src/tokenizer.h src/complete.h
|
||||
obj/builtin_function.o: src/event.h src/io.h src/env.h src/function.h
|
||||
obj/builtin_function.o: src/tnode.h src/parser.h src/expand.h src/proc.h
|
||||
obj/builtin_function.o: src/enum_set.h src/parser_keywords.h src/wgetopt.h
|
||||
obj/builtin_function.o: src/wutil.h
|
||||
obj/builtin_functions.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_functions.o: src/signal.h src/builtin_functions.h src/env.h
|
||||
obj/builtin_functions.o: src/event.h src/function.h src/io.h
|
||||
obj/builtin_functions.o: src/parser_keywords.h src/proc.h src/parse_tree.h
|
||||
obj/builtin_functions.o: src/parse_constants.h src/tokenizer.h src/wgetopt.h
|
||||
obj/builtin_functions.o: src/wutil.h
|
||||
obj/builtin_functions.o: src/maybe.h src/signal.h src/builtin_functions.h
|
||||
obj/builtin_functions.o: src/env.h src/event.h src/io.h src/function.h
|
||||
obj/builtin_functions.o: src/parse_tree.h src/parse_constants.h
|
||||
obj/builtin_functions.o: src/parse_grammar.h src/tokenizer.h src/tnode.h
|
||||
obj/builtin_functions.o: src/parser_keywords.h src/proc.h src/enum_set.h
|
||||
obj/builtin_functions.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_history.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_history.o: src/signal.h src/builtin_history.h src/history.h
|
||||
obj/builtin_history.o: src/wutil.h src/io.h src/env.h src/reader.h
|
||||
obj/builtin_history.o: src/complete.h src/highlight.h src/color.h
|
||||
obj/builtin_history.o: src/parse_constants.h src/wgetopt.h
|
||||
obj/builtin_history.o: src/maybe.h src/signal.h src/builtin_history.h
|
||||
obj/builtin_history.o: src/history.h src/wutil.h src/io.h src/env.h
|
||||
obj/builtin_history.o: src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_history.o: src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_history.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_history.o: src/enum_set.h src/tnode.h src/reader.h src/complete.h
|
||||
obj/builtin_history.o: src/highlight.h src/color.h src/wgetopt.h
|
||||
obj/builtin_jobs.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_jobs.o: src/signal.h src/io.h src/env.h src/proc.h
|
||||
obj/builtin_jobs.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
|
||||
obj/builtin_jobs.o: src/maybe.h src/signal.h src/io.h src/env.h src/proc.h
|
||||
obj/builtin_jobs.o: src/enum_set.h src/parse_tree.h src/parse_constants.h
|
||||
obj/builtin_jobs.o: src/parse_grammar.h src/tokenizer.h src/tnode.h
|
||||
obj/builtin_jobs.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_math.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_math.o: src/signal.h src/builtin_math.h src/io.h src/env.h
|
||||
obj/builtin_math.o: src/tinyexpr.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_math.o: config.h src/tinyexpr.h src/builtin.h src/common.h
|
||||
obj/builtin_math.o: src/fallback.h src/maybe.h src/signal.h
|
||||
obj/builtin_math.o: src/builtin_math.h src/io.h src/env.h src/wgetopt.h
|
||||
obj/builtin_math.o: src/wutil.h
|
||||
obj/builtin_printf.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_printf.o: src/signal.h src/io.h src/env.h src/wutil.h
|
||||
obj/builtin_printf.o: src/maybe.h src/signal.h src/io.h src/env.h src/wutil.h
|
||||
obj/builtin_pwd.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_pwd.o: src/signal.h src/builtin_pwd.h src/io.h src/env.h
|
||||
obj/builtin_pwd.o: src/wutil.h
|
||||
obj/builtin_pwd.o: src/maybe.h src/signal.h src/builtin_pwd.h src/io.h
|
||||
obj/builtin_pwd.o: src/env.h src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_pwd.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/builtin_pwd.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/builtin_pwd.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_random.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_random.o: src/signal.h src/builtin_random.h src/io.h src/env.h
|
||||
obj/builtin_random.o: src/wutil.h
|
||||
obj/builtin_random.o: src/maybe.h src/signal.h src/builtin_random.h src/io.h
|
||||
obj/builtin_random.o: src/env.h src/wutil.h
|
||||
obj/builtin_read.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_read.o: src/signal.h src/builtin_read.h src/complete.h src/env.h
|
||||
obj/builtin_read.o: src/event.h src/highlight.h src/color.h src/history.h
|
||||
obj/builtin_read.o: src/wutil.h src/io.h src/proc.h src/parse_tree.h
|
||||
obj/builtin_read.o: src/parse_constants.h src/tokenizer.h src/reader.h
|
||||
obj/builtin_read.o: src/maybe.h src/signal.h src/builtin_read.h
|
||||
obj/builtin_read.o: src/complete.h src/env.h src/event.h src/io.h
|
||||
obj/builtin_read.o: src/highlight.h src/color.h src/history.h src/wutil.h
|
||||
obj/builtin_read.o: src/parser.h src/expand.h src/parse_constants.h
|
||||
obj/builtin_read.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_read.o: src/proc.h src/enum_set.h src/tnode.h src/reader.h
|
||||
obj/builtin_read.o: src/wcstringutil.h src/wgetopt.h
|
||||
obj/builtin_realpath.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_realpath.o: src/signal.h src/builtin_realpath.h src/io.h
|
||||
obj/builtin_realpath.o: src/env.h src/wutil.h
|
||||
obj/builtin_realpath.o: src/maybe.h src/signal.h src/builtin_realpath.h
|
||||
obj/builtin_realpath.o: src/io.h src/env.h src/wutil.h
|
||||
obj/builtin_return.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_return.o: src/signal.h src/builtin_return.h src/io.h src/env.h
|
||||
obj/builtin_return.o: src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_return.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/builtin_return.o: src/proc.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_return.o: src/maybe.h src/signal.h src/builtin_return.h src/io.h
|
||||
obj/builtin_return.o: src/env.h src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_return.o: src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_return.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_return.o: src/enum_set.h src/tnode.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_set.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_set.o: src/signal.h src/env.h src/expand.h src/parse_constants.h
|
||||
obj/builtin_set.o: src/io.h src/proc.h src/parse_tree.h src/tokenizer.h
|
||||
obj/builtin_set.o: src/wgetopt.h src/wutil.h
|
||||
obj/builtin_set.o: src/maybe.h src/signal.h src/env.h src/expand.h
|
||||
obj/builtin_set.o: src/parse_constants.h src/io.h src/parser.h src/event.h
|
||||
obj/builtin_set.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_set.o: src/proc.h src/enum_set.h src/tnode.h src/wgetopt.h
|
||||
obj/builtin_set.o: src/wutil.h
|
||||
obj/builtin_set_color.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_set_color.o: src/signal.h src/color.h src/env.h src/io.h
|
||||
obj/builtin_set_color.o: src/output.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_set_color.o: src/maybe.h src/signal.h src/color.h src/env.h
|
||||
obj/builtin_set_color.o: src/io.h src/output.h src/parser.h src/event.h
|
||||
obj/builtin_set_color.o: src/expand.h src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_set_color.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_set_color.o: src/enum_set.h src/tnode.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_source.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_source.o: src/signal.h src/builtin_source.h src/env.h
|
||||
obj/builtin_source.o: src/maybe.h src/signal.h src/builtin_source.h src/env.h
|
||||
obj/builtin_source.o: src/intern.h src/io.h src/parser.h src/event.h
|
||||
obj/builtin_source.o: src/expand.h src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_source.o: src/tokenizer.h src/proc.h src/reader.h src/complete.h
|
||||
obj/builtin_source.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_source.o: src/enum_set.h src/tnode.h src/reader.h src/complete.h
|
||||
obj/builtin_source.o: src/highlight.h src/color.h src/wutil.h
|
||||
obj/builtin_status.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_status.o: src/signal.h src/builtin_status.h src/io.h src/env.h
|
||||
obj/builtin_status.o: src/maybe.h src/signal.h src/builtin_status.h
|
||||
obj/builtin_status.o: src/future_feature_flags.h src/io.h src/env.h
|
||||
obj/builtin_status.o: src/parser.h src/event.h src/expand.h
|
||||
obj/builtin_status.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/builtin_status.o: src/proc.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_status.o: src/parse_constants.h src/parse_tree.h
|
||||
obj/builtin_status.o: src/parse_grammar.h src/tokenizer.h src/proc.h
|
||||
obj/builtin_status.o: src/enum_set.h src/tnode.h src/wgetopt.h src/wutil.h
|
||||
obj/builtin_string.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_string.o: src/signal.h src/io.h src/env.h src/parse_util.h
|
||||
obj/builtin_string.o: src/parse_constants.h src/tokenizer.h
|
||||
obj/builtin_string.o: src/wcstringutil.h src/wgetopt.h src/wildcard.h
|
||||
obj/builtin_string.o: src/complete.h src/expand.h src/wutil.h
|
||||
obj/builtin_string.o: src/maybe.h src/signal.h src/io.h src/env.h
|
||||
obj/builtin_string.o: src/parse_util.h src/parse_tree.h src/parse_constants.h
|
||||
obj/builtin_string.o: src/parse_grammar.h src/tokenizer.h src/wcstringutil.h
|
||||
obj/builtin_string.o: src/wgetopt.h src/wildcard.h src/complete.h
|
||||
obj/builtin_string.o: src/expand.h src/wutil.h
|
||||
obj/builtin_test.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_test.o: src/signal.h src/io.h src/env.h src/wutil.h
|
||||
obj/builtin_test.o: src/maybe.h src/signal.h src/io.h src/env.h src/wutil.h
|
||||
obj/builtin_ulimit.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/builtin_ulimit.o: src/signal.h src/io.h src/env.h src/util.h
|
||||
obj/builtin_ulimit.o: src/maybe.h src/signal.h src/io.h src/env.h src/util.h
|
||||
obj/builtin_ulimit.o: src/wgetopt.h src/wutil.h
|
||||
obj/color.o: config.h src/color.h src/common.h src/fallback.h src/signal.h
|
||||
obj/common.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
|
||||
obj/common.o: src/expand.h src/parse_constants.h src/proc.h src/io.h
|
||||
obj/common.o: src/parse_tree.h src/tokenizer.h src/wildcard.h src/complete.h
|
||||
obj/common.o: src/wutil.h
|
||||
obj/builtin_wait.o: src/builtin.h src/common.h config.h src/fallback.h
|
||||
obj/builtin_wait.o: src/maybe.h src/signal.h src/builtin_wait.h src/proc.h
|
||||
obj/builtin_wait.o: src/enum_set.h src/io.h src/env.h src/parse_tree.h
|
||||
obj/builtin_wait.o: src/parse_constants.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/builtin_wait.o: src/tnode.h src/wgetopt.h src/wutil.h
|
||||
obj/color.o: config.h src/color.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/color.o: src/signal.h
|
||||
obj/common.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/common.o: src/env.h src/expand.h src/parse_constants.h
|
||||
obj/common.o: src/future_feature_flags.h src/proc.h src/enum_set.h src/io.h
|
||||
obj/common.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/common.o: src/tnode.h src/wildcard.h src/complete.h src/wutil.h
|
||||
obj/complete.o: config.h src/autoload.h src/common.h src/fallback.h
|
||||
obj/complete.o: src/signal.h src/env.h src/lru.h src/builtin.h src/complete.h
|
||||
obj/complete.o: src/exec.h src/expand.h src/parse_constants.h src/function.h
|
||||
obj/complete.o: src/event.h src/iothread.h src/parse_tree.h src/tokenizer.h
|
||||
obj/complete.o: src/parse_util.h src/parser.h src/proc.h src/io.h src/path.h
|
||||
obj/complete.o: src/util.h src/wildcard.h src/wutil.h
|
||||
obj/complete.o: src/maybe.h src/signal.h src/env.h src/lru.h src/builtin.h
|
||||
obj/complete.o: src/complete.h src/exec.h src/expand.h src/parse_constants.h
|
||||
obj/complete.o: src/function.h src/event.h src/io.h src/parse_tree.h
|
||||
obj/complete.o: src/parse_grammar.h src/tokenizer.h src/tnode.h
|
||||
obj/complete.o: src/iothread.h src/parse_util.h src/parser.h src/proc.h
|
||||
obj/complete.o: src/enum_set.h src/path.h src/reader.h src/highlight.h
|
||||
obj/complete.o: src/color.h src/util.h src/wildcard.h src/wutil.h
|
||||
obj/env.o: config.h src/builtin_bind.h src/common.h src/fallback.h
|
||||
obj/env.o: src/signal.h src/env.h src/env_universal_common.h src/wutil.h
|
||||
obj/env.o: src/event.h src/expand.h src/parse_constants.h src/fish_version.h
|
||||
obj/env.o: src/history.h src/input.h src/input_common.h src/output.h
|
||||
obj/env.o: src/color.h src/path.h src/proc.h src/io.h src/parse_tree.h
|
||||
obj/env.o: src/tokenizer.h src/reader.h src/complete.h src/highlight.h
|
||||
obj/env.o: src/sanity.h src/screen.h
|
||||
obj/env_universal_common.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/env_universal_common.o: src/env.h src/env_universal_common.h src/wutil.h
|
||||
obj/env_universal_common.o: src/path.h src/utf8.h src/util.h
|
||||
obj/event.o: config.h src/signal.h src/common.h src/fallback.h src/event.h
|
||||
obj/event.o: src/input_common.h src/io.h src/env.h src/parser.h src/expand.h
|
||||
obj/event.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/event.o: src/proc.h src/wutil.h
|
||||
obj/env.o: src/maybe.h src/signal.h src/complete.h src/env.h
|
||||
obj/env.o: src/env_universal_common.h src/wutil.h src/event.h src/io.h
|
||||
obj/env.o: src/expand.h src/parse_constants.h src/fish_version.h
|
||||
obj/env.o: src/function.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/env.o: src/tokenizer.h src/tnode.h src/history.h src/input.h
|
||||
obj/env.o: src/input_common.h src/output.h src/color.h src/path.h src/proc.h
|
||||
obj/env.o: src/enum_set.h src/reader.h src/highlight.h src/sanity.h
|
||||
obj/env.o: src/screen.h
|
||||
obj/env_universal_common.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/env_universal_common.o: src/signal.h src/env.h src/env_universal_common.h
|
||||
obj/env_universal_common.o: src/wutil.h src/path.h src/utf8.h src/util.h
|
||||
obj/env_universal_common.o: src/wcstringutil.h
|
||||
obj/event.o: config.h src/signal.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/event.o: src/event.h src/io.h src/env.h src/input_common.h src/parser.h
|
||||
obj/event.o: src/expand.h src/parse_constants.h src/parse_tree.h
|
||||
obj/event.o: src/parse_grammar.h src/tokenizer.h src/proc.h src/enum_set.h
|
||||
obj/event.o: src/tnode.h src/wutil.h
|
||||
obj/exec.o: config.h src/signal.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/exec.o: src/env.h src/exec.h src/function.h src/event.h src/io.h
|
||||
obj/exec.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
|
||||
obj/exec.o: src/parser.h src/expand.h src/proc.h src/postfork.h src/reader.h
|
||||
obj/exec.o: src/complete.h src/highlight.h src/color.h src/wutil.h
|
||||
obj/expand.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/exec.o: src/maybe.h src/env.h src/exec.h src/function.h src/event.h
|
||||
obj/exec.o: src/io.h src/parse_tree.h src/parse_constants.h
|
||||
obj/exec.o: src/parse_grammar.h src/tokenizer.h src/tnode.h src/parser.h
|
||||
obj/exec.o: src/expand.h src/proc.h src/enum_set.h src/postfork.h
|
||||
obj/exec.o: src/reader.h src/complete.h src/highlight.h src/color.h
|
||||
obj/exec.o: src/wutil.h
|
||||
obj/expand.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/expand.o: src/complete.h src/env.h src/exec.h src/expand.h
|
||||
obj/expand.o: src/parse_constants.h src/iothread.h src/parse_util.h
|
||||
obj/expand.o: src/tokenizer.h src/path.h src/proc.h src/io.h src/parse_tree.h
|
||||
obj/expand.o: src/wildcard.h src/wutil.h
|
||||
obj/fallback.o: config.h src/signal.h src/common.h src/fallback.h src/util.h
|
||||
obj/fish.o: config.h src/builtin.h src/common.h src/fallback.h src/signal.h
|
||||
obj/fish.o: src/env.h src/event.h src/expand.h src/parse_constants.h
|
||||
obj/fish.o: src/fish_version.h src/function.h src/history.h src/wutil.h
|
||||
obj/fish.o: src/io.h src/parser.h src/parse_tree.h src/tokenizer.h src/proc.h
|
||||
obj/fish.o: src/path.h src/reader.h src/complete.h src/highlight.h
|
||||
obj/fish.o: src/color.h
|
||||
obj/expand.o: src/parse_constants.h src/history.h src/wutil.h src/iothread.h
|
||||
obj/expand.o: src/parse_util.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/expand.o: src/tokenizer.h src/parser.h src/event.h src/io.h src/proc.h
|
||||
obj/expand.o: src/enum_set.h src/tnode.h src/path.h src/reader.h
|
||||
obj/expand.o: src/highlight.h src/color.h src/wcstringutil.h src/wildcard.h
|
||||
obj/fallback.o: config.h src/signal.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/fallback.o: src/util.h
|
||||
obj/fish.o: config.h src/builtin.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/fish.o: src/signal.h src/env.h src/event.h src/io.h src/expand.h
|
||||
obj/fish.o: src/parse_constants.h src/fish_version.h src/function.h
|
||||
obj/fish.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h src/tnode.h
|
||||
obj/fish.o: src/future_feature_flags.h src/history.h src/wutil.h src/parser.h
|
||||
obj/fish.o: src/proc.h src/enum_set.h src/path.h src/reader.h src/complete.h
|
||||
obj/fish.o: src/highlight.h src/color.h
|
||||
obj/fish_indent.o: config.h src/color.h src/common.h src/fallback.h
|
||||
obj/fish_indent.o: src/signal.h src/env.h src/fish_version.h src/highlight.h
|
||||
obj/fish_indent.o: src/output.h src/parse_constants.h src/parse_tree.h
|
||||
obj/fish_indent.o: src/tokenizer.h src/print_help.h src/wutil.h
|
||||
obj/fish_indent.o: src/maybe.h src/signal.h src/env.h src/fish_version.h
|
||||
obj/fish_indent.o: src/highlight.h src/output.h src/parse_constants.h
|
||||
obj/fish_indent.o: src/print_help.h src/tnode.h src/parse_grammar.h
|
||||
obj/fish_indent.o: src/tokenizer.h src/parse_tree.h src/wutil.h
|
||||
obj/fish_key_reader.o: config.h src/signal.h src/common.h src/fallback.h
|
||||
obj/fish_key_reader.o: src/env.h src/fish_version.h src/input.h
|
||||
obj/fish_key_reader.o: src/maybe.h src/env.h src/fish_version.h src/input.h
|
||||
obj/fish_key_reader.o: src/builtin_bind.h src/input_common.h src/print_help.h
|
||||
obj/fish_key_reader.o: src/proc.h src/io.h src/parse_tree.h
|
||||
obj/fish_key_reader.o: src/parse_constants.h src/tokenizer.h src/reader.h
|
||||
obj/fish_key_reader.o: src/proc.h src/enum_set.h src/io.h src/parse_tree.h
|
||||
obj/fish_key_reader.o: src/parse_constants.h src/parse_grammar.h
|
||||
obj/fish_key_reader.o: src/tokenizer.h src/tnode.h src/reader.h
|
||||
obj/fish_key_reader.o: src/complete.h src/highlight.h src/color.h src/wutil.h
|
||||
obj/fish_tests.o: config.h src/signal.h src/builtin.h src/common.h
|
||||
obj/fish_tests.o: src/fallback.h src/color.h src/complete.h src/env.h
|
||||
obj/fish_tests.o: src/env_universal_common.h src/wutil.h src/event.h
|
||||
obj/fish_tests.o: src/expand.h src/parse_constants.h src/function.h
|
||||
obj/fish_tests.o: src/fallback.h src/maybe.h src/color.h src/complete.h
|
||||
obj/fish_tests.o: src/env.h src/env_universal_common.h src/wutil.h
|
||||
obj/fish_tests.o: src/event.h src/io.h src/expand.h src/parse_constants.h
|
||||
obj/fish_tests.o: src/function.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/fish_tests.o: src/tokenizer.h src/tnode.h src/future_feature_flags.h
|
||||
obj/fish_tests.o: src/highlight.h src/history.h src/input.h
|
||||
obj/fish_tests.o: src/builtin_bind.h src/input_common.h src/io.h
|
||||
obj/fish_tests.o: src/iothread.h src/lru.h src/pager.h src/reader.h
|
||||
obj/fish_tests.o: src/screen.h src/parse_tree.h src/tokenizer.h
|
||||
obj/fish_tests.o: src/parse_util.h src/parser.h src/proc.h src/path.h
|
||||
obj/fish_tests.o: src/utf8.h src/util.h src/wcstringutil.h src/wildcard.h
|
||||
obj/fish_tests.o: src/builtin_bind.h src/input_common.h src/iothread.h
|
||||
obj/fish_tests.o: src/lru.h src/pager.h src/reader.h src/screen.h
|
||||
obj/fish_tests.o: src/parse_util.h src/parser.h src/proc.h src/enum_set.h
|
||||
obj/fish_tests.o: src/path.h src/utf8.h src/util.h src/wcstringutil.h
|
||||
obj/fish_tests.o: src/wildcard.h
|
||||
obj/fish_version.o: src/fish_version.h
|
||||
obj/function.o: config.h src/autoload.h src/common.h src/fallback.h
|
||||
obj/function.o: src/signal.h src/env.h src/lru.h src/event.h src/function.h
|
||||
obj/function.o: src/intern.h src/parser_keywords.h src/reader.h
|
||||
obj/function.o: src/complete.h src/highlight.h src/color.h
|
||||
obj/function.o: src/parse_constants.h src/wutil.h
|
||||
obj/function.o: src/maybe.h src/signal.h src/env.h src/lru.h src/event.h
|
||||
obj/function.o: src/io.h src/function.h src/parse_tree.h
|
||||
obj/function.o: src/parse_constants.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/function.o: src/tnode.h src/intern.h src/parser.h src/expand.h src/proc.h
|
||||
obj/function.o: src/enum_set.h src/parser_keywords.h src/reader.h
|
||||
obj/function.o: src/complete.h src/highlight.h src/color.h src/wutil.h
|
||||
obj/future_feature_flags.o: config.h src/future_feature_flags.h src/common.h
|
||||
obj/future_feature_flags.o: src/fallback.h src/maybe.h src/signal.h
|
||||
obj/highlight.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/highlight.o: src/signal.h src/color.h src/env.h src/expand.h
|
||||
obj/highlight.o: src/parse_constants.h src/function.h src/event.h
|
||||
obj/highlight.o: src/highlight.h src/history.h src/wutil.h src/output.h
|
||||
obj/highlight.o: src/parse_tree.h src/tokenizer.h src/parse_util.h src/path.h
|
||||
obj/highlight.o: src/wildcard.h src/complete.h
|
||||
obj/history.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
|
||||
obj/history.o: src/history.h src/wutil.h src/io.h src/iothread.h src/lru.h
|
||||
obj/history.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/highlight.o: src/maybe.h src/signal.h src/color.h src/env.h src/expand.h
|
||||
obj/highlight.o: src/parse_constants.h src/function.h src/event.h src/io.h
|
||||
obj/highlight.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/highlight.o: src/tnode.h src/future_feature_flags.h src/highlight.h
|
||||
obj/highlight.o: src/history.h src/wutil.h src/output.h src/parse_util.h
|
||||
obj/highlight.o: src/path.h src/wildcard.h src/complete.h
|
||||
obj/history.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/history.o: src/env.h src/history.h src/wutil.h src/io.h src/iothread.h
|
||||
obj/history.o: src/lru.h src/parser.h src/event.h src/expand.h
|
||||
obj/history.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/history.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/history.o: src/parse_util.h src/path.h src/reader.h src/complete.h
|
||||
obj/history.o: src/highlight.h src/color.h
|
||||
obj/input.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
|
||||
obj/input.o: src/event.h src/input.h src/builtin_bind.h src/input_common.h
|
||||
obj/input.o: src/io.h src/parser.h src/expand.h src/parse_constants.h
|
||||
obj/input.o: src/parse_tree.h src/tokenizer.h src/proc.h src/reader.h
|
||||
obj/input.o: src/complete.h src/highlight.h src/color.h src/wutil.h
|
||||
obj/input_common.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/input_common.o: src/env.h src/env_universal_common.h src/wutil.h
|
||||
obj/input_common.o: src/input_common.h src/iothread.h src/util.h
|
||||
obj/intern.o: config.h src/common.h src/fallback.h src/signal.h src/intern.h
|
||||
obj/io.o: config.h src/common.h src/fallback.h src/signal.h src/exec.h
|
||||
obj/io.o: src/io.h src/env.h src/wutil.h
|
||||
obj/iothread.o: config.h src/signal.h src/common.h src/fallback.h
|
||||
obj/history.o: src/highlight.h src/color.h src/wcstringutil.h src/wildcard.h
|
||||
obj/input.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/input.o: src/env.h src/event.h src/io.h src/input.h src/builtin_bind.h
|
||||
obj/input.o: src/input_common.h src/parser.h src/expand.h
|
||||
obj/input.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/input.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/input.o: src/reader.h src/complete.h src/highlight.h src/color.h
|
||||
obj/input.o: src/wutil.h
|
||||
obj/input_common.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/input_common.o: src/signal.h src/env.h src/env_universal_common.h
|
||||
obj/input_common.o: src/wutil.h src/input_common.h src/iothread.h src/util.h
|
||||
obj/intern.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/intern.o: src/intern.h
|
||||
obj/io.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/io.o: src/exec.h src/io.h src/env.h src/wutil.h
|
||||
obj/iothread.o: config.h src/signal.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/iothread.o: src/iothread.h src/wutil.h
|
||||
obj/kill.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/output.o: config.h src/color.h src/common.h src/fallback.h src/signal.h
|
||||
obj/output.o: src/env.h src/output.h src/wutil.h
|
||||
obj/pager.o: config.h src/common.h src/fallback.h src/signal.h src/complete.h
|
||||
obj/pager.o: src/highlight.h src/color.h src/env.h src/pager.h src/reader.h
|
||||
obj/pager.o: src/parse_constants.h src/screen.h src/util.h src/wutil.h
|
||||
obj/kill.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/output.o: config.h src/color.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/output.o: src/signal.h src/env.h src/output.h src/wutil.h
|
||||
obj/pager.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/pager.o: src/complete.h src/highlight.h src/color.h src/env.h src/pager.h
|
||||
obj/pager.o: src/reader.h src/parse_constants.h src/screen.h src/util.h
|
||||
obj/pager.o: src/wutil.h
|
||||
obj/parse_execution.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/parse_execution.o: src/signal.h src/builtin_function.h src/complete.h
|
||||
obj/parse_execution.o: src/env.h src/event.h src/exec.h src/expand.h
|
||||
obj/parse_execution.o: src/parse_constants.h src/function.h src/io.h
|
||||
obj/parse_execution.o: src/parse_execution.h src/parse_tree.h src/tokenizer.h
|
||||
obj/parse_execution.o: src/proc.h src/parse_util.h src/parser.h src/path.h
|
||||
obj/parse_execution.o: src/reader.h src/highlight.h src/color.h src/util.h
|
||||
obj/parse_execution.o: src/wildcard.h src/wutil.h
|
||||
obj/parse_productions.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/parse_productions.o: src/parse_constants.h src/parse_productions.h
|
||||
obj/parse_productions.o: src/parse_tree.h src/tokenizer.h
|
||||
obj/parse_tree.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/parse_tree.o: src/parse_constants.h src/parse_productions.h
|
||||
obj/parse_tree.o: src/parse_tree.h src/tokenizer.h src/proc.h src/io.h
|
||||
obj/parse_tree.o: src/env.h src/wutil.h
|
||||
obj/parse_execution.o: src/maybe.h src/signal.h src/builtin_function.h
|
||||
obj/parse_execution.o: src/parse_tree.h src/parse_constants.h
|
||||
obj/parse_execution.o: src/parse_grammar.h src/tokenizer.h src/complete.h
|
||||
obj/parse_execution.o: src/env.h src/event.h src/io.h src/exec.h src/expand.h
|
||||
obj/parse_execution.o: src/function.h src/tnode.h src/parse_execution.h
|
||||
obj/parse_execution.o: src/proc.h src/enum_set.h src/parse_util.h
|
||||
obj/parse_execution.o: src/parser.h src/path.h src/reader.h src/highlight.h
|
||||
obj/parse_execution.o: src/color.h src/util.h src/wildcard.h src/wutil.h
|
||||
obj/parse_productions.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/parse_productions.o: src/signal.h src/parse_constants.h
|
||||
obj/parse_productions.o: src/parse_grammar.h src/tokenizer.h
|
||||
obj/parse_productions.o: src/parse_productions.h src/parse_tree.h
|
||||
obj/parse_tree.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/parse_tree.o: src/signal.h src/parse_constants.h src/parse_productions.h
|
||||
obj/parse_tree.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/parse_tree.o: src/proc.h src/enum_set.h src/io.h src/env.h src/tnode.h
|
||||
obj/parse_tree.o: src/wutil.h
|
||||
obj/parse_util.o: config.h src/builtin.h src/common.h src/fallback.h
|
||||
obj/parse_util.o: src/signal.h src/expand.h src/parse_constants.h
|
||||
obj/parse_util.o: src/parse_tree.h src/tokenizer.h src/parse_util.h
|
||||
obj/parse_util.o: src/util.h src/wildcard.h src/complete.h src/wutil.h
|
||||
obj/parser.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
|
||||
obj/parser.o: src/event.h src/expand.h src/parse_constants.h src/function.h
|
||||
obj/parser.o: src/intern.h src/parse_execution.h src/io.h src/parse_tree.h
|
||||
obj/parser.o: src/tokenizer.h src/proc.h src/parse_util.h src/parser.h
|
||||
obj/parser.o: src/reader.h src/complete.h src/highlight.h src/color.h
|
||||
obj/parser.o: src/sanity.h src/wutil.h
|
||||
obj/parser_keywords.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/parser_keywords.o: src/parser_keywords.h
|
||||
obj/path.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
|
||||
obj/path.o: src/expand.h src/parse_constants.h src/path.h src/wutil.h
|
||||
obj/postfork.o: config.h src/signal.h src/common.h src/fallback.h src/exec.h
|
||||
obj/postfork.o: src/io.h src/env.h src/iothread.h src/postfork.h src/proc.h
|
||||
obj/postfork.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
|
||||
obj/postfork.o: src/wutil.h
|
||||
obj/print_help.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/print_help.o: src/print_help.h
|
||||
obj/proc.o: config.h src/signal.h src/common.h src/fallback.h src/event.h
|
||||
obj/proc.o: src/io.h src/env.h src/output.h src/color.h src/parse_tree.h
|
||||
obj/proc.o: src/parse_constants.h src/tokenizer.h src/parser.h src/expand.h
|
||||
obj/proc.o: src/proc.h src/reader.h src/complete.h src/highlight.h
|
||||
obj/proc.o: src/sanity.h src/util.h src/wutil.h
|
||||
obj/parse_util.o: src/maybe.h src/signal.h src/expand.h src/parse_constants.h
|
||||
obj/parse_util.o: src/future_feature_flags.h src/parse_util.h
|
||||
obj/parse_util.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/parse_util.o: src/parser.h src/event.h src/io.h src/env.h src/proc.h
|
||||
obj/parse_util.o: src/enum_set.h src/tnode.h src/util.h src/wildcard.h
|
||||
obj/parse_util.o: src/complete.h src/wutil.h
|
||||
obj/parser.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/parser.o: src/env.h src/event.h src/io.h src/expand.h
|
||||
obj/parser.o: src/parse_constants.h src/function.h src/parse_tree.h
|
||||
obj/parser.o: src/parse_grammar.h src/tokenizer.h src/tnode.h src/intern.h
|
||||
obj/parser.o: src/parse_execution.h src/proc.h src/enum_set.h
|
||||
obj/parser.o: src/parse_util.h src/parser.h src/reader.h src/complete.h
|
||||
obj/parser.o: src/highlight.h src/color.h src/sanity.h src/wutil.h
|
||||
obj/parser_keywords.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/parser_keywords.o: src/signal.h src/parser_keywords.h
|
||||
obj/path.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/path.o: src/env.h src/expand.h src/parse_constants.h src/path.h
|
||||
obj/path.o: src/wutil.h
|
||||
obj/postfork.o: config.h src/signal.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/postfork.o: src/exec.h src/io.h src/env.h src/iothread.h src/postfork.h
|
||||
obj/postfork.o: src/proc.h src/enum_set.h src/parse_tree.h
|
||||
obj/postfork.o: src/parse_constants.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/postfork.o: src/tnode.h src/wutil.h
|
||||
obj/print_help.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/print_help.o: src/signal.h src/print_help.h
|
||||
obj/proc.o: config.h src/signal.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/proc.o: src/event.h src/io.h src/env.h src/output.h src/color.h
|
||||
obj/proc.o: src/parse_tree.h src/parse_constants.h src/parse_grammar.h
|
||||
obj/proc.o: src/tokenizer.h src/parser.h src/expand.h src/proc.h
|
||||
obj/proc.o: src/enum_set.h src/tnode.h src/reader.h src/complete.h
|
||||
obj/proc.o: src/highlight.h src/sanity.h src/util.h src/wutil.h
|
||||
obj/reader.o: config.h src/signal.h src/color.h src/common.h src/fallback.h
|
||||
obj/reader.o: src/complete.h src/env.h src/event.h src/exec.h src/expand.h
|
||||
obj/reader.o: src/parse_constants.h src/function.h src/highlight.h
|
||||
obj/reader.o: src/history.h src/wutil.h src/input.h src/builtin_bind.h
|
||||
obj/reader.o: src/input_common.h src/intern.h src/io.h src/iothread.h
|
||||
obj/reader.o: src/kill.h src/output.h src/pager.h src/reader.h src/screen.h
|
||||
obj/reader.o: src/parse_tree.h src/tokenizer.h src/parse_util.h src/parser.h
|
||||
obj/reader.o: src/proc.h src/sanity.h src/util.h
|
||||
obj/sanity.o: config.h src/common.h src/fallback.h src/signal.h src/history.h
|
||||
obj/sanity.o: src/wutil.h src/kill.h src/proc.h src/io.h src/env.h
|
||||
obj/sanity.o: src/parse_tree.h src/parse_constants.h src/tokenizer.h
|
||||
obj/sanity.o: src/reader.h src/complete.h src/highlight.h src/color.h
|
||||
obj/sanity.o: src/sanity.h
|
||||
obj/screen.o: config.h src/common.h src/fallback.h src/signal.h src/env.h
|
||||
obj/screen.o: src/highlight.h src/color.h src/output.h src/pager.h
|
||||
obj/reader.o: src/maybe.h src/complete.h src/env.h src/event.h src/io.h
|
||||
obj/reader.o: src/exec.h src/expand.h src/parse_constants.h src/function.h
|
||||
obj/reader.o: src/parse_tree.h src/parse_grammar.h src/tokenizer.h
|
||||
obj/reader.o: src/tnode.h src/highlight.h src/history.h src/wutil.h
|
||||
obj/reader.o: src/input.h src/builtin_bind.h src/input_common.h src/intern.h
|
||||
obj/reader.o: src/iothread.h src/kill.h src/output.h src/pager.h src/reader.h
|
||||
obj/reader.o: src/screen.h src/parse_util.h src/parser.h src/proc.h
|
||||
obj/reader.o: src/enum_set.h src/sanity.h src/util.h
|
||||
obj/sanity.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/sanity.o: src/history.h src/wutil.h src/kill.h src/proc.h src/enum_set.h
|
||||
obj/sanity.o: src/io.h src/env.h src/parse_tree.h src/parse_constants.h
|
||||
obj/sanity.o: src/parse_grammar.h src/tokenizer.h src/tnode.h src/reader.h
|
||||
obj/sanity.o: src/complete.h src/highlight.h src/color.h src/sanity.h
|
||||
obj/screen.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/screen.o: src/env.h src/highlight.h src/color.h src/output.h src/pager.h
|
||||
obj/screen.o: src/complete.h src/reader.h src/parse_constants.h src/screen.h
|
||||
obj/screen.o: src/util.h
|
||||
obj/signal.o: config.h src/signal.h src/common.h src/fallback.h src/event.h
|
||||
obj/signal.o: src/proc.h src/io.h src/env.h src/parse_tree.h
|
||||
obj/signal.o: src/parse_constants.h src/tokenizer.h src/reader.h
|
||||
obj/signal.o: src/complete.h src/highlight.h src/color.h src/wutil.h
|
||||
obj/tokenizer.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/tokenizer.o: src/tokenizer.h src/wutil.h
|
||||
obj/utf8.o: config.h src/common.h src/fallback.h src/signal.h src/utf8.h
|
||||
obj/util.o: config.h src/common.h src/fallback.h src/signal.h src/util.h
|
||||
obj/util.o: src/wutil.h
|
||||
obj/wcstringutil.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/wcstringutil.o: src/wcstringutil.h
|
||||
obj/wgetopt.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/signal.o: config.h src/signal.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/signal.o: src/event.h src/io.h src/env.h src/parser.h src/expand.h
|
||||
obj/signal.o: src/parse_constants.h src/parse_tree.h src/parse_grammar.h
|
||||
obj/signal.o: src/tokenizer.h src/proc.h src/enum_set.h src/tnode.h
|
||||
obj/signal.o: src/reader.h src/complete.h src/highlight.h src/color.h
|
||||
obj/signal.o: src/wutil.h
|
||||
obj/tinyexpr.o: src/tinyexpr.h
|
||||
obj/tnode.o: src/tnode.h src/parse_grammar.h src/parse_constants.h
|
||||
obj/tnode.o: src/common.h config.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/tnode.o: src/tokenizer.h src/parse_tree.h
|
||||
obj/tokenizer.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/tokenizer.o: src/signal.h src/future_feature_flags.h src/tokenizer.h
|
||||
obj/tokenizer.o: src/parse_constants.h src/wutil.h
|
||||
obj/utf8.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/utf8.o: src/utf8.h
|
||||
obj/util.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/util.o: src/util.h src/wutil.h
|
||||
obj/wcstringutil.o: config.h src/common.h src/fallback.h src/maybe.h
|
||||
obj/wcstringutil.o: src/signal.h src/wcstringutil.h
|
||||
obj/wgetopt.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/wgetopt.o: src/wgetopt.h src/wutil.h
|
||||
obj/wildcard.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/wildcard.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/wildcard.o: src/complete.h src/expand.h src/parse_constants.h
|
||||
obj/wildcard.o: src/reader.h src/highlight.h src/color.h src/env.h
|
||||
obj/wildcard.o: src/wildcard.h src/wutil.h
|
||||
obj/wutil.o: config.h src/common.h src/fallback.h src/signal.h src/wutil.h
|
||||
obj/wildcard.o: src/future_feature_flags.h src/reader.h src/highlight.h
|
||||
obj/wildcard.o: src/color.h src/env.h src/wildcard.h src/wutil.h
|
||||
obj/wutil.o: config.h src/common.h src/fallback.h src/maybe.h src/signal.h
|
||||
obj/wutil.o: src/wutil.h
|
||||
|
||||
21
README.md
21
README.md
@@ -32,14 +32,14 @@ fish can be installed:
|
||||
|
||||
Packages for Debian, Fedora, openSUSE, and Red Hat Enterprise Linux/CentOS are available from the
|
||||
[openSUSE Build
|
||||
Service](https://software.opensuse.org/download.html?project=shells%3Afish%3Arelease%3A2&package=fish).
|
||||
Service](https://software.opensuse.org/download.html?project=shells%3Afish&package=fish).
|
||||
|
||||
Packages for Ubuntu are available from the [fish
|
||||
PPA](https://launchpad.net/~fish-shell/+archive/ubuntu/release-2), and can be installed using the
|
||||
PPA](https://launchpad.net/~fish-shell/+archive/ubuntu/release-3), and can be installed using the
|
||||
following commands:
|
||||
|
||||
```
|
||||
sudo apt-add-repository ppa:fish-shell/release-2
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
sudo apt-get update
|
||||
sudo apt-get install fish
|
||||
```
|
||||
@@ -71,7 +71,7 @@ Running fish requires:
|
||||
|
||||
The following optional features also have specific requirements:
|
||||
|
||||
* builtin commands that have the `--help` option or print usage messages require `nroff` and `ul`
|
||||
* builtin commands that have the `--help` option or print usage messages require `ul` and either `nroff` or `mandoc` for display
|
||||
* automated completion generation from manual pages requires Python (2.7+ or 3.3+) and possibly the
|
||||
`backports.lzma` module for Python 2.7
|
||||
* the `fish_config` web configuration tool requires Python (2.7+ or 3.3 +) and a web browser
|
||||
@@ -128,19 +128,6 @@ make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
### Building from source (macOS only)
|
||||
|
||||
* Build the `base` target in Xcode
|
||||
* Run the fish executable, for example, in `DerivedData/fish/Build/Products/Debug/base/bin/fish`
|
||||
|
||||
To build and install fish with Xcode on macOS, execute the following in a terminal:
|
||||
|
||||
```bash
|
||||
xcodebuild install
|
||||
sudo ditto /tmp/fish.dst /
|
||||
sudo make install-doc
|
||||
```
|
||||
|
||||
### Help, it didn't build!
|
||||
|
||||
If fish reports that it could not find curses, try installing a curses development package and build again.
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Builds the commands.hdr file.
|
||||
# Usage: build_commands_hdr.sh ${HELP_SRC} < commands_hdr.in > commands.hdr
|
||||
|
||||
rm -f command_list.tmp command_list_toc.tmp
|
||||
for i in `printf "%s\n" $@ | LC_ALL=C.UTF-8 sort`; do
|
||||
echo "<hr>" >>command_list.tmp;
|
||||
cat $i >>command_list.tmp;
|
||||
echo >>command_list.tmp;
|
||||
echo >>command_list.tmp;
|
||||
NAME=`basename $i .txt`;
|
||||
echo '- <a href="#'$NAME'">'$NAME'</a>' >> command_list_toc.tmp;
|
||||
echo "Back to <a href='index.html#toc-commands'>command index</a>". >>command_list.tmp;
|
||||
done
|
||||
mv command_list.tmp command_list.txt
|
||||
mv command_list_toc.tmp command_list_toc.txt
|
||||
/usr/bin/env awk '{if ($0 ~ /@command_list_toc@/) { system("cat command_list_toc.txt"); }
|
||||
else if ($0 ~ /@command_list@/){ system("cat command_list.txt");}
|
||||
else{ print $0;}}'
|
||||
@@ -1,163 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is run as part of the build process
|
||||
|
||||
if test $# -eq 0
|
||||
then
|
||||
# Use fish's defaults
|
||||
DOXYFILE=Doxyfile.help
|
||||
INPUTDIR=doc_src
|
||||
OUTPUTDIR=share
|
||||
echo "Using defaults: $0 ${DOXYFILE} ${INPUTDIR} ${OUTPUTDIR}"
|
||||
elif test $# -eq 3
|
||||
then
|
||||
DOXYFILE="$1"
|
||||
INPUTDIR="$2"
|
||||
OUTPUTDIR="$3"
|
||||
else
|
||||
echo "Usage: $0 doxygen_file input_directory output_directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine which man pages we don't want to generate.
|
||||
# on OS X, don't make a man page for open, since we defeat fish's open function on OS X.
|
||||
# This is also done in the Makefile, but the Xcode build doesn't use that
|
||||
CONDEMNED_PAGES=
|
||||
if test `uname` = 'Darwin'; then
|
||||
CONDEMNED_PAGES="$CONDEMNED_PAGES open.1"
|
||||
fi
|
||||
|
||||
# Helper function to turn a relative path into an absolute path
|
||||
resolve_path()
|
||||
{
|
||||
D=`command dirname "$1"`
|
||||
B=`command basename "$1"`
|
||||
echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
|
||||
}
|
||||
|
||||
# Expand relative paths
|
||||
DOXYFILE=`resolve_path "$DOXYFILE"`
|
||||
INPUTDIR=`resolve_path "$INPUTDIR"`
|
||||
INPUTFILTER=`resolve_path "$INPUT_FILTER"`
|
||||
OUTPUTDIR=`resolve_path "$OUTPUTDIR"`
|
||||
|
||||
echo " doxygen file: $DOXYFILE"
|
||||
echo " input directory: $INPUTDIR"
|
||||
echo " input filter: $INPUTFILTER"
|
||||
echo " output directory: $OUTPUTDIR"
|
||||
echo " skipping: $CONDEMNED_PAGES"
|
||||
|
||||
#Until now the makefile likely has been affecting our output, reset for upcoming warnings
|
||||
tput sgr0
|
||||
|
||||
# Make sure INPUTDIR is found
|
||||
if test ! -d "$INPUTDIR"; then
|
||||
echo >&2 "Could not find input directory '${INPUTDIR}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure doxygen is found
|
||||
DOXYGENPATH=`command -v doxygen`
|
||||
if test -z "$DOXYGENPATH" ; then
|
||||
for i in /usr/local/bin/doxygen /opt/bin/doxygen /Applications/Doxygen.app/Contents/Resources/doxygen ~/Applications/Doxygen.app/Contents/Resources/doxygen ; do
|
||||
if test -f "$i"; then
|
||||
DOXYGENPATH="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -z "$DOXYGENPATH"; then
|
||||
echo >&2 "doxygen is not installed, so documentation will not be built."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check we have the lexicon filter
|
||||
if test -z "$INPUT_FILTER"; then
|
||||
echo >&2 "Lexicon filter is not available. Continuing without."
|
||||
INPUTFILTER=''
|
||||
fi
|
||||
|
||||
# Determine where our output should go
|
||||
if ! mkdir -p "${OUTPUTDIR}" ; then
|
||||
echo "Could not create output directory '${OUTPUTDIR}'"
|
||||
fi
|
||||
|
||||
# Make a temporary directory
|
||||
TMPLOC=`mktemp -d -t fish_doc_build_XXXXXX` || { echo >&2 "Could not build documentation because mktemp failed"; exit 1; }
|
||||
|
||||
# Copy stuff to the temp directory
|
||||
for i in "$INPUTDIR"/*.txt; do
|
||||
BASENAME=`basename $i .txt`
|
||||
INPUTFILE=$TMPLOC/$BASENAME.doxygen
|
||||
echo "/** \\page" $BASENAME > $INPUTFILE
|
||||
cat $i | sed "s/\\\section $BASENAME $BASENAME/\\\section $BASENAME-man $BASENAME/" >> $INPUTFILE
|
||||
echo "*/" >> $INPUTFILE
|
||||
done
|
||||
|
||||
# Make some extra stuff to pass to doxygen
|
||||
# Input is kept as . because we cd to the input directory beforehand
|
||||
# This prevents doxygen from generating "documentation" for intermediate directories
|
||||
PROJECT_NUMBER=$(echo "$FISH_BUILD_VERSION" | env sed "s/-[a-z0-9-]*//")
|
||||
echo "PROJECT_NUMBER: $FISH_BUILD_VERSION"
|
||||
DOXYPARAMS=$(cat <<EOF
|
||||
PROJECT_NUMBER=${PROJECT_NUMBER}
|
||||
INPUT_FILTER=$INPUTFILTER
|
||||
INPUT=.
|
||||
OUTPUT_DIRECTORY=$OUTPUTDIR
|
||||
QUIET=YES
|
||||
EOF
|
||||
);
|
||||
|
||||
# echo "$DOXYPARAMS"
|
||||
|
||||
# Clear out the output directory first
|
||||
find "${OUTPUTDIR}" -name "*.1" -delete
|
||||
|
||||
# Run doxygen
|
||||
cd "$TMPLOC"
|
||||
(cat "${DOXYFILE}" ; echo "$DOXYPARAMS";) | "$DOXYGENPATH" -
|
||||
|
||||
# Remember errors
|
||||
RESULT=$?
|
||||
|
||||
cd "${OUTPUTDIR}/man/man1/"
|
||||
if test "$RESULT" = 0 ; then
|
||||
|
||||
# Postprocess the files
|
||||
for i in "$INPUTDIR"/*.txt; do
|
||||
# This command turns the following weirdness from Doxygen:
|
||||
# abbr \-
|
||||
# .SH "abbr - manage fish abbreviations"
|
||||
# into
|
||||
# \fBabbr\fP - manage fish abbreviations
|
||||
# It would be nice to use -i here for edit in place, but that is not portable
|
||||
CMD_NAME=`basename "$i" .txt`;
|
||||
sed -E < ${CMD_NAME}.1 > ${CMD_NAME}.1.tmp \
|
||||
-e "/^.SH NAME/{
|
||||
N; N
|
||||
s/${CMD_NAME} \\\\- \n.SH \"${CMD_NAME} (- .*)\"/\\\fB${CMD_NAME}\\\fP \1/g
|
||||
}"
|
||||
mv "${CMD_NAME}.1.tmp" "${CMD_NAME}.1"
|
||||
done
|
||||
|
||||
# Erase condemned pages
|
||||
rm -f $CONDEMNED_PAGES
|
||||
fi
|
||||
|
||||
# Destroy TMPLOC
|
||||
if test "$RESULT" -ne 0; then
|
||||
echo "Cleaning up '$TMPLOC'"
|
||||
fi
|
||||
rm -Rf "$TMPLOC"
|
||||
|
||||
if test "$RESULT" -ne 0; then
|
||||
tput smso 2> /dev/null || true
|
||||
echo "Doxygen failed creating manpages. See the output log for details."
|
||||
tput sgr0 2> /dev/null || true
|
||||
else
|
||||
tput bold 2> /dev/null || true
|
||||
echo Built manpages
|
||||
tput sgr0 2> /dev/null || true
|
||||
fi
|
||||
exit $RESULT
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
TOC_TXT=$1
|
||||
env awk "{if (\$0 ~ /@toc@/){ system(\"cat ${TOC_TXT}\");} else{ print \$0;}}"
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Builds the lexicon filter
|
||||
# Usage: build_lexicon_filter.sh FUNCTIONS_DIR COMPLETIONS_DIR lexicon_filter.in [SED_BINARY] > lexicon_filter
|
||||
|
||||
set -e
|
||||
|
||||
# To enable the lexicon filter, we first need to be aware of what fish
|
||||
# considers to be a command, function, or external binary. We use
|
||||
# command_list_toc.txt for the base commands. Scan the share/functions
|
||||
# directory for other functions, some of which are mentioned in the docs, and
|
||||
# use /share/completions to find a good selection of binaries. Additionally,
|
||||
# colour defaults from __fish_config_interactive to set the docs colours when
|
||||
# used in a 'cli' style context.
|
||||
rm -f lexicon.tmp lexicon_catalog.tmp lexicon_catalog.txt lexicon.txt
|
||||
|
||||
FUNCTIONS_DIR=${1}
|
||||
FUNCTIONS_DIR_FILES=${1}/*.fish
|
||||
COMPLETIONS_DIR_FILES=${2}/*.fish
|
||||
LEXICON_FILTER_IN=${3}
|
||||
|
||||
SED=${4:-$(command -v sed)}
|
||||
|
||||
# Scan sources for commands/functions/binaries/colours. If GNU sed was portable, this could be much smarter.
|
||||
$SED <command_list_toc.txt >>lexicon.tmp -n \
|
||||
-e "s|^.*>\([a-z][a-z_]*\)</a>|'\1'|w lexicon_catalog.tmp" \
|
||||
-e "s|'\(.*\)'|bltn \1|p"; mv lexicon_catalog.tmp lexicon_catalog.txt
|
||||
printf "%s\n" ${COMPLETIONS_DIR_FILES} | $SED -n \
|
||||
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | grep -F -vx -f lexicon_catalog.txt | $SED >>lexicon.tmp -n \
|
||||
-e 'w lexicon_catalog.tmp' \
|
||||
-e "s|'\(.*\)'|cmnd \1|p"; cat lexicon_catalog.tmp >> lexicon_catalog.txt;
|
||||
printf "%s\n" ${FUNCTIONS_DIR_FILES} | $SED -n \
|
||||
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | grep -F -vx -f lexicon_catalog.txt | $SED >>lexicon.tmp -n \
|
||||
-e 'w lexicon_catalog.tmp' \
|
||||
-e "s|'\(.*\)'|func \1|p";
|
||||
$SED < ${FUNCTIONS_DIR}/__fish_config_interactive.fish >>lexicon.tmp -n \
|
||||
-e '/set_default/s/.*\(fish_[a-z][a-z_]*\).*$$/clrv \1/p'; \
|
||||
$SED < ${LEXICON_FILTER_IN} >>lexicon.tmp -n \
|
||||
-e '/^#.!#/s/^#.!# \(.... [a-z][a-z_]*\)/\1/p';
|
||||
mv lexicon.tmp lexicon.txt; rm -f lexicon_catalog.tmp lexicon_catalog.txt;
|
||||
|
||||
# Copy the filter to stdout. We're going to append sed commands to it after.
|
||||
$SED -e 's|@sed@|'$SED'|' < ${LEXICON_FILTER_IN}
|
||||
|
||||
# Scan through the lexicon, transforming each line to something useful to Doxygen.
|
||||
if echo x | $SED "/[[:<:]]x/d" 2>/dev/null; then
|
||||
WORDBL='[[:<:]]'; WORDBR='[[:>:]]';
|
||||
else
|
||||
WORDBL='\\<'; WORDBR='\\>';
|
||||
fi;
|
||||
$SED < lexicon.txt -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';
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Usage: build_toc_txt.sh $(HDR_FILES:index.hdr=index.hdr.in) > toc.txt
|
||||
|
||||
# Ugly hack to set the toc initial title for the main page
|
||||
echo "- <a href=\"index.html\" id=\"toc-index\">fish shell documentation - ${FISH_BUILD_VERSION}</a>" > toc.txt
|
||||
# The first sed command captures the page name, followed by the description
|
||||
# The second sed command captures the command name \1 and the description \2, but only up to a dash
|
||||
# This is to reduce the size of the TOC in the command listing on the main page
|
||||
for i in $@; do
|
||||
NAME=`basename $i .hdr`
|
||||
NAME=`basename $NAME .hdr.in`
|
||||
env sed <$i >>toc.txt -n \
|
||||
-e 's,.*\\page *\([^ ]*\) *\(.*\)$,- <a href="'$NAME'.html" id="toc-'$NAME'">\2</a>,p' \
|
||||
-e 's,.*\\section *\([^ ]*\) *\(.*\) - .*$, - <a href="'$NAME'.html#\1">\2</a>,p' \
|
||||
-e 's,.*\\section *\([^ ]*\) *\(.*\)$, - <a href="'$NAME'.html#\1">\2</a>,p'
|
||||
done
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Usage: Doxyfile.user lexicon_filter
|
||||
DOXYFILE=$1
|
||||
LEXICON_FILTER=$2
|
||||
|
||||
(cat "${DOXYFILE}" ;\
|
||||
echo INPUT_FILTER="${LEXICON_FILTER}"; \
|
||||
echo PROJECT_NUMBER=${FISH_BUILD_VERSION} \
|
||||
| /usr/bin/env sed "s/-[a-z0-9-]*//") \
|
||||
| doxygen - && touch user_doc
|
||||
|
||||
(cd ./user_doc/html/ && \
|
||||
rm -f bc_s.png bdwn.png closed.png doc.png folder*.png ftv2*.png \
|
||||
nav*.png open.png splitbar.png sync_*.png tab*.* doxygen.* \
|
||||
dynsections.js jquery.js pages.html)
|
||||
@@ -8,10 +8,6 @@ set -e
|
||||
|
||||
# Find the fish git directory as two levels up from script directory.
|
||||
GIT_DIR="$( cd "$( dirname $( dirname "$0" ) )" && pwd )"
|
||||
|
||||
# Set the output directory as either the first param or cwd.
|
||||
test -n "$1" && OUTPUT_DIR=$1/ || OUTPUT_DIR=
|
||||
FBVF=${OUTPUT_DIR}FISH-BUILD-VERSION-FILE
|
||||
DEF_VER=unknown
|
||||
|
||||
# First see if there is a version file (included in release tarballs),
|
||||
@@ -23,6 +19,17 @@ elif ! VN=$(git -C "$GIT_DIR" describe --always --dirty 2>/dev/null); then
|
||||
VN="$DEF_VER"
|
||||
fi
|
||||
|
||||
# If the first param is --stdout, then output to stdout and exit.
|
||||
if test "$1" = '--stdout'
|
||||
then
|
||||
echo $VN
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Set the output directory as either the first param or cwd.
|
||||
test -n "$1" && OUTPUT_DIR=$1/ || OUTPUT_DIR=
|
||||
FBVF=${OUTPUT_DIR}FISH-BUILD-VERSION-FILE
|
||||
|
||||
if test -r $FBVF
|
||||
then
|
||||
VC=$(grep -v '^#' $FBVF | tr -d '"' | sed -e 's/^FISH_BUILD_VERSION=//')
|
||||
|
||||
@@ -3,31 +3,17 @@
|
||||
# This is meant to be run by "make lint" or "make lint-all". It is not meant to
|
||||
# be run directly from a shell prompt.
|
||||
#
|
||||
set cppchecks warning,performance,portability,information,missingInclude
|
||||
|
||||
# We don't include "missingInclude" as that doesn't find our config.h.
|
||||
# Missing includes will quickly be found by... compiling the thing anyway.
|
||||
set cppchecks warning,performance,portability,information #,missingInclude
|
||||
set cppcheck_args
|
||||
set c_files
|
||||
set all no
|
||||
set kernel_name (uname -s)
|
||||
set machine_type (uname -m)
|
||||
|
||||
set -gx CXX $argv[1]
|
||||
set -e argv[1]
|
||||
|
||||
if test "$argv[1]" = "--all"
|
||||
set all yes
|
||||
set cppchecks "$cppchecks,unusedFunction"
|
||||
set -e argv[1]
|
||||
end
|
||||
|
||||
if test $kernel_name = Linux
|
||||
# This is an awful hack. However, the include-what-you-use program spews lots of errors like
|
||||
# /usr/include/unistd.h:226:10: fatal error: 'stddef.h' file not found
|
||||
# if we don't explicitly tell it where to find the system headers on Linux. See
|
||||
# http://stackoverflow.com/questions/19642590/libtooling-cant-find-stddef-h-nor-other-headers/
|
||||
set -l sys_includes (eval $CXX -v -c src/builtin.cpp 2>&1 | \
|
||||
sed -n -e '/^#include <...> search/,/^End of search list/s/^ *//p')[2..-2]
|
||||
set -x CPLUS_INCLUDE_PATH (string join ':' $sys_includes)
|
||||
end
|
||||
argparse a/all -- $argv
|
||||
|
||||
# We only want -D and -I options to be passed thru to cppcheck.
|
||||
for arg in $argv
|
||||
@@ -49,8 +35,9 @@ if test "$machine_type" = "x86_64"
|
||||
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
|
||||
end
|
||||
|
||||
if test $all = yes
|
||||
if set -q _flag_all
|
||||
set c_files src/*.cpp
|
||||
set cppchecks "$cppchecks,unusedFunction"
|
||||
else
|
||||
# We haven't been asked to lint all the source. If there are uncommitted
|
||||
# changes lint those, else lint the files in the most recent commit.
|
||||
@@ -128,26 +115,7 @@ if set -q c_files[1]
|
||||
# The stderr to stdout redirection is because oclint, incorrectly writes its final summary
|
||||
# counts of the errors detected to stderr. Anyone running this who wants to capture its
|
||||
# output will expect those messages to be written to stdout.
|
||||
if test "$kernel_name" = "Darwin"
|
||||
if not test -f compile_commands.json
|
||||
xcodebuild -alltargets >xcodebuild.log
|
||||
oclint-xcodebuild xcodebuild.log >/dev/null
|
||||
end
|
||||
if test $all = yes
|
||||
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.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
|
||||
# handling for oclint to work.
|
||||
oclint $c_files -- $argv 2>&1
|
||||
end
|
||||
oclint $c_files -- $argv 2>&1
|
||||
end
|
||||
else
|
||||
echo
|
||||
|
||||
@@ -5,37 +5,28 @@
|
||||
VERSION=`git describe --always --dirty 2>/dev/null`
|
||||
if test -z "$VERSION" ; then
|
||||
echo "Could not get version from git"
|
||||
VERSION=`sed -E -n 's/^.*PACKAGE_VERSION "([0-9a-z.\-]+)"/\1/p' osx/config.h`
|
||||
if test -z "$VERSION"; then
|
||||
echo "Could not get version from osx/config.h"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Version is $VERSION"
|
||||
|
||||
set -x
|
||||
|
||||
make distclean
|
||||
|
||||
#Exit on error
|
||||
set -e
|
||||
|
||||
PKGDIR=`mktemp -d`
|
||||
|
||||
SRC_DIR=$PWD
|
||||
OUTPUT_PATH=${FISH_ARTEFACT_PATH:-~/fish_built}
|
||||
|
||||
mkdir -p $PKGDIR/root $PKGDIR/intermediates $PKGDIR/dst
|
||||
xcodebuild install -scheme install_tree -configuration Release DSTROOT=$PKGDIR/root/
|
||||
mkdir -p $PKGDIR/build $PKGDIR/root $PKGDIR/intermediates $PKGDIR/dst
|
||||
( cd "$PKGDIR/build" && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo "$SRC_DIR" && make -j 4 && env DESTDIR=$PKGDIR/root/ make install )
|
||||
pkgbuild --scripts build_tools/osx_package_scripts --root $PKGDIR/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" $PKGDIR/intermediates/fish.pkg
|
||||
|
||||
productbuild --package-path $PKGDIR/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ $OUTPUT_PATH/fish-$VERSION.pkg
|
||||
|
||||
|
||||
# Make the app
|
||||
xcodebuild -scheme fish.app -configuration Release DSTROOT=/tmp/fish_app/ SYMROOT=DerivedData/fish/Build/Products
|
||||
|
||||
cd DerivedData/fish/Build/Products/Release/
|
||||
zip -r $OUTPUT_PATH/fish-$VERSION.app.zip fish.app
|
||||
( cd "$PKGDIR/build" && make fish_macapp && zip -r "$OUTPUT_PATH/fish-$VERSION.app.zip" fish.app )
|
||||
|
||||
rm -r $PKGDIR
|
||||
|
||||
@@ -14,8 +14,7 @@ set -e
|
||||
# but to get the documentation in, we need to make a symlink called "fish-VERSION"
|
||||
# and tar from that, so that the documentation gets the right prefix
|
||||
|
||||
# We need GNU tar as that supports the --mtime option
|
||||
# BSD tar supports --mtree but keeping them in sync sounds too hard
|
||||
# We need GNU tar as that supports the --mtime and --transform options
|
||||
TAR=notfound
|
||||
for try in tar gtar gnutar; do
|
||||
if $try -Pcf /dev/null --mtime now /dev/null >/dev/null 2>&1; then
|
||||
@@ -48,26 +47,21 @@ rm -f "$path" "$path".gz
|
||||
# git starts the archive
|
||||
git archive --format=tar --prefix="$prefix"/ HEAD > "$path"
|
||||
|
||||
# tarball out the documentation, generate a configure script and version file
|
||||
autoreconf --no-recursive
|
||||
./configure --with-doxygen
|
||||
make doc share/man
|
||||
echo $VERSION > version
|
||||
|
||||
# tarball out the documentation, generate a version file
|
||||
PREFIX_TMPDIR=`mktemp -d`
|
||||
cd $PREFIX_TMPDIR
|
||||
echo $VERSION > version
|
||||
cmake $wd
|
||||
make doc
|
||||
|
||||
ln -s "$wd" "$prefix"
|
||||
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 --mode=g+w,a+rX"
|
||||
$TAR_APPEND --no-recursion "$prefix"/user_doc
|
||||
$TAR_APPEND "$prefix"/user_doc/html "$prefix"/share/man
|
||||
$TAR_APPEND "$prefix"/version
|
||||
$TAR_APPEND "$prefix"/configure "$prefix"/config.h.in
|
||||
rm "$prefix"/version
|
||||
unlink "$prefix"
|
||||
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \
|
||||
--mode=g+w,a+rX --transform s/^/$prefix\//"
|
||||
$TAR_APPEND --no-recursion user_doc
|
||||
$TAR_APPEND user_doc/html user_doc/man
|
||||
$TAR_APPEND version
|
||||
|
||||
cd -
|
||||
rmdir $PREFIX_TMPDIR
|
||||
rm -r "$PREFIX_TMPDIR"
|
||||
|
||||
# gzip it
|
||||
gzip "$path"
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/usr/bin/env fish
|
||||
#
|
||||
# This is meant to be run by "make style" or "make style-all". It is not meant to
|
||||
# be run directly from a shell prompt although it can be.
|
||||
#
|
||||
# This runs C++ files and fish scripts (*.fish) through their respective code
|
||||
# formatting programs.
|
||||
#
|
||||
|
||||
3
build_tools/ubsan.blacklist
Normal file
3
build_tools/ubsan.blacklist
Normal file
@@ -0,0 +1,3 @@
|
||||
# Ubuntu Xenial (used for Travis CI builds) ships libstdc++ 5.4.0 which contains undefined behaviour
|
||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63345
|
||||
object-size:*bits/stl_tree.h
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Expects to be called from Xcode (Run Script build phase),
|
||||
# write version number C preprocessor macro to header file.
|
||||
|
||||
ver="$SCRIPT_OUTPUT_FILE_0"
|
||||
|
||||
./build_tools/git_version_gen.sh
|
||||
|
||||
cmp --quiet "FISH-BUILD-VERSION-FILE" "$ver"
|
||||
if [ $? -ne 0 ]; then
|
||||
/bin/cp FISH-BUILD-VERSION-FILE "$ver"
|
||||
fi
|
||||
@@ -1,5 +1,29 @@
|
||||
# Detect curses.
|
||||
FIND_PACKAGE(Curses REQUIRED)
|
||||
# The following defines affect the environment configuration tests are run in:
|
||||
# CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_LIBRARIES,
|
||||
# and CMAKE_REQUIRED_INCLUDES
|
||||
# `wcstod_l` is a GNU-extension, sometimes hidden behind GNU-related defines.
|
||||
# This is the case for at least Cygwin and Newlib.
|
||||
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE=1)
|
||||
IF(APPLE)
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-Werror=unguarded-availability" REQUIRES_UNGUARDED_AVAILABILITY)
|
||||
IF(REQUIRES_UNGUARDED_AVAILABILITY)
|
||||
LIST(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Werror=unguarded-availability")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Try using CMake's own logic to locate curses/ncurses
|
||||
FIND_PACKAGE(Curses)
|
||||
IF(NOT ${CURSES_FOUND})
|
||||
# CMake has trouble finding platform-specific system libraries
|
||||
# installed to multiarch paths (e.g. /usr/lib/x86_64-linux-gnu)
|
||||
# if not symlinked or passed in as a manual define.
|
||||
MESSAGE("Falling back to pkg-config for (n)curses detection")
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_SEARCH_MODULE(CURSES REQUIRED ncurses curses)
|
||||
SET(CURSES_CURSES_LIBRARY ${CURSES_LIBRARIES})
|
||||
SET(CURSES_LIBRARY ${CURSES_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
# Get threads.
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
@@ -9,11 +33,6 @@ IF(CMAKE_VERSION VERSION_LESS 3.4.0)
|
||||
ENDIF()
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
|
||||
IF(APPLE)
|
||||
# 10.7+ only.
|
||||
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Werror=unguarded-availability")
|
||||
ENDIF()
|
||||
|
||||
# Detect WSL. Does not match against native Windows/WIN32.
|
||||
if (CMAKE_HOST_SYSTEM_VERSION MATCHES ".*-Microsoft")
|
||||
SET(WSL 1)
|
||||
@@ -50,13 +69,14 @@ CHECK_CXX_SYMBOL_EXISTS(mkostemp "stdlib.h;unistd.h" HAVE_MKOSTEMP)
|
||||
SET(HAVE_CURSES_H ${CURSES_HAVE_CURSES_H})
|
||||
SET(HAVE_NCURSES_CURSES_H ${CURSES_HAVE_NCURSES_CURSES_H})
|
||||
SET(HAVE_NCURSES_H ${CURSES_HAVE_NCURSES_H})
|
||||
CHECK_INCLUDE_FILES("curses.h;term.h" HAVE_TERM_H)
|
||||
CHECK_INCLUDE_FILE_CXX("ncurses/term.h" HAVE_NCURSES_TERM_H)
|
||||
IF(HAVE_CURSES_H)
|
||||
CHECK_INCLUDE_FILES("curses.h;term.h" HAVE_TERM_H)
|
||||
ENDIF()
|
||||
IF(NOT HAVE_TERM_H)
|
||||
CHECK_INCLUDE_FILE_CXX("ncurses/term.h" HAVE_NCURSES_TERM_H)
|
||||
ENDIF()
|
||||
CHECK_INCLUDE_FILE_CXX(siginfo.h HAVE_SIGINFO_H)
|
||||
CHECK_INCLUDE_FILE_CXX(spawn.h HAVE_SPAWN_H)
|
||||
CHECK_CXX_SYMBOL_EXISTS(std::wcscasecmp wchar.h HAVE_STD__WCSCASECMP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(std::wcsdup wchar.h HAVE_STD__WCSDUP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(std::wcsncasecmp wchar.h HAVE_STD__WCSNCASECMP)
|
||||
CHECK_STRUCT_HAS_MEMBER("struct stat" st_ctime_nsec "sys/stat.h" HAVE_STRUCT_STAT_ST_CTIME_NSEC
|
||||
LANGUAGE CXX)
|
||||
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtimespec.tv_nsec "sys/stat.h"
|
||||
@@ -68,35 +88,44 @@ CHECK_INCLUDE_FILE_CXX(sys/ioctl.h HAVE_SYS_IOCTL_H)
|
||||
CHECK_INCLUDE_FILE_CXX(sys/select.h HAVE_SYS_SELECT_H)
|
||||
CHECK_INCLUDE_FILES("sys/types.h;sys/sysctl.h" HAVE_SYS_SYSCTL_H)
|
||||
CHECK_INCLUDE_FILE_CXX(termios.h HAVE_TERMIOS_H) # Needed for TIOCGWINSZ
|
||||
|
||||
CHECK_CXX_SYMBOL_EXISTS(wcscasecmp wchar.h HAVE_WCSCASECMP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(wcsdup wchar.h HAVE_WCSDUP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(wcslcpy wchar.h HAVE_WCSLCPY)
|
||||
CHECK_CXX_SYMBOL_EXISTS(wcsncasecmp wchar.h HAVE_WCSNCASECMP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(wcsndup wchar.h HAVE_WCSNDUP)
|
||||
|
||||
CMAKE_PUSH_CHECK_STATE(RESET)
|
||||
# `wcstod_l` is a GNU-extension, sometimes hidden behind the following define
|
||||
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE=1)
|
||||
# `xlocale.h` is required to find `wcstod_l` in `wchar.h` under FreeBSD, but
|
||||
# it's not present under Linux.
|
||||
SET(WCSTOD_L_INCLUDES "")
|
||||
# These are for compatibility with Solaris 10, which places the following
|
||||
# in the std namespace.
|
||||
IF(NOT HAVE_WCSNCASECMP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(std::wcscasecmp wchar.h HAVE_STD__WCSCASECMP)
|
||||
ENDIF()
|
||||
IF(NOT HAVE_WCSDUP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(std::wcsdup wchar.h HAVE_STD__WCSDUP)
|
||||
ENDIF()
|
||||
IF(NOT HAVE_WCSNCASECMP)
|
||||
CHECK_CXX_SYMBOL_EXISTS(std::wcsncasecmp wchar.h HAVE_STD__WCSNCASECMP)
|
||||
ENDIF()
|
||||
|
||||
# `xlocale.h` is required to find `wcstod_l` in `wchar.h` under FreeBSD,
|
||||
# but it's not present under Linux.
|
||||
CHECK_INCLUDE_FILES("xlocale.h" HAVE_XLOCALE_H)
|
||||
IF(HAVE_XLOCALE_H)
|
||||
LIST(APPEND WCSTOD_L_INCLUDES "xlocale.h")
|
||||
ENDIF()
|
||||
LIST(APPEND WCSTOD_L_INCLUDES "wchar.h")
|
||||
CHECK_CXX_SYMBOL_EXISTS(wcstod_l "${WCSTOD_L_INCLUDES}" HAVE_WCSTOD_L)
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
|
||||
CHECK_CXX_SYMBOL_EXISTS(_sys_errs stdlib.h HAVE__SYS__ERRS)
|
||||
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_EXTRA_INCLUDE_FILES termios.h sys/ioctl.h)
|
||||
CHECK_TYPE_SIZE("struct winsize" STRUCT_WINSIZE LANGUAGE CXX)
|
||||
CHECK_CXX_SYMBOL_EXISTS("TIOCGWINSZ" "termios.h;sys/ioctl.h" HAVE_TIOCGWINSZ)
|
||||
IF(STRUCT_WINSIZE GREATER -1 AND HAVE_TIOCGWINSZ EQUAL 1)
|
||||
SET(HAVE_WINSIZE 1)
|
||||
ENDIF()
|
||||
SET(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
|
||||
IF(EXISTS "/proc/self/stat")
|
||||
SET(HAVE__PROC_SELF_STAT 1)
|
||||
@@ -119,7 +148,8 @@ ELSEIF(HAVE_NCURSES_TERM_H)
|
||||
SET(TPARM_INCLUDES "${TPARM_INCLUDES}#include <ncurses/term.h>\n")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY})
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY})
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
${TPARM_INCLUDES}
|
||||
|
||||
@@ -129,10 +159,24 @@ int main () {
|
||||
"
|
||||
TPARM_TAKES_VARARGS
|
||||
)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||
IF(NOT TPARM_TAKES_VARARGS)
|
||||
SET(TPARM_SOLARIS_KLUDGE 1)
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
${TPARM_INCLUDES}
|
||||
#define TPARM_VARARGS
|
||||
|
||||
int main () {
|
||||
tparm( \"\" );
|
||||
}
|
||||
"
|
||||
TPARM_TAKES_VARARGS_WITH_VARARGS
|
||||
)
|
||||
IF(NOT TPARM_TAKES_VARARGS)
|
||||
SET(TPARM_SOLARIS_KLUDGE 1)
|
||||
ELSE()
|
||||
SET(TPARM_VARARGS 1)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <memory>
|
||||
|
||||
155
cmake/Docs.cmake
155
cmake/Docs.cmake
@@ -1,15 +1,47 @@
|
||||
FIND_PACKAGE(Doxygen 1.8.7)
|
||||
FIND_PROGRAM(SPHINX_EXECUTABLE NAMES sphinx-build
|
||||
HINTS
|
||||
$ENV{SPHINX_DIR}
|
||||
PATH_SUFFIXES bin
|
||||
DOC "Sphinx documentation generator")
|
||||
|
||||
INCLUDE(FeatureSummary)
|
||||
|
||||
IF(DOXYGEN_FOUND)
|
||||
OPTION(BUILD_DOCS "build documentation (requires Doxygen)" ON)
|
||||
ELSE(DOXYGEN_FOUND)
|
||||
OPTION(BUILD_DOCS "build documentation (requires Doxygen)" OFF)
|
||||
ENDIF(DOXYGEN_FOUND)
|
||||
SET(SPHINX_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sphinx_doc_src")
|
||||
SET(SPHINX_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/user_doc")
|
||||
SET(SPHINX_BUILD_DIR "${SPHINX_ROOT_DIR}/build")
|
||||
SET(SPHINX_CACHE_DIR "${SPHINX_ROOT_DIR}/doctrees")
|
||||
SET(SPHINX_HTML_DIR "${SPHINX_ROOT_DIR}/html")
|
||||
SET(SPHINX_MANPAGE_DIR "${SPHINX_ROOT_DIR}/man")
|
||||
|
||||
IF(BUILD_DOCS AND NOT DOXYGEN_FOUND)
|
||||
MESSAGE(FATAL_ERROR "build documentation selected, but Doxygen could not be found")
|
||||
CONFIGURE_FILE("${SPHINX_SRC_DIR}/conf.py" "${SPHINX_BUILD_DIR}/conf.py" @ONLY)
|
||||
|
||||
ADD_CUSTOM_TARGET(sphinx-docs
|
||||
${SPHINX_EXECUTABLE}
|
||||
-q -b html
|
||||
-c "${SPHINX_SRC_DIR}"
|
||||
-d "${SPHINX_CACHE_DIR}"
|
||||
"${SPHINX_SRC_DIR}"
|
||||
"${SPHINX_HTML_DIR}"
|
||||
COMMENT "Building HTML documentation with Sphinx")
|
||||
|
||||
ADD_CUSTOM_TARGET(sphinx-manpages
|
||||
${SPHINX_EXECUTABLE}
|
||||
-q -b man
|
||||
-c "${SPHINX_SRC_DIR}"
|
||||
-d "${SPHINX_CACHE_DIR}"
|
||||
"${SPHINX_SRC_DIR}"
|
||||
# TODO: This only works if we only have section 1 manpages.
|
||||
"${SPHINX_MANPAGE_DIR}/man1"
|
||||
COMMENT "Building man pages with Sphinx")
|
||||
|
||||
IF(SPHINX_EXECUTABLE)
|
||||
OPTION(BUILD_DOCS "build documentation (requires Sphinx)" ON)
|
||||
ELSE(SPHINX_EXECUTABLE)
|
||||
OPTION(BUILD_DOCS "build documentation (requires Sphinx)" OFF)
|
||||
ENDIF(SPHINX_EXECUTABLE)
|
||||
|
||||
IF(BUILD_DOCS AND NOT SPHINX_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "build documentation selected, but sphinx-build could not be found")
|
||||
ENDIF()
|
||||
|
||||
IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/user_doc/html
|
||||
@@ -28,114 +60,13 @@ ENDIF()
|
||||
ADD_FEATURE_INFO(Documentation INSTALL_DOCS "user manual and documentation")
|
||||
|
||||
IF(BUILD_DOCS)
|
||||
# Files in ./share/completions/
|
||||
FILE(GLOB COMPLETIONS_DIR_FILES share/completions/*.fish)
|
||||
|
||||
# Files in ./share/functions/
|
||||
FILE(GLOB FUNCTIONS_DIR_FILES share/functions/*.fish)
|
||||
|
||||
# Files in doc_src
|
||||
FILE(GLOB DOC_SRC_FILES doc_src/*)
|
||||
|
||||
# .txt files in doc_src
|
||||
FILE(GLOB HELP_SRC doc_src/*.txt)
|
||||
|
||||
# These files are the source files, they contain a few @FOO@-style substitutions.
|
||||
# Note that this order defines the order that they appear in the documentation.
|
||||
SET(HDR_FILES_SRC doc_src/index.hdr.in doc_src/tutorial.hdr doc_src/design.hdr
|
||||
doc_src/license.hdr doc_src/commands.hdr.in doc_src/faq.hdr)
|
||||
|
||||
# These are the generated result files.
|
||||
STRING(REPLACE ".in" "" HDR_FILES "${HDR_FILES_SRC}")
|
||||
|
||||
# Header files except for index.hdr
|
||||
SET(HDR_FILES_NO_INDEX ${HDR_FILES})
|
||||
LIST(REMOVE_ITEM HDR_FILES_NO_INDEX doc_src/index.hdr)
|
||||
|
||||
# Copy doc_src files
|
||||
FILE(COPY ${DOC_SRC_FILES} DESTINATION doc_src)
|
||||
|
||||
# Build lexicon_filter.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT lexicon_filter
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_lexicon_filter.sh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/share/functions/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/share/completions/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lexicon_filter.in
|
||||
${SED}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/lexicon_filter
|
||||
&& chmod a+x ${CMAKE_CURRENT_BINARY_DIR}/lexicon_filter
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${FUNCTIONS_DIR_FILES} ${COMPLETIONS_DIR_FILES}
|
||||
doc_src/commands.hdr ${CMAKE_CURRENT_SOURCE_DIR}/lexicon_filter.in
|
||||
share/functions/__fish_config_interactive.fish
|
||||
build_tools/build_lexicon_filter.sh command_list_toc.txt)
|
||||
|
||||
# Other targets should depend on this target, otherwise the lexicon
|
||||
# filter can be built twice.
|
||||
ADD_CUSTOM_TARGET(build_lexicon_filter DEPENDS lexicon_filter)
|
||||
|
||||
#
|
||||
# commands.hdr collects documentation on all commands, functions and
|
||||
# builtins
|
||||
#
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc_src)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT doc_src/commands.hdr command_list_toc.txt
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_commands_hdr.sh ${HELP_SRC}
|
||||
< doc_src/commands.hdr.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/doc_src/commands.hdr
|
||||
DEPENDS ${HELP_SRC}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/doc_src/commands.hdr.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_commands_hdr.sh)
|
||||
|
||||
# doc.h is a compilation of the various snippets of text used both for
|
||||
# the user documentation and for internal help functions into a single
|
||||
# file that can be parsed by Doxygen to generate the user
|
||||
# documentation.
|
||||
ADD_CUSTOM_COMMAND(OUTPUT doc.h
|
||||
COMMAND cat ${HDR_FILES} > ${CMAKE_CURRENT_BINARY_DIR}/doc.h
|
||||
DEPENDS ${HDR_FILES})
|
||||
|
||||
# toc.txt: $(HDR_FILES:index.hdr=index.hdr.in) build_tools/build_toc_txt.sh | show-SED
|
||||
# FISH_BUILD_VERSION=${FISH_BUILD_VERSION} build_tools/build_toc_txt.sh \
|
||||
# $(HDR_FILES:index.hdr=index.hdr.in) > toc.txt
|
||||
# Note we would like to add doc_src/index.hdr.in as a dependency but CMake replaces this with
|
||||
# doc_src/index.hdr; CMake bug?
|
||||
ADD_CUSTOM_COMMAND(OUTPUT toc.txt
|
||||
COMMAND env `cat ${FBVF} | tr -d '\"'` ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_toc_txt.sh
|
||||
doc_src/index.hdr.in ${HDR_FILES_NO_INDEX}
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/toc.txt
|
||||
DEPENDS ${CFBVF} ${HDR_FILES_NO_INDEX})
|
||||
|
||||
# doc_src/index.hdr: toc.txt doc_src/index.hdr.in | show-AWK
|
||||
# @echo " AWK CAT $(em)$@$(sgr0)"
|
||||
# $v cat $@.in | $(AWK) '{if ($$0 ~ /@toc@/){ system("cat toc.txt");} else{ print $$0;}}' >$@
|
||||
ADD_CUSTOM_COMMAND(OUTPUT doc_src/index.hdr
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_index_hdr.sh toc.txt
|
||||
< doc_src/index.hdr.in
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/doc_src/index.hdr
|
||||
DEPENDS toc.txt)
|
||||
|
||||
# doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FILES) lexicon_filter
|
||||
# @echo " doxygen $(em)user_doc$(sgr0)"
|
||||
# $v (cat Doxyfile.user; echo INPUT_FILTER=./lexicon_filter; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION) | $(SED) "s/-.*//") | doxygen - && touch user_doc
|
||||
# $v rm -f $(wildcard $(addprefix ./user_doc/html/,arrow*.png bc_s.png bdwn.png closed.png doc.png folder*.png ftv2*.png nav*.png open.png splitbar.png sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html))
|
||||
ADD_CUSTOM_TARGET(doc ALL
|
||||
COMMAND env `cat ${FBVF}`
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_user_doc.sh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.user ./lexicon_filter
|
||||
DEPENDS ${CFBVF} Doxyfile.user ${DOC_SRC_FILES} doc.h ${HDR_FILES} build_lexicon_filter command_list_toc.txt)
|
||||
|
||||
ADD_CUSTOM_COMMAND(OUTPUT share/man/
|
||||
COMMAND env `cat ${FBVF} | tr -d '\"' `
|
||||
INPUT_FILTER=lexicon_filter ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/build_documentation.sh ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.help doc_src ./share
|
||||
DEPENDS ${CFBVF} ${HELP_SRC} build_lexicon_filter)
|
||||
|
||||
ADD_CUSTOM_TARGET(BUILD_MANUALS ALL DEPENDS share/man/)
|
||||
DEPENDS sphinx-docs sphinx-manpages)
|
||||
|
||||
# Group docs targets into a DocsTargets folder
|
||||
SET_PROPERTY(TARGET doc BUILD_MANUALS build_lexicon_filter
|
||||
SET_PROPERTY(TARGET doc sphinx-docs sphinx-manpages
|
||||
PROPERTY FOLDER cmake/DocTargets)
|
||||
|
||||
ELSEIF(HAVE_PREBUILT_DOCS)
|
||||
IF(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
# Out of tree build - link the prebuilt documentation to the build tree
|
||||
|
||||
@@ -153,8 +153,8 @@ INSTALL(DIRECTORY share/groff
|
||||
|
||||
# $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/
|
||||
# CONDEMNED_PAGE is managed by the conditional above
|
||||
# Building the man pages is optional: if doxygen isn't installed, they're not built
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/man/man1/
|
||||
# Building the man pages is optional: if sphinx isn't installed, they're not built
|
||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/user_doc/man/man1/
|
||||
DESTINATION ${rel_datadir}/fish/man/man1
|
||||
FILES_MATCHING
|
||||
PATTERN "*.1"
|
||||
|
||||
58
cmake/MacApp.cmake
Normal file
58
cmake/MacApp.cmake
Normal file
@@ -0,0 +1,58 @@
|
||||
# This is Mac-only.
|
||||
if (NOT APPLE)
|
||||
RETURN()
|
||||
endif (NOT APPLE)
|
||||
|
||||
# The source tree containing certain macOS resources.
|
||||
SET(OSX_DIR ${CMAKE_CURRENT_SOURCE_DIR}/osx)
|
||||
|
||||
SET(RESOURCE_FILES
|
||||
${OSX_DIR}/launch_fish.scpt
|
||||
${OSX_DIR}/fish_term_icon.icns
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build_tools/osx_package_scripts/add-shell
|
||||
${OSX_DIR}/install.sh
|
||||
)
|
||||
|
||||
# Resource files must be present in the source list.
|
||||
ADD_EXECUTABLE(fish_macapp EXCLUDE_FROM_ALL
|
||||
${OSX_DIR}/osx_fish_launcher.m
|
||||
${RESOURCE_FILES}
|
||||
)
|
||||
|
||||
# Compute the version. Note this is done at generation time, not build time,
|
||||
# so cmake must be re-run after version changes for the app to be updated. But
|
||||
# generally this will be run by make_pkg.sh which always re-runs cmake.
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/git_version_gen.sh --stdout
|
||||
COMMAND cut -d- -f1
|
||||
OUTPUT_VARIABLE FISH_SHORT_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
|
||||
# Note CMake appends .app, so the real output name will be fish.app.
|
||||
# This target does not include the 'base' resource.
|
||||
SET_TARGET_PROPERTIES(fish_macapp PROPERTIES OUTPUT_NAME "fish")
|
||||
|
||||
FIND_LIBRARY(FOUNDATION_LIB Foundation)
|
||||
TARGET_LINK_LIBRARIES(fish_macapp ${FOUNDATION_LIB})
|
||||
|
||||
SET_TARGET_PROPERTIES(fish_macapp PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST ${OSX_DIR}/CMakeMacAppInfo.plist.in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.ridiculousfish.fish-shell"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${FISH_SHORT_VERSION}
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
)
|
||||
|
||||
# The fish Mac app contains a fish installation inside the package.
|
||||
# Here is where it gets built.
|
||||
# Copy into the fish mac app after.
|
||||
SET(MACAPP_FISH_BUILDROOT ${CMAKE_CURRENT_BINARY_DIR}/macapp_buildroot/base)
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET fish_macapp POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${MACAPP_FISH_BUILDROOT}
|
||||
COMMAND DESTDIR=${MACAPP_FISH_BUILDROOT} ${CMAKE_COMMAND}
|
||||
--build ${CMAKE_CURRENT_BINARY_DIR} --target install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${MACAPP_FISH_BUILDROOT}/..
|
||||
$<TARGET_BUNDLE_CONTENT_DIR:fish_macapp>/Resources/
|
||||
)
|
||||
@@ -13,8 +13,8 @@ IF (PCRE2_LIB AND PCRE2_INCLUDE_DIR)
|
||||
MESSAGE(STATUS "Found system PCRE2 library ${PCRE2_INCLUDE_DIR}")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Using bundled PCRE2 library")
|
||||
ADD_SUBDIRECTORY(pcre2-10.22 EXCLUDE_FROM_ALL)
|
||||
SET(PCRE2_INCLUDE_DIR ${CMAKE_BINARY_DIR}/pcre2-10.22/)
|
||||
ADD_SUBDIRECTORY(pcre2-10.32 EXCLUDE_FROM_ALL)
|
||||
SET(PCRE2_INCLUDE_DIR ${CMAKE_BINARY_DIR}/pcre2-10.32/)
|
||||
SET(PCRE2_LIB pcre2-${PCRE2_WIDTH})
|
||||
endif(PCRE2_LIB AND PCRE2_INCLUDE_DIR)
|
||||
INCLUDE_DIRECTORIES(${PCRE2_INCLUDE_DIR})
|
||||
|
||||
@@ -23,12 +23,12 @@ IF(GETTEXT_FOUND)
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Intl_INCLUDE_DIR})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${Intl_LIBRARIES})
|
||||
# libintl.h can be compiled into the stdlib on some GLibC systems
|
||||
IF(Intl_FOUND AND Intl_LIBRARIES)
|
||||
SET(LIBINTL_INCLUDE "#include <libintl.h>")
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Intl_INCLUDE_DIR})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${Intl_LIBRARIES})
|
||||
ENDIF()
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
${LIBINTL_INCLUDE}
|
||||
@@ -40,3 +40,4 @@ int main () {
|
||||
}
|
||||
"
|
||||
HAVE__NL_MSG_CAT_CNTR)
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
|
||||
24
configure.ac
24
configure.ac
@@ -283,7 +283,7 @@ fi
|
||||
# Check presense of various header files
|
||||
#
|
||||
|
||||
AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h ncurses/curses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h])
|
||||
AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h ncurses/curses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h xlocale.h])
|
||||
|
||||
if test x$local_gettext != xno; then
|
||||
AC_CHECK_HEADERS([libintl.h])
|
||||
@@ -322,8 +322,25 @@ AC_CHECK_FUNCS( wcslcpy lrand48_r killpg )
|
||||
AC_CHECK_FUNCS( backtrace_symbols getifaddrs )
|
||||
AC_CHECK_FUNCS( futimens clock_gettime )
|
||||
AC_CHECK_FUNCS( getpwent flock )
|
||||
AC_CHECK_FUNCS( dirfd )
|
||||
|
||||
AC_MSG_CHECKING([dirfd])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM(
|
||||
[
|
||||
#include <dirent.h>
|
||||
DIR *dirp;
|
||||
], [
|
||||
return dirfd(dirp);
|
||||
]
|
||||
)
|
||||
]
|
||||
, [ AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_DIRFD], 1, [ Define to 1 if you have the `dirfd' function or macro. ])
|
||||
],
|
||||
[ AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
AC_CHECK_DECL( [__NetBSD__], AC_DEFINE([TPARM_VARARGS], 1, [ Make tparm take varargs ]) )
|
||||
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
|
||||
|
||||
#
|
||||
@@ -554,6 +571,7 @@ AC_COMPILE_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[
|
||||
#define TPARM_VARARGS 1
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
@@ -686,7 +704,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.22])
|
||||
AC_CONFIG_SUBDIRS([pcre2-10.32])
|
||||
|
||||
PCRE2_CXXFLAGS='-I$(PCRE2_DIR)/src'
|
||||
PCRE2_LIBS='-L$(PCRE2_LIBDIR) -lpcre2-$(PCRE2_WIDTH)'
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -3,7 +3,9 @@ Section: shells
|
||||
Priority: extra
|
||||
Maintainer: ridiculous_fish <corydoras@ridiculousfish.com>
|
||||
Uploaders: David Adam <zanchey@ucc.gu.uwa.edu.au>
|
||||
Build-Depends: debhelper (>= 9.0.0), libncurses5-dev, cmake3 (>= 3.2.0) | cmake (>= 3.2.0), gettext
|
||||
Build-Depends: debhelper (>= 9.0.0), libncurses5-dev, cmake3 (>= 3.2.0) | cmake (>= 3.2.0), gettext,
|
||||
# Test dependencies
|
||||
locales-all
|
||||
# When libpcre2-dev is available on all supported Debian versions, add a dependency on that.
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://fishshell.com/
|
||||
@@ -12,7 +14,7 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
|
||||
|
||||
Package: fish
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, fish-common (= ${source:Version}), passwd (>= 4.0.3-10), bc, gettext-base, man-db
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, fish-common (= ${source:Version}), passwd (>= 4.0.3-10), gettext-base, man-db
|
||||
Recommends: xsel (>=1.2.0)
|
||||
Description: friendly interactive shell
|
||||
Fish is a command-line shell for modern systems, focusing on user-friendliness,
|
||||
|
||||
3
debian/rules
vendored
3
debian/rules
vendored
@@ -18,6 +18,3 @@ override_dh_installdocs:
|
||||
# Consider transitioning https://wiki.debian.org/DebugPackage
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=fish-dbg
|
||||
|
||||
# Don't run tests; they don't work until fish is installed
|
||||
override_dh_auto_test:
|
||||
|
||||
@@ -1,253 +0,0 @@
|
||||
# Formatting guide for fish docs
|
||||
|
||||
The fish documentation has been updated to support Doxygen 1.8.7+, and while the main benefit of this change is extensive Markdown support, the addition of a fish lexicon and syntax filter, combined with semantic markup rules allows for automatic formatting enhancements across the HTML user_docs and man pages.
|
||||
|
||||
Initially my motivation was to fix a problem with long options ([Issue #1557](https://github.com/fish-shell/fish-shell/issues/1557) on GitHub), but as I worked on fixing the issue I realised there was an opportunity to simplify, reinforce and clarify the current documentation, hopefully making further contribution easier and cleaner, while allowing the documentation examples to presented more clearly with less author effort.
|
||||
|
||||
While the documentation is pretty robust to variations in the documentation source, adherence to the following style guide will help keep the already excellent documentation in good shape moving forward.
|
||||
|
||||
## 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. Doxygen is able to treat paragraphs as complete blocks. The semantic filter can see complete lines when deciding on how to apply syntax highlighting. In advanced pagers, such as 'most', man pages will consistently wrap to the width of the user's console.
|
||||
|
||||
## Doxygen special commands and aliases
|
||||
|
||||
While Markdown syntax forms the basis of the documentation content, there are some exceptions that require the use of Doxygen special commands. On the whole, Doxygen commands should be avoided, especially inline word formatting such as \\c as this would allow Doxygen to make unhelpful assumptions, such as converting double dashes (\--) to n-dashes (–).
|
||||
|
||||
### 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.
|
||||
|
||||
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:
|
||||
|
||||
\page universally_unique_page_id Page title
|
||||
|
||||
The source files that contain the page markers are currently:
|
||||
|
||||
- __index.hdr.in__: Core documentation
|
||||
- __commands.hdr.in__: Individual commands
|
||||
- __tutorial.hdr__: Tutorial
|
||||
- __design.hdr__: Design document
|
||||
- __faq.hdr__: Frequently Asked Questions
|
||||
- __license.hdr__: Fish and 3rd party licences
|
||||
|
||||
Unless there is a _VERY_ good reason and developer consensus, new pages should never be added.
|
||||
|
||||
The rest of the documentation is structured using \\section and \\subsection markers. Most of the source files (listed above) contain their full content, the exception being commands, which are separated out into source text files in the doc_src directory. These files are concatenated into one file, so each one starts with a \\section declaration. The synopsis, description and examples (if present) are declared as \\subsections. The format of these marks is practically identical to the page mark.
|
||||
|
||||
\section universally_unique_section_id Section title
|
||||
\subsection universally_unique_subsection_id Subsection title
|
||||
|
||||
Each page, section and subsection id _must_ be unique across the whole of the documentation, otherwise Doxygen will issue a warning.
|
||||
|
||||
### Semantic markup: the \\fish .. \\endfish block
|
||||
|
||||
While Doxygen has support for \\code..\\endcode blocks with enhanced markup and syntax colouring, it only understands the core Doxygen languages: C, C++, Objective C, Java, PHP, Python, Tcl and Fortran. To enhance Fish's syntax presentation, use the special \\fish..\\endfish blocks instead.
|
||||
|
||||
Text placed in this block will be parsed by Doxygen using the included lexicon filter (see lexicon_filter.in) as a Doxygen input filter. The filter is built during make so that it can pick up information on builtins, functions and shell commands mentioned in completions and apply markup to keywords found inside the \\fish block.
|
||||
|
||||
Basically, preformatted plain text inside the \\fish block is fed through the filter and is returned marked up so that Doxygen aliases can convert it back to a presentable form, according to the output document type.
|
||||
|
||||
For instance:
|
||||
|
||||
`echo hello world`
|
||||
|
||||
is transformed into:
|
||||
|
||||
`@cmnd{echo} @args{hello} @args{world}`
|
||||
|
||||
which is then transformed by Doxygen into an HTML version (`make doc`):
|
||||
|
||||
`<span class="command">echo</span> <span class="argument">hello</span> <span class="argument">world</span>`
|
||||
|
||||
And a man page version (`make share/man`):
|
||||
|
||||
__echo__ hello world
|
||||
|
||||
### Fonts
|
||||
|
||||
In older browsers, it was easy to set the fonts used for the three basic type styles (serif, sans-serif and monospace). Modern browsers have removed these options in their respective quests for simplification, assuming the content author will provide suitable styles for the content in the site's CSS, or the end user will provide overriding styles manually. Doxygen's default styling is very simple and most users will just accept this default.
|
||||
|
||||
I've tried to use a sensible set of fonts in the documentation's CSS based on 'good' terminal fonts and as a result the first preference font used throughout the documentation is '[DejaVu](https://dejavu-fonts.github.io)'. The rationale behind this is that while DejaVu is getting a little long in the tooth, it still provides the most complete support across serif, sans-serif and monospace styles (giving a well balanced feel and consistent [x-height](https://en.wikipedia.org/wiki/X-height)), has the widest support for extended Unicode characters and has a free, permissive licenses (though it's still incompatible with GPLv2, though arguably less so than the SIL Open Font license, though this is a moot point when using it solely in the docs).
|
||||
|
||||
#### Fonts inside \\fish blocks and \`backticks\`
|
||||
|
||||
As the point of these constructs is to make fish's syntax clearer to the user, it makes sense to mimic what the user will see in the console, therefore any content is formatted using the monospaced style, specifically monospaced fonts are chosen in the following order:
|
||||
|
||||
1. __DejaVu Sans Mono__: Explained above. [[↓](https://dejavu-fonts.github.io)]
|
||||
2. __Source Code Pro__: Monospaced code font, part of Adobe's free Edge Web Fonts. [[↓](https://edgewebfonts.adobe.com)]
|
||||
3. __Menlo__: Apple supplied variant of DejaVu.
|
||||
4. __Ubuntu Mono__: Ubuntu Linux's default monospaced font. [[↓](http://font.ubuntu.com)]
|
||||
5. __Consolas__: Modern Microsoft supplied console font.
|
||||
6. __Monaco__: Apple supplied console font since 1984!
|
||||
7. __Lucida Console__: Generic mono terminal font, standard in many OS's and distros.
|
||||
8. __monospace__: Catchall style. Chooses default monospaced font, often Courier.
|
||||
9. __fixed__: As above, more often used on mobile devices.
|
||||
|
||||
#### General Fonts
|
||||
|
||||
1. __DejaVu Sans__: As above.[[↓](https://dejavu-fonts.github.io)]
|
||||
2. __Roboto__: Elegant Google free font and is Doxygen's default [[↓](https://fonts.google.com/specimen/Roboto)]
|
||||
3. __Lucida Grande__: Default Apple OS X content font.
|
||||
4. __Calibri__: Default Microsoft Office font (since 2007).
|
||||
5. __Verdana__: Good general font found in a lot of OSs.
|
||||
6. __Helvetica Neue__: Better spaced and balanced Helvetica/Arial variant.
|
||||
7. __Helvetica__: Standard humanist typeface found almost everywhere.
|
||||
8. __Arial__: Microsoft's Helvetica.
|
||||
9. __sans-serif__: Catchall style. Chooses default sans-serif typeface, often Helvetica.
|
||||
|
||||
The ordering of the fonts is important as it's designed to allow the documentation to settle into a number of different identities according to the fonts available. If you have the complete DejaVu family installed, then the docs are presented using that, and if your Console is set up to use the same fonts, presentation will be completely consistent.
|
||||
|
||||
On OS X, with nothing extra installed, the docs will default to Menlo and Lucida Grande giving a Mac feel. Under Windows, it will default to using Consolas and Calibri on recent versions, giving a modern Windows style.
|
||||
|
||||
#### Other sources:
|
||||
|
||||
- [Font Squirrel](https://www.fontsquirrel.com): Good source of open source font packages.
|
||||
|
||||
### Choosing a CLI style: using a \\fish{style} block
|
||||
|
||||
By default, when output as HTML, a \\fish block uses syntax colouring suited to the style of the documentation rather than trying to mimic the terminal. The block has a light, bordered background and a colour scheme that 'suggests' what the user would see in a console.
|
||||
|
||||
Additional stying can be applied adding a style declaration:
|
||||
|
||||
\fish{additional_style [another_style...]}
|
||||
...
|
||||
\endfish
|
||||
|
||||
This will translate to classes applied to the `<div>` tag, like so:
|
||||
|
||||
<div class="fish additional_style another_style">
|
||||
...
|
||||
</div>
|
||||
|
||||
The various classes are defined in `doc_src/user_doc.css` and new style can be simply added
|
||||
|
||||
The documentation currently defines a couple of additional styles:
|
||||
|
||||
- __cli-dark__: Used in the _tutorial_ and _FAQ_ to simulate a dark background terminal, with fish's default colours (slightly tweaked for legibility in the browser).
|
||||
|
||||
- __synopsis__: A simple colour theme helpful for displaying the logical 'summary' of a command's syntax, options and structure.
|
||||
|
||||
## Markdown
|
||||
|
||||
Apart from the exceptions discussed above, the rest of the documentation now supports the use of Markdown. As such the use of Doxygen special commands for HTML tags is unnecessary.
|
||||
|
||||
There are a few exceptions and extensions to the Markdown [standard](https://daringfireball.net/projects/markdown/) that are documented in the Doxygen [documentation](https://www.stack.nl/~dimitri/doxygen/manual/markdown.html).
|
||||
|
||||
### \`Backticks\`
|
||||
|
||||
As is standard in Markdown and 'Github Flavoured Markdown' (GFM), backticks can be used to denote inline technical terms in the documentation, `like so`. In the documentation this will set the font to the monospaced 'console' typeface and will cause the enclosed term to stand out.
|
||||
|
||||
However, fenced code blocks using 4 spaces or 3 backticks (\`\`\`) should be avoided as Doxygen will interpret these as \\code blocks and try to apply standard syntax colouring, which doesn't work so well for fish examples. Use `\fish..\endfish` blocks instead.
|
||||
|
||||
### Lists
|
||||
|
||||
Standard Markdown list rules apply, but as Doxygen will collapse white space on output, combined with the use of long lines, it's a good idea to include an extra new line between long list items to assist future editing.
|
||||
|
||||
## Special cases
|
||||
|
||||
The following can be used in \\fish blocks to render some fish scenarios. These are mostly used in the tutorial when an interactive situation needs to be displayed.
|
||||
|
||||
### Custom formatting tags
|
||||
|
||||
```html
|
||||
<u>: <u>These words are underlined.</u>
|
||||
<s>: auto<s>suggestion</s>.
|
||||
<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.
|
||||
<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.
|
||||
```
|
||||
|
||||
### Prompts and cursors
|
||||
|
||||
```html
|
||||
>_: Display a basic prompt.
|
||||
~>_: Display a prompt with a the home directory as the current working directory.
|
||||
___ (3 underscores): Display a cursor.
|
||||
```
|
||||
|
||||
### Keyboard shortcuts: @key{} and @cursor_key{}
|
||||
|
||||
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.
|
||||
|
||||
- `@key{modifier,lable}`
|
||||
Displays a keystroke requiring the use of a 'modifier' key, such as 'Control-A', 'Shift-X', 'Alt-Tab' etc.
|
||||
|
||||
- `@key{modifier,entity,lable}`
|
||||
Displays a keystroke using a graphical entity, such as an arrow symbol for cursor key based shortcuts.
|
||||
|
||||
- `@cursor_key{entity,lable}`
|
||||
A special case for cursor keys, when no modifier is needed. i.e. `@cursor_key{↑,up}` for the up arrow key.
|
||||
|
||||
Some useful Unicode/HTML5 entities:
|
||||
|
||||
- Up arrow: `↑`
|
||||
- Down arrow: `↓`
|
||||
- Left arrow: `←`
|
||||
- Right arrow `→`
|
||||
- Shift: `⇧`
|
||||
- Tab: `⇥`
|
||||
- Mac option: `⌥`
|
||||
- Mac command: `⌘`
|
||||
|
||||
## Notes
|
||||
|
||||
### Doxygen
|
||||
|
||||
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.
|
||||
|
||||
Graphviz was also installed in all the above testing.
|
||||
|
||||
Doxygen 1.8.6 and lower do not have the \\htmlonly[block] directive which fixes a multitude of problems in the rendering of the docs. In Doxygen 1.8.7 the list of understood HTML entities was greatly increased. I tested earlier versions and many little issues returned.
|
||||
|
||||
As fish ships with pre-built documentation, I don't see this as an issue.
|
||||
|
||||
### Updated Configure/Makefile
|
||||
|
||||
- Tested on Ubuntu 14.04, CentOS 6.5 and Mac OS X 10.9.
|
||||
- Makefile has GNU/BSD sed/grep detection.
|
||||
|
||||
### HTML output
|
||||
|
||||
- The output HTML is HTML5 compliant, but should quickly and elegantly degrade on older browsers without losing basic structure.
|
||||
- The CSS avoids the use or browser specific extensions (i.e. -webkit, -moz etc), using the W3C HTML5 standard instead.
|
||||
- It's been tested in Chrome 37.0 and Firefox 32.0 on Mac OS X 10.9 (+Safari 7), Windows 8.1 (+Internet Explorer 11) and Ubuntu Desktop 14.04.
|
||||
- My assumption is basically that if someone cares enough to want to install fish, they'll be keeping a browser current.
|
||||
|
||||
### Man page output
|
||||
|
||||
- Tested on Ubuntu 14.04, CentOS 6.5 and Mac OS X 10.9.
|
||||
- Output is substantially cleaner.
|
||||
- Tested in cat, less, more and most pagers using the following fish script:
|
||||
|
||||
```
|
||||
function manTest --description 'Test manpage' --argument page
|
||||
set -l pager
|
||||
for i in $argv
|
||||
switch $i
|
||||
case "-l"
|
||||
set pager -P '/usr/bin/less -is'
|
||||
case "-m"
|
||||
set pager -P '/usr/bin/more -s'
|
||||
case "-c"
|
||||
set pager -P '/bin/cat'
|
||||
end
|
||||
end
|
||||
man $pager ~/Projects/OpenSource/fish-shell/share/man/man1/$page.1
|
||||
end
|
||||
|
||||
# Assumes 'most' is the default system pager.
|
||||
# NOT PORTABLE! Paths would be need to be updated on other systems.
|
||||
```
|
||||
|
||||
#### Author: Mark Griffiths [@GitHub](https://github.com/MarkGriffiths)
|
||||
@@ -1,80 +0,0 @@
|
||||
\section abbr abbr - manage fish abbreviations
|
||||
|
||||
\subsection abbr-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
abbr --add [SCOPE] WORD EXPANSION
|
||||
abbr --erase word
|
||||
abbr --rename [SCOPE] OLD_WORD NEW_WORD
|
||||
abbr --show
|
||||
abbr --list
|
||||
\endfish
|
||||
|
||||
\subsection abbr-description Description
|
||||
|
||||
`abbr` manages abbreviations - user-defined words that are replaced with longer phrases after they are entered.
|
||||
|
||||
For example, a frequently-run command like `git checkout` can be abbreviated to `gco`. After entering `gco` and pressing @key{Space} or @key{Enter}, the full text `git checkout` will appear in the command line.
|
||||
|
||||
\subsection abbr-options Options
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-a WORD EXPANSION` or `--add WORD EXPANSION` Adds a new abbreviation, causing WORD to be expanded to PHRASE.
|
||||
|
||||
- `-r OLD_WORD NEW_WORD` or `--rename OLD_WORD NEW_WORD` Renames an abbreviation, from OLD_WORD to NEW_WORD.
|
||||
|
||||
- `-s` or `--show` Show all abbreviations in a manner suitable for export and import.
|
||||
|
||||
- `-l` or `--list` Lists all abbreviated words.
|
||||
|
||||
- `-e WORD` or `--erase WORD` Erase the abbreviation WORD.
|
||||
|
||||
In addition, when adding abbreviations:
|
||||
|
||||
- `-g` or `--global` to use a global variable.
|
||||
- `-U` or `--universal` to use a universal variable (default).
|
||||
|
||||
See the "Internals" section for more on them.
|
||||
|
||||
\subsection abbr-example Examples
|
||||
|
||||
\fish
|
||||
abbr -a -g gco git checkout
|
||||
\endfish
|
||||
Add a new abbreviation where `gco` will be replaced with `git checkout` global to the current shell. This abbreviation will not be automatically visible to other shells unless the same command is run in those shells (such as when executing the commands in config.fish).
|
||||
|
||||
\fish
|
||||
abbr -a -U l less
|
||||
\endfish
|
||||
Add a new abbreviation where `l` will be replaced with `less` universal so all shells. Note that you omit the `-U` since it is the default.
|
||||
|
||||
\fish
|
||||
abbr -r gco gch
|
||||
\endfish
|
||||
Renames an existing abbreviation from `gco` to `gch`.
|
||||
|
||||
\fish
|
||||
abbr -e gco
|
||||
\endfish
|
||||
Erase the `gco` abbreviation.
|
||||
|
||||
\fish
|
||||
ssh another_host abbr -s | source
|
||||
\endfish
|
||||
Import the abbreviations defined on another_host over SSH.
|
||||
|
||||
\subsection abbr-internals Internals
|
||||
Each abbreviation is stored in its own global or universal variable. The name consists of the prefix `_fish_abbr_` followed by the WORD after being transformed by `string escape style=var`. The WORD cannot contain a space but all other characters are legal.
|
||||
|
||||
Defining an abbreviation with global scope is slightly faster than universal scope (which is the default). But in general you'll only want to use the global scope when defining abbreviations in a startup script like `~/.config/fish/config.fish` like this:
|
||||
|
||||
\fish
|
||||
if status --is-interactive
|
||||
abbr --add --global first 'echo my first abbreviation'
|
||||
abbr --add --global second 'echo my second abbreviation'
|
||||
abbr --add --global gco git checkout
|
||||
# etcetera
|
||||
end
|
||||
\endfish
|
||||
|
||||
You can create abbreviations interactively and they will be visible to other fish sessions if you use the `-U` or `--universal` flag or don't explicitly specify the scope and the abbreviation isn't already defined with global scope. If you want it to be visible only to the current shell use the `-g` or `--global` flag.
|
||||
@@ -1,41 +0,0 @@
|
||||
\section alias alias - create a function
|
||||
|
||||
\subsection alias-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
alias
|
||||
alias [OPTIONS] NAME DEFINITION
|
||||
alias [OPTIONS] NAME=DEFINITION
|
||||
\endfish
|
||||
|
||||
\subsection alias-description Description
|
||||
|
||||
`alias` is a simple wrapper for the `function` builtin, which creates a function wrapping a command. It has similar syntax to POSIX shell `alias`. For other uses, it is recommended to define a <a href='#function'>function</a>.
|
||||
|
||||
`fish` marks functions that have been created by `alias` by including the command used to create them in the function description. You can list `alias`-created functions by running `alias` without arguments. They must be erased using `functions -e`.
|
||||
|
||||
- `NAME` is the name of the alias
|
||||
- `DEFINITION` is the actual command to execute. The string `$argv` will be appended.
|
||||
|
||||
You cannot create an alias to a function with the same name. Note that spaces need to be escaped in the call to `alias` just like at the command line, _even inside quoted parts_.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-h` or `--help` displays help about using this command.
|
||||
|
||||
- `-s` or `--save` Automatically save the function created by the alias into your fish configuration directory using <a href='#funcsave'>funcsave</a>.
|
||||
|
||||
\subsection alias-example Example
|
||||
|
||||
The following code will create `rmi`, which runs `rm` with additional arguments on every invocation.
|
||||
|
||||
\fish
|
||||
alias rmi="rm -i"
|
||||
|
||||
# This is equivalent to entering the following function:
|
||||
function rmi --wraps rm --description 'alias rmi=rm -i'
|
||||
rm -i $argv
|
||||
end
|
||||
|
||||
# This needs to have the spaces escaped or "Chrome.app..." will be seen as an argument to "/Applications/Google":
|
||||
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome banana'
|
||||
\endfish
|
||||
@@ -1,23 +0,0 @@
|
||||
\section and and - conditionally execute a command
|
||||
|
||||
\subsection and-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
COMMAND1; and COMMAND2
|
||||
\endfish
|
||||
|
||||
\subsection and-description Description
|
||||
|
||||
`and` is used to execute a command if the previous command was successful (returned a status of 0).
|
||||
|
||||
`and` statements may be used as part of the condition in an <a href="#if">`if`</a> or <a href="#while">`while`</a> block. See the documentation for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
|
||||
|
||||
`and` does not change the current exit status itself, but the command it runs most likely will. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
|
||||
\subsection and-example Example
|
||||
|
||||
The following code runs the `make` command to build a program. If the build succeeds, `make`'s exit status is 0, and the program is installed. If either step fails, the exit status is 1, and `make clean` is run, which removes the files created by the build process.
|
||||
|
||||
\fish
|
||||
make; and make install; or make clean
|
||||
\endfish
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
\section argparse argparse - parse options passed to a fish script or function
|
||||
|
||||
\subsection argparse-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
argparse [OPTIONS] OPTION_SPEC... -- [ARG...]
|
||||
\endfish
|
||||
|
||||
\subsection argparse-description Description
|
||||
|
||||
This command makes it easy for fish scripts and functions to handle arguments in a manner 100% identical to how fish builtin commands handle their arguments. You pass a sequence of arguments that define the options recognized, followed by a literal `--`, then the arguments to be parsed (which might also include a literal `--`). More on this in the <a href="#argparse-usage">usage</a> section below.
|
||||
|
||||
Each OPTION_SPEC can be written in the domain specific language <a href="#argparse-option-specs">described below</a> or created using the companion <a href="#fish-opt">`fish_opt`</a> command. All OPTION_SPECs must appear after any argparse flags and before the `--` that separates them from the arguments to be parsed.
|
||||
|
||||
Each option that is seen in the ARG list will result in a var name of the form `_flag_X`, where `X` is the short flag letter and the long flag name. The OPTION_SPEC always requires a short flag even if it can't be used. So there will always be `_flag_X` var set using the short flag letter if the corresponding short or long flag is seen. The long flag name var (e.g., `_flag_help`) will only be defined, obviously, if the OPTION_SPEC includes a long flag name.
|
||||
|
||||
For example `_flag_h` and `_flag_help` if `-h` or `--help` is seen. The var will be set with local scope (i.e., as if the script had done `set -l _flag_X`). If the flag is a boolean (that is, does not have an associated value) the values are the short and long flags seen. If the option is not a boolean flag the values will be zero or more values corresponding to the values collected when the ARG list is processed. If the flag was not seen the flag var will not be set.
|
||||
|
||||
\subsection argparse-options Options
|
||||
|
||||
The following `argparse` options are available. They must appear before all OPTION_SPECs:
|
||||
|
||||
- `-n` or `--name` is the command name to insert into any error messages. If you don't provide this value `argparse` will be used.
|
||||
|
||||
- `-x` or `--exclusive` should be followed by a comma separated list of short of long options that are mutually exclusive. You can use this option more than once to define multiple sets of mutually exclusive options.
|
||||
|
||||
- `-N` or `--min-args` is followed by an integer that defines the minimum number of acceptable non-option arguments. The default is zero.
|
||||
|
||||
- `-X` or `--max-args` is followed by an integer that defines the maximum number of acceptable non-option arguments. The default is infinity.
|
||||
|
||||
- `-s` or `--stop-nonopt` causes scanning the arguments to stop as soon as the first non-option argument is seen. Using this arg is equivalent to calling the C function `getopt_long()` with the short options starting with a `+` symbol. This is sometimes known as "POSIXLY CORRECT". If this flag is not used then arguments are reordered (i.e., permuted) so that all non-option arguments are moved after option arguments. This mode has several uses but the main one is to implement a command that has subcommands.
|
||||
|
||||
- `-h` or `--help` displays help about using this command.
|
||||
|
||||
\subsection argparse-usage Usage
|
||||
|
||||
Using this command involves passing two sets of arguments separated by `--`. The first set consists of one or more option specifications (`OPTION_SPEC` above) and options that modify the behavior of `argparse`. These must be listed before the `--` argument. The second set are the arguments to be parsed in accordance with the option specifications. They occur after the `--` argument and can be empty. More about this below but here is a simple example that might be used in a function named `my_function`:
|
||||
|
||||
\fish
|
||||
argparse --name=my_function 'h/help' 'n/name=' -- $argv
|
||||
or return
|
||||
\endfish
|
||||
|
||||
If `$argv` is empty then there is nothing to parse and `argparse` returns zero to indicate success. If `$argv` is not empty then it is checked for flags `-h`, `--help`, `-n` and `--name`. If they are found they are removed from the arguments and local variables (more on this <a href="argparse-local-variables">below</a>) are set so the script can determine which options were seen. Assuming `$argv` doesn't have any errors, such as a missing mandatory value for an option, then `argparse` exits with status zero. Otherwise it writes appropriate error messages to stderr and exits with a status of one.
|
||||
|
||||
The `--` argument is required. You do not have to include any arguments after the `--` but you must include the `--`. For example, this is acceptable:
|
||||
|
||||
\fish
|
||||
set -l argv
|
||||
argparse 'h/help' 'n/name' -- $argv
|
||||
\endfish
|
||||
|
||||
But this is not:
|
||||
|
||||
\fish
|
||||
set -l argv
|
||||
argparse 'h/help' 'n/name' $argv
|
||||
\endfish
|
||||
|
||||
The first `--` seen is what allows the `argparse` command to reliably separate the option specifications from the command arguments.
|
||||
|
||||
\subsection argparse-option-specs Option Specifications
|
||||
|
||||
Each option specification is a string composed of
|
||||
|
||||
- A short flag letter (which is mandatory). It must be an alphanumeric or "#". The "#" character is special and means that a flag of the form `-123` is valid. The short flag "#" must be followed by "-" (since the short name isn't otherwise valid since `_flag_#` is not a valid var name) and must be followed by a long flag name with no modifiers.
|
||||
|
||||
- A `/` if the short flag can be used by someone invoking your command else `-` if it should not be exposed as a valid short flag. If there is no long flag name these characters should be omitted. You can also specify a '#' to indicate the short and long flag names can be used and the value can be specified as an implicit int; i.e., a flag of the form `-NNN`.
|
||||
|
||||
- A long flag name which is optional. If not present then only the short flag letter can be used.
|
||||
|
||||
- Nothing if the flag is a boolean that takes no argument or is an implicit int flag, else
|
||||
|
||||
- `=` if it requires a value and only the last instance of the flag is saved, else
|
||||
|
||||
- `=?` it takes an optional value and only the last instance of the flag is saved, else
|
||||
|
||||
- `=+` if it requires a value and each instance of the flag is saved.
|
||||
|
||||
- Optionally a `!` followed by fish script to validate the value. Typically this will be a function to run. If the return status is zero the value for the flag is valid. If non-zero the value is invalid. Any error messages should be written to stdout (not stderr). See the section on <a href="#arparse-validation">Flag Value Validation</a> for more information.
|
||||
|
||||
See the <a href="#fish-opt">`fish_opt`</a> command for a friendlier but more verbose way to create option specifications.
|
||||
|
||||
In the following examples if a flag is not seen when parsing the arguments then the corresponding _flag_X var(s) will not be set.
|
||||
|
||||
\subsection argparse-validation Flag Value Validation
|
||||
|
||||
It is common to want to validate the the value provided for an option satisfies some criteria. For example, that it is a valid integer within a specific range. You can always do this after `argparse` returns but you can also request that `argparse` perform the validation by executing arbitrary fish script. To do so simply append an `!` (exclamation-mark) then the fish script to be run. When that code is executed three vars will be defined:
|
||||
|
||||
- `_argparse_cmd` will be set to the value of the value of the `argparse --name` value.
|
||||
|
||||
- `_flag_name` will be set to the short or long flag that being processed.
|
||||
|
||||
- `_flag_value` will be set to the value associated with the flag being processed.
|
||||
|
||||
If you do this via a function it should be defined with the `--no-scope-shadowing` flag. Otherwise it won't have access to those variables.
|
||||
|
||||
The script should write any error messages to stdout, not stderr. It should return a status of zero if the flag value is valid otherwise a non-zero status to indicate it is invalid.
|
||||
|
||||
Fish ships with a `_validate_int` function that accepts a `--min` and `--max` flag. Let's say your command accepts a `-m` or `--max` flag and the minimum allowable value is zero and the maximum is 5. You would define the option like this: `m/max=!_validate_int --min 0 --max 5`. The default if you just call `_validate_int` without those flags is to simply check that the value is a valid integer with no limits on the min or max value allowed.
|
||||
|
||||
\subsection argparse-optspec-examples Example OPTION_SPECs
|
||||
|
||||
Some OPTION_SPEC examples:
|
||||
|
||||
- `h/help` means that both `-h` and `--help` are valid. The flag is a boolean and can be used more than once. If either flag is used then `_flag_h` and `_flag_help` will be set to the count of how many times either flag was seen.
|
||||
|
||||
- `h-help` means that only `--help` is valid. The flag is a boolean and can be used more than once. If the long flag is used then `_flag_h` and `_flag_help` will be set to the count of how many times the long flag was seen.
|
||||
|
||||
- `n/name=` means that both `-n` and `--name` are valid. It requires a value and can be used at most once. If the flag is seen then `_flag_n` and `_flag_name` will be set with the single mandatory value associated with the flag.
|
||||
|
||||
- `n/name=?` means that both `-n` and `--name` are valid. It accepts an optional value and can be used at most once. If the flag is seen then `_flag_n` and `_flag_name` will be set with the value associated with the flag if one was provided else it will be set with no values.
|
||||
|
||||
- `n-name=+` means that only `--name` is valid. It requires a value and can be used more than once. If the flag is seen then `_flag_n` and `_flag_name` will be set with the values associated with each occurrence of the flag.
|
||||
|
||||
- `x` means that only `-x` is valid. It is a boolean can can be used more than once. If it is seen then `_flag_x` will be set to the count of how many times the flag was seen.
|
||||
|
||||
- `x=`, `x=?`, and `x=+` are similar to the n/name examples above but there is no long flag alternative to the short flag `-x`.
|
||||
|
||||
- `x-` is not valid since there is no long flag name and therefore the short flag, `-x`, has to be usable.
|
||||
|
||||
- `#-max` means that flags matching the regex "^--?\d+$" are valid. When seen they are assigned to the variable `_flag_max`. This allows any valid positive or negative integer to be specified by prefixing it with a single "-". Many commands support this idiom. For example `head -3 /a/file` to emit only the first three lines of /a/file.
|
||||
|
||||
- `n#max` means that flags matching the regex "^--?\d+$" are valid. When seen they are assigned to the variables `_flag_n` and `_flag_max`. This allows any valid positive or negative integer to be specified by prefixing it with a single "-". Many commands support this idiom. For example `head -3 /a/file` to emit only the first three lines of /a/file. You can also specify the value using either flag: `-n NNN` or `--max NNN` in this example.
|
||||
|
||||
After parsing the arguments the `argv` var is set with local scope to any values not already consumed during flag processing. If there are not unbound values the var is set but `count $argv` will be zero.
|
||||
|
||||
If an error occurs during argparse processing it will exit with a non-zero status and print error messages to stderr.
|
||||
|
||||
\subsection argparse-notes Notes
|
||||
|
||||
Prior to the addition of this builtin command in the 2.7.0 release there were two main ways to parse the arguments passed to a fish script or function. One way was to use the OS provided `getopt` command. The problem with that is that the GNU and BSD implementations are not compatible. Which makes using that external command difficult other than in trivial situations. The other way is to iterate over `$argv` and use the fish `switch` statement to decide how to handle the argument. That, however, involves a huge amount of boilerplate code. It is also borderline impossible to implement the same behavior as builtin commands.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,46 +0,0 @@
|
||||
\section begin begin - start a new block of code
|
||||
|
||||
\subsection begin-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
begin; [COMMANDS...;] end
|
||||
\endfish
|
||||
|
||||
\subsection begin-description Description
|
||||
|
||||
`begin` is used to create a new block of code.
|
||||
|
||||
A block allows the introduction of a new variable scope, redirection of the input or output of a set of commands as a group, or to specify precedence when using the conditional commands like `and`.
|
||||
|
||||
The block is unconditionally executed. `begin; ...; end` is equivalent to `if true; ...; end`.
|
||||
|
||||
`begin` does not change the current exit status itself. After the block has completed, `$status` will be set to the status returned by the most recent command.
|
||||
|
||||
|
||||
\subsection begin-example Example
|
||||
|
||||
The following code sets a number of variables inside of a block scope. Since the variables are set inside the block and have local scope, they will be automatically deleted when the block ends.
|
||||
|
||||
\fish
|
||||
begin
|
||||
set -l PIRATE Yarrr
|
||||
|
||||
...
|
||||
end
|
||||
|
||||
echo $PIRATE
|
||||
# This will not output anything, since the PIRATE variable
|
||||
# went out of scope at the end of the block
|
||||
\endfish
|
||||
|
||||
In the following code, all output is redirected to the file out.html.
|
||||
|
||||
\fish
|
||||
begin
|
||||
echo $xml_header
|
||||
echo $html_header
|
||||
if test -e $file
|
||||
...
|
||||
end
|
||||
...
|
||||
end > out.html
|
||||
\endfish
|
||||
170
doc_src/bind.txt
170
doc_src/bind.txt
@@ -1,170 +0,0 @@
|
||||
\section bind bind - handle fish key bindings
|
||||
|
||||
\subsection bind-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
bind [(-M | --mode) MODE] [(-m | --sets-mode) NEW_MODE]
|
||||
[--preset | --user]
|
||||
[(-s | --silent)] [(-k | --key)] SEQUENCE COMMAND [COMMAND...]
|
||||
bind [(-M | --mode) MODE] [(-k | --key)] [--preset] [--user] SEQUENCE
|
||||
bind (-K | --key-names) [(-a | --all)] [--preset] [--user]
|
||||
bind (-f | --function-names)
|
||||
bind (-L | --list-modes)
|
||||
bind (-e | --erase) [(-M | --mode) MODE]
|
||||
[--preset] [--user]
|
||||
(-a | --all | [(-k | --key)] SEQUENCE [SEQUENCE...])
|
||||
\endfish
|
||||
|
||||
\subsection bind-description Description
|
||||
|
||||
`bind` adds a binding for the specified key sequence to the specified command.
|
||||
|
||||
SEQUENCE is the character sequence to bind to. These should be written as <a href="index.html#escapes">fish escape sequences</a>. For example, because pressing the Alt key and another character sends that character prefixed with an escape character, Alt-based key bindings can be written using the `\e` escape. For example, @key{Alt,w} can be written as `\ew`. The control character can be written in much the same way using the `\c` escape, for example @key{Control,X} (^X) can be written as `\cx`. Note that Alt-based key bindings are case sensitive and Control-based key bindings are not. This is a constraint of text-based terminals, not `fish`.
|
||||
|
||||
The default key binding can be set by specifying a `SEQUENCE` of the empty string (that is, ```''``` ). It will be used whenever no other binding matches. For most key bindings, it makes sense to use the `self-insert` function (i.e. ```bind '' self-insert```) as the default keybinding. This will insert any keystrokes not specifically bound to into the editor. Non- printable characters are ignored by the editor, so this will not result in control sequences being printable.
|
||||
|
||||
If the `-k` switch is used, the name of the key (such as 'down', 'up' or 'backspace') is used instead of a sequence. The names used are the same as the corresponding curses variables, but without the 'key_' prefix. (See `terminfo(5)` for more information, or use `bind --key-names` for a list of all available named keys.) If used in conjunction with the `-s` switch, `bind` will silently ignore bindings to named keys that are not found in termcap for the current `$TERMINAL`, otherwise a warning is emitted.
|
||||
|
||||
`COMMAND` can be any fish command, but it can also be one of a set of special input functions. These include functions for moving the cursor, operating on the kill-ring, performing tab completion, etc. Use `bind --function-names` for a complete list of these input functions.
|
||||
|
||||
When `COMMAND` is a shellscript command, it is a good practice to put the actual code into a <a href="#function">function</a> and simply bind to the function name. This way it becomes significantly easier to test the function while editing, and the result is usually more readable as well.
|
||||
|
||||
If a script produces output, it should finish by calling `commandline -f repaint` to tell fish that a repaint is in order.
|
||||
|
||||
When multiple `COMMAND`s are provided, they are all run in the specified order when the key is pressed. Note that special input functions cannot be combined with ordinary shell script commands. The commands must be entirely a sequence of special input functions (from `bind -f`) or all shell script commands (i.e., valid fish script).
|
||||
|
||||
If no `SEQUENCE` is provided, all bindings (or just the bindings in the specified `MODE`) are printed. If `SEQUENCE` is provided without `COMMAND`, just the binding matching that sequence is printed.
|
||||
|
||||
To save custom keybindings, put the `bind` statements into <a href="index.html#initialization">config.fish</a>. Alternatively, fish also automatically executes a function called `fish_user_key_bindings` if it exists.
|
||||
|
||||
Key bindings may use "modes", which mimics Vi's modal input behavior. The default mode is "default", and every bind applies to a single mode. The mode can be viewed/changed with the `$fish_bind_mode` variable.
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
- `-k` or `--key` Specify a key name, such as 'left' or 'backspace' instead of a character sequence
|
||||
|
||||
- `-K` or `--key-names` Display a list of available key names. Specifying `-a` or `--all` includes keys that don't have a known mapping
|
||||
|
||||
- `-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
|
||||
|
||||
- `-e` or `--erase` Erase the binding with the given sequence and mode instead of defining a new one. Multiple sequences can be specified with this flag. Specifying `-a` or `--all` with `-M` or `--mode` erases all binds in the given mode regardless of sequence. Specifying `-a` or `--all` without `-M` or `--mode` erases all binds in all modes regardless of sequence.
|
||||
|
||||
- `-a` or `--all` See `--erase` and `--key-names`
|
||||
|
||||
- `--preset` and `--user` specify if bind should operate on user or preset bindings. User bindings take precedence over preset bindings when fish looks up mappings. By default, all `bind` invocations work on the "user" level except for listing, which will show both levels. All invocations except for inserting new bindings can operate on both levels at the same time. `--preset` should only be used in full binding sets (like when working on `fish_vi_key_bindings`).
|
||||
|
||||
\subsection bind-functions Special input functions
|
||||
The following special input functions are available:
|
||||
|
||||
- `accept-autosuggestion`, accept the current autosuggestion completely
|
||||
|
||||
- `backward-char`, moves one character to the left
|
||||
|
||||
- `backward-bigword`, move one whitespace-delimited word to the left
|
||||
|
||||
- `backward-delete-char`, deletes one character of input to the left of the cursor
|
||||
|
||||
- `backward-kill-bigword`, move the whitespace-delimited word to the left of the cursor to the killring
|
||||
|
||||
- `backward-kill-line`, move everything from the beginning of the line to the cursor to the killring
|
||||
|
||||
- `backward-kill-path-component`, move one path component to the left of the cursor (everything from the last "/" or whitespace exclusive) to the killring
|
||||
|
||||
- `backward-kill-word`, move the word to the left of the cursor to the killring
|
||||
|
||||
- `backward-word`, move one word to the left
|
||||
|
||||
- `beginning-of-buffer`, moves to the beginning of the buffer, i.e. the start of the first line
|
||||
|
||||
- `beginning-of-history`, move to the beginning of the history
|
||||
|
||||
- `beginning-of-line`, move to the beginning of the line
|
||||
|
||||
- `begin-selection`, start selecting text
|
||||
|
||||
- `capitalize-word`, make the current word begin with a capital letter
|
||||
|
||||
- `complete`, guess the remainder of the current token
|
||||
|
||||
- `complete-and-search`, invoke the searchable pager on completion options (for convenience, this also moves backwards in the completion pager)
|
||||
|
||||
- `delete-char`, delete one character to the right of the cursor
|
||||
|
||||
- `downcase-word`, make the current word lowercase
|
||||
|
||||
- `end-of-buffer`, moves to the end of the buffer, i.e. the end of the first line
|
||||
|
||||
- `end-of-history`, move to the end of the history
|
||||
|
||||
- `end-of-line`, move to the end of the line
|
||||
|
||||
- `end-selection`, end selecting text
|
||||
|
||||
- `forward-bigword`, move one whitespace-delimited word to the right
|
||||
|
||||
- `forward-char`, move one character to the right
|
||||
|
||||
- `forward-word`, move one word to the right
|
||||
|
||||
- `history-search-backward`, search the history for the previous match
|
||||
|
||||
- `history-search-forward`, search the history for the next match
|
||||
|
||||
- `kill-bigword`, move the next whitespace-delimited word to the killring
|
||||
|
||||
- `kill-line`, move everything from the cursor to the end of the line to the killring
|
||||
|
||||
- `kill-selection`, move the selected text to the killring
|
||||
|
||||
- `kill-whole-line`, move the line to the killring
|
||||
|
||||
- `kill-word`, move the next word to the killring
|
||||
|
||||
- `pager-toggle-search`, toggles the search field if the completions pager is visible.
|
||||
|
||||
- `suppress-autosuggestion`, remove the current autosuggestion
|
||||
|
||||
- `swap-selection-start-stop`, go to the other end of the highlighted text without changing the selection
|
||||
|
||||
- `transpose-chars`, transpose two characters to the left of the cursor
|
||||
|
||||
- `transpose-words`, transpose two words to the left of the cursor
|
||||
|
||||
- `upcase-word`, make the current word uppercase
|
||||
|
||||
- `yank`, insert the latest entry of the killring into the buffer
|
||||
|
||||
- `yank-pop`, rotate to the previous entry of the killring
|
||||
|
||||
|
||||
\subsection bind-example Examples
|
||||
|
||||
\fish
|
||||
bind <asis>\\cd</asis> 'exit'
|
||||
\endfish
|
||||
Causes `fish` to exit when @key{Control,D} is pressed.
|
||||
|
||||
\fish
|
||||
bind -k ppage history-search-backward
|
||||
\endfish
|
||||
Performs a history search when the @key{Page Up} key is pressed.
|
||||
|
||||
\fish
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
bind -M insert \\cc kill-whole-line force-repaint
|
||||
\endfish
|
||||
Turns on Vi key bindings and rebinds @key{Control,C} to clear the input line.
|
||||
|
||||
|
||||
\subsection special-case-escape Special Case: The escape Character
|
||||
|
||||
The escape key can be used standalone, for example, to switch from insertion mode to normal mode when using Vi keybindings. Escape may also be used as a "meta" key, to indicate the start of an escape sequence, such as function or arrow keys. Custom bindings can also be defined that begin with an escape character.
|
||||
|
||||
fish waits for a period after receiving the escape character, to determine whether it is standalone or part of an escape sequence. While waiting, additional key presses make the escape key behave as a meta key. If no other key presses come in, it is handled as a standalone escape. The waiting period is set to 300 milliseconds (0.3 seconds) in the default key bindings and 10 milliseconds in the vi key bindings. It can be configured by setting the `fish_escape_delay_ms` variable to a value between 10 and 5000 ms. It is recommended that this be a universal variable that you set once from an interactive session.
|
||||
|
||||
Note: fish 2.2.0 and earlier used a default of 10 milliseconds, and provided no way to configure it. That effectively made it impossible to use escape as a meta key.
|
||||
@@ -1,46 +0,0 @@
|
||||
\section block block - temporarily block delivery of events
|
||||
|
||||
\subsection block-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
block [OPTIONS...]
|
||||
\endfish
|
||||
|
||||
\subsection block-description Description
|
||||
|
||||
`block` prevents events triggered by `fish` or the <a href="commands.html#emit">`emit`</a> command from being delivered and acted upon while the block is in place.
|
||||
|
||||
In functions, `block` can be useful while performing work that should not be interrupted by the shell.
|
||||
|
||||
The block can be removed. Any events which triggered while the block was in place will then be delivered.
|
||||
|
||||
Event blocks should not be confused with code blocks, which are created with `begin`, `if`, `while` or `for`
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
- `-l` or `--local` Release the block automatically at the end of the current innermost code block scope
|
||||
|
||||
- `-g` or `--global` Never automatically release the lock
|
||||
|
||||
- `-e` or `--erase` Release global block
|
||||
|
||||
|
||||
\subsection block-example Example
|
||||
|
||||
\fish
|
||||
# Create a function that listens for events
|
||||
function --on-event foo foo; echo 'foo fired'; end
|
||||
|
||||
# Block the delivery of events
|
||||
block -g
|
||||
|
||||
emit foo
|
||||
# No output will be produced
|
||||
|
||||
block -e
|
||||
# 'foo fired' will now be printed
|
||||
\endfish
|
||||
|
||||
|
||||
\subsection block-notes Notes
|
||||
|
||||
Note that events are only received from the current fish process as there is no way to send events from one fish process to another.
|
||||
@@ -1,25 +0,0 @@
|
||||
\section break break - stop the current inner loop
|
||||
|
||||
\subsection break-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
LOOP_CONSTRUCT; [COMMANDS...] break; [COMMANDS...] end
|
||||
\endfish
|
||||
|
||||
\subsection break-description Description
|
||||
|
||||
`break` halts a currently running loop, such as a <a href="#for">for</a> loop or a <a href="#while">while</a> loop. It is usually added inside of a conditional block such as an <a href="#if">if</a> statement or a <a href="#switch">switch</a> statement.
|
||||
|
||||
There are no parameters for `break`.
|
||||
|
||||
|
||||
\subsection break-example Example
|
||||
The following code searches all .c files for "smurf", and halts at the first occurrence.
|
||||
|
||||
\fish
|
||||
for i in *.c
|
||||
if grep smurf $i
|
||||
echo Smurfs are present in $i
|
||||
break
|
||||
end
|
||||
end
|
||||
\endfish
|
||||
@@ -1,14 +0,0 @@
|
||||
\section breakpoint breakpoint - Launch debug mode
|
||||
|
||||
\subsection breakpoint-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
breakpoint
|
||||
\endfish
|
||||
|
||||
\subsection breakpoint-description Description
|
||||
|
||||
`breakpoint` is used to halt a running script and launch an interactive debugging prompt.
|
||||
|
||||
For more details, see <a href="index.html#debugging">Debugging fish scripts</a> in the `fish` manual.
|
||||
|
||||
There are no parameters for `breakpoint`.
|
||||
@@ -1,22 +0,0 @@
|
||||
\section builtin builtin - run a builtin command
|
||||
|
||||
\subsection builtin-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
builtin BUILTINNAME [OPTIONS...]
|
||||
\endfish
|
||||
|
||||
\subsection builtin-description Description
|
||||
|
||||
`builtin` forces the shell to use a builtin command, rather than a function or program.
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
- `-n` or `--names` List the names of all defined builtins
|
||||
|
||||
|
||||
\subsection builtin-example Example
|
||||
|
||||
\fish
|
||||
builtin jobs
|
||||
# executes the jobs builtin, even if a function named jobs exists
|
||||
\endfish
|
||||
@@ -1,42 +0,0 @@
|
||||
\section case case - conditionally execute a block of commands
|
||||
|
||||
\subsection case-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
|
||||
\endfish
|
||||
|
||||
\subsection case-description Description
|
||||
|
||||
`switch` executes one of several blocks of commands, depending on whether a specified value matches one of several values. `case` is used together with the `switch` statement in order to determine which block should be executed.
|
||||
|
||||
Each `case` command is given one or more parameters. The first `case` command with a parameter that matches the string specified in the switch command will be evaluated. `case` parameters may contain wildcards. These need to be escaped or quoted in order to avoid regular wildcard expansion using filenames.
|
||||
|
||||
Note that fish does not fall through on case statements. Only the first matching case is executed.
|
||||
|
||||
Note that command substitutions in a case statement will be evaluated even if its body is not taken. All substitutions, including command substitutions, must be performed before the value can be compared against the parameter.
|
||||
|
||||
|
||||
\subsection case-example Example
|
||||
|
||||
Say \$animal contains the name of an animal. Then this code would classify it:
|
||||
|
||||
\fish
|
||||
switch $animal
|
||||
case cat
|
||||
echo evil
|
||||
case wolf dog human moose dolphin whale
|
||||
echo mammal
|
||||
case duck goose albatross
|
||||
echo bird
|
||||
case shark trout stingray
|
||||
echo fish
|
||||
# Note that the next case has a wildcard which is quoted
|
||||
case '*'
|
||||
echo I have no idea what a $animal is
|
||||
end
|
||||
\endfish
|
||||
|
||||
If the above code was run with `$animal` set to `whale`, the output
|
||||
would be `mammal`.
|
||||
|
||||
If `$animal` was set to "banana", it would print "I have no idea what a banana is".
|
||||
@@ -1,33 +0,0 @@
|
||||
\section cd cd - change directory
|
||||
|
||||
\subsection cd-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
cd [DIRECTORY]
|
||||
\endfish
|
||||
|
||||
\subsection cd-description Description
|
||||
`cd` changes the current working directory.
|
||||
|
||||
If `DIRECTORY` is supplied, it will become the new directory. If no parameter is given, the contents of the `HOME` environment variable will be used.
|
||||
|
||||
If `DIRECTORY` is a relative path, the paths found in the `CDPATH` environment variable array will be tried as prefixes for the specified path.
|
||||
|
||||
Note that the shell will attempt to change directory without requiring `cd` if the name of a directory is provided (starting with `.`, `/` or `~`, or ending with `/`).
|
||||
|
||||
Fish also ships a wrapper function around the builtin `cd` that understands `cd -` as changing to the previous directory. See also <a href="commands.html#prevd">`prevd`</a>. This wrapper function maintains a history of the 25 most recently visited directories in the `$dirprev` and `$dirnext` global variables. If you make those universal variables your `cd` history is shared among all fish instances.
|
||||
|
||||
As a special case, `cd .` is equivalent to `cd $PWD`, which is useful in cases where a mountpoint has been recycled or a directory has been removed and recreated.
|
||||
|
||||
\subsection cd-example Examples
|
||||
|
||||
\fish
|
||||
cd
|
||||
# changes the working directory to your home directory.
|
||||
|
||||
cd /usr/src/fish-shell
|
||||
# changes the working directory to /usr/src/fish-shell
|
||||
\endfish
|
||||
|
||||
\subsection cd-see-also See Also
|
||||
|
||||
See also the <a href="commands.html#cdh">`cdh`</a> command for changing to a recently visited directory.
|
||||
@@ -1,16 +0,0 @@
|
||||
\section cdh cdh - change to a recently visited directory
|
||||
|
||||
\subsection cdh-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
cdh [ directory ]
|
||||
\endfish
|
||||
|
||||
\subsection cdh-description Description
|
||||
|
||||
`cdh` with no arguments presents a list of recently visited directories. You can then select one of the entries by letter or number. You can also press @key{tab} to use the completion pager to select an item from the list. If you give it a single argument it is equivalent to `cd directory`.
|
||||
|
||||
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates. If you make those universal variables your `cd` history is shared among all fish instances.
|
||||
|
||||
\subsection cdh-see-also See Also
|
||||
|
||||
See also the <a href="commands.html#prevd">`prevd`</a> and <a href="commands.html#pushd">`pushd`</a> commands which also work with the recent `cd` history and are provided for compatibility with other shells.
|
||||
@@ -1,30 +0,0 @@
|
||||
\section command command - run a program
|
||||
|
||||
\subsection command-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
command [OPTIONS] COMMANDNAME [ARGS...]
|
||||
\endfish
|
||||
|
||||
\subsection command-description Description
|
||||
|
||||
`command` forces the shell to execute the program `COMMANDNAME` and ignore any functions or builtins with the same name.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-a` or `--all` returns all the external commands that are found in `$PATH` in the order they are found.
|
||||
|
||||
- `-q` or `--quiet`, in conjunction with `-s`, silences the output and prints nothing, setting only the exit code.
|
||||
|
||||
- `-s` or `--search` returns the name of the external command that would be executed, or nothing if no file with the specified name could be found in the `$PATH`.
|
||||
|
||||
With the `-s` option, `command` treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found. Additionally passing a `-q` or `--quiet` option prevents any paths from being printed, like `type -q`, for testing only the exit status.
|
||||
|
||||
For basic compatibility with POSIX `command`, the `-v` flag is recognized as an alias for `-s`.
|
||||
|
||||
\subsection command-example Examples
|
||||
|
||||
`command ls` causes fish to execute the `ls` program, even if an `ls` function exists.
|
||||
|
||||
`command -s ls` returns the path to the `ls` program.
|
||||
|
||||
`command -sq git; and command git log` runs `git log` only if `git` exists.
|
||||
@@ -1,82 +0,0 @@
|
||||
\section commandline commandline - set or get the current command line buffer
|
||||
|
||||
\subsection commandline-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
commandline [OPTIONS] [CMD]
|
||||
\endfish
|
||||
|
||||
\subsection commandline-description Description
|
||||
|
||||
`commandline` can be used to set or get the current contents of the command line buffer.
|
||||
|
||||
With no parameters, `commandline` returns the current value of the command line.
|
||||
|
||||
With `CMD` specified, the command line buffer is erased and replaced with the contents of `CMD`.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-C` or `--cursor` set or get the current cursor position, not the contents of the buffer. If no argument is given, the current cursor position is printed, otherwise the argument is interpreted as the new cursor position.
|
||||
|
||||
- `-f` or `--function` inject readline functions into the reader. This option cannot be combined with any other option. It will cause any additional arguments to be interpreted as readline functions, and these functions will be injected into the reader, so that they will be returned to the reader before any additional actual key presses are read.
|
||||
|
||||
The following options change the way `commandline` updates the command line buffer:
|
||||
|
||||
- `-a` or `--append` do not remove the current commandline, append the specified string at the end of it
|
||||
|
||||
- `-i` or `--insert` do not remove the current commandline, insert the specified string at the current cursor position
|
||||
|
||||
- `-r` or `--replace` remove the current commandline and replace it with the specified string (default)
|
||||
|
||||
The following options change what part of the commandline is printed or updated:
|
||||
|
||||
- `-b` or `--current-buffer` select the entire buffer, including any displayed autosuggestion (default)
|
||||
|
||||
- `-j` or `--current-job` select the current job
|
||||
|
||||
- `-p` or `--current-process` select the current process
|
||||
|
||||
- `-s` or `--current-selection` selects the current selection
|
||||
|
||||
- `-t` or `--current-token` select the current token
|
||||
|
||||
The following options change the way `commandline` prints the current commandline buffer:
|
||||
|
||||
- `-c` or `--cut-at-cursor` only print selection up until the current cursor position
|
||||
|
||||
- `-o` or `--tokenize` tokenize the selection and print one string-type token per line
|
||||
|
||||
If `commandline` is called during a call to complete a given string using `complete -C STRING`, `commandline` will consider the specified string to be the current contents of the command line.
|
||||
|
||||
The following options output metadata about the commandline state:
|
||||
|
||||
- `-L` or `--line` print the line that the cursor is on, with the topmost line starting at 1
|
||||
|
||||
- `-S` or `--search-mode` evaluates to true if the commandline is performing a history search
|
||||
|
||||
- `-P` or `--paging-mode` evaluates to true if the commandline is showing pager contents, such as tab completions
|
||||
|
||||
|
||||
\subsection commandline-example Example
|
||||
|
||||
`commandline -j $history[3]` replaces the job under the cursor with the third item from the command line history.
|
||||
|
||||
If the commandline contains
|
||||
\fish
|
||||
>_ echo $fl___ounder >&2 | less; and echo $catfish
|
||||
\endfish
|
||||
|
||||
(with the cursor on the "o" of "flounder")
|
||||
|
||||
Then the following invocations behave like this:
|
||||
\fish
|
||||
>_ commandline -t
|
||||
$flounder
|
||||
>_ commandline -ct
|
||||
$fl
|
||||
>_ commandline -b # or just commandline
|
||||
echo $flounder >&2 | less; and echo $catfish
|
||||
>_ commandline -p
|
||||
echo $flounder >&2
|
||||
>_ commandline -j
|
||||
echo $flounder >&2 | less
|
||||
\endfish
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
\page commands Commands
|
||||
\htmlonly[block]
|
||||
<div class="fish_left_bar">
|
||||
<div class="logo"></div>
|
||||
<div class="menu commands_menu">
|
||||
\endhtmlonly
|
||||
@command_list_toc@
|
||||
|
||||
\htmlonly[block]
|
||||
</div>
|
||||
</div>
|
||||
<div class="commands fish_right_bar">
|
||||
<h1 class="interior_title">Command reference</h1>
|
||||
\endhtmlonly
|
||||
`fish` ships with a large number of builtin commands, shellscript functions and external commands. These are all described below.
|
||||
|
||||
Almost all fish commands respond to the `-h` or `--help` options to display their relevant help, also accessible using the `help` and `man` commands, like so:
|
||||
|
||||
\fish
|
||||
echo -h
|
||||
echo --help
|
||||
# Prints help to the terminal window
|
||||
|
||||
man echo
|
||||
# Displays the man page in the system pager
|
||||
# (normally 'less', 'more' or 'most').
|
||||
|
||||
help echo
|
||||
# Open a web browser to show the relevant documentation
|
||||
\endfish
|
||||
|
||||
@command_list@
|
||||
|
||||
\htmlonly[block]
|
||||
</div>
|
||||
\endhtmlonly
|
||||
*/
|
||||
@@ -1,131 +0,0 @@
|
||||
\section complete complete - edit command specific tab-completions
|
||||
|
||||
\subsection complete-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
complete ( -c | --command | -p | --path ) COMMAND
|
||||
[( -c | --command | -p | --path ) COMMAND]...
|
||||
[( -e | --erase )]
|
||||
[( -s | --short-option ) SHORT_OPTION]...
|
||||
[( -l | --long-option | -o | --old-option ) LONG_OPTION]...
|
||||
[( -a | --arguments ) OPTION_ARGUMENTS]
|
||||
[( -k | --keep-order )]
|
||||
[( -f | --no-files )]
|
||||
[( -r | --require-parameter )]
|
||||
[( -x | --exclusive )]
|
||||
[( -w | --wraps ) WRAPPED_COMMAND]...
|
||||
[( -n | --condition ) CONDITION]
|
||||
[( -d | --description ) DESCRIPTION]
|
||||
complete ( -C[STRING] | --do-complete[=STRING] )
|
||||
\endfish
|
||||
|
||||
\subsection complete-description Description
|
||||
|
||||
For an introduction to specifying completions, see <a
|
||||
href='index.html#completion-own'>Writing your own completions</a> in
|
||||
the fish manual.
|
||||
|
||||
- `COMMAND` is the name of the command for which to add a completion.
|
||||
|
||||
- `SHORT_OPTION` is a one character option for the command.
|
||||
|
||||
- `LONG_OPTION` is a multi character option for the command.
|
||||
|
||||
- `OPTION_ARGUMENTS` is parameter containing a space-separated list of possible option-arguments, which may contain command substitutions.
|
||||
|
||||
- `DESCRIPTION` is a description of what the option and/or option arguments do.
|
||||
|
||||
- `-c COMMAND` or `--command COMMAND` specifies that `COMMAND` is the name of the command.
|
||||
|
||||
- `-p COMMAND` or `--path COMMAND` specifies that `COMMAND` is the absolute path of the program (optionally containing wildcards).
|
||||
|
||||
- `-e` or `--erase` deletes the specified completion.
|
||||
|
||||
- `-s SHORT_OPTION` or `--short-option=SHORT_OPTION` adds a short option to the completions list.
|
||||
|
||||
- `-l LONG_OPTION` or `--long-option=LONG_OPTION` adds a GNU style long option to the completions list.
|
||||
|
||||
- `-o LONG_OPTION` or `--old-option=LONG_OPTION` adds an old style long option to the completions list (See below for details).
|
||||
|
||||
- `-a OPTION_ARGUMENTS` or `--arguments=OPTION_ARGUMENTS` adds the specified option arguments to the completions list.
|
||||
|
||||
- `-k` or `--keep-order` preserves the order of the `OPTION_ARGUMENTS` specified via `-a` or `--arguments` instead of sorting alphabetically.
|
||||
|
||||
- `-f` or `--no-files` specifies that the options specified by this completion may not be followed by a filename.
|
||||
|
||||
- `-r` or `--require-parameter` specifies that the options specified by this completion always must have an option argument, i.e. may not be followed by another option.
|
||||
|
||||
- `-x` or `--exclusive` implies both `-r` and `-f`.
|
||||
|
||||
- `-w WRAPPED_COMMAND` or `--wraps=WRAPPED_COMMAND` causes the specified command to inherit completions from the wrapped command (See below for details).
|
||||
|
||||
- `-n` or `--condition` specifies a shell command that must return 0 if the completion is to be used. This makes it possible to specify completions that should only be used in some cases.
|
||||
|
||||
- `-CSTRING` or `--do-complete=STRING` makes complete try to find all possible completions for the specified string.
|
||||
|
||||
- `-C` or `--do-complete` with no argument makes complete try to find all possible completions for the current command line buffer. If the shell is not in interactive mode, an error is returned.
|
||||
|
||||
- `-A` and `--authoritative` no longer do anything and are silently ignored.
|
||||
|
||||
- `-u` and `--unauthoritative` no longer do anything and are silently ignored.
|
||||
|
||||
Command specific tab-completions in `fish` are based on the notion of options and arguments. An option is a parameter which begins with a hyphen, such as '`-h`', '`-help`' or '`--help`'. Arguments are parameters that do not begin with a hyphen. Fish recognizes three styles of options, the same styles as the GNU version of the getopt library. These styles are:
|
||||
|
||||
- Short options, like '`-a`'. Short options are a single character long, are preceded by a single hyphen and may be grouped together (like '`-la`', which is equivalent to '`-l -a`'). Option arguments may be specified in the following parameter ('`-w 32`') or by appending the option with the value ('`-w32`').
|
||||
|
||||
- Old style long options, like '`-Wall`'. Old style long options can be more than one character long, are preceded by a single hyphen and may not be grouped together. Option arguments are specified in the following parameter ('`-ao null`').
|
||||
|
||||
- GNU style long options, like '`--colors`'. GNU style long options can be more than one character long, are preceded by two hyphens, and may not be grouped together. Option arguments may be specified in the following parameter ('`--quoting-style shell`') or by appending the option with a '`=`' and the value ('`--quoting-style=shell`'). GNU style long options may be abbreviated so long as the abbreviation is unique ('`--h`') is equivalent to '`--help`' if help is the only long option beginning with an 'h').
|
||||
|
||||
The options for specifying command name and command path may be used multiple times to define the same completions for multiple commands.
|
||||
|
||||
The options for specifying command switches and wrapped commands may be used multiple times to define multiple completions for the command(s) in a single call.
|
||||
|
||||
Invoking `complete` multiple times for the same command adds the new definitions on top of any existing completions defined for the command.
|
||||
|
||||
When `-a` or `--arguments` is specified in conjunction with long, short, or old style options, the specified arguments are only used as completions when attempting to complete an argument for any of the specified options. If `-a` or `--arguments` is specified without any long, short, or old style options, the specified arguments are used when completing any argument to the command (except when completing an option argument that was specified with `-r` or `--require-parameter`).
|
||||
|
||||
Command substitutions found in `OPTION_ARGUMENTS` are not expected to return a space-separated list of arguments. Instead they must return a newline-separated list of arguments, and each argument may optionally have a tab character followed by the argument description. Any description provided in this way overrides a description given with `-d` or `--description`.
|
||||
|
||||
The `-w` or `--wraps` options causes the specified command to inherit completions from another command. The inheriting command is said to "wrap" the inherited command. The wrapping command may have its own completions in addition to inherited ones. A command may wrap multiple commands, and wrapping is transitive: if A wraps B, and B wraps C, then A automatically inherits all of C's completions. Wrapping can be removed using the `-e` or `--erase` options. Note that wrapping only works for completions specified with `-c` or `--command` and are ignored when specifying completions with `-p` or `--path`.
|
||||
|
||||
When erasing completions, it is possible to either erase all completions for a specific command by specifying `complete -c COMMAND -e`, or by specifying a specific completion option to delete by specifying either a long, short or old style option.
|
||||
|
||||
|
||||
\subsection complete-example Example
|
||||
|
||||
The short style option `-o` for the `gcc` command requires that a file follows it. This can be done using writing:
|
||||
|
||||
\fish
|
||||
complete -c gcc -s o -r
|
||||
\endfish
|
||||
|
||||
The short style option `-d` for the `grep` command requires that one of the strings '`read`', '`skip`' or '`recurse`' is used. This can be specified writing:
|
||||
|
||||
\fish
|
||||
complete -c grep -s d -x -a "read skip recurse"
|
||||
\endfish
|
||||
|
||||
The `su` command takes any username as an argument. Usernames are given as the first colon-separated field in the file /etc/passwd. This can be specified as:
|
||||
|
||||
\fish
|
||||
complete -x -c su -d "Username" -a "(cat /etc/passwd | cut -d : -f 1)"
|
||||
\endfish
|
||||
|
||||
The `rpm` command has several different modes. If the `-e` or `--erase` flag has been specified, `rpm` should delete one or more packages, in which case several switches related to deleting packages are valid, like the `nodeps` switch.
|
||||
|
||||
This can be written as:
|
||||
|
||||
\fish
|
||||
complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d "Don't check dependencies"
|
||||
\endfish
|
||||
|
||||
where `__fish_contains_opt` is a function that checks the command line buffer for the presence of a specified set of options.
|
||||
|
||||
To implement an alias, use the `-w` or `--wraps` option:
|
||||
|
||||
\fish
|
||||
complete -c hub -w git
|
||||
\endfish
|
||||
|
||||
Now hub inherits all of the completions from git. Note this can also be specified in a function declaration.
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
\section contains contains - test if a word is present in a list
|
||||
|
||||
\subsection contains-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
contains [OPTIONS] KEY [VALUES...]
|
||||
\endfish
|
||||
|
||||
\subsection contains-description Description
|
||||
|
||||
`contains` tests whether the set `VALUES` contains the string `KEY`. If so, `contains` exits with status 0; if not, it exits with status 1.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-i` or `--index` print the word index
|
||||
|
||||
Note that, like GNU tools and most of fish's builtins, `contains` interprets all arguments starting with a `-` as options to contains, until it reaches an argument that is `--` (two dashes). See the examples below.
|
||||
|
||||
\subsection contains-example Example
|
||||
|
||||
If $animals is a list of animals, the following will test if it contains a cat:
|
||||
|
||||
\fish
|
||||
if contains cat $animals
|
||||
echo Your animal list is evil!
|
||||
end
|
||||
\endfish
|
||||
|
||||
This code will add some directories to $PATH if they aren't yet included:
|
||||
|
||||
\fish
|
||||
for i in ~/bin /usr/local/bin
|
||||
if not contains $i $PATH
|
||||
set PATH $PATH $i
|
||||
end
|
||||
end
|
||||
\endfish
|
||||
|
||||
While this will check if `hasargs` was run with the `-q` option:
|
||||
|
||||
\fish
|
||||
function hasargs
|
||||
if contains -- -q $argv
|
||||
echo '$argv contains a -q option'
|
||||
end
|
||||
end
|
||||
\endfish
|
||||
|
||||
The `--` here stops `contains` from treating `-q` to an option to itself. Instead it treats it as a normal string to check.
|
||||
@@ -1,26 +0,0 @@
|
||||
\section continue continue - skip the remainder of the current iteration of the current inner loop
|
||||
|
||||
\subsection continue-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
LOOP_CONSTRUCT; [COMMANDS...;] continue; [COMMANDS...;] end
|
||||
\endfish
|
||||
|
||||
\subsection continue-description Description
|
||||
|
||||
`continue` skips the remainder of the current iteration of the current inner loop, such as a <a href="#for">for</a> loop or a <a href="#while">while</a> loop. It is usually added inside of a conditional block such as an <a href="#if">if</a> statement or a <a href="#switch">switch</a> statement.
|
||||
|
||||
\subsection continue-example Example
|
||||
|
||||
The following code removes all tmp files that do not contain the word smurf.
|
||||
|
||||
\fish
|
||||
for i in *.tmp
|
||||
if grep smurf $i
|
||||
continue
|
||||
end
|
||||
# This "rm" is skipped over if "continue" is executed.
|
||||
rm $i
|
||||
# As is this "echo"
|
||||
echo $i
|
||||
end
|
||||
\endfish
|
||||
@@ -1,25 +0,0 @@
|
||||
\section count count - count the number of elements of an array
|
||||
|
||||
\subsection count-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
count $VARIABLE
|
||||
\endfish
|
||||
|
||||
\subsection count-description Description
|
||||
|
||||
`count` prints the number of arguments that were passed to it. This is usually used to find out how many elements an environment variable array contains.
|
||||
|
||||
`count` does not accept any options, not even `-h` or `--help`.
|
||||
|
||||
`count` exits with a non-zero exit status if no arguments were passed to it, and with zero if at least one argument was passed.
|
||||
|
||||
|
||||
\subsection count-example Example
|
||||
|
||||
\fish
|
||||
count $PATH
|
||||
# Returns the number of directories in the users PATH variable.
|
||||
|
||||
count *.txt
|
||||
# Returns the number of files in the current working directory ending with the suffix '.txt'.
|
||||
\endfish
|
||||
@@ -1,14 +0,0 @@
|
||||
\section dirh dirh - print directory history
|
||||
|
||||
\subsection dirh-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
dirh
|
||||
\endfish
|
||||
|
||||
\subsection dirh-description Description
|
||||
|
||||
`dirh` prints the current directory history. The current position in the history is highlighted using the color defined in the `fish_color_history_current` environment variable.
|
||||
|
||||
`dirh` does not accept any parameters.
|
||||
|
||||
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables.
|
||||
@@ -1,15 +0,0 @@
|
||||
\section dirs dirs - print directory stack
|
||||
|
||||
\subsection dirs-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
dirs
|
||||
dirs -c
|
||||
\endfish
|
||||
|
||||
\subsection dirs-description Description
|
||||
|
||||
`dirs` prints the current directory stack, as created by the <a href="#pushd">`pushd`</a> command.
|
||||
|
||||
With "-c", it clears the directory stack instead.
|
||||
|
||||
`dirs` does not accept any parameters.
|
||||
@@ -1,24 +0,0 @@
|
||||
\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.
|
||||
|
||||
`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.
|
||||
@@ -1,60 +0,0 @@
|
||||
\section echo echo - display a line of text
|
||||
|
||||
\subsection echo-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
echo [OPTIONS] [STRING]
|
||||
\endfish
|
||||
|
||||
\subsection echo-description Description
|
||||
|
||||
`echo` displays a string of text.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-n`, Do not output a newline
|
||||
|
||||
- `-s`, Do not separate arguments with spaces
|
||||
|
||||
- `-E`, Disable interpretation of backslash escapes (default)
|
||||
|
||||
- `-e`, Enable interpretation of backslash escapes
|
||||
|
||||
\subsection echo-escapes Escape Sequences
|
||||
|
||||
If `-e` is used, the following sequences are recognized:
|
||||
|
||||
- `\` backslash
|
||||
|
||||
- `\a` alert (BEL)
|
||||
|
||||
- `\b` backspace
|
||||
|
||||
- `\c` produce no further output
|
||||
|
||||
- `\e` escape
|
||||
|
||||
- `\f` form feed
|
||||
|
||||
- `\n` new line
|
||||
|
||||
- `\r` carriage return
|
||||
|
||||
- `\t` horizontal tab
|
||||
|
||||
- `\v` vertical tab
|
||||
|
||||
- `\0NNN` byte with octal value NNN (1 to 3 digits)
|
||||
|
||||
- `\xHH` byte with hexadecimal value HH (1 to 2 digits)
|
||||
|
||||
\subsection echo-example Example
|
||||
|
||||
\fish
|
||||
echo 'Hello World'
|
||||
\endfish
|
||||
Print hello world to stdout
|
||||
|
||||
\fish
|
||||
echo -e 'Top\\nBottom'
|
||||
\endfish
|
||||
Print Top and Bottom on separate lines, using an escape sequence
|
||||
@@ -1,23 +0,0 @@
|
||||
\section else else - execute command if a condition is not met
|
||||
|
||||
\subsection else-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
if CONDITION; COMMANDS_TRUE...; [else; COMMANDS_FALSE...;] end
|
||||
\endfish
|
||||
|
||||
\subsection else-description Description
|
||||
|
||||
`if` will execute the command `CONDITION`. If the condition's exit status is 0, the commands `COMMANDS_TRUE` will execute. If it is not 0 and `else` is given, `COMMANDS_FALSE` will be executed.
|
||||
|
||||
|
||||
\subsection else-example Example
|
||||
|
||||
The following code tests whether a file `foo.txt` exists as a regular file.
|
||||
|
||||
\fish
|
||||
if test -f foo.txt
|
||||
echo foo.txt exists
|
||||
else
|
||||
echo foo.txt does not exist
|
||||
end
|
||||
\endfish
|
||||
@@ -1,28 +0,0 @@
|
||||
\section emit emit - Emit a generic event
|
||||
|
||||
\subsection emit-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
emit EVENT_NAME [ARGUMENTS...]
|
||||
\endfish
|
||||
|
||||
\subsection emit-description Description
|
||||
|
||||
`emit` emits, or fires, an event. Events are delivered to, or caught by, special functions called event handlers. The arguments are passed to the event handlers as function arguments.
|
||||
|
||||
|
||||
\subsection emit-example Example
|
||||
|
||||
The following code first defines an event handler for the generic event named 'test_event', and then emits an event of that type.
|
||||
|
||||
\fish
|
||||
function event_test --on-event test_event
|
||||
echo event test: $argv
|
||||
end
|
||||
|
||||
emit test_event something
|
||||
\endfish
|
||||
|
||||
|
||||
\subsection emit-notes Notes
|
||||
|
||||
Note that events are only sent to the current fish process as there is no way to send events from one fish process to another.
|
||||
@@ -1,19 +0,0 @@
|
||||
\section end end - end a block of commands.
|
||||
|
||||
\subsection end-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
begin; [COMMANDS...] end
|
||||
if CONDITION; COMMANDS_TRUE...; [else; COMMANDS_FALSE...;] end
|
||||
while CONDITION; COMMANDS...; end
|
||||
for VARNAME in [VALUES...]; COMMANDS...; end
|
||||
switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
|
||||
\endfish
|
||||
|
||||
\subsection end-description Description
|
||||
|
||||
`end` ends a block of commands.
|
||||
|
||||
For more information, read the
|
||||
documentation for the block constructs, such as `if`, `for` and `while`.
|
||||
|
||||
The `end` command does not change the current exit status. Instead, the status after it will be the status returned by the most recent command.
|
||||
@@ -1,21 +0,0 @@
|
||||
\section eval eval - evaluate the specified commands
|
||||
|
||||
\subsection eval-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
eval [COMMANDS...]
|
||||
\endfish
|
||||
|
||||
\subsection eval-description Description
|
||||
`eval` evaluates the specified parameters as a command. If more than one parameter is specified, all parameters will be joined using a space character as a separator.
|
||||
|
||||
If your command does not need access to stdin, consider using `source` instead.
|
||||
|
||||
\subsection eval-example Example
|
||||
|
||||
The following code will call the ls command. Note that `fish` does not support the use of shell variables as direct commands; `eval` can be used to work around this.
|
||||
|
||||
\fish
|
||||
set cmd ls
|
||||
eval $cmd
|
||||
\endfish
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
\section exec exec - execute command in current process
|
||||
|
||||
\subsection exec-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
exec COMMAND [OPTIONS...]
|
||||
\endfish
|
||||
|
||||
\subsection exec-description Description
|
||||
|
||||
`exec` replaces the currently running shell with a new command. On successful completion, `exec` never returns. `exec` cannot be used inside a pipeline.
|
||||
|
||||
|
||||
\subsection exec-example Example
|
||||
|
||||
`exec emacs` starts up the emacs text editor, and exits `fish`. When emacs exits, the session will terminate.
|
||||
@@ -1,12 +0,0 @@
|
||||
\section exit exit - exit the shell
|
||||
|
||||
\subsection exit-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
exit [STATUS]
|
||||
\endfish
|
||||
|
||||
\subsection exit-description Description
|
||||
|
||||
`exit` causes fish to exit. If `STATUS` is supplied, it will be converted to an integer and used as the exit code. Otherwise, the exit code will be that of the last command executed.
|
||||
|
||||
If exit is called while sourcing a file (using the <a href="#source">source</a> builtin) the rest of the file will be skipped, but the shell itself will not exit.
|
||||
@@ -1,10 +0,0 @@
|
||||
\section false false - return an unsuccessful result
|
||||
|
||||
\subsection false-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
false
|
||||
\endfish
|
||||
|
||||
\subsection false-description Description
|
||||
|
||||
`false` sets the exit status to 1.
|
||||
306
doc_src/faq.hdr
306
doc_src/faq.hdr
@@ -1,306 +0,0 @@
|
||||
/**
|
||||
\page faq Frequently asked questions
|
||||
\htmlonly[block]
|
||||
<div class="fish_left_bar">
|
||||
<div class="logo"></div>
|
||||
<div class="menu faq_menu">
|
||||
|
||||
\endhtmlonly
|
||||
|
||||
- <a href='#faq-envvar'>How do I set or clear an environment variable?</a>
|
||||
- <a href='#faq-login-cmd'>How do I run a command every login? What's fish's equivalent to `.bashrc`?</a>
|
||||
- <a href='#faq-prompt'>How do I set my prompt?</a>
|
||||
- <a href='#faq-cmd-history'>How do I run a command from history?</a>
|
||||
- <a href='#faq-subcommand'>How do I run a subcommand? The backtick doesn't work!</a>
|
||||
- <a href='#faq-pkg-config'>My command (pkg-config) gives its output as a single long string?</a>
|
||||
- <a href='#faq-exit-status'>How do I get the exit status of a command?</a>
|
||||
- <a href='#faq-single-env'>How do I set an environment variable for just one command?</a>
|
||||
- <a href='#faq-exported-uvar'>Why doesn't `set -Ux` (exported universal variables) seem to work?</a>
|
||||
- <a href='#faq-customize-colors'>How do I customize my syntax highlighting colors?</a>
|
||||
- <a href='#faq-update-manpage-completions'>How do I update man page completions?</a>
|
||||
- <a href='#faq-cd-implicit'>I accidentally entered a directory path and fish changed directory. What happened?</a>
|
||||
- <a href='#faq-open'>The open command doesn't work.</a>
|
||||
- <a href='#faq-default'>How do I make fish my default shell?</a>
|
||||
- <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 can I use `-` as a shortcut for `cd -`?</a>
|
||||
- <a href='#faq-uninstalling'>How do I uninstall fish?</a>
|
||||
- <a href='#faq-third-party'>Where can I find extra tools for fish?</a>
|
||||
|
||||
\htmlonly[block]
|
||||
</div>
|
||||
</div>
|
||||
<div class="faq fish_right_bar">
|
||||
<h1 class="interior_title">Frequently Asked Questions</h1>
|
||||
\endhtmlonly
|
||||
|
||||
|
||||
\section faq-envvar How do I set or clear an environment variable?
|
||||
|
||||
Use the <a href="commands.html#set">`set`</a> command:
|
||||
|
||||
\fish{cli-dark}
|
||||
set -x key value
|
||||
set -e key
|
||||
\endfish
|
||||
|
||||
|
||||
\section faq-login-cmd How do I run a command every login? What's fish's equivalent to .bashrc?
|
||||
|
||||
Edit the file `~/.config/fish/config.fish`, creating it if it does not exist (Note the leading period).
|
||||
|
||||
<hr>
|
||||
\section faq-prompt How do I set my prompt?
|
||||
|
||||
The prompt is the output of the `fish_prompt` function. Put it in `~/.config/fish/functions/fish_prompt.fish`. For example, a simple prompt is:
|
||||
|
||||
\fish{cli-dark}
|
||||
function fish_prompt
|
||||
set_color $fish_color_cwd
|
||||
echo -n (prompt_pwd)
|
||||
set_color normal
|
||||
echo -n ' > '
|
||||
end
|
||||
\endfish
|
||||
|
||||
You can also use the Web configuration tool, <a href="commands.html#fish_config">`fish_config`</a>, to preview and choose from a gallery of sample prompts.
|
||||
|
||||
|
||||
\section faq-cmd-history How do I run a command from history?
|
||||
|
||||
Type some part of the command, and then hit the @cursor_key{↑,up} or @cursor_key{↓,down} arrow keys to navigate through history matches.
|
||||
|
||||
<hr>
|
||||
\section faq-subcommand How do I run a subcommand? The backtick doesn't work!
|
||||
|
||||
`fish` uses parentheses for subcommands. For example:
|
||||
|
||||
\fish{cli-dark}
|
||||
for i in (ls)
|
||||
echo $i
|
||||
end
|
||||
\endfish
|
||||
|
||||
\section faq-pkg-config My command (pkg-config) gives its output as a single long string?
|
||||
|
||||
Unlike other shells, fish splits command substitutions only on newlines, not spaces or tabs or the characters in $IFS.
|
||||
|
||||
That means if you run
|
||||
|
||||
\fish{cli-dark}
|
||||
echo x(printf '%s ' a b c)x
|
||||
\endfish
|
||||
|
||||
It will print `xa b c x`. But if you do
|
||||
|
||||
\fish{cli-dark}
|
||||
echo x(printf '%s\n' a b c)x
|
||||
\endfish
|
||||
|
||||
it will print `xax xbx xcx`.
|
||||
|
||||
In the overwhelming majority of cases, splitting on spaces is unwanted, so this is an improvement.
|
||||
|
||||
However sometimes, especially with `pkg-config` and related tools, splitting on spaces is needed.
|
||||
|
||||
In these cases use `string split " "` like:
|
||||
|
||||
\fish{cli-dark}
|
||||
g++ example_01.cpp (pkg-config --cflags --libs gtk+-2.0 | string split " ")
|
||||
\endfish
|
||||
|
||||
\section faq-exit-status How do I get the exit status of a command?
|
||||
|
||||
Use the `$status` variable. This replaces the `$?` variable used in some other shells.
|
||||
|
||||
\fish{cli-dark}
|
||||
somecommand
|
||||
if test $status -eq 7
|
||||
echo "That's my lucky number!"
|
||||
end
|
||||
\endfish
|
||||
|
||||
If you are just interested in success or failure, you can run the command directly as the if-condition:
|
||||
|
||||
\fish{cli-dark}
|
||||
if somecommand
|
||||
echo "Command succeeded"
|
||||
else
|
||||
echo "Command failed"
|
||||
end
|
||||
\endfish
|
||||
|
||||
See the documentation for <a href="commands.html#test">`test`</a> and <a href="commands.html#if">`if`</a> for more information.
|
||||
|
||||
<hr>
|
||||
\section faq-single-env How do I set an environment variable for just one command?
|
||||
|
||||
<i>`SOME_VAR=1 command` produces an error: `Unknown command "SOME_VAR=1"`.</i>
|
||||
|
||||
Use the `env` command.
|
||||
|
||||
`env SOME_VAR=1 command`
|
||||
|
||||
You can also declare a local variable in a block:
|
||||
|
||||
\fish{cli-dark}
|
||||
begin
|
||||
set -lx SOME_VAR 1
|
||||
command
|
||||
end
|
||||
\endfish
|
||||
|
||||
\section faq-exported-uvar Why doesn't `set -Ux` (exported universal variables) seem to work?
|
||||
|
||||
A global variable of the same name already exists.
|
||||
|
||||
Environment variables such as `EDITOR` or `TZ` can be set universally using `set -Ux`. However, if
|
||||
there is an environment variable already set before fish starts (such as by login scripts or system
|
||||
administrators), it is imported into fish as a global variable. The <a
|
||||
href="index.html#variables-scope">variable scopes</a> are searched from the "inside out", which
|
||||
means that local variables are checked first, followed by global variables, and finally universal
|
||||
variables.
|
||||
|
||||
This means that the global value takes precedence over the universal value.
|
||||
|
||||
To avoid this problem, consider changing the setting which fish inherits. If this is not possible,
|
||||
add a statement to your <a href="index.html#">user initialization file</a> (usually
|
||||
`~/.config/fish/config.fish`):
|
||||
|
||||
\fish{cli-dark}
|
||||
set -gx EDITOR vim
|
||||
\endfish
|
||||
|
||||
\section faq-customize-colors How do I customize my syntax highlighting colors?
|
||||
|
||||
Use the web configuration tool, <a href="commands.html#fish_config">`fish_config`</a>, or alter the <a href="index.html#variables-color">`fish_color` family of environment variables</a>.
|
||||
|
||||
<hr>
|
||||
\section faq-update-manpage-completions How do I update man page completions?
|
||||
|
||||
Use the <a href="commands.html#fish_update_completions">`fish_update_completions`</a> command.
|
||||
|
||||
<hr>
|
||||
\section faq-cd-implicit I accidentally entered a directory path and fish changed directory. What happened?
|
||||
|
||||
If fish is unable to locate a command with a given name, and it starts with '`.`', '`/`' or '`~`', fish will test if a directory of that name exists. If it does, it is implicitly assumed that you want to change working directory. For example, the fastest way to switch to your home directory is to simply press `~` and enter.
|
||||
|
||||
<hr>
|
||||
\section faq-open The open command doesn't work.
|
||||
|
||||
The `open` command uses the MIME type database and the `.desktop` files used by Gnome and KDE to identify filetypes and default actions. If at least one of these environments is installed, but the open command is not working, this probably means that the relevant files are installed in a non-standard location. Consider <a href="index.html#more-help">asking for more help</a>.
|
||||
|
||||
<hr>
|
||||
\section faq-default How do I make fish my default shell?
|
||||
|
||||
If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local):
|
||||
|
||||
\fish{cli-dark}
|
||||
echo /usr/local/bin/fish | sudo tee -a /etc/shells
|
||||
\endfish
|
||||
|
||||
If you installed a prepackaged version of fish, the package manager should have already done this for you.
|
||||
|
||||
In order to change your default shell, type:
|
||||
|
||||
\fish{cli-dark}
|
||||
chsh -s /usr/local/bin/fish
|
||||
\endfish
|
||||
|
||||
You may need to adjust the above path to e.g. `/usr/bin/fish`. Use the command `which fish` if you are unsure of where fish is installed.
|
||||
|
||||
Unfortunately, there is no way to make the changes take effect at once. You will need to log out and back in again.
|
||||
|
||||
<hr>
|
||||
\section faq-titlebar I'm seeing weird output before each prompt when using screen. What's wrong?
|
||||
|
||||
Quick answer:
|
||||
|
||||
Run the following command in fish:
|
||||
|
||||
\fish{cli-dark}
|
||||
function fish_title; end; funcsave fish_title
|
||||
\endfish
|
||||
|
||||
Problem solved!
|
||||
|
||||
The long answer:
|
||||
|
||||
Fish is trying to set the titlebar message of your terminal. While screen itself supports this feature, your terminal does not. Unfortunately, when the underlying terminal doesn't support setting the titlebar, screen simply passes through the escape codes and text to the underlying terminal instead of ignoring them. It is impossible to detect and resolve this problem from inside fish since fish has no way of knowing what the underlying terminal type is. For now, the only way to fix this is to unset the titlebar message, as suggested above.
|
||||
|
||||
Note that fish has a default titlebar message, which will be used if the fish_title function is undefined. So simply unsetting the fish_title function will not work.
|
||||
|
||||
<hr>
|
||||
\section faq-greeting How do I change the greeting message?
|
||||
|
||||
Change the value of the variable `fish_greeting` or create a `fish_greeting` function. For example, to remove the greeting use:
|
||||
|
||||
\fish{cli-dark}
|
||||
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 ".
|
||||
|
||||
Fish history recall is very simple yet effective:
|
||||
|
||||
- As in any modern shell, the Up arrow, @cursor_key{↑,Up} recalls whole lines, starting from the last line executed. A single press replaces "!!", later presses replace "!-3" and the like.
|
||||
|
||||
- If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will constrain the recall to lines that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like.
|
||||
|
||||
- @key{Alt,↑,Up} recalls individual arguments, starting from the last argument in the last line executed. A single press replaces "!$", later presses replace "!!:4" and the like.
|
||||
|
||||
- If the argument you want is far back in history (e.g. 2 lines back - that's a lot of words!), type any part of it and then press @key{Alt,↑,Up}. This will show only arguments containing that part and you will get what you want much faster. Try it out, this is very convenient!
|
||||
|
||||
- If you want to reuse several arguments from the same line ("!!:3*" and the like), consider recalling the whole line and removing what you don't need (@key{Alt,D} and @key{Alt,Backspace} are your friends).
|
||||
|
||||
See <a href='index.html#editor'>documentation</a> for more details about line editing in fish.
|
||||
|
||||
<hr>
|
||||
\section faq-cd-minus How can I use `-` as a shortcut for `cd -`?
|
||||
|
||||
In fish versions prior to 2.5.0 it was possible to create a function named `-` that would do `cd -`. Changes in the 2.5.0 release included several bug fixes that enforce the rule that a bare hyphen is not a valid function (or variable) name. However, you can achieve the same effect via an abbreviation:
|
||||
|
||||
\fish{cli-dark}
|
||||
abbr -a -- - 'cd -'
|
||||
\endfish
|
||||
|
||||
<hr>
|
||||
\section faq-uninstalling Uninstalling fish
|
||||
|
||||
Should you wish to uninstall fish, first ensure fish is not set as your shell. Run `chsh -s /bin/bash` if you are not sure.
|
||||
|
||||
Next, do the following (assuming fish was installed to /usr/local):
|
||||
|
||||
\fish{cli-dark}
|
||||
rm -Rf /usr/local/etc/fish /usr/local/share/fish ~/.config/fish
|
||||
rm /usr/local/share/man/man1/fish*.1
|
||||
cd /usr/local/bin
|
||||
rm -f fish fish_indent
|
||||
\endfish
|
||||
|
||||
<hr>
|
||||
\section faq-reserved-chars Unicode private-use characters reserved by fish
|
||||
|
||||
Fish reserves the <a href="http://www.unicode.org/faq/private_use.html">Unicode private-use character range</a> from U+F600 thru U+F73F for internal use. Any attempt to feed characters in that range to fish will result in them being replaced by the Unicode "replacement character" U+FFFD. This includes both interactive input as well as any file read by fish (but not programs run by fish).
|
||||
|
||||
<hr>
|
||||
\section faq-third-party Where can I find extra tools for fish?
|
||||
|
||||
The fish user community extends fish in unique and useful ways via scripts that aren't always appropriate for bundling with the fish package. Typically because they solve a niche problem unlikely to appeal to a broad audience. You can find those extensions, including prompts, themes and useful functions, in various third-party repositories. These include:
|
||||
|
||||
- <a href="https://github.com/fisherman/fisherman">Fisherman</a>
|
||||
- <a href="https://github.com/tuvistavie/fundle">Fundle</a>
|
||||
- <a href="https://github.com/oh-my-fish/oh-my-fish">Oh My Fish</a>
|
||||
- <a href="https://github.com/justinmayer/tacklebox">Tacklebox</a>
|
||||
|
||||
This is not an exhaustive list and the fish project has no opinion regarding the merits of the repositories listed above or the scripts found therein.
|
||||
|
||||
\htmlonly[block]
|
||||
</div>
|
||||
\endhtmlonly
|
||||
|
||||
*/
|
||||
@@ -1,15 +0,0 @@
|
||||
\section fg fg - bring job to foreground
|
||||
|
||||
\subsection fg-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fg [PID]
|
||||
\endfish
|
||||
|
||||
\subsection fg-description Description
|
||||
|
||||
`fg` brings the specified <a href="index.html#syntax-job-control">job</a> to the foreground, resuming it if it is stopped. While a foreground job is executed, fish is suspended. If no job is specified, the last job to be used is put in the foreground. If PID is specified, the job with the specified group ID is put in the foreground.
|
||||
|
||||
|
||||
\subsection fg-example Example
|
||||
|
||||
`fg` will put the last job in the foreground.
|
||||
@@ -1,34 +0,0 @@
|
||||
\section fish fish - the friendly interactive shell
|
||||
|
||||
\subsection fish-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fish [OPTIONS] [-c command] [FILE [ARGUMENTS...]]
|
||||
\endfish
|
||||
|
||||
\subsection fish-description Description
|
||||
|
||||
`fish` is a command-line shell written mainly with interactive use in mind. The full manual is available <a href='index.html'>in HTML</a> by using the <a href='#help'>help</a> command from inside fish.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-c` or `--command=COMMANDS` evaluate the specified commands instead of reading from the commandline
|
||||
|
||||
- `-C` or `--init-command=COMMANDS` evaluate the specified commands after reading the configuration, before running the command specified by `-c` or reading interactive input
|
||||
|
||||
- `-d` or `--debug-level=DEBUG_LEVEL` specify the verbosity level of fish. A higher number means higher verbosity. The default level is 1.
|
||||
|
||||
- `-i` or `--interactive` specify that fish is to run in interactive mode
|
||||
|
||||
- `-l` or `--login` specify that fish is to run as a login shell
|
||||
|
||||
- `-n` or `--no-execute` do not execute any commands, only perform syntax checking
|
||||
|
||||
- `-p` or `--profile=PROFILE_FILE` when fish exits, output timing information on all executed commands to the specified file
|
||||
|
||||
- `-v` or `--version` display version and exit
|
||||
|
||||
- `-D` or `--debug-stack-frames=DEBUG_LEVEL` specify how many stack frames to display when debug messages are written. The default is zero. A value of 3 or 4 is usually sufficient to gain insight into how a given debug call was reached but you can specify a value up to 128.
|
||||
|
||||
- `-f` or `--features=FEATURES` enables one or more feature flags (separated by a comma). These are how fish stages changes that might break scripts.
|
||||
|
||||
The fish exit status is generally the exit status of the last foreground command. If fish is exiting because of a parse error, the exit status is 127.
|
||||
@@ -1,30 +0,0 @@
|
||||
\section fish_breakpoint_prompt fish_breakpoint_prompt - define the appearance of the command line prompt when in the context of a `breakpoint` command
|
||||
|
||||
\subsection fish_breakpoint_prompt-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
function fish_breakpoint_prompt
|
||||
...
|
||||
end
|
||||
\endfish
|
||||
|
||||
\subsection fish_breakpoint_prompt-description Description
|
||||
|
||||
By defining the `fish_breakpoint_prompt` function, the user can choose a custom prompt when asking for input in response to a `breakpoint` command. The `fish_breakpoint_prompt` function is executed when the prompt is to be shown, and the output is used as a prompt.
|
||||
|
||||
The exit status of commands within `fish_breakpoint_prompt` will not modify the value of <a href="index.html#variables-status">$status</a> outside of the `fish_breakpoint_prompt` function.
|
||||
|
||||
`fish` ships with a default version of this function that displays the function name and line number of the current execution context.
|
||||
|
||||
|
||||
\subsection fish_breakpoint_prompt-example Example
|
||||
|
||||
A simple prompt that is a simplified version of the default debugging prompt:
|
||||
|
||||
\fish
|
||||
function fish_breakpoint_prompt -d "Write out the debug prompt"
|
||||
set -l function (status current-function)
|
||||
set -l line (status current-line-number)
|
||||
set -l prompt "$function:$line >"
|
||||
echo -ns (set_color $fish_color_status) "BP $prompt" (set_color normal) ' '
|
||||
end
|
||||
\endfish
|
||||
@@ -1,18 +0,0 @@
|
||||
\section fish_config fish_config - start the web-based configuration interface
|
||||
|
||||
\subsection fish_config-description Description
|
||||
|
||||
`fish_config` starts the web-based configuration interface.
|
||||
|
||||
The web interface allows you to view your functions, variables and history, and to make changes to your prompt and color configuration.
|
||||
|
||||
`fish_config` starts a local web server and then opens a web browser window; when you have finished, close the browser window and then press the Enter key to terminate the configuration session.
|
||||
|
||||
`fish_config` optionally accepts name of the initial configuration tab. For e.g. `fish_config history` will start configuration interface with history tab.
|
||||
|
||||
If the `BROWSER` environment variable is set, it will be used as the name of the web browser to open instead of the system default.
|
||||
|
||||
|
||||
\subsection fish_config-example Example
|
||||
|
||||
`fish_config` opens a new web browser window and allows you to configure certain fish settings.
|
||||
@@ -1,28 +0,0 @@
|
||||
\section fish_indent fish_indent - indenter and prettifier
|
||||
|
||||
\subsection fish_indent-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fish_indent [OPTIONS]
|
||||
\endfish
|
||||
|
||||
\subsection fish_indent-description Description
|
||||
|
||||
`fish_indent` is used to indent a piece of fish code. `fish_indent` reads commands from standard input and outputs them to standard output or a specified file.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-w` or `--write` indents a specified file and immediately writes to that file.
|
||||
|
||||
- `-i` or `--no-indent` do not indent commands; only reformat to one job per line.
|
||||
|
||||
- `-v` or `--version` displays the current fish version and then exits.
|
||||
|
||||
- `--ansi` colorizes the output using ANSI escape sequences, appropriate for the current $TERM, using the colors defined in the environment (such as `$fish_color_command`).
|
||||
|
||||
- `--html` outputs HTML, which supports syntax highlighting if the appropriate CSS is defined. The CSS class names are the same as the variable names, such as `fish_color_command`.
|
||||
|
||||
- `-d` or `--debug-level=DEBUG_LEVEL` enables debug output and specifies a verbosity level (like `fish -d`). Defaults to 0.
|
||||
|
||||
- `-D` or `--debug-stack-frames=DEBUG_LEVEL` specify how many stack frames to display when debug messages are written. The default is zero. A value of 3 or 4 is usually sufficient to gain insight into how a given debug call was reached but you can specify a value up to 128.
|
||||
|
||||
- `--dump-parse-tree` dumps information about the parsed statements to stderr. This is likely to be of interest only to people working on the fish source code.
|
||||
@@ -1,35 +0,0 @@
|
||||
\section fish_key_reader fish_key_reader - explore what characters keyboard keys send
|
||||
|
||||
\subsection fish_key_reader-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fish_key_reader [OPTIONS]
|
||||
\endfish
|
||||
|
||||
\subsection fish_key_reader-description Description
|
||||
|
||||
`fish_key_reader` is used to study input received from the terminal and can help with key binds. The program is interactive and works on standard input. Individual characters themselves and their hexadecimal values are displayed.
|
||||
|
||||
The tool will write an example `bind` command matching the character sequence captured to stdout. If the character sequence matches a special key name (see `bind --key-names`), both `bind CHARS ...` and `bind -k KEYNAME ...` usage will be shown. Additional details about the characters received, such as the delay between chars, are written to stderr.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-c` or `--continuous` begins a session where multiple key sequences can be inspected. By default the program exits after capturing a single key sequence.
|
||||
|
||||
- `-d` or `--debug-level=DEBUG_LEVEL` enables debug output and specifies a verbosity level (like `fish -d`). Defaults to 0.
|
||||
|
||||
- `-D` or `--debug-stack-frames=DEBUG_LEVEL` specify how many stack frames to display when debug messages are written. The default is zero. A value of 3 or 4 is usually sufficient to gain insight into how a given debug call was reached but you can specify a value up to 128.
|
||||
|
||||
- `-h` or `--help` prints usage information.
|
||||
|
||||
- `-v` or `--version` prints fish_key_reader's version and exits.
|
||||
|
||||
\subsection fish_key_reader-usage-notes Usage Notes
|
||||
|
||||
The delay in milliseconds since the previous character was received is included in the diagnostic information written to stderr. This information may be useful to determine the optimal `fish_escape_delay_ms` setting or learn the amount of lag introduced by tools like `ssh`, `mosh` or `tmux`.
|
||||
|
||||
`fish_key_reader` intentionally disables handling of many signals. To terminate `fish_key_reader` in `--continuous` mode do:
|
||||
|
||||
- press `Ctrl-C` twice, or
|
||||
- press `Ctrl-D` twice, or
|
||||
- type `exit`, or
|
||||
- type `quit`
|
||||
@@ -1,37 +0,0 @@
|
||||
\section fish_mode_prompt fish_mode_prompt - define the appearance of the mode indicator
|
||||
|
||||
\subsection fish_mode_prompt-synopsis Synopsis
|
||||
|
||||
The fish_mode_prompt function will output the mode indicator for use in vi-mode.
|
||||
|
||||
\subsection fish_mode_prompt-description Description
|
||||
|
||||
The default `fish_mode_prompt` function will output indicators about the current Vi editor mode displayed to the left of the regular prompt. Define your own function to customize the appearance of the mode indicator. You can also define an empty `fish_mode_prompt` function to remove the Vi mode indicators. The `$fish_bind_mode variable` can be used to determine the current mode. It
|
||||
will be one of `default`, `insert`, `replace_one`, or `visual`.
|
||||
|
||||
\subsection fish_mode_prompt-example Example
|
||||
|
||||
\fish
|
||||
function fish_mode_prompt
|
||||
switch $fish_bind_mode
|
||||
case default
|
||||
set_color --bold red
|
||||
echo 'N'
|
||||
case insert
|
||||
set_color --bold green
|
||||
echo 'I'
|
||||
case replace_one
|
||||
set_color --bold green
|
||||
echo 'R'
|
||||
case visual
|
||||
set_color --bold brmagenta
|
||||
echo 'V'
|
||||
case '*'
|
||||
set_color --bold red
|
||||
echo '?'
|
||||
end
|
||||
set_color normal
|
||||
end
|
||||
\endfish
|
||||
|
||||
Outputting multiple lines is not supported in `fish_mode_prompt`.
|
||||
@@ -1,54 +0,0 @@
|
||||
\section fish_opt fish_opt - create an option spec for the argparse command
|
||||
|
||||
\subsection fish_opt-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fish_opt [ -h | --help ]
|
||||
fish_opt ( -s X | --short=X ) [ -l LONG | --long=LONG ] [ --long-only ] \
|
||||
[ -o | --optional-val ] [ -r | --required-val ] [ --multiple-vals ]
|
||||
\endfish
|
||||
|
||||
\subsection fish_opt-description Description
|
||||
|
||||
This command provides a way to produce option specifications suitable for use with the <a href="#argparse">`argparse`</a> command. You can, of course, write the option specs by hand without using this command. But you might prefer to use this for the clarity it provides.
|
||||
|
||||
The following `argparse` options are available:
|
||||
|
||||
- `-s` or `--short` takes a single letter that is used as the short flag in the option being defined. This option is mandatory.
|
||||
|
||||
- `-l` or `--long` takes a string that is used as the long flag in the option being defined. This option is optional and has no default. If no long flag is defined then only the short flag will be allowed when parsing arguments using the option spec.
|
||||
|
||||
- `--long-only` means the option spec being defined will only allow the long flag name to be used. The short flag name must still be defined (i.e., `--short` must be specified) but it cannot be used when parsing args using this option spec.
|
||||
|
||||
- `-o` or `--optional` means the option being defined can take a value but it is optional rather than required. If the option is seen more than once when parsing arguments only the last value seen is saved. This means the resulting flag variable created by `argparse` will zero elements if no value was given with the option else it will have exactly one element.
|
||||
|
||||
- `-r` or `--required` means the option being defined requires a value. If the option is seen more than once when parsing arguments only the last value seen is saved. This means the resulting flag variable created by `argparse` will have exactly one element.
|
||||
|
||||
- `--multiple-vals` means the option being defined requires a value each time it is seen. Each instance is stored. This means the resulting flag variable created by `argparse` will have one element for each instance of this option in the args.
|
||||
|
||||
- `-h` or `--help` displays help about using this command.
|
||||
|
||||
\subsection fish_opt-examples Examples
|
||||
|
||||
Define a single option spec for the boolean help flag:
|
||||
|
||||
\fish
|
||||
set -l options (fish_opt -s h -l help)
|
||||
argparse $options -- $argv
|
||||
\endfish
|
||||
|
||||
Same as above but with a second flag that requires a value:
|
||||
|
||||
\fish
|
||||
set -l options (fish_opt -s h -l help)
|
||||
set options $options (fish_opt -s m -l max --required-val)
|
||||
argparse $options -- $argv
|
||||
\endfish
|
||||
|
||||
Same as above but with a third flag that can be given multiple times saving the value of each instance seen and only the long flag name (`--token`) can be used:
|
||||
|
||||
\fish
|
||||
set -l options (fish_opt --short=h --long=help)
|
||||
set options $options (fish_opt --short=m --long=max --required-val)
|
||||
set options $options (fish_opt --short=t --long=token --multiple-vals --long-only)
|
||||
argparse $options -- $argv
|
||||
\endfish
|
||||
@@ -1,29 +0,0 @@
|
||||
\section fish_prompt fish_prompt - define the appearance of the command line prompt
|
||||
|
||||
\subsection fish_prompt-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
function fish_prompt
|
||||
...
|
||||
end
|
||||
\endfish
|
||||
|
||||
\subsection fish_prompt-description Description
|
||||
|
||||
By defining the `fish_prompt` function, the user can choose a custom prompt. The `fish_prompt` function is executed when the prompt is to be shown, and the output is used as a prompt.
|
||||
|
||||
The exit status of commands within `fish_prompt` will not modify the value of <a href="index.html#variables-status">$status</a> outside of the `fish_prompt` function.
|
||||
|
||||
`fish` ships with a number of example prompts that can be chosen with the `fish_config` command.
|
||||
|
||||
|
||||
\subsection fish_prompt-example Example
|
||||
|
||||
A simple prompt:
|
||||
|
||||
\fish
|
||||
function fish_prompt -d "Write out the prompt"
|
||||
printf '%s@%s%s%s%s> ' (whoami) (hostname | cut -d . -f 1) \
|
||||
(set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
end
|
||||
\endfish
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
\section fish_right_prompt fish_right_prompt - define the appearance of the right-side command line prompt
|
||||
|
||||
\subsection fish_right_prompt-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
function fish_right_prompt
|
||||
...
|
||||
end
|
||||
\endfish
|
||||
|
||||
\subsection fish_right_prompt-description Description
|
||||
|
||||
`fish_right_prompt` is similar to `fish_prompt`, except that it appears on the right side of the terminal window.
|
||||
|
||||
Multiple lines are not supported in `fish_right_prompt`.
|
||||
|
||||
|
||||
\subsection fish_right_prompt-example Example
|
||||
|
||||
A simple right prompt:
|
||||
|
||||
\fish
|
||||
function fish_right_prompt -d "Write out the right prompt"
|
||||
date '+%m/%d/%y'
|
||||
end
|
||||
\endfish
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
\section fish_update_completions fish_update_completions - Update completions using manual pages
|
||||
|
||||
\subsection fish_update_completions-description Description
|
||||
|
||||
`fish_update_completions` parses manual pages installed on the system, and attempts to create completion files in the `fish` configuration directory.
|
||||
|
||||
This does not overwrite custom completions.
|
||||
|
||||
There are no parameters for `fish_update_completions`.
|
||||
@@ -1,12 +0,0 @@
|
||||
\section fish_vi_mode fish_vi_mode - Enable vi mode
|
||||
|
||||
\subsection fish_vi_mode-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fish_vi_mode
|
||||
\endfish
|
||||
|
||||
\subsection fish_vi_mode-description Description
|
||||
|
||||
This function is deprecated. Please call `fish_vi_key_bindings directly`
|
||||
|
||||
`fish_vi_mode` enters a vi-like command editing mode. To always start in vi mode, add `fish_vi_mode` to your `config.fish` file.
|
||||
@@ -1,36 +0,0 @@
|
||||
\section for for - perform a set of commands multiple times.
|
||||
|
||||
\subsection for-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
for VARNAME in [VALUES...]; COMMANDS...; end
|
||||
\endfish
|
||||
|
||||
\subsection for-description Description
|
||||
|
||||
`for` is a loop construct. It will perform the commands specified by `COMMANDS` multiple times. On each iteration, the local variable specified by `VARNAME` is assigned a new value from `VALUES`. If `VALUES` is empty, `COMMANDS` will not be executed at all. The `VARNAME` is visible when the loop terminates and will contain the last value assigned to it. If `VARNAME` does not already exist it will be set in the local scope. For our purposes if the `for` block is inside a function there must be a local variable with the same name. If the `for` block is not nested inside a function then global and universal variables of the same name will be used if they exist.
|
||||
|
||||
\subsection for-example Example
|
||||
|
||||
\fish
|
||||
for i in foo bar baz; echo $i; end
|
||||
|
||||
# would output:
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
\endfish
|
||||
|
||||
\subsection for-notes Notes
|
||||
|
||||
The `VARNAME` was local to the for block in releases prior to 3.0.0. This means that if you did something like this:
|
||||
|
||||
\fish
|
||||
for var in a b c
|
||||
if break_from_loop
|
||||
break
|
||||
end
|
||||
end
|
||||
echo $var
|
||||
\endfish
|
||||
|
||||
The last value assigned to `var` when the loop terminated would not be available outside the loop. What `echo $var` would write depended on what it was set to before the loop was run. Likely nothing.
|
||||
@@ -1,20 +0,0 @@
|
||||
\section funced funced - edit a function interactively
|
||||
|
||||
\subsection funced-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
funced [OPTIONS] NAME
|
||||
\endfish
|
||||
|
||||
\subsection funced-description Description
|
||||
|
||||
`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. 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, `-e vi`). The special command `fish` will use the built-in editor (same as specifying `-i`).
|
||||
|
||||
- `-i` or `--interactive` Force opening the function body in the built-in editor even if `$VISUAL` or `$EDITOR` is defined.
|
||||
|
||||
- `-s` or `--save` Automatically save the function after successfully editing it.
|
||||
@@ -1,12 +0,0 @@
|
||||
\section funcsave funcsave - save the definition of a function to the user's autoload directory
|
||||
|
||||
\subsection funcsave-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
funcsave FUNCTION_NAME
|
||||
\endfish
|
||||
|
||||
\subsection funcsave-description Description
|
||||
|
||||
`funcsave` saves the current definition of a function to a file in the fish configuration directory. This function will be automatically loaded by current and future fish sessions. This can be useful if you have interactively created a new function and wish to save it for later use.
|
||||
|
||||
Note that because fish loads functions on-demand, saved functions will not function as <a href="index.html#event">event handlers</a> until they are run or sourced otherwise. To activate an event handler for every new shell, add the function to your <a href="index.html#initialization">shell initialization file</a> instead of using `funcsave`.
|
||||
@@ -1,101 +0,0 @@
|
||||
\section function function - create a function
|
||||
|
||||
\subsection function-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
function NAME [OPTIONS]; BODY; end
|
||||
\endfish
|
||||
|
||||
\subsection function-description Description
|
||||
|
||||
`function` creates a new function `NAME` with the body `BODY`.
|
||||
|
||||
A function is a list of commands that will be executed when the name of the function is given as a command.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-a NAMES` or `--argument-names NAMES` assigns the value of successive command-line arguments to the names given in NAMES.
|
||||
|
||||
- `-d DESCRIPTION` or `--description=DESCRIPTION` is a description of what the function does, suitable as a completion description.
|
||||
|
||||
- `-w WRAPPED_COMMAND` or `--wraps=WRAPPED_COMMAND` causes the function to inherit completions from the given wrapped command. See the documentation for <a href="#complete">`complete`</a> for more information.
|
||||
|
||||
- `-e` or `--on-event EVENT_NAME` tells fish to run this function when the specified named event is emitted. Fish internally generates named events e.g. when showing the prompt.
|
||||
|
||||
- `-v` or `--on-variable VARIABLE_NAME` tells fish to run this function when the variable VARIABLE_NAME changes value.
|
||||
|
||||
- `-j PGID` or `--on-job-exit PGID` tells fish to run this function when the job with group ID PGID exits. Instead of PGID, the string 'caller' can be specified. This is only legal when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution.
|
||||
|
||||
- `-p PID` or `--on-process-exit PID` tells fish to run this function when the fish child process
|
||||
with process ID PID exits. Instead of a PID, for backward compatibility,
|
||||
"`%self`" can be specified as an alias for `$fish_pid`, and the function will be run when the
|
||||
current fish instance exits.
|
||||
|
||||
- `-s` or `--on-signal SIGSPEC` tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP).
|
||||
|
||||
- `-S` or `--no-scope-shadowing` allows the function to access the variables of calling functions. Normally, any variables inside the function that have the same name as variables from the calling function are "shadowed", and their contents is independent of the calling function.
|
||||
|
||||
- `-V` or `--inherit-variable NAME` snapshots the value of the variable `NAME` and defines a local variable with that same name and value when the function is defined. This is similar to a closure in other languages like Python but a bit different. Note the word "snapshot" in the first sentence. If you change the value of the variable after defining the function, even if you do so in the same scope (typically another function) the new value will not be used by the function you just created using this option. See the `function notify` example below for how this might be used.
|
||||
|
||||
If the user enters any additional arguments after the function, they are inserted into the environment <a href="index.html#variables-arrays">variable array</a> `$argv`. If the `--argument-names` option is provided, the arguments are also assigned to names specified in that option.
|
||||
|
||||
By using one of the event handler switches, a function can be made to run automatically at specific events. The user may generate new events using the <a href="#emit">emit</a> builtin. Fish generates the following named events:
|
||||
|
||||
- `fish_prompt`, which is emitted whenever a new fish prompt is about to be displayed.
|
||||
|
||||
- `fish_command_not_found`, which is emitted whenever a command lookup failed.
|
||||
|
||||
- `fish_preexec`, which is emitted right before executing an interactive command. The commandline is passed as the first parameter.
|
||||
|
||||
Note: This event will be emitted even if the command is invalid. The commandline parameter includes the entire commandline verbatim, and may potentially include newlines.
|
||||
|
||||
- `fish_postexec`, which is emitted right after executing an interactive command. The commandline is passed as the first parameter.
|
||||
|
||||
Note: This event will be emitted even if the command is invalid. The commandline parameter includes the entire commandline verbatim, and may potentially include newlines.
|
||||
|
||||
- `fish_exit` is emitted right before fish exits.
|
||||
|
||||
\subsection function-example Example
|
||||
|
||||
\fish
|
||||
function ll
|
||||
ls -l $argv
|
||||
end
|
||||
\endfish
|
||||
|
||||
will run the `ls` command, using the `-l` option, while passing on any additional files and switches to `ls`.
|
||||
|
||||
\fish
|
||||
function mkdir -d "Create a directory and set CWD"
|
||||
command mkdir $argv
|
||||
if test $status = 0
|
||||
switch $argv[(count $argv)]
|
||||
case '-*'
|
||||
|
||||
case '*'
|
||||
cd $argv[(count $argv)]
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
\endfish
|
||||
|
||||
This will run the `mkdir` command, and if it is successful, change the current working directory to the one just created.
|
||||
|
||||
\fish
|
||||
function notify
|
||||
set -l job (jobs -l -g)
|
||||
or begin; echo "There are no jobs" >&2; return 1; end
|
||||
|
||||
function _notify_job_$job --on-job-exit $job --inherit-variable job
|
||||
echo -n \a # beep
|
||||
functions -e _notify_job_$job
|
||||
end
|
||||
end
|
||||
\endfish
|
||||
|
||||
This will beep when the most recent job completes.
|
||||
|
||||
|
||||
\subsection function-notes Notes
|
||||
|
||||
Note that events are only received from the current fish process as there is no way to send events from one fish process to another.
|
||||
@@ -1,69 +0,0 @@
|
||||
\section functions functions - print or erase functions
|
||||
|
||||
\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...
|
||||
\endfish
|
||||
|
||||
\subsection functions-description Description
|
||||
|
||||
`functions` prints or erases functions.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-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.
|
||||
|
||||
- `-d DESCRIPTION` or `--description=DESCRIPTION` changes the description of this function.
|
||||
|
||||
- `-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.
|
||||
|
||||
- `-H` or `--handlers` will show all event handlers.
|
||||
|
||||
- `-t` or `--handlers-type TYPE` will show all event handlers matching the given type
|
||||
|
||||
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.
|
||||
|
||||
Automatically loaded functions cannot be removed using `functions -e`. Either remove the definition file or change the $fish_function_path variable to remove autoloaded functions.
|
||||
|
||||
Copying a function using `-c` copies only the body of the function, and does not attach any event notifications from the original function.
|
||||
|
||||
Only one function's description can be changed in a single invocation of `functions -d`.
|
||||
|
||||
The exit status of `functions` is the number of functions specified in the argument list that do not exist, which can be used in concert with the `-q` option.
|
||||
|
||||
|
||||
\subsection functions-example Examples
|
||||
\fish
|
||||
functions -n
|
||||
# Displays a list of currently-defined functions
|
||||
|
||||
functions -c foo bar
|
||||
# Copies the 'foo' function to a new function called 'bar'
|
||||
|
||||
functions -e bar
|
||||
# Erases the function `bar`
|
||||
\endfish
|
||||
@@ -1,79 +0,0 @@
|
||||
\section history history - Show and manipulate command history
|
||||
|
||||
\subsection history-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
history search [ --show-time ] [ --case-sensitive ] [ --exact | --prefix | --contains ] [ --max=n ] [ --null ] [ -R | --reverse ] [ "search string"... ]
|
||||
history delete [ --show-time ] [ --case-sensitive ] [ --exact | --prefix | --contains ] "search string"...
|
||||
history merge
|
||||
history save
|
||||
history clear
|
||||
history ( -h | --help )
|
||||
\endfish
|
||||
|
||||
\subsection history-description Description
|
||||
|
||||
`history` is used to search, delete, and otherwise manipulate the history of interactive commands.
|
||||
|
||||
The following operations (sub-commands) are available:
|
||||
|
||||
- `search` returns history items matching the search string. If no search string is provided it returns all history items. This is the default operation if no other operation is specified. You only have to explicitly say `history search` if you wish to search for one of the subcommands. The `--contains` search option will be used if you don't specify a different search option. Entries are ordered newest to oldest unless you use the `--reverse` flag. If stdout is attached to a tty the output will be piped through your pager by the history function. The history builtin simply writes the results to stdout.
|
||||
|
||||
- `delete` deletes history items. Without the `--prefix` or `--contains` options, the exact match of the specified text will be deleted. If you don't specify `--exact` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID separated by a space to delete multiple entries. Just press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports `--exact --case-sensitive` deletion.
|
||||
|
||||
- `merge` immediately incorporates history changes from other sessions. Ordinarily `fish` ignores history changes from sessions started after the current one. This command applies those changes immediately.
|
||||
|
||||
- `save` immediately writes all changes to the history file. The shell automatically saves the history file; this option is provided for internal use and should not normally need to be used by the user.
|
||||
|
||||
- `clear` clears the history file. A prompt is displayed before the history is erased asking you to confirm you really want to clear all history unless `builtin history` is used.
|
||||
|
||||
The following options are available:
|
||||
|
||||
These flags can appear before or immediately after one of the sub-commands listed above.
|
||||
|
||||
- `-C` or `--case-sensitive` does a case-sensitive search. The default is case-insensitive. Note that prior to fish 2.4.0 the default was case-sensitive.
|
||||
|
||||
- `-c` or `--contains` searches or deletes items in the history that contain the specified text string. This is the default for the `--search` flag. This is not currently supported by the `delete` subcommand.
|
||||
|
||||
- `-e` or `--exact` searches or deletes items in the history that exactly match the specified text string. This is the default for the `delete` subcommand. Note that the match is case-insensitive by default. If you really want an exact match, including letter case, you must use the `-C` or `--case-sensitive` flag.
|
||||
|
||||
- `-p` or `--prefix` searches or deletes items in the history that begin with the specified text string. This is not currently supported by the `--delete` flag.
|
||||
|
||||
- `-t` or `--show-time` prepends each history entry with the date and time the entry was recorded. By default it uses the strftime format `# %c%n`. You can specify another format; e.g., `--show-time="%Y-%m-%d %H:%M:%S "` or `--show-time="%a%I%p"`. The short option, `-t`, doesn't accept a strftime format string; it only uses the default format. Any strftime format is allowed, including `%s` to get the raw UNIX seconds since the epoch.
|
||||
|
||||
- `-z` or `--null` causes history entries written by the search operations to be terminated by a NUL character rather than a newline. This allows the output to be processed by `read -z` to correctly handle multiline history entries.
|
||||
|
||||
- `-<number>` `-n <number>` or `--max=<number>` limits the matched history items to the first "n" matching entries. This is only valid for `history search`.
|
||||
|
||||
- `-R` or `--reverse` causes the history search results to be ordered oldest to newest. Which is the order used by most shells. The default is newest to oldest.
|
||||
|
||||
- `-h` or `--help` display help for this command.
|
||||
|
||||
\subsection history-examples Example
|
||||
|
||||
\fish
|
||||
history clear
|
||||
# Deletes all history items
|
||||
|
||||
history search --contains "foo"
|
||||
# Outputs a list of all previous commands containing the string "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 separated by a space.
|
||||
\endfish
|
||||
|
||||
\subsection customizing-the-histfile Customizing the name of the history file
|
||||
|
||||
By default interactive commands are logged to `$XDG_DATA_HOME/fish/fish_history` (typically `~/.local/share/fish/fish_history`).
|
||||
|
||||
You can set the `fish_history` variable to another name for the current shell session. The default value (when the variable is unset) is `fish` which corresponds to `$XDG_DATA_HOME/fish/fish_history`. If you set it to e.g. `fun`, the history would be written to `$XDG_DATA_HOME/fish/fun_history`. An empty string means history will not be stored at all. This is similar to the private session features in web browsers.
|
||||
|
||||
You can change `fish_history` at any time (by using `set -x fish_history "session_name"`) and it will take effect right away. If you set it to `"default"`, it will use the default session name (which is `"fish"`).
|
||||
|
||||
Other shells such as bash and zsh use a variable named `HISTFILE` for a similar purpose. Fish uses a different name to avoid conflicts and signal that the behavior is different (session name instead of a file path). Also, if you set the var to anything other than `fish` or `default` it will inhibit importing the bash history. That's because the most common use case for this feature is to avoid leaking private or sensitive history when giving a presentation.
|
||||
|
||||
\subsection history-notes Notes
|
||||
|
||||
If you specify both `--prefix` and `--contains` the last flag seen is used.
|
||||
|
||||
Note that for backwards compatibility each subcommand can also be specified as a long option. For example, rather than `history search` you can type `history --search`. Those long options are deprecated and will be removed in a future release.
|
||||
@@ -1,39 +0,0 @@
|
||||
\section if if - conditionally execute a command
|
||||
|
||||
\subsection if-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
if CONDITION; COMMANDS_TRUE...;
|
||||
[else if CONDITION2; COMMANDS_TRUE2...;]
|
||||
[else; COMMANDS_FALSE...;]
|
||||
end
|
||||
\endfish
|
||||
|
||||
\subsection if-description Description
|
||||
|
||||
`if` will execute the command `CONDITION`. If the condition's exit status is 0, the commands `COMMANDS_TRUE` will execute. If the exit status is not 0 and `else` is given, `COMMANDS_FALSE` will be executed.
|
||||
|
||||
You can use <a href="#and">`and`</a> or <a href="#or">`or`</a> in the condition. See the second example below.
|
||||
|
||||
The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
|
||||
\subsection if-example Example
|
||||
|
||||
The following code will print `foo.txt exists` if the file foo.txt exists and is a regular file, otherwise it will print `bar.txt exists` if the file bar.txt exists and is a regular file, otherwise it will print `foo.txt and bar.txt do not exist`.
|
||||
|
||||
\fish
|
||||
if test -f foo.txt
|
||||
echo foo.txt exists
|
||||
else if test -f bar.txt
|
||||
echo bar.txt exists
|
||||
else
|
||||
echo foo.txt and bar.txt do not exist
|
||||
end
|
||||
\endfish
|
||||
|
||||
The following code will print "foo.txt exists and is readable" if foo.txt is a regular file and readable
|
||||
\fish
|
||||
if test -f foo.txt
|
||||
and test -r foo.txt
|
||||
echo "foo.txt exists and is readable"
|
||||
end
|
||||
\endfish
|
||||
1431
doc_src/index.hdr.in
1431
doc_src/index.hdr.in
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
\section isatty isatty - test if a file descriptor is a tty.
|
||||
|
||||
\subsection isatty-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
isatty [FILE DESCRIPTOR]
|
||||
\endfish
|
||||
|
||||
\subsection isatty-description Description
|
||||
|
||||
`isatty` tests if a file descriptor is a tty.
|
||||
|
||||
`FILE DESCRIPTOR` may be either the number of a file descriptor, or one of the strings `stdin`, `stdout`, or `stderr`.
|
||||
|
||||
If the specified file descriptor is a tty, the exit status of the command is zero. Otherwise, the exit status is non-zero. No messages are printed to standard error.
|
||||
|
||||
|
||||
\subsection isatty-examples Examples
|
||||
|
||||
From an interactive shell, the commands below exit with a return value of zero:
|
||||
|
||||
\fish
|
||||
isatty
|
||||
isatty stdout
|
||||
isatty 2
|
||||
echo | isatty 1
|
||||
\endfish
|
||||
|
||||
And these will exit non-zero:
|
||||
|
||||
\fish
|
||||
echo | isatty
|
||||
isatty 9
|
||||
isatty stdout > file
|
||||
isatty 2 2> file
|
||||
\endfish
|
||||
@@ -1,33 +0,0 @@
|
||||
\section jobs jobs - print currently running jobs
|
||||
|
||||
\subsection jobs-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
jobs [OPTIONS] [PID]
|
||||
\endfish
|
||||
|
||||
\subsection jobs-description Description
|
||||
|
||||
`jobs` prints a list of the currently running <a href="index.html#syntax-job-control">jobs</a> and their status.
|
||||
|
||||
jobs accepts the following switches:
|
||||
|
||||
- `-c` or `--command` prints the command name for each process in jobs.
|
||||
|
||||
- `-g` or `--group` only prints the group ID of each job.
|
||||
|
||||
- `-l` or `--last` prints only the last job to be started.
|
||||
|
||||
- `-p` or `--pid` prints the process ID for each process in all jobs.
|
||||
|
||||
- `-q` or `--quiet` prints no output for evaluation of jobs by exit code only.
|
||||
|
||||
On systems that supports this feature, jobs will print the CPU usage of each job since the last command was executed. The CPU usage is expressed as a percentage of full CPU activity. Note that on multiprocessor systems, the total activity may be more than 100\%.
|
||||
|
||||
The exit code of the `jobs` builtin is `0` if there are running background jobs and `1` otherwise.
|
||||
|
||||
\subsection prints no output.
|
||||
|
||||
|
||||
\subsection jobs-example Example
|
||||
|
||||
`jobs` outputs a summary of the current jobs.
|
||||
104
doc_src/math.txt
104
doc_src/math.txt
@@ -1,104 +0,0 @@
|
||||
\section math math - Perform mathematics calculations
|
||||
|
||||
\subsection math-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
math [-sN | --scale=N] [--] EXPRESSION
|
||||
\endfish
|
||||
|
||||
\subsection math-description Description
|
||||
|
||||
`math` is used to perform mathematical calculations. It supports all the usual operations such as addition, subtraction, etc. As well as functions like `abs()`, `sqrt()` and `log2()`.
|
||||
|
||||
By default, the output is as a float with trailing zeroes trimmed. To get a fixed representation, the `--scale` option can be used, including `--scale=0` for integer output.
|
||||
|
||||
Keep in mind that parameter expansion takes before expressions are evaluated. This can be very useful in order to perform calculations involving shell variables or the output of command substitutions, but it also means that parenthesis and the asterisk glob character have to be escaped or quoted.
|
||||
|
||||
`math` ignores whitespace between arguments and takes its input as multiple arguments (internally joined with a space), so `math 2 +2` and `math "2 + 2"` work the same. `math 2 2` is an error.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-sN` or `--scale=N` sets the scale of the result. `N` must be an integer. A scale of zero causes results to be rounded down to the nearest integer. So `3/2` returns `1` rather than `2` which `1.5` would normally round to. This is for compatibility with `bc` which was the basis for this command prior to fish 3.0.0. Scale values greater than zero causes the result to be rounded using the usual rules to the specified number of decimal places.
|
||||
|
||||
\subsection return-values Return Values
|
||||
|
||||
If the expression is successfully evaluated and doesn't over/underflow or return NaN the return `status` is zero (success) else one.
|
||||
|
||||
\subsection math-syntax Syntax
|
||||
|
||||
`math` knows some operators, constants, functions and can (obviously) read numbers.
|
||||
|
||||
For numbers, `.` is always the radix character regardless of locale - `2.5`, not `2,5`. Scientific notation (`10e5`) is also available.
|
||||
|
||||
\subsection math-operators Operators
|
||||
|
||||
`math` knows the following operators:
|
||||
|
||||
- `+` for addition and `-` for subtraction.
|
||||
|
||||
- `*` for multiplication, `/` for division.
|
||||
|
||||
- `^` for exponentiation.
|
||||
|
||||
- `%` for modulo.
|
||||
|
||||
- `(` and `)` for grouping.
|
||||
|
||||
They are all used in an infix manner - `5 + 2`, not `+ 5 2`.
|
||||
|
||||
\subsection math-constants Constants
|
||||
|
||||
`math` knows the following constants:
|
||||
|
||||
- `e` - Euler's number.
|
||||
- `pi` - You know that one. Half of Tau. (Tau is not implemented)
|
||||
|
||||
Use them without a leading `$` - `pi - 3` should be about 0.
|
||||
|
||||
\subsection math-functions Functions
|
||||
|
||||
`math` supports the following functions:
|
||||
|
||||
- `abs`
|
||||
- `acos`
|
||||
- `asin`
|
||||
- `atan`
|
||||
- `atan2`
|
||||
- `ceil`
|
||||
- `cos`
|
||||
- `cosh`
|
||||
- `exp` - the base-e exponential function
|
||||
- `fac` - factorial
|
||||
- `floor`
|
||||
- `ln`
|
||||
- `log` or `log10` - the base-10 logarithm
|
||||
- `ncr`
|
||||
- `npr`
|
||||
- `pow(x,y)` returns x to the y (and can be written as `x ^ y`)
|
||||
- `round` - rounds to the nearest integer, away from 0
|
||||
- `sin`
|
||||
- `sinh`
|
||||
- `sqrt`
|
||||
- `tan`
|
||||
- `tanh`
|
||||
|
||||
All of the trigonometric functions use radians.
|
||||
|
||||
\subsection math-example Examples
|
||||
|
||||
`math 1+1` outputs 2.
|
||||
|
||||
`math $status - 128` outputs the numerical exit status of the last command minus 128.
|
||||
|
||||
`math 10 / 6` outputs `1.666667`.
|
||||
|
||||
`math -s0 10.0 / 6.0` outputs `1`.
|
||||
|
||||
`math -s3 10 / 6` outputs `1.666`.
|
||||
|
||||
`math "sin(pi)"` outputs `0`.
|
||||
|
||||
\subsection math-notes Compatibility notes
|
||||
|
||||
Fish 1.x and 2.x releases relied on the `bc` command for handling `math` expressions. Starting with fish 3.0.0 fish uses the tinyexpr library and evaluates the expression without the involvement of any external commands.
|
||||
|
||||
You don't need to use `--` before the expression even if it begins with a minus sign which might otherwise be interpreted as an invalid option. If you do insert `--` before the expression it will cause option scanning to stop just like for every other command and it won't be part of the expression.
|
||||
@@ -1,32 +0,0 @@
|
||||
\section nextd nextd - move forward through directory history
|
||||
|
||||
\subsection nextd-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
nextd [ -l | --list ] [POS]
|
||||
\endfish
|
||||
|
||||
\subsection nextd-description Description
|
||||
|
||||
`nextd` moves forwards `POS` positions in the history of visited directories; if the end of the history has been hit, a warning is printed.
|
||||
|
||||
If the `-l` or `--list` flag is specified, the current directory history is also displayed.
|
||||
|
||||
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates.
|
||||
|
||||
You may be interested in the <a href="commands.html#cdh">`cdh`</a> command which provides a more intuitive way to navigate to recently visited directories.
|
||||
|
||||
\subsection nextd-example Example
|
||||
|
||||
\fish
|
||||
cd /usr/src
|
||||
# Working directory is now /usr/src
|
||||
|
||||
cd /usr/src/fish-shell
|
||||
# Working directory is now /usr/src/fish-shell
|
||||
|
||||
prevd
|
||||
# Working directory is now /usr/src
|
||||
|
||||
nextd
|
||||
# Working directory is now /usr/src/fish-shell
|
||||
\endfish
|
||||
@@ -1,23 +0,0 @@
|
||||
\section not not - negate the exit status of a job
|
||||
|
||||
\subsection not-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
not COMMAND [OPTIONS...]
|
||||
\endfish
|
||||
|
||||
\subsection not-description Description
|
||||
|
||||
`not` negates the exit status of another command. If the exit status is zero, `not` returns 1. Otherwise, `not` returns 0.
|
||||
|
||||
|
||||
\subsection not-example Example
|
||||
|
||||
The following code reports an error and exits if no file named spoon can be found.
|
||||
|
||||
\fish
|
||||
if not test -f spoon
|
||||
echo There is no spoon
|
||||
exit 1
|
||||
end
|
||||
\endfish
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
\section open open - open file in its default application
|
||||
|
||||
\subsection open-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
open FILES...
|
||||
\endfish
|
||||
|
||||
\subsection open-description Description
|
||||
|
||||
`open` opens a file in its default application, using the appropriate tool for the operating system. On GNU/Linux, this requires the common but optional `xdg-open` utility, from the `xdg-utils` package.
|
||||
|
||||
Note that this function will not be used if a command by this name exists (which is the case on macOS or Haiku).
|
||||
|
||||
|
||||
\subsection open-example Example
|
||||
|
||||
`open *.txt` opens all the text files in the current directory using your system's default text editor.
|
||||
@@ -1,23 +0,0 @@
|
||||
\section or or - conditionally execute a command
|
||||
|
||||
\subsection or-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
COMMAND1; or COMMAND2
|
||||
\endfish
|
||||
|
||||
\subsection or-description Description
|
||||
|
||||
`or` is used to execute a command if the previous command was not successful (returned a status of something other than 0).
|
||||
|
||||
`or` statements may be used as part of the condition in an <a href="#if">`and`</a> or <a href="#while">`while`</a> block. See the documentation
|
||||
for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
|
||||
|
||||
`or` does not change the current exit status itself, but the command it runs most likely will. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
|
||||
\subsection or-example Example
|
||||
|
||||
The following code runs the `make` command to build a program. If the build succeeds, the program is installed. If either step fails, `make clean` is run, which removes the files created by the build process.
|
||||
|
||||
\fish
|
||||
make; and make install; or make clean
|
||||
\endfish
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user