mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-10 01:21:16 -03:00
Compare commits
454 Commits
release-mo
...
4.0.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7619fa316c | ||
|
|
e2005c64b3 | ||
|
|
9ada3e6c16 | ||
|
|
bdba2c227d | ||
|
|
201882e72a | ||
|
|
1db0ff9f77 | ||
|
|
9258275fe6 | ||
|
|
6900b89c82 | ||
|
|
9c0086b7af | ||
|
|
e200abe39c | ||
|
|
0c8f1f4220 | ||
|
|
e593da1c2e | ||
|
|
6666c8f1cd | ||
|
|
3e61036911 | ||
|
|
f23a479b81 | ||
|
|
e274ff41d0 | ||
|
|
d2af306f3d | ||
|
|
0e7c7f1745 | ||
|
|
3fada80553 | ||
|
|
c7d4acbef8 | ||
|
|
e204a4c126 | ||
|
|
9af33802ec | ||
|
|
eecf0814a1 | ||
|
|
1ceebdf580 | ||
|
|
335f91babd | ||
|
|
ec66749369 | ||
|
|
6e9e33d81d | ||
|
|
f3ebc68d5d | ||
|
|
4be17bfefb | ||
|
|
6fd0025f38 | ||
|
|
052fc18db9 | ||
|
|
63a08e53e5 | ||
|
|
62ac23453e | ||
|
|
c052beb4dd | ||
|
|
e0cabacdaa | ||
|
|
59b9f57802 | ||
|
|
65fc2b539c | ||
|
|
3f1add9e21 | ||
|
|
68d2cafa6e | ||
|
|
b9d9e7edc6 | ||
|
|
6b17ec7dae | ||
|
|
08d796890a | ||
|
|
4f98ef36f6 | ||
|
|
a09c78491f | ||
|
|
02932d6b8c | ||
|
|
7cca98bda2 | ||
|
|
b77fc28692 | ||
|
|
3475531ef7 | ||
|
|
8222ed891b | ||
|
|
f787e6858c | ||
|
|
a014166795 | ||
|
|
f7e639504a | ||
|
|
028b60cad6 | ||
|
|
b11e22d905 | ||
|
|
33f8415785 | ||
|
|
5ccd155177 | ||
|
|
0f8d3a5174 | ||
|
|
c4a26cb2b1 | ||
|
|
7228cb15bf | ||
|
|
d5b46d6535 | ||
|
|
d4b4d44f14 | ||
|
|
b8cfd6d12b | ||
|
|
6fb22a4fd1 | ||
|
|
35849c57dc | ||
|
|
27504658ce | ||
|
|
db323348c7 | ||
|
|
edb1b5f333 | ||
|
|
2d8d377ddc | ||
|
|
057dd930b4 | ||
|
|
25b944e3e6 | ||
|
|
f1456f9707 | ||
|
|
c88e6827b7 | ||
|
|
bc3e3ae029 | ||
|
|
3191ac13e5 | ||
|
|
4f810809c8 | ||
|
|
d622949d26 | ||
|
|
d95b662542 | ||
|
|
d88d3122c8 | ||
|
|
a7f717c59c | ||
|
|
ba49981f17 | ||
|
|
05ae55b172 | ||
|
|
b5877ebe44 | ||
|
|
f9a03215b8 | ||
|
|
ff0980c4c1 | ||
|
|
1a58d3f08b | ||
|
|
b71027f622 | ||
|
|
84c03c6f26 | ||
|
|
bf455bc316 | ||
|
|
6af0378916 | ||
|
|
de154065fe | ||
|
|
459e9b7847 | ||
|
|
f127323c33 | ||
|
|
3fc245d829 | ||
|
|
542793a534 | ||
|
|
18c231de29 | ||
|
|
8e78857836 | ||
|
|
c7efbf590e | ||
|
|
5771085280 | ||
|
|
76d2419228 | ||
|
|
ffbf957fa3 | ||
|
|
ae3532e9ec | ||
|
|
5cd2ef903a | ||
|
|
67b6afffd4 | ||
|
|
6df88e1a9f | ||
|
|
61884bda36 | ||
|
|
66584dadcc | ||
|
|
5944518e6e | ||
|
|
19502ff9e7 | ||
|
|
e37e1b8f78 | ||
|
|
5d31be1c3e | ||
|
|
7a959723ef | ||
|
|
ad7631093d | ||
|
|
bd8d268255 | ||
|
|
83f29ed09c | ||
|
|
aca6836103 | ||
|
|
c9f1979b05 | ||
|
|
4a35c48ce5 | ||
|
|
f336cf5624 | ||
|
|
1504731d53 | ||
|
|
9dce68fab4 | ||
|
|
815bc054e7 | ||
|
|
b8af4b20c2 | ||
|
|
c06830ccf2 | ||
|
|
f96b9c53ce | ||
|
|
12527d1522 | ||
|
|
46422b6a16 | ||
|
|
97f0809b62 | ||
|
|
d30a2c5240 | ||
|
|
7ee6d91ba0 | ||
|
|
a94c4e96ab | ||
|
|
e767bb623f | ||
|
|
e925eccad2 | ||
|
|
200eeffeee | ||
|
|
0d453039ac | ||
|
|
044afefc5c | ||
|
|
5cce0918a9 | ||
|
|
3a673aff63 | ||
|
|
880aa479bf | ||
|
|
303af078f3 | ||
|
|
1e069b0fff | ||
|
|
eb336889b7 | ||
|
|
1c57144f8b | ||
|
|
6d30751f1c | ||
|
|
d33b967196 | ||
|
|
ea115f8595 | ||
|
|
def40ff34d | ||
|
|
bfa1e0dafb | ||
|
|
b52173c854 | ||
|
|
b5736c5535 | ||
|
|
e2a0b0e2b8 | ||
|
|
ebc460b9f9 | ||
|
|
df56f7155e | ||
|
|
40b63c35ab | ||
|
|
b72dc096f9 | ||
|
|
c571b65221 | ||
|
|
fab273cf4d | ||
|
|
0f346991e4 | ||
|
|
9c2bfec150 | ||
|
|
9c40f72643 | ||
|
|
774ad16404 | ||
|
|
6d7a7c2254 | ||
|
|
e1349b9c4a | ||
|
|
0677c03689 | ||
|
|
1b6e107131 | ||
|
|
7ea368b6d3 | ||
|
|
00b2009851 | ||
|
|
47d3189614 | ||
|
|
65ac71edcc | ||
|
|
a11b9e5af7 | ||
|
|
db244e0492 | ||
|
|
3469fd25ec | ||
|
|
378f452eaa | ||
|
|
04151d758b | ||
|
|
bf91da5979 | ||
|
|
2f2ea729a7 | ||
|
|
db48cd547b | ||
|
|
acadf00718 | ||
|
|
93ac5d0eb3 | ||
|
|
5aec9e3b47 | ||
|
|
d7fb0308a7 | ||
|
|
fa5de3ece8 | ||
|
|
29e69bd113 | ||
|
|
4d6544591e | ||
|
|
bfbee7a7ff | ||
|
|
3400844f9a | ||
|
|
f1bb4e02fe | ||
|
|
9385a25c22 | ||
|
|
323bddcce6 | ||
|
|
d29d63d930 | ||
|
|
a62bae9e8f | ||
|
|
28d4fc33d8 | ||
|
|
7dc046b959 | ||
|
|
9882849fda | ||
|
|
92582d5b1f | ||
|
|
8eb5e36aa6 | ||
|
|
fd3ed7cfa5 | ||
|
|
4c9dfcc5d7 | ||
|
|
4024d82412 | ||
|
|
1c11055241 | ||
|
|
28fb5b5207 | ||
|
|
45439f07d7 | ||
|
|
452aa6c614 | ||
|
|
8c92ea1642 | ||
|
|
d2bfb51611 | ||
|
|
806734cc56 | ||
|
|
8e141070b2 | ||
|
|
b009c0d480 | ||
|
|
b3aa79e9aa | ||
|
|
fbf9ac8046 | ||
|
|
fb6d3c3669 | ||
|
|
d6dccc3c88 | ||
|
|
f36a7262db | ||
|
|
8a5b1ccc17 | ||
|
|
52a2bed38c | ||
|
|
cbfbac2198 | ||
|
|
a9b7dd1a9b | ||
|
|
4decacb933 | ||
|
|
620eed466b | ||
|
|
33fe575112 | ||
|
|
13f7e6d0a5 | ||
|
|
44a8344da1 | ||
|
|
92919effc5 | ||
|
|
046cadb53a | ||
|
|
a5f99afa47 | ||
|
|
24397c71cd | ||
|
|
566ff38fee | ||
|
|
7ea2ab4ebb | ||
|
|
e6e647092d | ||
|
|
5845a3f7ad | ||
|
|
ff8a879e80 | ||
|
|
6749a44d0f | ||
|
|
550a076fa3 | ||
|
|
c28659a045 | ||
|
|
d2608588fc | ||
|
|
dd333cdc82 | ||
|
|
57a7920e15 | ||
|
|
2f99a82700 | ||
|
|
5f76fc3e41 | ||
|
|
c0a2b55efd | ||
|
|
f75912d205 | ||
|
|
701853fdd3 | ||
|
|
ea2c53ca85 | ||
|
|
06105e9207 | ||
|
|
e858322749 | ||
|
|
bd2ddda9a4 | ||
|
|
6db110916b | ||
|
|
d707a516d2 | ||
|
|
aed52049ab | ||
|
|
5fed900b94 | ||
|
|
70ba81e5b3 | ||
|
|
f237fb7b9f | ||
|
|
7069f3fe40 | ||
|
|
1e7de063bd | ||
|
|
541f8b47bf | ||
|
|
6eec2db292 | ||
|
|
039011bc81 | ||
|
|
9abec243a4 | ||
|
|
f89e26b06e | ||
|
|
80d53b129f | ||
|
|
7162822486 | ||
|
|
7c2a379674 | ||
|
|
25534bf657 | ||
|
|
687001f8b7 | ||
|
|
e6fea730e2 | ||
|
|
b56bb80a14 | ||
|
|
5fc47f37a6 | ||
|
|
8557c3c48c | ||
|
|
c54dfa12c1 | ||
|
|
67fa71a94d | ||
|
|
0275c5e803 | ||
|
|
8fd0399ed3 | ||
|
|
ac951427af | ||
|
|
95f4c9c07e | ||
|
|
8add30e3bf | ||
|
|
cb3fbd3a5c | ||
|
|
9b9663ea44 | ||
|
|
a23cd62ec7 | ||
|
|
489d6b9dd8 | ||
|
|
10ac98e2ea | ||
|
|
46ce01223b | ||
|
|
50c737fa55 | ||
|
|
a98997fab0 | ||
|
|
cc8fa0f780 | ||
|
|
378e9b236a | ||
|
|
0a145cff3c | ||
|
|
f9febba2b0 | ||
|
|
84d8655677 | ||
|
|
abc1a45ea1 | ||
|
|
be16eeef69 | ||
|
|
6d28845c2b | ||
|
|
99fa8aaaa7 | ||
|
|
fa298c41e0 | ||
|
|
327aa964e9 | ||
|
|
6c852655dd | ||
|
|
0e0d56d805 | ||
|
|
2d2f18c159 | ||
|
|
c58313fb2b | ||
|
|
662607fb2a | ||
|
|
6ae887383c | ||
|
|
1b33e4b9a6 | ||
|
|
0083192fcb | ||
|
|
5c8b6adc2c | ||
|
|
c97b1a992c | ||
|
|
56a1403350 | ||
|
|
6fded249cd | ||
|
|
421ce13be6 | ||
|
|
99b5e6e0e7 | ||
|
|
004953a3b2 | ||
|
|
7e516925e9 | ||
|
|
0b68fbfd85 | ||
|
|
fcf8ed0628 | ||
|
|
210d687b2b | ||
|
|
74e0436c3c | ||
|
|
3360dcbebc | ||
|
|
1599293796 | ||
|
|
2343a6b1f1 | ||
|
|
7c73c5fec0 | ||
|
|
7827a8e533 | ||
|
|
aa30b4db4b | ||
|
|
378dc9123a | ||
|
|
5abd0e46f5 | ||
|
|
e24823dd6c | ||
|
|
3012020af3 | ||
|
|
7b2cc9dca2 | ||
|
|
d124c31958 | ||
|
|
b2e6609367 | ||
|
|
1cad9898d6 | ||
|
|
4859606e0c | ||
|
|
5d10bc6a02 | ||
|
|
eee44b7469 | ||
|
|
8736d9b1e7 | ||
|
|
f5e71063d7 | ||
|
|
2d1ad1c3cc | ||
|
|
8b464d96af | ||
|
|
281df5daad | ||
|
|
3ed031c149 | ||
|
|
644171fac6 | ||
|
|
c625a324ba | ||
|
|
4101bb30bf | ||
|
|
b89619330b | ||
|
|
f0a5f8738b | ||
|
|
1347df898e | ||
|
|
2fd51355c3 | ||
|
|
8c8da78cf8 | ||
|
|
b949497bc1 | ||
|
|
b570c7f6a6 | ||
|
|
36c5ee045c | ||
|
|
2d07aa2686 | ||
|
|
8dcde27e0b | ||
|
|
212dd6ec37 | ||
|
|
fcab68c591 | ||
|
|
6fe192606a | ||
|
|
11f11e27a1 | ||
|
|
31b15405e9 | ||
|
|
edd82be58d | ||
|
|
b92830cb17 | ||
|
|
b3108c0cee | ||
|
|
7a667b4f6d | ||
|
|
c4bc6b6f09 | ||
|
|
262e2d5fe6 | ||
|
|
93aa5a9376 | ||
|
|
642eff9e1f | ||
|
|
723e5a8417 | ||
|
|
0e6171b63e | ||
|
|
98fcb1c6ba | ||
|
|
421e27b1bf | ||
|
|
13f0c9b0c6 | ||
|
|
2d8fcbcdcd | ||
|
|
68b9f96f84 | ||
|
|
913860bd1c | ||
|
|
ca21872d14 | ||
|
|
2b19e1a09b | ||
|
|
cdeb3977c3 | ||
|
|
fea1e3aee5 | ||
|
|
c1acbf2845 | ||
|
|
366c1b7210 | ||
|
|
4061ef7137 | ||
|
|
fc47d9fa1d | ||
|
|
2cf4b12d41 | ||
|
|
95ac51101e | ||
|
|
3307672998 | ||
|
|
080e40aac0 | ||
|
|
7846a232a9 | ||
|
|
6d76b938c7 | ||
|
|
14a5c0ca44 | ||
|
|
bb57f2391f | ||
|
|
d33cbfd1a3 | ||
|
|
4e3dc51bc4 | ||
|
|
960415db3f | ||
|
|
0ef811c86e | ||
|
|
f0a3a5708f | ||
|
|
dff454b1c7 | ||
|
|
2543b8198d | ||
|
|
9fddc3e887 | ||
|
|
2279b47178 | ||
|
|
5405833822 | ||
|
|
5e3fdf3320 | ||
|
|
373c5b1e14 | ||
|
|
56718c31b1 | ||
|
|
c1fbe237c9 | ||
|
|
bfc68345c9 | ||
|
|
4b24fe7daf | ||
|
|
0979b9a98b | ||
|
|
018659bf66 | ||
|
|
0d9ad0f23b | ||
|
|
767ae87191 | ||
|
|
7f29f09d25 | ||
|
|
7debdb75af | ||
|
|
24a077f804 | ||
|
|
d7f4ad7ab8 | ||
|
|
33a170d614 | ||
|
|
d1a2923d72 | ||
|
|
8aed929f5e | ||
|
|
e5040cbbaf | ||
|
|
23941ea9ca | ||
|
|
344b072e82 | ||
|
|
cfcf415db7 | ||
|
|
04d97e936a | ||
|
|
f42beec42e | ||
|
|
85404bf7a9 | ||
|
|
6525e3d11a | ||
|
|
3710e98d65 | ||
|
|
9e01981bb9 | ||
|
|
cd3b6f9124 | ||
|
|
ec939fb22f | ||
|
|
31d7f197b1 | ||
|
|
dccc3349f0 | ||
|
|
fa72d1faa1 | ||
|
|
e322d3addc | ||
|
|
3e3aa08c28 | ||
|
|
5ee51492be | ||
|
|
677e53f06a | ||
|
|
f89909ae31 | ||
|
|
adfa87d141 | ||
|
|
c155acd004 | ||
|
|
2e2765eec0 | ||
|
|
ca27e028df | ||
|
|
0e62178320 | ||
|
|
bd9fee417b | ||
|
|
9ef76860e6 | ||
|
|
5760a1afcf | ||
|
|
b05e071238 | ||
|
|
8eaa16542a | ||
|
|
832cda26f6 | ||
|
|
0e97b876ea | ||
|
|
aca8058717 | ||
|
|
dea7841611 | ||
|
|
c2cde317f2 | ||
|
|
04c9134275 | ||
|
|
50333d8d00 | ||
|
|
0d5e6f356e | ||
|
|
9c960d6af8 | ||
|
|
daa2f2d023 | ||
|
|
21860cbd39 |
@@ -1,8 +0,0 @@
|
||||
# For macOS, support 10.9 on x86-64, and 11.0 on aarch64, which
|
||||
# is the minimum supported version for Apple Silicon.
|
||||
[target.x86_64-apple-darwin]
|
||||
rustflags = ["-C", "link-arg=-mmacosx-version-min=10.9"]
|
||||
|
||||
[target.aarch64-apple-darwin]
|
||||
rustflags = ["-C", "link-arg=-mmacosx-version-min=11.0"]
|
||||
|
||||
@@ -13,16 +13,20 @@ max_line_length = 100
|
||||
indent_style = tab
|
||||
|
||||
[*.{md,rst}]
|
||||
max_line_length = unset
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{sh,ac}]
|
||||
indent_size = 2
|
||||
[*.sh]
|
||||
indent_size = 4
|
||||
|
||||
[build_tools/release.sh]
|
||||
max_line_length = 72
|
||||
|
||||
[Dockerfile]
|
||||
indent_size = 2
|
||||
|
||||
[share/{completions,functions}/**.fish]
|
||||
max_line_length = off
|
||||
max_line_length = unset
|
||||
|
||||
[{COMMIT_EDITMSG,git-revise-todo}]
|
||||
max_line_length = 80
|
||||
[{COMMIT_EDITMSG,git-revise-todo,*.jjdescription}]
|
||||
max_line_length = 72
|
||||
|
||||
20
.github/actions/rust-toolchain@oldest-supported/action.yml
vendored
Normal file
20
.github/actions/rust-toolchain@oldest-supported/action.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Oldest Supported Rust Toolchain
|
||||
|
||||
inputs:
|
||||
targets:
|
||||
description: Comma-separated list of target triples to install for this toolchain
|
||||
required: false
|
||||
components:
|
||||
description: Comma-separated list of components to be additionally installed
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@1.70
|
||||
with:
|
||||
targets: ${{ inputs.targets }}
|
||||
components: ${{ inputs.components}}
|
||||
20
.github/actions/rust-toolchain@stable/action.yml
vendored
Normal file
20
.github/actions/rust-toolchain@stable/action.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Stable Rust Toolchain
|
||||
|
||||
inputs:
|
||||
targets:
|
||||
description: Comma-separated list of target triples to install for this toolchain
|
||||
required: false
|
||||
components:
|
||||
description: Comma-separated list of components to be additionally installed
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@1.89
|
||||
with:
|
||||
targets: ${{ inputs.targets }}
|
||||
components: ${{ inputs.components }}
|
||||
42
.github/workflows/mac_codesign.yml
vendored
42
.github/workflows/mac_codesign.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: macOS build and codesign
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Enables manual trigger from GitHub UI
|
||||
|
||||
jobs:
|
||||
build-and-code-sign:
|
||||
runs-on: macos-latest
|
||||
environment: macos-codesign
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust 1.73.0
|
||||
uses: dtolnay/rust-toolchain@1.73.0
|
||||
with:
|
||||
targets: x86_64-apple-darwin
|
||||
- name: Install Rust 1.79
|
||||
uses: dtolnay/rust-toolchain@1.79
|
||||
with:
|
||||
targets: aarch64-apple-darwin
|
||||
- name: build-and-codesign
|
||||
run: |
|
||||
cargo install apple-codesign
|
||||
mkdir -p "$FISH_ARTEFACT_PATH"
|
||||
echo "$MAC_CODESIGN_APP_P12_BASE64" | base64 --decode > /tmp/app.p12
|
||||
echo "$MAC_CODESIGN_INSTALLER_P12_BASE64" | base64 --decode > /tmp/installer.p12
|
||||
echo "$MACOS_NOTARIZE_JSON" > /tmp/notarize.json
|
||||
./build_tools/make_pkg.sh -s -f /tmp/app.p12 -i /tmp/installer.p12 -p "$MAC_CODESIGN_PASSWORD" -n -j /tmp/notarize.json
|
||||
rm /tmp/installer.p12 /tmp/app.p12 /tmp/notarize.json
|
||||
env:
|
||||
MAC_CODESIGN_APP_P12_BASE64: ${{ secrets.MAC_CODESIGN_APP_P12_BASE64 }}
|
||||
MAC_CODESIGN_INSTALLER_P12_BASE64: ${{ secrets.MAC_CODESIGN_INSTALLER_P12_BASE64 }}
|
||||
MAC_CODESIGN_PASSWORD: ${{ secrets.MAC_CODESIGN_PASSWORD }}
|
||||
MACOS_NOTARIZE_JSON: ${{ secrets.MACOS_NOTARIZE_JSON }}
|
||||
# macOS runners keep having issues loading Cargo.toml dependencies from git (GitHub) instead
|
||||
# of crates.io, so give this a try. It's also sometimes significantly faster on all platforms.
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
FISH_ARTEFACT_PATH: /tmp/fish-built
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macOS Artefacts
|
||||
path: /tmp/fish-built/*
|
||||
if-no-files-found: error
|
||||
30
.github/workflows/main.yml
vendored
30
.github/workflows/main.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: make test
|
||||
name: make fish_run_tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
@@ -28,10 +28,10 @@ jobs:
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- name: make
|
||||
run: |
|
||||
make VERBOSE=1
|
||||
- name: make test
|
||||
make -C build VERBOSE=1
|
||||
- name: make fish_run_tests
|
||||
run: |
|
||||
make VERBOSE=1 test
|
||||
make -C build VERBOSE=1 fish_run_tests
|
||||
|
||||
ubuntu-32bit-static-pcre2:
|
||||
|
||||
@@ -54,10 +54,10 @@ jobs:
|
||||
cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu ..
|
||||
- name: make
|
||||
run: |
|
||||
make VERBOSE=1
|
||||
- name: make test
|
||||
make -C build VERBOSE=1
|
||||
- name: make fish_run_tests
|
||||
run: |
|
||||
make VERBOSE=1 test
|
||||
make -C build VERBOSE=1 fish_run_tests
|
||||
|
||||
ubuntu-asan:
|
||||
|
||||
@@ -92,8 +92,8 @@ jobs:
|
||||
cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug
|
||||
- name: make
|
||||
run: |
|
||||
make VERBOSE=1
|
||||
- name: make test
|
||||
make -C build VERBOSE=1
|
||||
- name: make fish_run_tests
|
||||
env:
|
||||
FISH_CI_SAN: 1
|
||||
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1:fast_unwind_on_malloc=0
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
llvm_version=$(clang --version | awk 'NR==1 { split($NF, version, "."); print version[1] }')
|
||||
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-$llvm_version
|
||||
export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt"
|
||||
make VERBOSE=1 test
|
||||
make -C build VERBOSE=1 fish_run_tests
|
||||
|
||||
# Our clang++ tsan builds are not recognizing safe rust patterns (such as the fact that Drop
|
||||
# cannot be called while a thread is using the object in question). Rust has its own way of
|
||||
@@ -133,9 +133,9 @@ jobs:
|
||||
# - name: make
|
||||
# run: |
|
||||
# make
|
||||
# - name: make test
|
||||
# - name: make fish_run_tests
|
||||
# run: |
|
||||
# make test
|
||||
# make -C build fish_run_tests
|
||||
|
||||
macos:
|
||||
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
cmake -DWITH_GETTEXT=NO -DCMAKE_BUILD_TYPE=Debug ..
|
||||
- name: make
|
||||
run: |
|
||||
make VERBOSE=1
|
||||
- name: make test
|
||||
make -C build VERBOSE=1
|
||||
- name: make fish_run_tests
|
||||
run: |
|
||||
make VERBOSE=1 test
|
||||
make -C build VERBOSE=1 fish_run_tests
|
||||
|
||||
211
.github/workflows/release.yml
vendored
Normal file
211
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
name: Create a new release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
is-release-tag:
|
||||
name: Pre-release checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
- name: Check if the pushed tag looks like a release
|
||||
run: |
|
||||
set -x
|
||||
commit_subject=$(git log -1 --format=%s)
|
||||
tag=$(git describe)
|
||||
[ "$commit_subject" = "Release $tag" ]
|
||||
|
||||
|
||||
source-tarball:
|
||||
needs: [is-release-tag]
|
||||
name: Create the source tarball
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
tarball-name: ${{ steps.version.outputs.tarball-name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
- name: Install dependencies
|
||||
run: sudo apt install cmake gettext ninja-build python3-pip python3-sphinx
|
||||
- name: Create tarball
|
||||
run: |
|
||||
set -x
|
||||
mkdir /tmp/fish-built
|
||||
FISH_ARTEFACT_PATH=/tmp/fish-built ./build_tools/make_tarball.sh
|
||||
{
|
||||
pip install sphinx-markdown-builder==0.6.8
|
||||
relnotes_tmp=$(mktemp -d)
|
||||
mkdir "$relnotes_tmp/src" "$relnotes_tmp/out"
|
||||
version=$(git describe)
|
||||
minor_version=${version%.*}
|
||||
# Delete notes for prior releases.
|
||||
# Also fix up any relative references to other documentation files.
|
||||
awk <CHANGELOG.rst '
|
||||
/^fish/ && $2 != "'"$version"'" { exit }
|
||||
{ print }
|
||||
' |
|
||||
sed >"$relnotes_tmp/src"/index.rst \
|
||||
-e 's,:doc:`\(.*\) <\([^>]*\)>`,`\1 <https://fishshell.com/docs/'"$minor_version"'/\2.html>`_,g' \
|
||||
-e 's,:envvar:`\([^`]*\)`,``$\1``,g'
|
||||
# In future, we could reuse doctree from when we made HTML docs.
|
||||
sphinx-build -j 1 $(: "sphinx-markdown-builder is not marked concurrency-safe") \
|
||||
-W -E -b markdown -c doc_src \
|
||||
-d "$relnotes_tmp/doctree" "$relnotes_tmp/src" $relnotes_tmp/out
|
||||
# Delete title
|
||||
sed -n 1p "$relnotes_tmp/out/index.md" | grep -q "^# fish .*"
|
||||
sed -n 2p "$relnotes_tmp/out/index.md" | grep -q '^$'
|
||||
sed -i 1,2d "$relnotes_tmp/out/index.md"
|
||||
{
|
||||
cat "$relnotes_tmp/out/index.md" - <<EOF
|
||||
----
|
||||
|
||||
*Download links: To download the source code for fish, we suggest the file named "fish-$version.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly.*
|
||||
|
||||
*There is no GPG signature because we haven't yet decided how to integrate signing into the new release automation.*
|
||||
|
||||
*The files called fish-$version-linux-\*.tar.xz are experimental packages containing a single standalone ``fish`` binary for any Linux with the given architecture.*
|
||||
EOF
|
||||
} >/tmp/fish-built/release-notes.md
|
||||
rm -r "$relnotes_tmp"
|
||||
}
|
||||
- name: Upload tarball artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: source-tarball
|
||||
path: |
|
||||
/tmp/fish-built/fish-${{ github.ref_name }}.tar.xz
|
||||
/tmp/fish-built/release-notes.md
|
||||
if-no-files-found: error
|
||||
|
||||
packages-for-linux:
|
||||
needs: [is-release-tag]
|
||||
name: Build single-file fish for Linux (experimental)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
- name: Install Rust Stable
|
||||
uses: ./.github/actions/rust-toolchain@stable
|
||||
with:
|
||||
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
|
||||
- name: Install dependencies
|
||||
run: sudo apt install crossbuild-essential-arm64 musl-tools python3-sphinx
|
||||
- name: Build statically-linked executables
|
||||
run: |
|
||||
set -x
|
||||
CFLAGS="-D_FORTIFY_SOURCE=2" \
|
||||
CMAKE_WITH_GETTEXT=0 \
|
||||
CC=aarch64-linux-gnu-gcc \
|
||||
RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc -C link-arg=-lgcc -C link-arg=-D_FORTIFY_SOURCE=0" \
|
||||
cargo build --release --target aarch64-unknown-linux-musl --bin fish
|
||||
cargo build --release --target x86_64-unknown-linux-musl --bin fish
|
||||
- name: Compress
|
||||
run: |
|
||||
set -x
|
||||
for arch in x86_64 aarch64; do
|
||||
tar -cazf fish-$(git describe)-linux-$arch.tar.xz \
|
||||
-C target/$arch-unknown-linux-musl/release fish
|
||||
done
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Static builds for Linux
|
||||
path: fish-${{ github.ref_name }}-linux-*.tar.xz
|
||||
if-no-files-found: error
|
||||
|
||||
create-draft-release:
|
||||
needs:
|
||||
- is-release-tag
|
||||
- source-tarball
|
||||
- packages-for-linux
|
||||
name: Create release draft
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
merge-multiple: true
|
||||
path: /tmp/artifacts
|
||||
- name: List artifacts
|
||||
run: find /tmp/artifacts -type f
|
||||
- name: Create draft release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: fish ${{ github.ref_name }}
|
||||
body_path: /tmp/artifacts/release-notes.md
|
||||
draft: true
|
||||
files: |
|
||||
/tmp/artifacts/fish-${{ github.ref_name }}.tar.xz
|
||||
/tmp/artifacts/fish-${{ github.ref_name }}-linux-*.tar.xz
|
||||
|
||||
packages-for-macos:
|
||||
needs: [is-release-tag, create-draft-release]
|
||||
name: Build packages for macOS
|
||||
runs-on: macos-latest
|
||||
environment: macos-codesign
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Workaround for https://github.com/actions/checkout/issues/882
|
||||
ref: ${{ github.ref }}
|
||||
- name: Install Rust
|
||||
uses: ./.github/actions/rust-toolchain@oldest-supported
|
||||
with:
|
||||
targets: x86_64-apple-darwin
|
||||
- name: Install Rust Stable
|
||||
uses: ./.github/actions/rust-toolchain@stable
|
||||
with:
|
||||
targets: aarch64-apple-darwin
|
||||
- name: Build and codesign
|
||||
run: |
|
||||
die() { echo >&2 "$*"; exit 1; }
|
||||
[ -n "$MAC_CODESIGN_APP_P12_BASE64" ] || die "Missing MAC_CODESIGN_APP_P12_BASE64"
|
||||
[ -n "$MAC_CODESIGN_INSTALLER_P12_BASE64" ] || die "Missing MAC_CODESIGN_INSTALLER_P12_BASE64"
|
||||
[ -n "$MAC_CODESIGN_PASSWORD" ] || die "Missing MAC_CODESIGN_PASSWORD"
|
||||
[ -n "$MACOS_NOTARIZE_JSON" ] || die "Missing MACOS_NOTARIZE_JSON"
|
||||
set -x
|
||||
export FISH_ARTEFACT_PATH=/tmp/fish-built
|
||||
# macOS runners keep having issues loading Cargo.toml dependencies from git (GitHub) instead
|
||||
# of crates.io, so give this a try. It's also sometimes significantly faster on all platforms.
|
||||
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
cargo install apple-codesign
|
||||
mkdir -p "$FISH_ARTEFACT_PATH"
|
||||
echo "$MAC_CODESIGN_APP_P12_BASE64" | base64 --decode >/tmp/app.p12
|
||||
echo "$MAC_CODESIGN_INSTALLER_P12_BASE64" | base64 --decode >/tmp/installer.p12
|
||||
echo "$MACOS_NOTARIZE_JSON" >/tmp/notarize.json
|
||||
./build_tools/make_macos_pkg.sh -s -f /tmp/app.p12 \
|
||||
-i /tmp/installer.p12 -p "$MAC_CODESIGN_PASSWORD" \
|
||||
-n -j /tmp/notarize.json
|
||||
[ -f "${FISH_ARTEFACT_PATH}/fish-${{ github.ref_name }}.app.zip" ]
|
||||
[ -f "${FISH_ARTEFACT_PATH}/fish-${{ github.ref_name }}.pkg" ]
|
||||
rm /tmp/installer.p12 /tmp/app.p12 /tmp/notarize.json
|
||||
env:
|
||||
MAC_CODESIGN_APP_P12_BASE64: ${{ secrets.MAC_CODESIGN_APP_P12_BASE64 }}
|
||||
MAC_CODESIGN_INSTALLER_P12_BASE64: ${{ secrets.MAC_CODESIGN_INSTALLER_P12_BASE64 }}
|
||||
MAC_CODESIGN_PASSWORD: ${{ secrets.MAC_CODESIGN_PASSWORD }}
|
||||
MACOS_NOTARIZE_JSON: ${{ secrets.MACOS_NOTARIZE_JSON }}
|
||||
- name: Add macOS packages to the release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload $(git describe) \
|
||||
/tmp/fish-built/fish-${{ github.ref_name }}.app.zip \
|
||||
/tmp/fish-built/fish-${{ github.ref_name }}.pkg
|
||||
8
.github/workflows/rust_checks.yml
vendored
8
.github/workflows/rust_checks.yml
vendored
@@ -31,3 +31,11 @@ jobs:
|
||||
# This used to have --deny=warnings, but that turns rust release day
|
||||
# into automatic CI failure day, so we don't do that.
|
||||
run: cargo clippy --workspace --all-targets
|
||||
|
||||
# Disabling for now because it also checks "advisories",
|
||||
# making CI fail for reasons unrelated to the patch
|
||||
# cargo-deny:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: EmbarkStudios/cargo-deny-action@v1
|
||||
|
||||
@@ -31,7 +31,7 @@ PREFIX?=/usr/local
|
||||
build/fish: build/$(BUILDFILE)
|
||||
$(CMAKE) --build build
|
||||
|
||||
# Don't split the mkdir into its own rule because that would cause CMake to regenerate the build
|
||||
# Don't split the mkdir into its own rule because that would cause CMake to regenerate the build
|
||||
# files after each build (because it adds the mdate of the build directory into the out-of-date
|
||||
# calculation tree). GNUmake supports order-only dependencies, BSDmake does not seem to.
|
||||
build/$(BUILDFILE):
|
||||
@@ -48,7 +48,11 @@ clean:
|
||||
|
||||
.PHONY: test
|
||||
test: build/fish
|
||||
$(CMAKE) --build build --target test
|
||||
$(CMAKE) --build build --target fish_run_tests
|
||||
|
||||
.PHONY: fish_run_tests
|
||||
fish_run_tests: build/fish
|
||||
$(CMAKE) --build build --target fish_run_tests
|
||||
|
||||
.PHONY: run
|
||||
run: build/fish
|
||||
|
||||
341
CHANGELOG.rst
341
CHANGELOG.rst
@@ -1,27 +1,92 @@
|
||||
fish 3.8.0 (released ???)
|
||||
===================================
|
||||
fish 4.0.6 (released September 12, 2025)
|
||||
========================================
|
||||
|
||||
.. ignore: 9439 9440 9442 9452 9469 9480 9482 9520 9536 9541 9544 9559 9561 9576 9575
|
||||
9568 9588 9556 9563 9567 9585 9591 9593 9594 9603 9600 9599 9592 9612 9613 9619 9630 9638 9625 9654 9637 9673 9666 9626 9688 9725 9636 9735
|
||||
9542 9332 9566 9573 9579 9586 9589 9607 9608 9615 9616 9621 9641 9642 9643 9653 9658 9661
|
||||
9671 9726 9729 9739 9745 9746 9754 9765 9767 9768 9771 9777 9778 9786 9816 9818 9821 9839
|
||||
9845 9864 9916 9923 9962 9963 9990 9991 10121 10179 9856 9859 9861 9863 9867 9869 9874 9879
|
||||
9881 9894 9896 9902 9873 10228 9925 9928 10145 10146 10161 10173 10195 10220 10222 10288
|
||||
10342 10358 9927 9930 9947 9948 9950 9952 9966 9968 9980 9981 9984 10040 10061 10101 10090
|
||||
10102 10108 10114 10115 10128 10129 10143 10174 10175 10180 10182 10184 10185 10186 10188
|
||||
10198 10200 10201 10204 10210 10214 10219 10223 10227 10232 10235 10237 10243 10244 10245
|
||||
10246 10251 10260 10267 10281 10347 10366 10368 10370 10371 10263 10270 10272 10276 10277
|
||||
10278 10279 10291 10293 10305 10306 10309 10316 10317 10327 10328 10329 10330 10336 10340
|
||||
10345 10346 10353 10354 10356 10372 10373 3299 10360 10359
|
||||
2037 2037 3017 3018 3162 4865 5284 5991 6981 6996 7172 9751 9893 10241 10254 10268 10290 10307
|
||||
10308 10321 10338 10348 10349 10355 10357 10379 10381 10388 10389 10390 10395 10398 10400 10403
|
||||
10404 10407 10408 10409 10411 10412 10417 10418 10427 10429 10438 10439 10440 10441 10442 10443
|
||||
10445 10448 10450 10451 10456 10457 10462 10463 10464 10466 10467 10474 10481 10490 10492 10494
|
||||
10499 10503 10505 10508 10509 10510 10511 10512 10513 10518 10547 10719
|
||||
This release of fish fixes a number of issues identified in fish 4.0.2:
|
||||
|
||||
The entirety of fish's C++ code has been ported to Rust (:issue:`9512`).
|
||||
This means a large change in dependencies and how to build fish.
|
||||
Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
|
||||
- fish now properly inherits $PATH under Windows WSL2 (:issue:`11354`).
|
||||
- Remote filesystems are detected properly again on non-Linux systems.
|
||||
- the :doc:`printf <cmds/printf>` builtin no longer miscalculates width of multi-byte characters (:issue:`11412`).
|
||||
- For many years, fish has been "relocatable" -- it was possible to move the entire ``CMAKE_INSTALL_PREFIX`` and fish would use paths relative to its binary.
|
||||
Only gettext locale paths were still determined purely at compile time, which has been fixed.
|
||||
- the :doc:`commandline <cmds/commandline>` builtin failed to print the commandline set by a ``commandline -C`` invocation, which broke some completion scripts.
|
||||
This has been corrected (:issue:`11423`).
|
||||
- To work around terminals that fail to parse Operating System Command (OSC) sequences, a temporary feature flag has been added.
|
||||
It allows you to disable prompt marking (OSC 133) by running (once) ``set -Ua fish_features no-mark-prompt`` and restarting fish (:issue:`11749`).
|
||||
- The routines to save history and universal variables have seen some robustness improvements.
|
||||
- builtin :doc:`status current-command <cmds/status>` no longer prints a trailing blank line.
|
||||
- A crash displaying multi-line quoted command substitutions has been fixed (:issue:`11444`).
|
||||
- Commands like ``set fish_complete_path ...`` accidentally disabled completion autoloading, which has been corrected.
|
||||
- ``nmcli`` completions have been fixed to query network information dynamically instead of only when completing the first time.
|
||||
- Git completions no longer print an error when no `git-foo` executable is in :envvar:`PATH`.
|
||||
- Custom completions like ``complete foo -l long -xa ...`` that use the output of ``commandline -t``.
|
||||
on a command-line like ``foo --long=`` have been invalidated by a change in 4.0; the completion scripts have been adjusted accordingly (:issue:`11508`).
|
||||
- Some completions were misinterpreted, which caused garbage to be displayed in the completion list. This has been fixed.
|
||||
- fish no longer interprets invalid control sequences from the terminal as if they were :kbd:`alt-[` or :kbd:`alt-o` key strokes.
|
||||
- :doc:`bind <cmds/bind>` has been taught about the :kbd:`printscreen` and :kbd:`menu` keys.
|
||||
- :kbd:`alt-delete` now deletes the word right of the cursor.
|
||||
- :kbd:`ctrl-alt-h` erases the last word again (:issue:`11548`).
|
||||
- :kbd:`alt-left` :kbd:`alt-right` were misinterpreted because they send unexpected sequences on some terminals; a workaround has been added. (:issue:`11479`).
|
||||
- Key bindings like ``bind shift-A`` are no longer accepted; use ``bind shift-a`` or ``bind A``.
|
||||
- Key bindings like ``bind shift-a`` take precedence over ``bind A`` when the key event included the shift modifier.
|
||||
- Bindings using shift with non-ASCII letters (such as :kbd:`ctrl-shift-ä`) are now supported.
|
||||
- Bindings with modifiers such as ``bind ctrl-w`` work again on non-Latin keyboard layouts such as a Russian one.
|
||||
This is implemented by allowing key events such as :kbd:`ctrl-ц` to match bindings of the corresponding Latin key, using the kitty keyboard protocol's base layout key (:issue:`11520`).
|
||||
- Vi mode: The cursor position after pasting via :kbd:`p` has been corrected.
|
||||
- Vi mode: Trying to replace the last character via :kbd:`r` no longer replaces the last-but-one character (:issue:`11484`),
|
||||
|
||||
fish 4.0.2 (released April 20, 2025)
|
||||
====================================
|
||||
|
||||
This release of fish fixes a number of issues identified in fish 4.0.1:
|
||||
|
||||
- Completions are quoted, rather than backslash-escaped, only if the completion is unambiguous. Continuing to edit the token is therefore easier (:issue:`11271`). This changes the behavior introduced in 4.0.0 where all completions were quoted.
|
||||
- The warning when the terminfo database can't be found has been downgraded to a log message. fish will act as if the terminal behaves like xterm-256color, which is correct for the vast majority of cases (:issue:`11277`, :issue:`11290`).
|
||||
- Key combinations using the super (Windows/command) key can now (actually) be bound using the :kbd:`super-` prefix (:issue:`11217`). This was listed in the release notes for 4.0.1 but did not work correctly.
|
||||
- :doc:`function <cmds/function>` is stricter about argument parsing, rather than allowing additional parameters to be silently ignored (:issue:`11295`).
|
||||
- Using parentheses in the :doc:`test <cmds/test>` builtin works correctly, following a regression in 4.0.0 where they were not recognized (:issue:`11387`).
|
||||
- :kbd:`delete` in Vi mode when Num Lock is active will work correctly (:issue:`11303`).
|
||||
- Abbreviations cannot alter the command-line contents, preventing a crash (:issue:`11324`).
|
||||
- Improvements to various completions, including new completions for ``wl-randr`` (:issue:`11301`), performance improvements for ``cargo`` completions by avoiding network requests (:issue:`11347`), and other improvements for ``btrfs`` (:issue:`11320`), ``cryptsetup`` (:issue:`11315`), ``git`` (:issue:`11319`, :issue:`11322`, :issue:`11323`), ``jj`` (:issue:`11046`), and ``systemd-analyze`` (:issue:`11314`).
|
||||
- The Mercurial (``hg``) prompt can handle working directories that contain an embedded newline, rather than producing errors (:issue:`11348`).
|
||||
- A number of crashes have been fixed. Triggers include prompts containing backspace characters (:issue:`11280`), history pager search (:issue:`11355`), invalid UTF-8 in :doc:`read <cmds/read>` (:issue:`11383`), and the ``kill-selection`` binding (:issue:`11367`).
|
||||
- A race condition in the test suite has been fixed (:issue:`11254`), and a test for fish versioning relaxed to support downstream distributors' modifications (:issue:`11173`).
|
||||
- Small improvements to the documentation (:issue:`11264`, :issue:`11329`, :issue:`11361`).
|
||||
|
||||
--------------
|
||||
|
||||
fish 4.0.1 (released March 12, 2025)
|
||||
====================================
|
||||
|
||||
This release of fish includes the following improvements compared to fish 4.0.0:
|
||||
|
||||
- Key combinations using the super (Windows/command) key can be bound using the :kbd:`super-` prefix (:issue:`11217`).
|
||||
- Konsole's menu shows the "Open folder with" option again (:issue:`11198`).
|
||||
- ``$fish_color_search_match`` will now only be applied to the foreground color if it has an explicit foreground. For example, this allows setting::
|
||||
set -g fish_color_search_match --reverse
|
||||
- Cursor shape commands (``\e[2 q``) are no longer sent in non-interactive shells or in redirections (:issue:`11255`).
|
||||
- :doc:`status <cmds/status>` gained a ``is-interactive-read`` subcommand, to check whether the script is being called from an interactive :doc:`read <cmds/read>` invocation.
|
||||
- fish's background tasks are now started in a way that avoids an error on macOS Terminal.app (:issue:`11181`).
|
||||
- Using key combinations within qemu should work correctly.
|
||||
- Prompts containing control characters no longer cause incorrect display of command lines (:issue:`11252`).
|
||||
- Cancelling the command-line in Vi mode displays correctly again (:issue:`11261`).
|
||||
- The acidhub prompt properly displays the git branch again (:issue:`11179`).
|
||||
- Completions for ``wine`` correctly include files again (:issue:`11202`).
|
||||
- On macOS, paths from ``/etc/paths`` and ``/etc/manpaths`` containing colons are handled correctly (:issue:`10684`). This functionality was included in the 4.0.0 release notes but was missing from the source code.
|
||||
- The XTerm ``modifyOtherKeys`` keyboard encoding is no longer used under WezTerm, as it does not work correctly in all layouts (:issue:`11204`).
|
||||
- kbd:`option-left` and other similar keys should now work in iTerm versions before 3.5.12; the kitty keyboard protocol is now disabled on these versions (:issue:`11192`).
|
||||
- The kitty keyboard protocol is no longer used under Midnight Commander, as it does not work correctly (:issue:`10640`).
|
||||
- fish now sends the commandline along with the OSC 133 semantic prompt command start sequence. This fixes a test in the kitty terminal (:issue:`11203`).
|
||||
- Git completions for third-party commands like "git-absorb" are completed correctly again (:issue:`11205`).
|
||||
- Completions for ``diskutil`` no longer produce an error (:issue:`11201`).
|
||||
- The output of certain error messages no longer prints newlines to standard output (:issue:`11248`).
|
||||
- A number of crashes have been fixed, including file names longer than 255 bytes (:issue:`11221`), using fish on a btrfs filesystem (:issue:`11219`), history files that do not have the expected format (:issue:`11236`), and pasting into an empty command line (:issue:`11256`).
|
||||
|
||||
--------------
|
||||
|
||||
fish 4.0.0 (released February 27, 2025)
|
||||
=======================================
|
||||
|
||||
fish's core code has been ported from C++ to Rust (:issue:`9512`). This means a large change in dependencies and how to build fish. However, there should be no direct impact on users. Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
|
||||
|
||||
Notable backwards-incompatible changes
|
||||
--------------------------------------
|
||||
@@ -29,36 +94,33 @@ Notable backwards-incompatible changes
|
||||
- As part of a larger binding rework, ``bind`` gained a new key notation.
|
||||
In most cases the old notation should keep working, but in rare cases you may have to change a ``bind`` invocation to use the new notation.
|
||||
See :ref:`below <changelog-new-bindings>` for details.
|
||||
- Fish no longer supports terminals that fail to ignore OSC or CSI sequences they don't recognize.
|
||||
The typical problem is that terminals echo the raw sequences sent by fish instead of silently ignoring them.
|
||||
- :kbd:`alt-left` and :kbd:`alt-right` will now move by one argument (which may contain quoted spaces), not just one word like :kbd:`ctrl-left` and :kbd:`ctrl-right` do.
|
||||
- :kbd:`alt-backspace` will delete an entire argument, not just one word (which is :kbd:`ctrl-backspace` now).
|
||||
- ``random`` now uses a different random number generator and so the values you get even with the same seed have changed.
|
||||
Notably, it will now work much more sensibly with very small seeds.
|
||||
- :kbd:`ctrl-c` now calls a new bind function called ``clear-commandline``. The old behavior, which leaves a "^C" marker, is available as ``cancel-commandline`` (:issue:`10935`)
|
||||
- ``random`` will produce different values from previous versions of fish when used with the same seed, and will work more sensibly with small seed numbers.
|
||||
The seed was never guaranteed to give the same result across systems,
|
||||
so we do not expect this to have a large impact (:issue:`9593`).
|
||||
- Variables in command position that expand to a subcommand keyword are now forbidden to fix a likely user error.
|
||||
For example, ``set editor command emacs; $editor`` is no longer allowed (:issue:`10249`).
|
||||
- ``functions --handlers`` will now list handlers in a different order.
|
||||
Now it is definition order, first to last, where before it was last to first.
|
||||
This was never specifically defined, and we recommend not relying on a specific order (:issue:`9944`).
|
||||
- The ``qmark-noglob`` feature flag, introduced in fish 3.0, is now turned on by default. That means ``?`` will no longer act as a single-character glob.
|
||||
- The ``qmark-noglob`` feature, introduced in fish 3.0, is enabled by default. That means ``?`` will no longer act as a single-character glob.
|
||||
You can, for the time being, turn it back on by adding ``no-qmark-noglob`` to :envvar:`fish_features` and restarting fish::
|
||||
|
||||
set -Ua fish_features no-qmark-noglob
|
||||
|
||||
The flag will eventually be made read-only, making it impossible to turn off.
|
||||
- Fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`).
|
||||
- Under WSLv1, backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit/exec (after the usual prompt to close or disown them) to work around a WSL deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session.
|
||||
|
||||
- Terminals that fail to ignore unrecognized OSC or CSI sequences may display garbage. We know cool-retro-term and emacs' ansi-term are affected, but most mainstream terminals are not.
|
||||
- fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`).
|
||||
- Under Microsoft Windows Subsystem for Linux 1 (not WSL 2), backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit (after the usual prompt to close or disown them) to work around a WSL 1 deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session.
|
||||
|
||||
Notable improvements and fixes
|
||||
------------------------------
|
||||
.. _changelog-new-bindings:
|
||||
|
||||
- fish now requests XTerm's ``modifyOtherKeys`` keyboard encoding and `kitty keyboard protocol's <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_ progressive enhancements for a CSI u encoding.
|
||||
Depending on terminal support, this allows to bind a lot more key combinations, including arbitrary combinations of modifiers :kbd:`ctrl`, :kbd:`alt` and :kbd:`shift`,
|
||||
and to distinguish e.g. :kbd:`ctrl-i` from :kbd:`tab`.
|
||||
- fish now requests XTerm's ``modifyOtherKeys`` keyboard encoding and `kitty keyboard protocol's <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_ progressive enhancements (:issue:`10359`).
|
||||
Depending on terminal support, this allows to binding more key combinations, including arbitrary combinations of modifiers :kbd:`ctrl`, :kbd:`alt` and :kbd:`shift`, and distinguishing (for example) :kbd:`ctrl-i` from :kbd:`tab`.
|
||||
|
||||
Additionally, builtin ``bind`` no longer requires specifying keys as byte sequences but learned a human-readable syntax.
|
||||
Additionally, ``bind`` now supports a human-readable syntax in addition to byte sequences.
|
||||
This includes modifier names, and names for keys like :kbd:`enter` and :kbd:`backspace`.
|
||||
For example
|
||||
|
||||
@@ -66,181 +128,224 @@ Notable improvements and fixes
|
||||
- ``bind ctrl-x,alt-c 'do something'`` binds a sequence of two keys.
|
||||
|
||||
Any key argument that starts with an ASCII control character (like ``\e`` or ``\cX``) or is up to 3 characters long, not a named key, and does not contain ``,`` or ``-`` will be interpreted in the old syntax to keep compatibility for the majority of bindings.
|
||||
|
||||
Keyboard protocols can be turned off by disabling the "keyboard-protocols" feature flag::
|
||||
|
||||
set -Ua fish_features no-keyboard-protocols
|
||||
|
||||
This is a temporary measure to work around buggy terminals (:issue:`11056`), which appear to be relatively rare.
|
||||
Use this if something like "=0" or "=5u" appears in your commandline mysteriously.
|
||||
|
||||
- fish can now be built as a self-installing binary (:issue:`10367`). That means it can be easily built on one system and copied to another, where it can extract supporting files.
|
||||
To do this, run::
|
||||
|
||||
cargo install --path . # in a clone of the fish repository
|
||||
# or `cargo build --release` and copy target/release/fish{,_indent,_key_reader} wherever you want
|
||||
|
||||
The first time it runs interactively, it will extract all the data files to ``~/.local/share/fish/install/``. A specific path can be used for the data files with ``fish --install=PATH`` To uninstall, remove the fish binaries and that directory.
|
||||
|
||||
This build system is experimental; the main build system, using ``cmake``, remains the recommended approach for packaging and installation to a prefix.
|
||||
- A new function ``fish_should_add_to_history`` can be overridden to decide whether a command should be added to the history (:issue:`10302`).
|
||||
- :kbd:`ctrl-c` during command input no longer prints ``^C`` and a new prompt but merely clears the command line. This restores the behavior from version 2.2. To revert to the old behavior use ``bind ctrl-c __fish_cancel_commandline`` (:issue:`10213`).
|
||||
- Bindings can now mix special input functions and shell commands, so ``bind ctrl-g expand-abbr "commandline -i \n"`` works as expected (:issue:`8186`).
|
||||
- Special input functions run from bindings via ``commandline -f`` are now applied immediately instead of after the currently executing binding.
|
||||
- Special input functions run from bindings via ``commandline -f`` are now applied immediately, instead of after the currently executing binding (:issue:`3031`, :issue:`10126`).
|
||||
For example, ``commandline -i foo; commandline | grep foo`` succeeds now.
|
||||
- Undo history is no longer truncated after every command but kept for the lifetime of the shell process.
|
||||
- Undo history is no longer truncated after every command, but kept for the lifetime of the shell process.
|
||||
- The :kbd:`ctrl-r` history search now uses glob syntax (:issue:`10131`).
|
||||
- The :kbd:`ctrl-r` history search now operates only on the line or command substitution at cursor, making it easier to combine commands from history.
|
||||
- The :kbd:`ctrl-r` history search now operates only on the line or command substitution at cursor, making it easier to combine commands from history (:issue:`9751`).
|
||||
- Abbreviations can now be restricted to specific commands. For instance::
|
||||
|
||||
abbr --add --command git back 'reset --hard HEAD^'
|
||||
|
||||
will expand "back" to ``reset --hard HEAD^``, but only when the command is ``git`` (:issue:`9411`, :issue:`10452`).
|
||||
will expand "back" to ``reset --hard HEAD^``, but only when the command is ``git`` (:issue:`9411`).
|
||||
|
||||
Deprecations and removed features
|
||||
---------------------------------
|
||||
|
||||
- ``commandline --tokenize`` (short option ``-o``) has been deprecated in favor of ``commandline --tokens-expanded`` (short option ``-x``) which expands variables and other shell syntax, removing the need to use "eval" in completion scripts (:issue:`10212`).
|
||||
- ``commandline --tokenize`` (short option ``-o``) has been deprecated in favor of ``commandline --tokens-expanded`` (short option ``-x``) which expands variables and other shell syntax, removing the need to use :doc:`eval <cmds/eval>` in completion scripts (:issue:`10212`).
|
||||
- Two new feature flags:
|
||||
|
||||
- ``remove-percent-self`` (see ``status features``) disables PID expansion of ``%self`` which has been supplanted by ``$fish_pid`` (:issue:`10262`).
|
||||
- ``test-require-arg``, will disable ``test``'s one-argument mode. That means ``test -n`` without an additional argument will return false, ``test -z`` will keep returning true. Any other option without an argument, anything that is not an option and no argument will be an error. This also goes for ``[``, test's alternate name.
|
||||
- ``remove-percent-self`` (see ``status features``) disables PID expansion of ``%self``, which has been supplanted by ``$fish_pid`` (:issue:`10262`).
|
||||
- ``test-require-arg`` disables ``test``'s one-argument mode. That means ``test -n`` without an additional argument will return false, ``test -z`` will keep returning true. Any other option without an argument, anything that is not an option and no argument will be an error. This also goes for ``[``, test's alternate name.
|
||||
This is a frequent source of confusion and so we are breaking with POSIX explicitly in this regard.
|
||||
In addition to the feature flag, there is a debug category "deprecated-test". Running fish with ``fish -d deprecated-test`` will show warnings whenever a ``test`` invocation that would change is used. (:issue:`10365`).
|
||||
|
||||
as always these can be enabled with::
|
||||
These can be enabled with::
|
||||
|
||||
set -Ua fish_features remove-percent-self test-require-arg
|
||||
|
||||
They are available as a preview now, it is our intention to enable them by default in future, and after that eventually make them read-only.
|
||||
- Specifying key names as terminfo name (``bind -k``) is deprecated and may be removed in a future version.
|
||||
We intend to enable them by default in future, and after that eventually make them read-only.
|
||||
- Specifying key names as terminfo names (using the ``bind -k`` syntax) is deprecated and may be removed in a future version.
|
||||
- When a terminal pastes text into fish using bracketed paste, fish used to switch to a special ``paste`` bind mode.
|
||||
This bind mode has been removed. The behavior on paste is currently not meant to be configurable.
|
||||
- When an interactive fish is stopped or terminated by a signal that cannot be caught (SIGSTOP or SIGKILL), it may leave the terminal in a state where keypresses with modifiers are sent as CSI u sequences instead of traditional control characters or escape sequences (that are recognized by bash/readline).
|
||||
This bind mode has been removed. The behavior on paste is no longer configurable.
|
||||
- When an interactive fish is stopped or terminated by a signal that cannot be caught (SIGSTOP or SIGKILL), it may leave the terminal in a state where keypresses with modifiers are sent as CSI u sequences, instead of traditional control characters or escape sequences that are recognized by Readline and compatible programs, such as bash and python.
|
||||
If this happens, you can use the ``reset`` command from ``ncurses`` to restore the terminal state.
|
||||
- ``fish_key_reader --verbose`` no longer shows timing information.
|
||||
- Terminal information is no longer read from hashed terminfo databases, or termcap databases (:issue:`10269`). The vast majority of systems use a non-hashed terminfo database, which is still supported.
|
||||
- ``source`` returns an error if used without a filename or pipe/redirection (:issue:`10774`).
|
||||
|
||||
Scripting improvements
|
||||
----------------------
|
||||
- for-loops will no longer remember local variables from the previous iteration (:issue:`10525`).
|
||||
- Add ``history append`` subcommand to append a command to the history without executing it (:issue:`4506`).
|
||||
- A new redirection: ``<? /path/to/file`` will try opening the file as input, and if it doesn't succeed silently use /dev/null instead.
|
||||
- ``for`` loops will no longer remember local variables from the previous iteration (:issue:`10525`).
|
||||
- A new ``history append`` subcommand appends a command to the history, without executing it (:issue:`4506`).
|
||||
- A new redirection: ``<? /path/to/file`` will try opening the file as input, and if it doesn't succeed silently uses ``/dev/null`` instead.
|
||||
This can help with checks like ``test -f /path/to/file; and string replace foo bar < /path/to/file``. (:issue:`10387`)
|
||||
- New option ``commandline --tokens-raw`` prints a list of tokens without any unescaping (:issue:`10212`).
|
||||
- New option ``commandline --showing-suggestion`` to check whether an autosuggestion is currently displayed (:issue:`10586`).
|
||||
- ``functions`` and ``type`` now show where a function was copied and where it originally was instead of saying ``Defined interactively`` (:issue:`6575`).
|
||||
- Stack trace now shows line numbers for copied functions.
|
||||
- A new option ``commandline --tokens-raw`` prints a list of tokens without any unescaping (:issue:`10212`).
|
||||
- A new option ``commandline --showing-suggestion`` tests whether an autosuggestion is currently displayed (:issue:`10586`).
|
||||
- ``functions`` and ``type`` now show that a function was copied and its source, rather than solely ``Defined interactively`` (:issue:`6575`).
|
||||
- Stack trace now shows line numbers for copied functions (:issue:`6575`).
|
||||
- ``foo & && bar`` is now a syntax error, like in other shells (:issue:`9911`).
|
||||
- ``if -e foo; end`` now prints a more accurate error (:issue:`10000`).
|
||||
- Variables in command position that expand to a subcommand keyword are now forbidden to fix a likely user error.
|
||||
For example ``set editor command emacs; $editor`` is no longer allowed (:issue:`10249`).
|
||||
- ``cd`` into a directory that is not readable but accessible (permissions ``--x``) is now possible (:issue:`10432`).
|
||||
- An integer overflow in ``string repeat`` leading to a near-infinite loop has been fixed (:issue:`9899`).
|
||||
- ``string shorten`` behaves better in the presence of non-printable characters, including fixing an integer overflow that shortened strings more than intended. (:issue:`9854`)
|
||||
- ``string pad`` no longer allows non-printable characters as padding. (:issue:`9854`)
|
||||
- ``string repeat`` now allows omission of ``-n`` when the first argument is an integer. (:issue:`10282`)
|
||||
- ``string shorten`` behaves better in the presence of non-printable characters, including fixing an integer overflow that shortened strings more than intended (:issue:`9854`).
|
||||
- ``string pad`` no longer allows non-printable characters as padding (:issue:`9854`).
|
||||
- ``string repeat`` now allows omission of ``-n`` when the first argument is an integer (:issue:`10282`).
|
||||
- ``string match`` and ``replace`` have a new ``--max-matches`` option to return as soon as the specified number of matches have been identified, which can improve performance in scripts (:issue:`10587`).
|
||||
- ``functions --handlers-type caller-exit`` once again lists functions defined as ``function --on-job-exit caller``, rather than them being listed by ``functions --handlers-type process-exit``.
|
||||
- ``set`` has a new ``--no-event`` flag, to set or erase variables without triggering a variable event. This is useful e.g. to change a variable in an event handler. (:issue:`10480`)
|
||||
- Commas in command substitution output are no longer used as separators in brace expansion, preventing a surprising expansion in rare cases (:issue:`5048`).
|
||||
- Universal variables can now store strings containing invalid Unicode codepoints (:issue:`10313`).
|
||||
- ``path basename`` now takes a ``-E`` option that causes it to return the basename (i.e. "filename" with the directory prefix removed) with the final extension (if any) also removed. This is a shorter version of ``path change-extension "" (path basename $foo)`` (:issue:`10521`).
|
||||
- ``math`` now adds ``--scale-mode`` parameter. You can choose between ``truncate``, ``round``, ``floor``, ``ceiling`` as you wish (default value is ``truncate``). (:issue:`9117`).
|
||||
- A new ``set --no-event`` option sets or erases variables without triggering a variable event. This can be useful to change a variable in an event handler (:issue:`10480`).
|
||||
- Commas in command substitution output are no longer used as separators in brace expansion, preventing a surprising expansion in some cases (:issue:`5048`).
|
||||
- Universal variables can now store strings containing invalid UTF-8 (:issue:`10313`).
|
||||
- A new ``path basename -E`` option that causes it to return the basename ("filename" with the directory prefix removed) with the final extension (if any) also removed. This is a shorter version of ``path change-extension "" (path basename $foo)`` (:issue:`10521`).
|
||||
- A new ``math --scale-mode`` option to select ``truncate``, ``round``, ``floor``, ``ceiling`` as you wish; the default value is ``truncate``. (:issue:`9117`).
|
||||
- ``random`` is now less strict about its arguments, allowing a start larger or equal to the end. (:issue:`10879`)
|
||||
- ``function --argument-names`` now produces an error if a read-only variable name is used, rather than simply ignoring it (:issue:`10842`).
|
||||
- Tilde expansion in braces (that is, ``{~,}``) works correctly (:issue:`10610`).
|
||||
|
||||
Interactive improvements
|
||||
------------------------
|
||||
- When using :kbd:`ctrl-x` on Wayland in the VSCode terminal, the clipboard is no longer cleared on :kbd:`ctrl-c`.
|
||||
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
|
||||
- Option completion now uses fuzzy subsequence filtering, just like non-option completion (:issue:`830`).
|
||||
This means that ``--fb`` may be completed to ``--foobar`` if there is no better match.
|
||||
- Completions that insert an entire token now use quotes instead of backslashes to escape special characters (:issue:`5433`).
|
||||
- Historically, file name completions are provided after the last ``:`` or ``=`` within a token.
|
||||
This helps commands like ``rsync --files-from=``.
|
||||
If the ``=`` or ``:`` is actually part of the filename, it will be escaped as ``\:`` and ``\=``,
|
||||
and no longer get this special treatment.
|
||||
This matches Bash's behavior.
|
||||
- Autosuggestions were sometimes not shown after recalling a line from history, which has been fixed (:issue:`10287`).
|
||||
- Up-arrow search matches -- which are highlighted in reverse video -- are no longer syntax-highlighted, to fix bad contrast with the search match highlighting.
|
||||
- Up-arrow search matches -- which are highlighted in reverse colors -- are no longer syntax-highlighted, to fix bad contrast with the search match highlighting.
|
||||
- Command abbreviations (those with ``--position command`` or without a ``--position``) now also expand after decorators like ``command`` (:issue:`10396`).
|
||||
- Abbreviations now expand after process separators like ``;`` and ``|``. This fixes a regression in version 3.6 (:issue:`9730`).
|
||||
- When exporting interactively defined functions (using ``type``, ``functions`` or ``funcsave``) the function body is now indented, same as in the interactive command line editor (:issue:`8603`).
|
||||
- When exporting interactively defined functions (using ``type``, ``functions`` or ``funcsave``) the function body is now indented, to match the interactive command line editor (:issue:`8603`).
|
||||
- :kbd:`ctrl-x` (``fish_clipboard_copy``) on multiline commands now includes indentation (:issue:`10437`).
|
||||
- :kbd:`ctrl-v` (``fish_clipboard_paste``) now strips ASCII control characters from the pasted text.
|
||||
This is consistent with normal keyboard input (:issue:`5274`).
|
||||
- When a command like ``fg %2`` fails to find the given job, it no longer behaves as if no job spec was given (:issue:`9835`).
|
||||
- Redirection in command position like ``>echo`` is now highlighted as error (:issue:`8877`).
|
||||
- ``fish_vi_cursor`` now works properly inside the prompt created by builtin ``read`` (:issue:`10088`).
|
||||
- fish no longer fails to open a fifo if interrupted by a terminal resize signal (:issue:`10250`).
|
||||
- fish no longer fails to open a FIFO if interrupted by a terminal resize signal (:issue:`10250`).
|
||||
- ``read --help`` and friends no longer ignore redirections. This fixes a regression in version 3.1 (:issue:`10274`).
|
||||
- Measuring a command with ``time`` now considers the time taken for command substitution (:issue:`9100`).
|
||||
- ``fish_add_path`` now automatically enables verbose mode when used interactively (in the commandline), in an effort to be clearer about what it does (:issue:`10532`).
|
||||
- ``fish_add_path`` now automatically enables verbose mode when used interactively (in the command line), in an effort to be clearer about what it does (:issue:`10532`).
|
||||
- fish no longer adopts TTY modes of failed commands (:issue:`10603`).
|
||||
- `complete -e cmd` now prevents autoloading completions for `cmd` (:issue:`6716`).
|
||||
- fish's default colorscheme no longer uses the color "blue" as it has bad contrast against the background in a few terminal's default palettes (:issue:`10758`, :issue:`10786`)
|
||||
The colorscheme will not be upgraded for existing installs. If you want, you should select it again via ``fish_config``.
|
||||
- ``complete -e cmd`` now prevents autoloading completions for ``cmd`` (:issue:`6716`).
|
||||
- fish's default color scheme no longer uses the color "blue", as it has bad contrast against the background in a few terminal's default palettes (:issue:`10758`, :issue:`10786`)
|
||||
The color scheme will not be upgraded for existing installs. If you want, you should select it again via ``fish_config``.
|
||||
- Command lines which are larger than the terminal are now displayed correctly, instead of multiple blank lines being displayed (:issue:`7296`).
|
||||
- Prompts that use external commands will no longer produce an infinite loop if the command crashes (:issue:`9796`).
|
||||
- Undo (:kbd:`ctrl-z`) restores the cursor position too (:issue:`10838`).
|
||||
- The output of ``jobs`` shows "-" for jobs that have the same process group ID as the fish process, rather than "-2" (:issue:`10833`).
|
||||
- Job expansion (``%1`` syntax) works properly for jobs that are a mixture of external commands and functions (:issue:`10832`).
|
||||
- Command lines which have more lines than the terminal can be displayed and edited correctly (:issue:`10827`).
|
||||
- Functions that have been erased are no longer highlighted as valid commands (:issue:`10866`).
|
||||
- ``not``, ``time``, and variable assignments (that is ``not time a=b env``) is correctly recognized as valid syntax (:issue:`10890`).
|
||||
- The Web-based configuration removes old right-hand-side prompts again, fixing a regression in fish 3.4.0 (:issue:`10675`).
|
||||
- Further protection against programs which crash and leave the terminal in an inconsistent state (:issue:`10834`, :issue:`11038`).
|
||||
- A workaround for git being very slow on macOS has been applied, improving performance after a fresh boot (:issue:`10535`).
|
||||
|
||||
New or improved bindings
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
- When the cursor is on a command that resolves to an executable script, :kbd:`alt-o` will now open that script in your editor (:issue:`10266`).
|
||||
- During up-arrow history search, :kbd:`shift-delete` will delete the current search item and move to the next older item. Previously this was only supported in the history pager.
|
||||
Same for autosuggestions.
|
||||
- During up-arrow history search, :kbd:`shift-delete` will delete the current search item and move to the next older item. Previously this was only supported in the history pager.
|
||||
- :kbd:`shift-delete` will also remove the currently-displayed autosuggestion from history, and remove it as a suggestion.
|
||||
- :kbd:`ctrl-Z` (also known as :kbd:`ctrl-shift-z`) is now bound to redo.
|
||||
- :kbd:`alt-delete` now deletes the argument (which may contain quoted spaces) right of the cursor.
|
||||
- Some improvements to the :kbd:`alt-e` binding which edits the commandline in an external editor:
|
||||
- Some improvements to the :kbd:`alt-e` binding which edits the command line in an external editor:
|
||||
- The editor's cursor position is copied back to fish. This is currently supported for Vim and Kakoune.
|
||||
- Cursor position synchronization is only supported for a set of known editors. This has been extended by also resolving aliases. For example use ``complete --wraps my-vim vim`` to synchronize cursors when ``EDITOR=my-vim``.
|
||||
- Cursor position synchronization is only supported for a set of known editors, which are now also detected in aliases which use ``complete --wraps``. For example, use ``complete --wraps my-vim vim`` to synchronize cursors when ``EDITOR=my-vim``.
|
||||
- Multiline commands are indented before being sent to the editor, which matches how they are displayed in fish.
|
||||
- The ``*-path-component`` bindings like ``backward-kill-path-component`` now treat ``#`` as part of a path component (:issue:`10271`).
|
||||
- The ``...-path-component`` bindings, like ``backward-kill-path-component``, now treat ``#`` as part of a path component (:issue:`10271`).
|
||||
- Bindings like :kbd:`alt-l` that print output in between prompts now work correctly with multiline commandlines.
|
||||
- :kbd:`ctrl-c` no longer cancels builtin ``read``.
|
||||
- :kbd:`alt-d` on an empty command line lists the directory history again. This restores the behavior of version 2.1.
|
||||
- ``history-prefix-search-{backward,forward}`` now maintain the cursor position instead of moving the cursor to the end of the command line (:issue:`10430`).
|
||||
- The :kbd:`E` binding in vi mode now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
|
||||
- The following keys have refined behavior if the terminal supports `disambiguating them <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`_:
|
||||
- ``history-prefix-search-backward`` and ``-forward`` now maintain the cursor position, instead of moving the cursor to the end of the command line (:issue:`10430`).
|
||||
- The following keys have refined behavior if the terminal supports :ref:`the new keyboard encodings <changelog-new-bindings>`:
|
||||
- :kbd:`shift-enter` now inserts a newline instead of executing the command line.
|
||||
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character.
|
||||
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character (:issue:`10741`).
|
||||
- :kbd:`ctrl-delete` deletes the next word (same as :kbd:`alt-d`).
|
||||
- New special input functions:
|
||||
- ``forward-char-passive`` and ``backward-char-passive`` are like their non-passive variants but do not accept autosuggestions or move focus in the completion pager (:issue:`10398`).
|
||||
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token which includes escaped spaces (:issue:`2014`).
|
||||
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept.
|
||||
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token (which includes escaped spaces) (:issue:`2014`).
|
||||
- ``clear-commandline``, which merely clears the command line, as an alternative to ``cancel-commandline`` which prints ``^C`` and a new prompt (:issue:`10213`).
|
||||
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept (:issue:`10608`).
|
||||
- Vi mode has seen some improvements but continues to suffer from the lack of people working on it.
|
||||
- Insert-mode :kbd:`ctrl-n` accepts autosuggestions (:issue:`10339`).
|
||||
- New default cursor shapes for insert and replace mode.
|
||||
- :kbd:`ctrl-n` in insert mode accepts autosuggestions (:issue:`10339`).
|
||||
- Outside insert mode, the cursor will no longer be placed beyond the last character on the commandline.
|
||||
- When the cursor is at the end of the commandline, a single :kbd:`l` will accept an autosuggestion (:issue:`10286`).
|
||||
- The cursor position after pasting (:kbd:`p`) has been corrected.
|
||||
- Added an additional binding, :kbd:`_`, for moving to the beginning of the line (:issue:`10720`).
|
||||
- When the cursor is at the start of a line, escaping from insert mode no longer moves the cursor to the previous line.
|
||||
- Added bindings for clipboard interaction, like :kbd:`",+,p` and :kbd:`",+,y,y`.
|
||||
- Deleting in visual mode now moves the cursor back, matching vi (:issue:`10394`).
|
||||
- The :kbd:`;`, :kbd:`,`, :kbd:`v`, :kbd:`V`, :kbd:`I`, and :kbd:`gU` bindings work in visual mode (:issue:`10601`, :issue:`10648`).
|
||||
- Support :kbd:`%` motion (:issue:`10593`).
|
||||
- :kbd:`ctrl-k` to remove the contents of the line beyond the cursor in all modes (:issue:`10648`).
|
||||
- Support `ab` and `ib` vi text objects. New input functions are introduced ``jump-{to,till}-matching-bracket`` (:issue:`1842`).
|
||||
- The :kbd:`E` binding now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
|
||||
|
||||
Completions
|
||||
^^^^^^^^^^^
|
||||
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
|
||||
- Option completion now uses fuzzy subsequence filtering, just like non-option completion (:issue:`830`).
|
||||
This means that ``--fb`` may be completed to ``--foobar`` if there is no better match.
|
||||
- Completions that insert an entire token now use quotes instead of backslashes to escape special characters (:issue:`5433`).
|
||||
- Normally, file name completions start after the last ``:`` or ``=`` in a token.
|
||||
This helps commands like ``rsync --files-from=``.
|
||||
This special meaning can now disabled by escaping these separators as ``\:`` and ``\=``.
|
||||
This matches Bash's behavior.
|
||||
Note that this escaping is usually not necessary since the completion engine already tries
|
||||
to guess whether the separator is actually part of a file name.
|
||||
- Various new completion scripts and numerous updates to existing ones.
|
||||
- Completions could hang if the ``PAGER`` environment variable was sent to certain editors on macOS, FreeBSD and some other platforms. This has been fixed (:issue:`10820`).
|
||||
- Generated completions are now stored in ``$XDG_CACHE_HOME/fish`` or ``~/.cache/fish`` by default (:issue:`10369`)
|
||||
- A regression in fish 3.1, where completing a command line could change it completely, has been fixed (:issue:`10904`).
|
||||
|
||||
Improved terminal support
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
- Fish now marks the prompt and command-output regions (via OSC 133) to enable terminal shell integration (:issue:`10352`).
|
||||
- fish now marks the prompt and command-output regions (via OSC 133) to enable terminal shell integration (:issue:`10352`).
|
||||
Shell integration shortcuts can scroll to the next/previous prompt or show the last command output in a pager.
|
||||
- Fish now reports the working directory (via OSC 7) unconditionally instead of only for some terminals (:issue:`9955`).
|
||||
- Fish now sets the terminal window title (via OSC 0) unconditionally instead of only for some terminals (:issue:`10037`).
|
||||
- fish now reports the working directory (via OSC 7) unconditionally instead of only for some terminals (:issue:`9955`).
|
||||
- fish now sets the terminal window title (via OSC 0) unconditionally instead of only for some terminals (:issue:`10037`).
|
||||
- Focus reporting in tmux is no longer disabled on the first prompt.
|
||||
- Focus reporting is now disabled during execution of bind commands (:issue:`6942`).
|
||||
- ``fish_vi_cursor`` no longer attempts to detect if the terminal is capable, as we can no longer find terminals that aren't and the allowlist was hard to keep up-to-date. (:issue:`10693`)
|
||||
- Focus reporting is now disabled during commands run inside key bindings (:issue:`6942`).
|
||||
- Cursor changes are applied to all terminals that support them, and the list of specifically-supported terminals has been removed (:issue:`10693`).
|
||||
- If it cannot find the terminfo entry given by :envvar:`TERM` environment variable, fish will now use an included ``xterm-256color`` definition to match the vast majority of current terminal emulators (:issue:`10905`). If you need to have a specific terminfo profile for your terminal's ``TERM`` variable, install it into the terminfo database.
|
||||
- Further improvements to the correct display of prompts which fill the width of the terminal (:issue:`8164`).
|
||||
|
||||
Other improvements
|
||||
------------------
|
||||
- ``fish_indent`` will now collapse multiple successive empty lines into one (:issue:`10325`).
|
||||
- ``status`` gained a ``buildinfo`` subcommand, to print information on how fish was built, to help with debugging (:issue:`10896`).
|
||||
- ``fish_indent`` will now collapse multiple empty lines into one (:issue:`10325`).
|
||||
- ``fish_indent`` now preserves the modification time of files if there were no changes (:issue:`10624`).
|
||||
- The HTML-based configuration UI (``fish_config``) now uses Alpine.js instead of AngularJS (:issue:`9554`).
|
||||
- ``fish_config`` now also works in a Windows MSYS environment (:issue:`10111`).
|
||||
- Performance and interactivity under WSLv1 and WSLv2 has been improved with a workaround for Windows-specific locations being appended to ``$PATH`` by default (:issue:`10506`).
|
||||
- Performance in launching external processes has been improved for many cases (:issue:`10869`).
|
||||
- Performance and interactivity under Windows Subsystem for Linux has been improved, with a workaround for Windows-specific locations being appended to ``$PATH`` by default (:issue:`10506`).
|
||||
- On macOS, paths from ``/etc/paths`` and ``/etc/manpaths`` containing colons are handled correctly (:issue:`10684`).
|
||||
- Additional filesystems such as AFS are properly detected as remote, which avoids certain hangs due to expensive filesystem locks (:issue:`10818`).
|
||||
- A spurious error when launching multiple instances of fish for the first time has been removed (:issue:`10813`).
|
||||
|
||||
.. _rust-packaging:
|
||||
|
||||
For distributors
|
||||
----------------
|
||||
|
||||
Fish has been ported to Rust. That means the dependencies have changed.
|
||||
fish has been ported to Rust. This means a significant change in dependencies, which are listed in the README. In short, Rust 1.70 or greater is required, and a C++ compiler is no longer needed (although a C compiler is still required, for some C glue code and the tests).
|
||||
|
||||
It now requires Rust 1.70 at least.
|
||||
CMake remains the recommended build system, because of cargo's limited support for installing support files. Version 3.5 remains the minimum supported version. The Xcode generator for CMake is not supported any longer (:issue:`9924`). CMake builds default to optimized release builds (:issue:`10799`).
|
||||
|
||||
CMake remains for now because cargo is unable to install the many asset files that fish needs. The minimum required CMake version has increased to 3.19.
|
||||
fish no longer depends on the ncurses library, but still uses a terminfo database. When packaging fish, please add a dependency on the package containing your terminfo database instead of curses.
|
||||
|
||||
Some smaller changes:
|
||||
The ``test`` target was removed as it can no longer be defined in new CMake versions. Use ``make fish_run_tests``. Any existing test target will not print output if it fails (:issue:`11116`).
|
||||
|
||||
- The default build configuration has changed to "Debug".
|
||||
Please pass ``-DCMAKE_BUILD_TYPE=Release`` if you want to build a package.
|
||||
- Xcode support has been removed (:issue:`9924`).
|
||||
- fish no longer links against the (n)curses library, opting to read the terminfo database via the terminfo crate.
|
||||
This means hashed terminfo databases are no longer supported (from our research, they are basically unmaintained and unused).
|
||||
When packaging fish, please add a dependency on the package containing your terminfo database instead of curses,
|
||||
if such a package is required.
|
||||
If it cannot find a terminfo database, fish will now fall back on an included ``xterm-256color`` definition (:issue:`10269`).
|
||||
The Web-based configuration has been rewritten to use Alpine.js (:issue:`9554`).
|
||||
|
||||
--------------
|
||||
|
||||
fish 4.0b1 (released December 17, 2024)
|
||||
=======================================
|
||||
|
||||
A number of improvements were included in fish 4.0.0 following the beta release of 4.0b1. These include fixes for regressions, improvements to completions and documentation, and the removal of a small number of problematic changes.
|
||||
|
||||
The full list of fixed issues can be found on the `GitHub milestone page for 4.0-final <https://github.com/fish-shell/fish-shell/milestone/43>`_.
|
||||
|
||||
--------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||
|
||||
project(fish LANGUAGES C)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set(DEFAULT_BUILD_TYPE "Debug")
|
||||
set(DEFAULT_BUILD_TYPE "RelWithDebInfo")
|
||||
|
||||
# Generate Xcode schemas (but not for tests).
|
||||
set(CMAKE_XCODE_GENERATE_SCHEME 1)
|
||||
@@ -56,8 +56,9 @@ function(CREATE_TARGET target)
|
||||
${Rust_CARGO}
|
||||
build --bin ${target}
|
||||
$<$<CONFIG:Release>:--release>
|
||||
$<$<CONFIG:RelWithDebInfo>:--release>
|
||||
$<$<CONFIG:RelWithDebInfo>:--profile=release-with-debug>
|
||||
--target ${Rust_CARGO_TARGET}
|
||||
--no-default-features
|
||||
${CARGO_FLAGS}
|
||||
${FEATURES_ARG}
|
||||
&&
|
||||
|
||||
@@ -42,8 +42,8 @@ Guidelines
|
||||
|
||||
In short:
|
||||
|
||||
- Be conservative in what you need (``C++11``, few dependencies)
|
||||
- Use automated tools to help you (including ``make test``, ``build_tools/style.fish`` and ``make lint``)
|
||||
- Be conservative in what you need (keep to the agreed minimum supported Rust version, limit new dependencies)
|
||||
- Use automated tools to help you (including ``make fish_run_tests`` and ``build_tools/style.fish``)
|
||||
|
||||
Contributing completions
|
||||
========================
|
||||
@@ -101,7 +101,7 @@ To ensure your changes conform to the style rules run
|
||||
|
||||
before committing your change. That will run our autoformatters:
|
||||
|
||||
- ``git-clang-format`` for c++
|
||||
- ``rustfmt`` for Rust
|
||||
- ``fish_indent`` (shipped with fish) for fish script
|
||||
- ``black`` for python
|
||||
|
||||
@@ -207,7 +207,7 @@ The tests can be run on your local computer on all operating systems.
|
||||
::
|
||||
|
||||
cmake path/to/fish-shell
|
||||
make test
|
||||
make fish_run_tests
|
||||
|
||||
Git hooks
|
||||
---------
|
||||
@@ -235,7 +235,7 @@ One possibility is a pre-push hook script like this one:
|
||||
done
|
||||
if [ "x$isprotected" = x1 ]; then
|
||||
echo "Running tests before push to master"
|
||||
make test
|
||||
make fish_run_tests
|
||||
RESULT=$?
|
||||
if [ $RESULT -ne 0 ]; then
|
||||
echo "Tests failed for a push to master, we can't let you do that" >&2
|
||||
@@ -245,7 +245,7 @@ One possibility is a pre-push hook script like this one:
|
||||
exit 0
|
||||
|
||||
This will check if the push is to the master branch and, if it is, only
|
||||
allow the push if running ``make test`` succeeds. In some circumstances
|
||||
allow the push if running ``make fish_run_tests`` succeeds. In some circumstances
|
||||
it may be advisable to circumvent this check with
|
||||
``git push --no-verify``, but usually that isn’t necessary.
|
||||
|
||||
@@ -322,12 +322,12 @@ Setting Code Up For Translations
|
||||
--------------------------------
|
||||
|
||||
All non-debug messages output for user consumption should be marked for
|
||||
translation. In C++, this requires the use of the ``_`` (underscore)
|
||||
macro:
|
||||
translation. In Rust, this requires the use of the ``wgettext!`` or ``wgettext_fmt!``
|
||||
macros:
|
||||
|
||||
::
|
||||
|
||||
streams.out.append_format(_(L"%ls: There are no jobs\n"), argv[0]);
|
||||
streams.out.append(wgettext_fmt!("%ls: There are no jobs\n", argv[0]));
|
||||
|
||||
All messages in fish script must be enclosed in single or double quote
|
||||
characters for our message extraction script to find them.
|
||||
|
||||
174
Cargo.lock
generated
174
Cargo.lock
generated
@@ -20,6 +20,15 @@ version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.1.30"
|
||||
@@ -43,6 +52,25 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dashmap"
|
||||
version = "5.5.3"
|
||||
@@ -56,6 +84,16 @@ dependencies = [
|
||||
"parking_lot_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.1"
|
||||
@@ -69,12 +107,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fish"
|
||||
version = "0.1.0"
|
||||
version = "4.0.6"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
@@ -90,6 +128,7 @@ dependencies = [
|
||||
"portable-atomic",
|
||||
"rand",
|
||||
"rsconf",
|
||||
"rust-embed",
|
||||
"serial_test",
|
||||
"terminfo",
|
||||
"widestring",
|
||||
@@ -100,6 +139,8 @@ name = "fish-printf"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"unicode-segmentation",
|
||||
"unicode-width",
|
||||
"widestring",
|
||||
]
|
||||
|
||||
@@ -115,6 +156,16 @@ version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
|
||||
|
||||
[[package]]
|
||||
name = "generic-array"
|
||||
version = "0.14.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.5"
|
||||
@@ -371,6 +422,49 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-embed"
|
||||
version = "8.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fa66af4a4fdd5e7ebc276f115e895611a34739a9c1c01028383d612d550953c0"
|
||||
dependencies = [
|
||||
"rust-embed-impl",
|
||||
"rust-embed-utils",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-embed-impl"
|
||||
version = "8.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rust-embed-utils",
|
||||
"syn 2.0.79",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-embed-utils"
|
||||
version = "8.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e5347777e9aacb56039b0e1f28785929a8a3b709e87482e7442c72e7c12529d"
|
||||
dependencies = [
|
||||
"sha2",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.2.0"
|
||||
@@ -397,7 +491,18 @@ checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -429,6 +534,17 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.79"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "terminfo"
|
||||
version = "0.9.0"
|
||||
@@ -441,18 +557,61 @@ dependencies = [
|
||||
"phf_codegen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "widestring"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
@@ -462,6 +621,15 @@ dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
|
||||
12
Cargo.toml
12
Cargo.toml
@@ -7,11 +7,16 @@ rust-version = "1.70"
|
||||
edition = "2021"
|
||||
|
||||
[profile.release]
|
||||
overflow-checks = true
|
||||
lto = true
|
||||
|
||||
[profile.release-with-debug]
|
||||
inherits = "release"
|
||||
debug = true
|
||||
|
||||
[package]
|
||||
name = "fish"
|
||||
version = "0.1.0"
|
||||
version = "4.0.6"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
default-run = "fish"
|
||||
@@ -52,6 +57,7 @@ rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
|
||||
widestring = "1.1.0"
|
||||
# We need 0.9.0 specifically for some crash fixes.
|
||||
terminfo = "0.9.0"
|
||||
rust-embed = { version = "8.2.0", optional = true }
|
||||
|
||||
[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
|
||||
portable-atomic = { version = "1", default-features = false, features = [
|
||||
@@ -82,8 +88,9 @@ name = "fish_key_reader"
|
||||
path = "src/bin/fish_key_reader.rs"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["installable"]
|
||||
benchmark = []
|
||||
installable = ["dep:rust-embed"]
|
||||
|
||||
# The following features are auto-detected by the build-script and should not be enabled manually.
|
||||
asan = []
|
||||
@@ -96,3 +103,4 @@ rust.unknown_lints = "allow"
|
||||
rust.unstable_name_collisions = "allow"
|
||||
clippy.manual_range_contains = "allow"
|
||||
clippy.needless_return = "allow"
|
||||
clippy.needless_lifetimes = "allow"
|
||||
|
||||
@@ -55,7 +55,11 @@ clean:
|
||||
|
||||
.PHONY: test
|
||||
test: build/fish
|
||||
$(CMAKE) --build build --target test
|
||||
$(CMAKE) --build build --target fish_run_tests
|
||||
|
||||
.PHONY: fish_run_tests
|
||||
fish_run_tests: build/fish
|
||||
$(CMAKE) --build build --target fish_run_tests
|
||||
|
||||
.PHONY: install
|
||||
install: build/fish
|
||||
|
||||
74
README.rst
74
README.rst
@@ -66,8 +66,7 @@ Windows
|
||||
for Linux with the instructions for the appropriate distribution
|
||||
listed above under “Packages for Linux”, or from source with the
|
||||
instructions below.
|
||||
- Fish can also be installed on all versions of Windows using
|
||||
`Cygwin <https://cygwin.com/>`__ (from the **Shells** category).
|
||||
- fish (4.0 on and onwards) cannot be installed in Cygwin, due to a lack of Rust support.
|
||||
|
||||
Building from source
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -121,33 +120,27 @@ Building
|
||||
Dependencies
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Compiling fish from a tarball requires:
|
||||
|
||||
- a C++11 compiler (g++ 4.8 or later, or clang 3.3 or later)
|
||||
- CMake (version 3.5 or later)
|
||||
- PCRE2 (headers and libraries) - optional, this will be downloaded if missing
|
||||
- gettext (headers and libraries) - optional, for translation support
|
||||
|
||||
Sphinx is also optionally required to build the documentation from a
|
||||
cloned git repository.
|
||||
|
||||
Additionally, running the test suite requires Python 3.5+ and the pexpect package.
|
||||
|
||||
Dependencies, git master
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Building from git master currently requires:
|
||||
Compiling fish requires:
|
||||
|
||||
- Rust (version 1.70 or later)
|
||||
- CMake (version 3.19 or later)
|
||||
- CMake (version 3.15 or later)
|
||||
- a C compiler (for system feature detection and the test helper binary)
|
||||
- PCRE2 (headers and libraries) - optional, this will be downloaded if missing
|
||||
- gettext (headers and libraries) - optional, for translation support
|
||||
- an Internet connection, as other dependencies will be downloaded automatically
|
||||
|
||||
Sphinx is also optionally required to build the documentation from a
|
||||
cloned git repository.
|
||||
|
||||
Building from source (all platforms) - Makefile generator
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Additionally, running the full test suite requires Python 3, tmux, and the pexpect package.
|
||||
|
||||
Building from source with CMake
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Rather than building from source, consider using a packaged build for your platform. Using the
|
||||
steps below makes fish difficult to uninstall or upgrade. Release packages are available from the
|
||||
links above, and up-to-date `development builds of fish are available for many platforms
|
||||
<https://github.com/fish-shell/fish-shell/wiki/Development-builds>`__
|
||||
|
||||
To install into ``/usr/local``, run:
|
||||
|
||||
@@ -155,35 +148,50 @@ To install into ``/usr/local``, run:
|
||||
|
||||
mkdir build; cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
cmake --build .
|
||||
sudo cmake --install .
|
||||
|
||||
The install directory can be changed using the
|
||||
``-DCMAKE_INSTALL_PREFIX`` parameter for ``cmake``.
|
||||
|
||||
Build options
|
||||
~~~~~~~~~~~~~
|
||||
CMake Build options
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), fish has some other options available to customize it.
|
||||
In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), fish's CMake build has some other options available to customize it.
|
||||
|
||||
- BUILD_DOCS=ON|OFF - whether to build the documentation. This is automatically set to OFF when Sphinx isn't installed.
|
||||
- INSTALL_DOCS=ON|OFF - whether to install the docs. This is automatically set to on when BUILD_DOCS is or prebuilt documentation is available (like when building in-tree from a tarball).
|
||||
- FISH_USE_SYSTEM_PCRE2=ON|OFF - whether to use an installed pcre2. This is normally autodetected.
|
||||
- MAC_CODESIGN_ID=String|OFF - the codesign ID to use on Mac, or "OFF" to disable codesigning.
|
||||
- WITH_GETTEXT=ON|OFF - whether to build with gettext support for translations.
|
||||
- extra_functionsdir, extra_completionsdir and extra_confdir - to compile in an additional directory to be searched for functions, completions and configuration snippets
|
||||
|
||||
Note that fish does *not* support static linking and will attempt to error out if it detects it.
|
||||
Building fish as self-installable (experimental)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Help, it didn’t build!
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
You can also build fish as a self-installing binary.
|
||||
|
||||
On Debian or Ubuntu you want these packages:
|
||||
This will include all the datafiles like the included functions or web configuration tool in the main ``fish`` binary.
|
||||
|
||||
::
|
||||
On the first interactive run, and whenever it notices they are out of date, it will extract the datafiles to ~/.local/share/fish/install/ (currently, subject to change). You can do this manually by running ``fish --install``.
|
||||
|
||||
sudo apt install build-essential cmake libpcre2-dev gettext
|
||||
To install fish as self-installable, just use ``cargo``, like::
|
||||
|
||||
On RedHat, CentOS, or Amazon EC2 everything should be preinstalled.
|
||||
cargo install --path /path/to/fish # if you have a git clone
|
||||
cargo install --git https://github.com/fish-shell/fish-shell --tag 4.0 # to build from git once 4.0 is released
|
||||
cargo install --git https://github.com/fish-shell/fish-shell # to build the current development snapshot without cloning
|
||||
|
||||
This will place the binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
|
||||
|
||||
This build won't have the HTML docs (``help`` will open the online version) or translations.
|
||||
|
||||
It will try to build the man pages with sphinx-build. If that is not available and you would like to include man pages, you need to install it and retrigger the build script, e.g. by setting FISH_BUILD_DOCS=1::
|
||||
|
||||
FISH_BUILD_DOCS=1 cargo install --path .
|
||||
|
||||
Setting it to "0" disables the inclusion of man pages.
|
||||
|
||||
You can also link this build statically (but not against glibc) and move it to other computers.
|
||||
|
||||
Contributing Changes to the Code
|
||||
--------------------------------
|
||||
|
||||
156
build.rs
156
build.rs
@@ -29,13 +29,25 @@ fn main() {
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
// Some build info
|
||||
rsconf::set_env_value("BUILD_TARGET_TRIPLE", &env::var("TARGET").unwrap());
|
||||
rsconf::set_env_value("BUILD_HOST_TRIPLE", &env::var("HOST").unwrap());
|
||||
rsconf::set_env_value("BUILD_PROFILE", &env::var("PROFILE").unwrap());
|
||||
|
||||
let version = &get_version(&env::current_dir().unwrap());
|
||||
// Per https://doc.rust-lang.org/cargo/reference/build-scripts.html#inputs-to-the-build-script,
|
||||
// the source directory is the current working directory of the build script
|
||||
rsconf::set_env_value(
|
||||
"FISH_BUILD_VERSION",
|
||||
&get_version(&env::current_dir().unwrap()),
|
||||
);
|
||||
rsconf::set_env_value("FISH_BUILD_VERSION", version);
|
||||
|
||||
std::env::set_var("FISH_BUILD_VERSION", version);
|
||||
|
||||
#[cfg(feature = "installable")]
|
||||
#[cfg(not(clippy))]
|
||||
{
|
||||
let cman = std::fs::canonicalize(env!("CARGO_MANIFEST_DIR")).unwrap();
|
||||
let targetman = cman.as_path().join("target").join("man");
|
||||
build_man(&targetman);
|
||||
}
|
||||
rsconf::rebuild_if_path_changed("src/libc.c");
|
||||
cc::Build::new()
|
||||
.file("src/libc.c")
|
||||
@@ -215,7 +227,7 @@ fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
}
|
||||
|
||||
fn setup_paths() {
|
||||
fn get_path(name: &str, default: &str, onvar: PathBuf) -> PathBuf {
|
||||
fn get_path(name: &str, default: &str, onvar: &Path) -> PathBuf {
|
||||
let mut var = PathBuf::from(env::var(name).unwrap_or(default.to_string()));
|
||||
if var.is_relative() {
|
||||
var = onvar.join(var);
|
||||
@@ -223,30 +235,51 @@ fn get_path(name: &str, default: &str, onvar: PathBuf) -> PathBuf {
|
||||
var
|
||||
}
|
||||
|
||||
let prefix = PathBuf::from(env::var("PREFIX").unwrap_or("/usr/local".to_string()));
|
||||
if prefix.is_relative() {
|
||||
let (prefix_from_home, prefix) = if let Ok(pre) = env::var("PREFIX") {
|
||||
(false, PathBuf::from(pre))
|
||||
} else {
|
||||
(true, PathBuf::from(".local/"))
|
||||
};
|
||||
|
||||
// If someone gives us a $PREFIX, we need it to be absolute.
|
||||
// Otherwise we would try to get it from $HOME and that won't really work.
|
||||
if !prefix_from_home && prefix.is_relative() {
|
||||
panic!("Can't have relative prefix");
|
||||
}
|
||||
|
||||
rsconf::rebuild_if_env_changed("PREFIX");
|
||||
rsconf::set_env_value("PREFIX", prefix.to_str().unwrap());
|
||||
|
||||
let datadir = get_path("DATADIR", "share/", prefix.clone());
|
||||
let datadir = get_path("DATADIR", "share/", &prefix);
|
||||
rsconf::set_env_value("DATADIR", datadir.to_str().unwrap());
|
||||
rsconf::rebuild_if_env_changed("DATADIR");
|
||||
|
||||
let bindir = get_path("BINDIR", "bin/", prefix.clone());
|
||||
let datadir_subdir = if prefix_from_home {
|
||||
"fish/install"
|
||||
} else {
|
||||
"fish"
|
||||
};
|
||||
rsconf::set_env_value("DATADIR_SUBDIR", datadir_subdir);
|
||||
|
||||
let bindir = get_path("BINDIR", "bin/", &prefix);
|
||||
rsconf::set_env_value("BINDIR", bindir.to_str().unwrap());
|
||||
rsconf::rebuild_if_env_changed("BINDIR");
|
||||
|
||||
let sysconfdir = get_path("SYSCONFDIR", "etc/", datadir.clone());
|
||||
let sysconfdir = get_path(
|
||||
"SYSCONFDIR",
|
||||
// If we get our prefix from $HOME, we should use the system's /etc/
|
||||
// ~/.local/share/etc/ makes no sense
|
||||
if prefix_from_home { "/etc/" } else { "etc/" },
|
||||
&datadir,
|
||||
);
|
||||
rsconf::set_env_value("SYSCONFDIR", sysconfdir.to_str().unwrap());
|
||||
rsconf::rebuild_if_env_changed("SYSCONFDIR");
|
||||
|
||||
let localedir = get_path("LOCALEDIR", "locale/", datadir.clone());
|
||||
let localedir = get_path("LOCALEDIR", "locale/", &datadir);
|
||||
rsconf::set_env_value("LOCALEDIR", localedir.to_str().unwrap());
|
||||
rsconf::rebuild_if_env_changed("LOCALEDIR");
|
||||
|
||||
let docdir = get_path("DOCDIR", "doc/fish", datadir.clone());
|
||||
let docdir = get_path("DOCDIR", "doc/fish", &datadir);
|
||||
rsconf::set_env_value("DOCDIR", docdir.to_str().unwrap());
|
||||
rsconf::rebuild_if_env_changed("DOCDIR");
|
||||
}
|
||||
@@ -259,7 +292,7 @@ fn get_version(src_dir: &Path) -> String {
|
||||
return var;
|
||||
}
|
||||
|
||||
let path = PathBuf::from(src_dir).join("version");
|
||||
let path = src_dir.join("version");
|
||||
if let Ok(strver) = read_to_string(path) {
|
||||
return strver.to_string();
|
||||
}
|
||||
@@ -270,7 +303,7 @@ fn get_version(src_dir: &Path) -> String {
|
||||
if !rev.is_empty() {
|
||||
// If it contains a ".", we have a proper version like "3.7",
|
||||
// or "23.2.1-1234-gfab1234"
|
||||
if rev.contains(".") {
|
||||
if rev.contains('.') {
|
||||
return rev;
|
||||
}
|
||||
// If it doesn't, we probably got *just* the commit SHA,
|
||||
@@ -283,7 +316,98 @@ fn get_version(src_dir: &Path) -> String {
|
||||
return version + "-g" + &rev;
|
||||
}
|
||||
}
|
||||
// TODO: Do we just use the cargo version here?
|
||||
|
||||
"unknown".to_string()
|
||||
// git did not tell us a SHA either because it isn't installed,
|
||||
// or because it refused (safe.directory applies to `git describe`!)
|
||||
// So we read the SHA ourselves.
|
||||
fn get_git_hash() -> Result<String, Box<dyn std::error::Error>> {
|
||||
let gitdir = Path::new(env!("CARGO_MANIFEST_DIR")).join(".git");
|
||||
|
||||
// .git/HEAD contains ref: refs/heads/branch
|
||||
let headpath = gitdir.join("HEAD");
|
||||
let headstr = read_to_string(headpath)?;
|
||||
let headref = headstr.split(' ').collect::<Vec<_>>()[1].trim();
|
||||
|
||||
// .git/refs/heads/branch contains the SHA
|
||||
let refpath = gitdir.join(headref);
|
||||
// Shorten to 9 characters (what git describe does currently)
|
||||
let refstr = &read_to_string(refpath)?[0..9];
|
||||
let refstr = refstr.trim();
|
||||
|
||||
let version = env!("CARGO_PKG_VERSION").to_owned();
|
||||
Ok(version + "-g" + refstr)
|
||||
}
|
||||
|
||||
get_git_hash().expect("Could not get a version. Either set $FISH_BUILD_VERSION or install git.")
|
||||
}
|
||||
|
||||
#[cfg(feature = "installable")]
|
||||
// disable clippy because otherwise it would panic without sphinx
|
||||
#[cfg(not(clippy))]
|
||||
fn build_man(build_dir: &Path) {
|
||||
use std::process::Command;
|
||||
let mandir = build_dir;
|
||||
let sec1dir = mandir.join("man1");
|
||||
let docsrc_path = std::fs::canonicalize(env!("CARGO_MANIFEST_DIR"))
|
||||
.unwrap()
|
||||
.as_path()
|
||||
.join("doc_src");
|
||||
let docsrc = docsrc_path.to_str().unwrap();
|
||||
let args = &[
|
||||
"-j",
|
||||
"auto",
|
||||
"-q",
|
||||
"-b",
|
||||
"man",
|
||||
"-c",
|
||||
docsrc,
|
||||
// doctree path - put this *above* the man1 dir to exclude it.
|
||||
// this is ~6M
|
||||
"-d",
|
||||
mandir.to_str().unwrap(),
|
||||
docsrc,
|
||||
sec1dir.to_str().unwrap(),
|
||||
];
|
||||
let _ = std::fs::create_dir_all(sec1dir.to_str().unwrap());
|
||||
|
||||
rsconf::rebuild_if_env_changed("FISH_BUILD_DOCS");
|
||||
if env::var("FISH_BUILD_DOCS") == Ok("0".to_string()) {
|
||||
println!("cargo:warning=Skipping man pages because $FISH_BUILD_DOCS is set to 0");
|
||||
return;
|
||||
}
|
||||
|
||||
// We run sphinx to build the man pages.
|
||||
// Every error here is fatal so cargo doesn't cache the result
|
||||
// - if we skipped the docs with sphinx not installed, installing it would not then build the docs.
|
||||
// That means you need to explicitly set $FISH_BUILD_DOCS=0 (`FISH_BUILD_DOCS=0 cargo install --path .`),
|
||||
// which is unfortunate - but the docs are pretty important because they're also used for --help.
|
||||
match Command::new("sphinx-build").args(args).spawn() {
|
||||
Err(x) if x.kind() == std::io::ErrorKind::NotFound => {
|
||||
if env::var("FISH_BUILD_DOCS") == Ok("1".to_string()) {
|
||||
panic!("Could not find sphinx-build to build man pages.\nInstall sphinx or disable building the docs by setting $FISH_BUILD_DOCS=0.");
|
||||
}
|
||||
println!("cargo:warning=Cannot find sphinx-build to build man pages.");
|
||||
println!("cargo:warning=If you install it now you need to run `cargo clean` and rebuild, or set $FISH_BUILD_DOCS=1 explicitly.");
|
||||
}
|
||||
Err(x) => {
|
||||
// Another error - permissions wrong etc
|
||||
panic!("Error starting sphinx-build to build man pages: {:?}", x);
|
||||
}
|
||||
Ok(mut x) => match x.wait() {
|
||||
Err(err) => {
|
||||
panic!(
|
||||
"Error waiting for sphinx-build to build man pages: {:?}",
|
||||
err
|
||||
);
|
||||
}
|
||||
Ok(out) => {
|
||||
if out.success() {
|
||||
// Success!
|
||||
return;
|
||||
} else {
|
||||
panic!("sphinx-build failed to build the man pages.");
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,16 +53,16 @@ fi
|
||||
|
||||
if test -r "$FBVF"
|
||||
then
|
||||
VC=$(grep -v '^#' "$FBVF" | tr -d '"' | sed -e 's/^FISH_BUILD_VERSION=//')
|
||||
VC=$(cat "$FBVF")
|
||||
else
|
||||
VC="unset"
|
||||
fi
|
||||
|
||||
# Maybe output the FBVF
|
||||
# It looks like FISH_BUILD_VERSION="2.7.1-621-ga2f065e6"
|
||||
# It looks like "2.7.1-621-ga2f065e6"
|
||||
test "$VN" = "$VC" || {
|
||||
echo >&2 "FISH_BUILD_VERSION=$VN"
|
||||
echo "FISH_BUILD_VERSION=\"$VN\"" >"$FBVF"
|
||||
echo >&2 "$VN"
|
||||
echo "$VN" >"$FBVF"
|
||||
}
|
||||
|
||||
# Output the fish-build-version-witness.txt
|
||||
|
||||
183
build_tools/make_macos_pkg.sh
Executable file
183
build_tools/make_macos_pkg.sh
Executable file
@@ -0,0 +1,183 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script to produce an OS X installer .pkg and .app(.zip)
|
||||
|
||||
usage() {
|
||||
echo "Build macOS packages, optionally signing and notarizing them."
|
||||
echo "Usage: $0 options"
|
||||
echo "Options:"
|
||||
echo " -s Enables code signing"
|
||||
echo " -f <APP_KEY.p12> Path to .p12 file for application signing"
|
||||
echo " -i <INSTALLER_KEY.p12> Path to .p12 file for installer signing"
|
||||
echo " -p <PASSWORD> Password for the .p12 files (necessary to access the certificates)"
|
||||
echo " -e <entitlements file> (Optional) Path to an entitlements XML file"
|
||||
echo " -n Enables notarization. This will fail if code signing is not also enabled."
|
||||
echo " -j <API_KEY.JSON> Path to JSON file generated with \`rcodesign encode-app-store-connect-api-key\` (required for notarization)"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
SIGN=
|
||||
NOTARIZE=
|
||||
|
||||
ARM64_DEPLOY_TARGET='MACOSX_DEPLOYMENT_TARGET=11.0'
|
||||
X86_64_DEPLOY_TARGET='MACOSX_DEPLOYMENT_TARGET=10.9'
|
||||
|
||||
# As of this writing, the most recent Rust release supports macOS back to 10.12.
|
||||
# The first supported version of macOS on arm64 is 10.15, so any Rust is fine for arm64.
|
||||
# We wish to support back to 10.9 on x86-64; the last version of Rust to support that is
|
||||
# version 1.73.0.
|
||||
RUST_VERSION_X86_64=1.70.0
|
||||
|
||||
while getopts "sf:i:p:e:nj:" opt; do
|
||||
case $opt in
|
||||
s) SIGN=1;;
|
||||
f) P12_APP_FILE=$(realpath "$OPTARG");;
|
||||
i) P12_INSTALL_FILE=$(realpath "$OPTARG");;
|
||||
p) P12_PASSWORD="$OPTARG";;
|
||||
e) ENTITLEMENTS_FILE=$(realpath "$OPTARG");;
|
||||
n) NOTARIZE=1;;
|
||||
j) API_KEY_FILE=$(realpath "$OPTARG");;
|
||||
\?) usage;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$SIGN" ] && { [ -z "$P12_APP_FILE" ] || [ -z "$P12_INSTALL_FILE" ] || [ -z "$P12_PASSWORD" ]; }; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ -n "$NOTARIZE" ] && [ -z "$API_KEY_FILE" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
VERSION=$(git describe --always --dirty 2>/dev/null)
|
||||
if test -z "$VERSION" ; then
|
||||
echo "Could not get version from git"
|
||||
if test -f version; then
|
||||
VERSION=$(cat version)
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Version is $VERSION"
|
||||
|
||||
PKGDIR=$(mktemp -d)
|
||||
echo "$PKGDIR"
|
||||
|
||||
SRC_DIR=$PWD
|
||||
OUTPUT_PATH=${FISH_ARTEFACT_PATH:-~/fish_built}
|
||||
|
||||
mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/intermediates" "$PKGDIR/dst"
|
||||
|
||||
# Build and install for arm64.
|
||||
# Pass FISH_USE_SYSTEM_PCRE2=OFF because a system PCRE2 on macOS will not be signed by fish,
|
||||
# and will probably not be built universal, so the package will fail to validate/run on other systems.
|
||||
# Note CMAKE_OSX_ARCHITECTURES is still relevant for the Mac app.
|
||||
{ cd "$PKGDIR/build_arm64" \
|
||||
&& cmake \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
|
||||
-DWITH_GETTEXT=OFF \
|
||||
-DRust_CARGO_TARGET=aarch64-apple-darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
|
||||
-DFISH_USE_SYSTEM_PCRE2=OFF \
|
||||
"$SRC_DIR" \
|
||||
&& env $ARM64_DEPLOY_TARGET make VERBOSE=1 -j 12 \
|
||||
&& env DESTDIR="$PKGDIR/root/" $ARM64_DEPLOY_TARGET make install;
|
||||
}
|
||||
|
||||
# Build for x86-64 but do not install; instead we will make some fat binaries inside the root.
|
||||
# Set RUST_VERSION_X86_64 to the last version of Rust that supports macOS 10.9.
|
||||
{ cd "$PKGDIR/build_x86_64" \
|
||||
&& cmake \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
|
||||
-DWITH_GETTEXT=OFF \
|
||||
-DRust_TOOLCHAIN="$RUST_VERSION_X86_64" \
|
||||
-DRust_CARGO_TARGET=x86_64-apple-darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
|
||||
-DFISH_USE_SYSTEM_PCRE2=OFF "$SRC_DIR" \
|
||||
&& env $X86_64_DEPLOY_TARGET make VERBOSE=1 -j 12; }
|
||||
|
||||
# Fatten them up.
|
||||
for FILE in "$PKGDIR"/root/usr/local/bin/*; do
|
||||
X86_FILE="$PKGDIR/build_x86_64/$(basename "$FILE")"
|
||||
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
||||
chmod 755 "$FILE"
|
||||
done
|
||||
|
||||
if test -n "$SIGN"; then
|
||||
echo "Signing executables"
|
||||
ARGS=(
|
||||
--p12-file "$P12_APP_FILE"
|
||||
--p12-password "$P12_PASSWORD"
|
||||
--code-signature-flags runtime
|
||||
--for-notarization
|
||||
)
|
||||
if [ -n "$ENTITLEMENTS_FILE" ]; then
|
||||
ARGS+=(--entitlements-xml-file "$ENTITLEMENTS_FILE")
|
||||
fi
|
||||
for FILE in "$PKGDIR"/root/usr/local/bin/*; do
|
||||
(set +x; rcodesign sign "${ARGS[@]}" "$FILE")
|
||||
done
|
||||
fi
|
||||
|
||||
pkgbuild --scripts "$SRC_DIR/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 "$SRC_DIR/build_tools/osx_distribution.xml" --resources "$SRC_DIR/build_tools/osx_package_resources/" "$OUTPUT_PATH/fish-$VERSION.pkg"
|
||||
|
||||
if test -n "$SIGN"; then
|
||||
echo "Signing installer"
|
||||
ARGS=(
|
||||
--p12-file "$P12_INSTALL_FILE"
|
||||
--p12-password "$P12_PASSWORD"
|
||||
--code-signature-flags runtime
|
||||
--for-notarization
|
||||
)
|
||||
(set +x; rcodesign sign "${ARGS[@]}" "$OUTPUT_PATH/fish-$VERSION.pkg")
|
||||
fi
|
||||
|
||||
# Make the app
|
||||
(cd "$PKGDIR/build_arm64" && env $ARM64_DEPLOY_TARGET make -j 12 fish_macapp)
|
||||
(cd "$PKGDIR/build_x86_64" && env $X86_64_DEPLOY_TARGET make -j 12 fish_macapp)
|
||||
|
||||
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtesy of CMake.
|
||||
cd "$PKGDIR/build_arm64"
|
||||
for FILE in fish.app/Contents/Resources/base/usr/local/bin/*; do
|
||||
X86_FILE="$PKGDIR/build_x86_64/fish.app/Contents/Resources/base/usr/local/bin/$(basename "$FILE")"
|
||||
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
||||
|
||||
# macho-universal-create screws up the permissions.
|
||||
chmod 755 "$FILE"
|
||||
done
|
||||
|
||||
if test -n "$SIGN"; then
|
||||
echo "Signing app"
|
||||
ARGS=(
|
||||
--p12-file "$P12_APP_FILE"
|
||||
--p12-password "$P12_PASSWORD"
|
||||
--code-signature-flags runtime
|
||||
--for-notarization
|
||||
)
|
||||
if [ -n "$ENTITLEMENTS_FILE" ]; then
|
||||
ARGS+=(--entitlements-xml-file "$ENTITLEMENTS_FILE")
|
||||
fi
|
||||
(set +x; rcodesign sign "${ARGS[@]}" "fish.app")
|
||||
|
||||
fi
|
||||
|
||||
cp -R "fish.app" "$OUTPUT_PATH/fish-$VERSION.app"
|
||||
cd "$OUTPUT_PATH"
|
||||
|
||||
# Maybe notarize.
|
||||
if test -n "$NOTARIZE"; then
|
||||
echo "Notarizing"
|
||||
rcodesign notarize --staple --wait --max-wait-seconds 1800 --api-key-file "$API_KEY_FILE" "$OUTPUT_PATH/fish-$VERSION.pkg"
|
||||
rcodesign notarize --staple --wait --max-wait-seconds 1800 --api-key-file "$API_KEY_FILE" "$OUTPUT_PATH/fish-$VERSION.app"
|
||||
fi
|
||||
|
||||
# Zip it up.
|
||||
zip -r "fish-$VERSION.app.zip" "fish-$VERSION.app" && rm -Rf "fish-$VERSION.app"
|
||||
|
||||
rm -rf "$PKGDIR"
|
||||
@@ -3,18 +3,18 @@
|
||||
# Script to produce an OS X installer .pkg and .app(.zip)
|
||||
|
||||
usage() {
|
||||
echo "Build macOS packages, optionally signing and notarizing them."
|
||||
echo "Usage: $0 options"
|
||||
echo "Options:"
|
||||
echo " -s Enables code signing"
|
||||
echo " -f <APP_KEY.p12> Path to .p12 file for application signing"
|
||||
echo " -i <INSTALLER_KEY.p12> Path to .p12 file for installer signing"
|
||||
echo " -p <PASSWORD> Password for the .p12 files (necessary to access the certificates)"
|
||||
echo " -e <entitlements file> (Optional) Path to an entitlements XML file"
|
||||
echo " -n Enables notarization. This will fail if code signing is not also enabled."
|
||||
echo " -j <API_KEY.JSON> Path to JSON file generated with `rcodesign encode-app-store-connect-api-key` (required for notarization)"
|
||||
echo
|
||||
exit 1
|
||||
echo "Build macOS packages, optionally signing and notarizing them."
|
||||
echo "Usage: $0 options"
|
||||
echo "Options:"
|
||||
echo " -s Enables code signing"
|
||||
echo " -f <APP_KEY.p12> Path to .p12 file for application signing"
|
||||
echo " -i <INSTALLER_KEY.p12> Path to .p12 file for installer signing"
|
||||
echo " -p <PASSWORD> Password for the .p12 files (necessary to access the certificates)"
|
||||
echo " -e <entitlements file> (Optional) Path to an entitlements XML file"
|
||||
echo " -n Enables notarization. This will fail if code signing is not also enabled."
|
||||
echo " -j <API_KEY.JSON> Path to JSON file generated with \`rcodesign encode-app-store-connect-api-key\` (required for notarization)"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
set -x
|
||||
@@ -30,35 +30,35 @@ X86_64_DEPLOY_TARGET='MACOSX_DEPLOYMENT_TARGET=10.9'
|
||||
# The first supported version of macOS on arm64 is 10.15, so any Rust is fine for arm64.
|
||||
# We wish to support back to 10.9 on x86-64; the last version of Rust to support that is
|
||||
# version 1.73.0.
|
||||
RUST_VERSION_X86_64=1.73.0
|
||||
RUST_VERSION_X86_64=1.70.0
|
||||
|
||||
while getopts "sf:i:p:e:nj:" opt; do
|
||||
case $opt in
|
||||
s) SIGN=1;;
|
||||
f) P12_APP_FILE=$(realpath "$OPTARG");;
|
||||
i) P12_INSTALL_FILE=$(realpath "$OPTARG");;
|
||||
p) P12_PASSWORD="$OPTARG";;
|
||||
e) ENTITLEMENTS_FILE=$(realpath "$OPTARG");;
|
||||
n) NOTARIZE=1;;
|
||||
j) API_KEY_FILE=$(realpath "$OPTARG");;
|
||||
\?) usage;;
|
||||
esac
|
||||
case $opt in
|
||||
s) SIGN=1;;
|
||||
f) P12_APP_FILE=$(realpath "$OPTARG");;
|
||||
i) P12_INSTALL_FILE=$(realpath "$OPTARG");;
|
||||
p) P12_PASSWORD="$OPTARG";;
|
||||
e) ENTITLEMENTS_FILE=$(realpath "$OPTARG");;
|
||||
n) NOTARIZE=1;;
|
||||
j) API_KEY_FILE=$(realpath "$OPTARG");;
|
||||
\?) usage;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$SIGN" ] && ([ -z "$P12_APP_FILE" ] || [-z "$P12_INSTALL_FILE"] || [ -z "$P12_PASSWORD" ]); then
|
||||
usage
|
||||
if [ -n "$SIGN" ] && { [ -z "$P12_APP_FILE" ] || [ -z "$P12_INSTALL_FILE" ] || [ -z "$P12_PASSWORD" ]; }; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ -n "$NOTARIZE" ] && [ -z "$API_KEY_FILE" ]; then
|
||||
usage
|
||||
usage
|
||||
fi
|
||||
|
||||
VERSION=$(git describe --always --dirty 2>/dev/null)
|
||||
if test -z "$VERSION" ; then
|
||||
echo "Could not get version from git"
|
||||
if test -f version; then
|
||||
VERSION=$(cat version)
|
||||
fi
|
||||
echo "Could not get version from git"
|
||||
if test -f version; then
|
||||
VERSION=$(cat version)
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Version is $VERSION"
|
||||
@@ -76,7 +76,7 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in
|
||||
# and will probably not be built universal, so the package will fail to validate/run on other systems.
|
||||
# Note CMAKE_OSX_ARCHITECTURES is still relevant for the Mac app.
|
||||
{ cd "$PKGDIR/build_arm64" \
|
||||
&& cmake \
|
||||
&& cmake \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
|
||||
-DWITH_GETTEXT=OFF \
|
||||
@@ -91,7 +91,7 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in
|
||||
# Build for x86-64 but do not install; instead we will make some fat binaries inside the root.
|
||||
# Set RUST_VERSION_X86_64 to the last version of Rust that supports macOS 10.9.
|
||||
{ cd "$PKGDIR/build_x86_64" \
|
||||
&& cmake \
|
||||
&& cmake \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
|
||||
-DWITH_GETTEXT=OFF \
|
||||
@@ -99,11 +99,11 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in
|
||||
-DRust_CARGO_TARGET=x86_64-apple-darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
|
||||
-DFISH_USE_SYSTEM_PCRE2=OFF "$SRC_DIR" \
|
||||
&& env $X86_64_DEPLOY_TARGET make VERBOSE=1 -j 12; }
|
||||
&& env $X86_64_DEPLOY_TARGET make VERBOSE=1 -j 12; }
|
||||
|
||||
# Fatten them up.
|
||||
for FILE in "$PKGDIR"/root/usr/local/bin/*; do
|
||||
X86_FILE="$PKGDIR/build_x86_64/$(basename $FILE)"
|
||||
X86_FILE="$PKGDIR/build_x86_64/$(basename "$FILE")"
|
||||
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
||||
chmod 755 "$FILE"
|
||||
done
|
||||
@@ -142,10 +142,10 @@ fi
|
||||
(cd "$PKGDIR/build_arm64" && env $ARM64_DEPLOY_TARGET make -j 12 fish_macapp)
|
||||
(cd "$PKGDIR/build_x86_64" && env $X86_64_DEPLOY_TARGET make -j 12 fish_macapp)
|
||||
|
||||
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtsey of CMake.
|
||||
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtesy of CMake.
|
||||
cd "$PKGDIR/build_arm64"
|
||||
for FILE in fish.app/Contents/Resources/base/usr/local/bin/*; do
|
||||
X86_FILE="$PKGDIR/build_x86_64/fish.app/Contents/Resources/base/usr/local/bin/$(basename $FILE)"
|
||||
X86_FILE="$PKGDIR/build_x86_64/fish.app/Contents/Resources/base/usr/local/bin/$(basename "$FILE")"
|
||||
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
||||
|
||||
# macho-universal-create screws up the permissions.
|
||||
|
||||
176
build_tools/release.sh
Executable file
176
build_tools/release.sh
Executable file
@@ -0,0 +1,176 @@
|
||||
#!/bin/sh
|
||||
|
||||
{
|
||||
|
||||
set -ex
|
||||
|
||||
version=$1
|
||||
repository_owner=fish-shell
|
||||
remote=origin
|
||||
if [ -n "$2" ]; then
|
||||
set -u
|
||||
repository_owner=$2
|
||||
remote=$3
|
||||
set +u
|
||||
[ $# -eq 3 ]
|
||||
fi
|
||||
|
||||
[ -n "$version" ]
|
||||
|
||||
for tool in \
|
||||
bundle \
|
||||
gh \
|
||||
ruby \
|
||||
timeout \
|
||||
; do
|
||||
if ! command -v "$tool" >/dev/null; then
|
||||
echo >&2 "$0: missing command: $1"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
repo_root="$(dirname "$0")/.."
|
||||
fish_site=$repo_root/../fish-site
|
||||
|
||||
for path in . "$fish_site"
|
||||
do
|
||||
if ! git -C "$path" diff HEAD --quiet; then
|
||||
echo >&2 "$0: index and worktree must be clean"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if git tag | grep -qxF "$version"; then
|
||||
echo >&2 "$0: tag $version already exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -n 1p CHANGELOG.rst | grep -q '^fish .*(released ???)$'
|
||||
sed -n 2p CHANGELOG.rst | grep -q '^===*$'
|
||||
|
||||
changelog_title="fish $version (released $(date +'%B %d, %Y'))"
|
||||
sed -i \
|
||||
-e "1c$changelog_title" \
|
||||
-e "2c$(printf %s "$changelog_title" | sed s/./=/g)" \
|
||||
CHANGELOG.rst
|
||||
|
||||
CommitVersion() {
|
||||
sed -i "s/^version = \".*\"/version = \"$1\"/g" Cargo.toml
|
||||
cargo fetch --offline
|
||||
git add CHANGELOG.rst Cargo.toml Cargo.lock
|
||||
git commit -m "$2
|
||||
|
||||
Created by ./build_tools/release.sh $version"
|
||||
}
|
||||
|
||||
CommitVersion "$version" "Release $version"
|
||||
|
||||
# N.B. this is not GPG-signed.
|
||||
git tag --annotate --message="Release $version" $version
|
||||
|
||||
git push $remote $version
|
||||
|
||||
gh() {
|
||||
command gh --repo "$repository_owner/fish-shell" "$@"
|
||||
}
|
||||
|
||||
run_id=
|
||||
while [ -z "$run_id" ] && sleep 5
|
||||
do
|
||||
run_id=$(gh run list \
|
||||
--json=databaseId --jq=.[].databaseId \
|
||||
--workflow=release.yml --limit=1 \
|
||||
--commit="$(git rev-parse "$version^{commit}")")
|
||||
done
|
||||
|
||||
# Update fishshell.com
|
||||
tag_oid=$(git rev-parse "$version")
|
||||
tmpdir=$(mktemp -d)
|
||||
while ! \
|
||||
gh release download "$version" --dir="$tmpdir" \
|
||||
--pattern="fish-$version.tar.xz"
|
||||
do
|
||||
timeout 30 gh run watch "$run_id" ||:
|
||||
done
|
||||
actual_tag_oid=$(git ls-remote "$remote" |
|
||||
awk '$2 == "refs/tags/'"$version"'" { print $1 }')
|
||||
[ "$tag_oid" = "$actual_tag_oid" ]
|
||||
tar -C "$tmpdir" xf fish-$version.tar.xz
|
||||
minor_version=${version%.*}
|
||||
CopyDocs() {
|
||||
rm -rf "fish-site/site/docs/$1"
|
||||
cp -r "$tmpdir/fish-$version/user_doc/html" "fish-site/site/docs/$1"
|
||||
git -C fish-site add "site/docs/$1"
|
||||
}
|
||||
CopyDocs "$minor_version"
|
||||
latest_release=$(
|
||||
releases=$(git tag | grep '^[0-9]*\.[0-9]*\.[0-9]*.*' |
|
||||
sed $(: "De-prioritize release candidates (1.2.3-rc0)") \
|
||||
's/-/~/g' | LC_ALL=C sort --version-sort)
|
||||
printf %s\\n "$releases" | tail -1
|
||||
)
|
||||
if [ "$version" = "$latest_release" ]; then
|
||||
CopyDocs current
|
||||
fi
|
||||
rm -rf "$tmpdir"
|
||||
(
|
||||
cd "$fish_site"
|
||||
make new-release
|
||||
git add -u
|
||||
git commit --message="$(printf %s "\
|
||||
| Release $version
|
||||
|
|
||||
| Created by ../fish-shell/build_tools/release.sh
|
||||
" | sed 's,^\s*| ,,')"
|
||||
)
|
||||
|
||||
# N.B. --exit-status doesn't fail reliably.
|
||||
gh run view "$run_id" --verbose --log-failed --exit-status
|
||||
|
||||
while {
|
||||
! draft=$(gh release view "$version" --json=isDraft --jq=.isDraft) \
|
||||
|| [ "$draft" = true ]
|
||||
}
|
||||
do
|
||||
sleep 20
|
||||
done
|
||||
|
||||
(
|
||||
cd "$fish_site"
|
||||
git push git@github.com:$repository_owner/fish-site
|
||||
)
|
||||
|
||||
if git merge-base --is-ancestor $remote/master $version
|
||||
then
|
||||
git push $remote $version:master
|
||||
else
|
||||
# Probably on an integration branch.
|
||||
# TODO Maybe push when that's safe (or move this to CI).
|
||||
:
|
||||
fi
|
||||
|
||||
if [ "$repository_owner" = fish-shell ]; then {
|
||||
mail=$(mktemp)
|
||||
cat >$mail <<EOF
|
||||
From: $(git var GIT_AUTHOR_IDENT | sed 's/ [0-9]* +[0-9]*$//')
|
||||
To: fish-users Mailing List <fish-users@lists.sourceforge.net>
|
||||
Subject: fish $version released
|
||||
|
||||
See https://github.com/fish-shell/fish-shell/releases/tag/$version
|
||||
EOF
|
||||
git send-email --suppress-cc=all $mail
|
||||
rm $mail
|
||||
} fi
|
||||
|
||||
changelog=$(cat - CHANGELOG.rst <<EOF
|
||||
fish ?.?.? (released ???)
|
||||
=========================
|
||||
|
||||
EOF
|
||||
)
|
||||
printf %s\\n "$changelog" >CHANGELOG.rst
|
||||
CommitVersion ${version}-snapshot "start new cycle"
|
||||
|
||||
exit
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@ add_custom_target(sphinx-docs
|
||||
|
||||
# sphinx-manpages needs the fish_indent binary for the version number
|
||||
add_custom_target(sphinx-manpages
|
||||
env PATH="${CMAKE_BINARY_DIR}:$$PATH"
|
||||
env FISH_BUILD_VERSION_FILE="${CMAKE_CURRENT_BINARY_DIR}/${FBVF}"
|
||||
${SPHINX_EXECUTABLE}
|
||||
-j auto
|
||||
-q -b man
|
||||
@@ -38,7 +38,7 @@ add_custom_target(sphinx-manpages
|
||||
"${SPHINX_SRC_DIR}"
|
||||
# TODO: This only works if we only have section 1 manpages.
|
||||
"${SPHINX_MANPAGE_DIR}/man1"
|
||||
DEPENDS fish_indent
|
||||
DEPENDS CHECK-FISH-BUILD-VERSION-FILE
|
||||
COMMENT "Building man pages with Sphinx")
|
||||
|
||||
if(SPHINX_EXECUTABLE)
|
||||
|
||||
@@ -265,18 +265,6 @@ else()
|
||||
endif()
|
||||
|
||||
if (_RUSTC_VERSION_RAW MATCHES "rustup [0-9\\.]+")
|
||||
if (_USER_SPECIFIED_RUSTC)
|
||||
message(
|
||||
WARNING "User-specified Rust_COMPILER pointed to rustup's rustc proxy. Corrosion's "
|
||||
"FindRust will always try to evaluate to an actual Rust toolchain, and so the "
|
||||
"user-specified Rust_COMPILER will be discarded in favor of the default "
|
||||
"rustup-managed toolchain."
|
||||
)
|
||||
|
||||
unset(Rust_COMPILER)
|
||||
unset(Rust_COMPILER CACHE)
|
||||
endif()
|
||||
|
||||
# Get `rustup` next to the `rustc` proxy
|
||||
get_filename_component(_RUST_PROXIES_PATH "${_Rust_COMPILER_TEST}" DIRECTORY)
|
||||
find_program(Rust_RUSTUP rustup HINTS "${_RUST_PROXIES_PATH}" NO_DEFAULT_PATH)
|
||||
@@ -318,18 +306,23 @@ if (Rust_RESOLVE_RUSTUP_TOOLCHAINS)
|
||||
set(_DISCOVERED_TOOLCHAINS_VERSION "")
|
||||
|
||||
foreach(_TOOLCHAIN_RAW ${_TOOLCHAINS_RAW})
|
||||
if (_TOOLCHAIN_RAW MATCHES "([a-zA-Z0-9\\._\\-]+)[ \t\r\n]?(\\(default\\) \\(override\\)|\\(default\\)|\\(override\\))?[ \t\r\n]+(.+)")
|
||||
# We're going to try to parse the output of `rustup toolchain list --verbose`.
|
||||
# We expect output like this:
|
||||
# stable-random-toolchain-junk (parenthesized-random-stuff-like-active-or-default) /path/to/toolchain/blah/more-blah
|
||||
# In the following regex, we capture the toolchain name, any parenthesized stuff, and then the path.
|
||||
message(STATUS "Parsing toolchain: ${_TOOLCHAIN_RAW}")
|
||||
if (_TOOLCHAIN_RAW MATCHES "([^\t ]+)[\t ]*(\\(.*\\))?[\t ]*(.+)")
|
||||
set(_TOOLCHAIN "${CMAKE_MATCH_1}")
|
||||
set(_TOOLCHAIN_TYPE "${CMAKE_MATCH_2}")
|
||||
|
||||
set(_TOOLCHAIN_PATH "${CMAKE_MATCH_3}")
|
||||
set(_TOOLCHAIN_${_TOOLCHAIN}_PATH "${CMAKE_MATCH_3}")
|
||||
|
||||
if (_TOOLCHAIN_TYPE MATCHES ".*\\(default\\).*")
|
||||
if (_TOOLCHAIN_TYPE MATCHES "default")
|
||||
set(_TOOLCHAIN_DEFAULT "${_TOOLCHAIN}")
|
||||
endif()
|
||||
|
||||
if (_TOOLCHAIN_TYPE MATCHES ".*\\(override\\).*")
|
||||
if (_TOOLCHAIN_TYPE MATCHES "override")
|
||||
set(_TOOLCHAIN_OVERRIDE "${_TOOLCHAIN}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ configure_file(fish.pc.in fish.pc.noversion @ONLY)
|
||||
add_custom_command(OUTPUT fish.pc
|
||||
COMMAND sed '/Version/d' fish.pc.noversion > fish.pc
|
||||
COMMAND printf "Version: " >> fish.pc
|
||||
COMMAND sed 's/FISH_BUILD_VERSION=//\;s/\"//g' ${FBVF} >> fish.pc
|
||||
COMMAND cat ${FBVF} >> fish.pc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS CHECK-FISH-BUILD-VERSION-FILE ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ add_executable(fish_macapp EXCLUDE_FROM_ALL
|
||||
|
||||
# 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.
|
||||
# generally this will be run by make_macos_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
|
||||
@@ -32,7 +32,7 @@ execute_process(
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
|
||||
# Note CMake appends .app, so the real output name will be fish.app.
|
||||
# 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")
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ else()
|
||||
set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_HOST_TARGET}")
|
||||
endif()
|
||||
|
||||
set(rust_profile $<IF:$<CONFIG:Debug>,debug,release>)
|
||||
set(rust_profile $<IF:$<CONFIG:Debug>,debug,$<IF:$<CONFIG:RelWithDebInfo>,release-with-debug,release>>)
|
||||
set(rust_debugflags "$<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g>")
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ set(VARS_FOR_CARGO
|
||||
"PREFIX=${CMAKE_INSTALL_PREFIX}"
|
||||
# Temporary hack to propogate CMake flags/options to build.rs.
|
||||
"CMAKE_WITH_GETTEXT=${CMAKE_WITH_GETTEXT}"
|
||||
# Cheesy so we can tell cmake was used to build
|
||||
"CMAKE=1"
|
||||
"DOCDIR=${CMAKE_INSTALL_FULL_DOCDIR}"
|
||||
"DATADIR=${CMAKE_INSTALL_FULL_DATADIR}"
|
||||
"SYSCONFDIR=${CMAKE_INSTALL_FULL_SYSCONFDIR}"
|
||||
|
||||
@@ -8,13 +8,11 @@ set(CMAKE_FOLDER tests)
|
||||
# pass but it should not be considered a failed test run, either.
|
||||
set(SKIP_RETURN_CODE 125)
|
||||
|
||||
# Even though we are using CMake's ctest for testing, we still define our own `make test` target
|
||||
# Even though we are using CMake's ctest for testing, we still define our own `make fish_run_tests` target
|
||||
# rather than use its default for many reasons:
|
||||
# * CMake doesn't run tests in-proc or even add each tests as an individual node in the ninja
|
||||
# dependency tree, instead it just bundles all tests into a target called `test` that always just
|
||||
# shells out to `ctest`, so there are no build-related benefits to not doing that ourselves.
|
||||
# * CMake devs insist that it is appropriate for `make test` to never depend on `make all`, i.e.
|
||||
# running `make test` does not require any of the binaries to be built before testing.
|
||||
# * The only way to have a test depend on a binary is to add a fake test with a name like
|
||||
# "build_fish" that executes CMake recursively to build the `fish` target.
|
||||
# * Circling back to the point about individual tests not being actual Makefile targets, CMake does
|
||||
@@ -32,15 +30,6 @@ add_custom_target(fish_run_tests
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# If CMP0037 is available, also make an alias "test" target.
|
||||
# Note that this policy may not be available, in which case definining such a target silently fails.
|
||||
cmake_policy(PUSH)
|
||||
if(POLICY CMP0037)
|
||||
cmake_policy(SET CMP0037 OLD)
|
||||
add_custom_target(test DEPENDS fish_run_tests)
|
||||
endif()
|
||||
cmake_policy(POP)
|
||||
|
||||
# The "test" directory.
|
||||
set(TEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/test)
|
||||
|
||||
@@ -54,6 +43,7 @@ set(TEST_ROOT_DIR ${TEST_DIR}/root)
|
||||
if(NOT FISH_IN_TREE_BUILD)
|
||||
add_custom_target(funcs_dir)
|
||||
add_custom_command(TARGET funcs_dir
|
||||
POST_BUILD
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/share
|
||||
# Don't run ln twice or it will create a new link in the link.
|
||||
COMMAND test -e ${CMAKE_BINARY_DIR}/share/functions || ln -sf
|
||||
@@ -63,6 +53,7 @@ if(NOT FISH_IN_TREE_BUILD)
|
||||
|
||||
add_custom_target(tests_dir DEPENDS tests)
|
||||
add_custom_command(TARGET tests_dir
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/tests/ ${CMAKE_BINARY_DIR}/tests/
|
||||
COMMENT "Copying test files to binary dir"
|
||||
@@ -79,7 +70,7 @@ configure_file(build_tools/pexpect_helper.py pexpect_helper.py COPYONLY)
|
||||
set(CMAKE_XCODE_GENERATE_SCHEME 0)
|
||||
|
||||
# CMake being CMake, you can't just add a DEPENDS argument to add_test to make it depend on any of
|
||||
# your binaries actually being built before `make test` is executed (requiring `make all` first),
|
||||
# your binaries actually being built before `make fish_run_tests` is executed (requiring `make all` first),
|
||||
# and the only dependency a test can have is on another test. So we make building fish
|
||||
# prerequisites to our entire top-level `test` target.
|
||||
function(add_test_target NAME)
|
||||
@@ -153,7 +144,7 @@ endif()
|
||||
|
||||
add_test(
|
||||
NAME "cargo-test"
|
||||
COMMAND env ${VARS_FOR_CARGO} cargo test ${CARGO_FLAGS} --workspace --target-dir ${rust_target_dir} ${cargo_test_flags}
|
||||
COMMAND env ${VARS_FOR_CARGO} cargo test --no-default-features ${CARGO_FLAGS} --workspace --target-dir ${rust_target_dir} ${cargo_test_flags}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
)
|
||||
set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
|
||||
25
debian/control
vendored
25
debian/control
vendored
@@ -3,10 +3,16 @@ Section: shells
|
||||
Priority: optional
|
||||
Maintainer: ridiculous_fish <corydoras@ridiculousfish.com>
|
||||
Uploaders: David Adam <zanchey@ucc.gu.uwa.edu.au>
|
||||
Build-Depends: debhelper (>= 12), cmake (>= 3.19.0) | cmake-mozilla (>= 3.19.0), gettext,
|
||||
rustc (>= 1.70), cargo (>= 0.66) | cargo-mozilla (>= 0.66), libpcre2-dev,
|
||||
Build-Depends: debhelper (>= 12),
|
||||
cargo (>= 0.66) | cargo-mozilla (>= 0.66),
|
||||
cmake (>= 3.15.0) | cmake-mozilla (>= 3.15.0),
|
||||
gettext,
|
||||
libpcre2-dev,
|
||||
rustc (>= 1.70),
|
||||
# Test dependencies
|
||||
locales-all, python3
|
||||
locales-all,
|
||||
ncurses-base,
|
||||
python3
|
||||
Standards-Version: 4.1.5
|
||||
Homepage: https://fishshell.com/
|
||||
Vcs-Git: https://github.com/fish-shell/fish-shell.git
|
||||
@@ -14,8 +20,17 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
|
||||
|
||||
Package: fish
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, passwd (>= 4.0.3-10), gettext-base, man-db,
|
||||
procps, python3 (>=3.5)
|
||||
Depends: bsdextrautils,
|
||||
Depends: bsdextrautils | bsdmainutils,
|
||||
file,
|
||||
gettext-base,
|
||||
groff-base,
|
||||
man-db,
|
||||
ncurses-base,
|
||||
procps,
|
||||
python3 (>=3.5),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Conflicts: fish-common
|
||||
Recommends: xsel (>=1.2.0)
|
||||
Suggests: xdg-utils
|
||||
|
||||
22
deny.toml
Normal file
22
deny.toml
Normal file
@@ -0,0 +1,22 @@
|
||||
[licenses]
|
||||
# We want really high confidence when inferring licenses from text
|
||||
confidence-threshold = 0.93
|
||||
unused-allowed-license = "allow" # don't warn for unused licenses in this list
|
||||
allow = [
|
||||
"BSD-2-Clause",
|
||||
"BSD-3-Clause",
|
||||
"BSL-1.0",
|
||||
"GPL-2.0",
|
||||
"ISC",
|
||||
"LGPL-2.0",
|
||||
"MIT",
|
||||
"MPL-2.0",
|
||||
"PSF-2.0",
|
||||
"Unicode-DFS-2016",
|
||||
"WTFPL",
|
||||
"Zlib",
|
||||
]
|
||||
|
||||
[sources.allow-org]
|
||||
# 1 or more github.com organizations to allow git sources for
|
||||
github = ["fish-shell"]
|
||||
@@ -53,7 +53,7 @@ Combining these features, it is possible to create custom syntaxes, where a regu
|
||||
|
||||
> abbr > ~/.config/fish/conf.d/myabbrs.fish
|
||||
|
||||
This will save all your abbrevations in "myabbrs.fish", overwriting the whole file so it doesn't leave any duplicates,
|
||||
This will save all your abbreviations in "myabbrs.fish", overwriting the whole file so it doesn't leave any duplicates,
|
||||
or restore abbreviations you had erased.
|
||||
Of course any functions will have to be saved separately, see :doc:`funcsave <funcsave>`.
|
||||
|
||||
@@ -125,6 +125,7 @@ This first creates a function ``vim_edit`` which prepends ``vim`` before its arg
|
||||
This creates an abbreviation "4DIRS" which expands to a multi-line loop "template." The template enters each directory and then leaves it. The cursor is positioned ready to enter the command to run in each directory, at the location of the ``!``, which is itself erased.
|
||||
|
||||
::
|
||||
|
||||
abbr --command git co checkout
|
||||
|
||||
Turns "co" as an argument to "git" into "checkout". Multiple commands are possible, ``--command={git,hg}`` would expand "co" to "checkout" for both git and hg.
|
||||
|
||||
@@ -23,7 +23,7 @@ If both ``KEYS`` and ``COMMAND`` are given, ``bind`` adds (or replaces) a bindin
|
||||
If only ``KEYS`` is given, any existing binding in the given ``MODE`` will be printed.
|
||||
|
||||
``KEYS`` is a comma-separated list of key names.
|
||||
Modifier keys can be specified by prefixing a key name with a combination of ``ctrl-``/``c-``, ``alt-``/``a-`` and ``shift-``.
|
||||
Modifier keys can be specified by prefixing a key name with a combination of ``ctrl-``, ``alt-``, ``shift-`` and ``super-`` (i.e. the "windows" or "command" key).
|
||||
For example, pressing :kbd:`w` while holding the Alt modifier is written as ``alt-w``.
|
||||
Key names are case-sensitive; for example ``alt-W`` is the same as ``alt-shift-w``.
|
||||
``ctrl-x,ctrl-e`` would mean pressing :kbd:`ctrl-x` followed by :kbd:`ctrl-e`.
|
||||
@@ -99,6 +99,12 @@ The following options are available:
|
||||
**-s** or **--silent**
|
||||
Silences some of the error messages, including for unknown key names and unbound sequences.
|
||||
|
||||
**-k KEY_NAME** or **--key KEY_NAME**
|
||||
This looks up KEY_NAME in terminfo and binds that sequence instead of a key that fish would decode.
|
||||
To view a list of the terminfo keys fish knows about, use ``bind --key-names`` or ``bind -K``.
|
||||
This is deprecated and provided for compatibility with older fish versions. You should bind the keys directly.
|
||||
Instead of ``bind -k sright`` use ``bind shift-right``, instead of ``bind -k nul`` use ``bind ctrl-space`` and so on.
|
||||
|
||||
**-h** or **--help**
|
||||
Displays help about using this command.
|
||||
|
||||
@@ -162,7 +168,7 @@ The following special input functions are available:
|
||||
start selecting text
|
||||
|
||||
``cancel``
|
||||
cancel the current commandline and replace it with a new empty one
|
||||
close the pager if it is open, or undo the most recent completion if one was just inserted, or otherwise cancel the current commandline and replace it with a new empty one
|
||||
|
||||
``cancel-commandline``
|
||||
cancel the current commandline and replace it with a new empty one, leaving the old one in place with a marker to show that it was cancelled
|
||||
@@ -170,6 +176,9 @@ The following special input functions are available:
|
||||
``capitalize-word``
|
||||
make the current word begin with a capital letter
|
||||
|
||||
``clear-commandline``
|
||||
empty the entire commandline
|
||||
|
||||
``clear-screen``
|
||||
clears the screen and redraws the prompt. if the terminal doesn't support clearing the screen it is the same as ``repaint``.
|
||||
|
||||
@@ -259,7 +268,7 @@ The following special input functions are available:
|
||||
search the history for the next matching argument
|
||||
|
||||
``forward-jump`` and ``backward-jump``
|
||||
read another character and jump to its next occurence after/before the cursor
|
||||
read another character and jump to its next occurrence after/before the cursor
|
||||
|
||||
``forward-jump-till`` and ``backward-jump-till``
|
||||
jump to right *before* the next occurrence
|
||||
@@ -269,7 +278,7 @@ The following special input functions are available:
|
||||
|
||||
``jump-to-matching-bracket``
|
||||
jump to matching bracket if the character under the cursor is bracket;
|
||||
otherwise, jump to the next occurence of *any right* bracket after the cursor.
|
||||
otherwise, jump to the next occurrence of *any right* bracket after the cursor.
|
||||
The following brackets are considered: ``([{}])``
|
||||
|
||||
``jump-till-matching-bracket``
|
||||
@@ -292,7 +301,7 @@ The following special input functions are available:
|
||||
move the selected text to the killring
|
||||
|
||||
``kill-whole-line``
|
||||
move the line (including the following newline) to the killring. If the line is the last line, its preceeding newline is also removed
|
||||
move the line (including the following newline) to the killring. If the line is the last line, its preceding newline is also removed
|
||||
|
||||
``kill-inner-line``
|
||||
move the line (without the following newline) to the killring
|
||||
|
||||
@@ -71,7 +71,7 @@ The following options change what part of the commandline is printed or updated:
|
||||
Selects the current token
|
||||
|
||||
**--search-field**
|
||||
Use the pager search field instead of the command line. Returns false is the search field is not shown.
|
||||
Use the pager search field instead of the command line. Returns false if the search field is not shown.
|
||||
|
||||
The following options change the way ``commandline`` prints the current commandline buffer:
|
||||
|
||||
@@ -97,7 +97,12 @@ If ``commandline`` is called during a call to complete a given string using ``co
|
||||
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.
|
||||
If no argument is given, print the line that the cursor is on, with the topmost line starting at 1.
|
||||
Otherwise, set the cursor to the given line.
|
||||
|
||||
**--column**
|
||||
If no argument is given, print the 1-based offset from the start of the line to the cursor position in Unicode code points.
|
||||
Otherwise, set the cursor to the given code point offset.
|
||||
|
||||
**-S** or **--search-mode**
|
||||
Evaluates to true if the commandline is performing a history search.
|
||||
@@ -111,7 +116,7 @@ The following options output metadata about the commandline state:
|
||||
**--is-valid**
|
||||
Returns true when the commandline is syntactically valid and complete.
|
||||
If it is, it would be executed when the ``execute`` bind function is called.
|
||||
If the commandline is incomplete, return 2, if erroneus, return 1.
|
||||
If the commandline is incomplete, return 2, if erroneous, return 1.
|
||||
|
||||
**--showing-suggestion**
|
||||
Evaluates to true (i.e. returns 0) when the shell is currently showing an automatic history completion/suggestion, available to be consumed via one of the `forward-` bindings.
|
||||
|
||||
50
doc_src/cmds/export.rst
Normal file
50
doc_src/cmds/export.rst
Normal file
@@ -0,0 +1,50 @@
|
||||
.. _cmd-export:
|
||||
|
||||
export - compatibility function for exporting variables
|
||||
=======================================================
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. synopsis::
|
||||
|
||||
export
|
||||
export NAME=VALUE
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``export`` is a function included for compatibility with POSIX shells. In general, the :doc:`set <set>`
|
||||
builtin should be used instead.
|
||||
|
||||
When called without arguments, ``export`` prints a list of currently-exported variables, like ``set
|
||||
-x``.
|
||||
|
||||
When called with a ``NAME=VALUE`` pair, the variable ``NAME`` is set to ``VALUE`` in the global
|
||||
scope, and exported as an environment variable to other commands.
|
||||
|
||||
There are no options available.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The following commands have an identical effect.
|
||||
|
||||
::
|
||||
|
||||
set -gx PAGER bat
|
||||
export PAGER=bat
|
||||
|
||||
Note: If you want to add to e.g. ``$PATH``, you need to be careful to :ref:`combine the list <cartesian-product>`. Quote it, like so::
|
||||
|
||||
export PATH="$PATH:/opt/bin"
|
||||
|
||||
Or just use ``set``, which avoids this::
|
||||
|
||||
set -gx PATH $PATH /opt/bin
|
||||
|
||||
See more
|
||||
--------
|
||||
|
||||
1. The :doc:`set <set>` command.
|
||||
@@ -34,12 +34,18 @@ The following options are available:
|
||||
See :ref:`Debugging <debugging-fish>` below for details.
|
||||
|
||||
**-o** or **--debug-output=DEBUG_FILE**
|
||||
Specifies a file path to receive the debug output, including categories and :envvar:`fish_trace`.
|
||||
The default is stderr.
|
||||
Specifies a file path to receive the debug output, including categories and :envvar:`fish_trace`.
|
||||
The default is standard error.
|
||||
|
||||
**-i** or **--interactive**
|
||||
The shell is interactive.
|
||||
|
||||
**--install[=PATH]**
|
||||
When built as self-installable (via cargo), this will unpack fish's data files and place them in ``~/.local/share/fish/install/``.
|
||||
fish will also ask to do this automatically when run interactively.
|
||||
If PATH is given, fish will install itself into a relocatable directory tree rooted at that path.
|
||||
That means it will install the data files to PATH/share/fish and copy itself to PATH/bin/fish.
|
||||
|
||||
**-l** or **--login**
|
||||
Act as if invoked as a login shell.
|
||||
|
||||
|
||||
@@ -26,15 +26,12 @@ The first argument to fish_title contains the most recently executed foreground
|
||||
|
||||
This requires that your terminal supports programmable titles and the feature is turned on.
|
||||
|
||||
To disable setting the title, use an empty function (see below).
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
A simple title:
|
||||
|
||||
|
||||
|
||||
::
|
||||
A simple title::
|
||||
|
||||
function fish_title
|
||||
set -q argv[1]; or set argv fish
|
||||
@@ -43,3 +40,7 @@ A simple title:
|
||||
echo (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv;
|
||||
end
|
||||
|
||||
Do not change the title::
|
||||
|
||||
function fish_title
|
||||
end
|
||||
|
||||
@@ -279,7 +279,7 @@ Examples
|
||||
|
||||
path normalize [-z | --null-in] [-Z | --null-out] [-q | --quiet] [PATH ...]
|
||||
|
||||
``path normalize`` returns the normalized versions of all paths. That means it squashes duplicate "/" (except for two leading "//"), collapses "../" with earlier components and removes "." components.
|
||||
``path normalize`` returns the normalized versions of all paths. That means it squashes duplicate "/", collapses "../" with earlier components and removes "." components.
|
||||
|
||||
Unlike ``realpath`` or ``path resolve``, it does not make the paths absolute. It also does not resolve any symlinks. As such it can operate on non-existent paths.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Description
|
||||
|
||||
fish will search the working directory to resolve relative paths but will not search :envvar:`PATH` .
|
||||
|
||||
If no file is specified and stdin is not the terminal, or if the file name ``-`` is used, stdin will be read.
|
||||
If no file is specified and a file or pipeline is connected to standard input, or if the file name ``-`` is used, ``source`` will read from standard input. If no file is specified and there is no redirected file or pipeline on standard input, an error will be printed.
|
||||
|
||||
The exit status of ``source`` is the exit status of the last job to execute. If something goes wrong while opening or reading the file, ``source`` exits with a non-zero status.
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ Synopsis
|
||||
status
|
||||
status is-login
|
||||
status is-interactive
|
||||
status is-interactive-read
|
||||
status is-block
|
||||
status is-breakpoint
|
||||
status is-command-substitution
|
||||
@@ -29,6 +30,7 @@ Synopsis
|
||||
status job-control CONTROL_TYPE
|
||||
status features
|
||||
status test-feature FEATURE
|
||||
status buildinfo
|
||||
|
||||
Description
|
||||
-----------
|
||||
@@ -49,6 +51,9 @@ The following operations (subcommands) are available:
|
||||
**is-interactive**, **-i** or **--is-interactive**
|
||||
Returns 0 if fish is interactive - that is, connected to a keyboard.
|
||||
|
||||
**is-interactive-read** or **--is-interactive-read**
|
||||
Returns 0 if fish is running an interactive :doc:`read <read>` builtin which is connected to a keyboard.
|
||||
|
||||
**is-login**, **-l** or **--is-login**
|
||||
Returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up :envvar:`PATH`.
|
||||
|
||||
@@ -97,6 +102,10 @@ The following operations (subcommands) are available:
|
||||
**test-feature** *FEATURE*
|
||||
Returns 0 when FEATURE is enabled, 1 if it is disabled, and 2 if it is not recognized.
|
||||
|
||||
**buildinfo**
|
||||
This prints information on how fish was build - which architecture, which build system or profile was used, etc.
|
||||
This is mainly useful for debugging.
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@ Description
|
||||
|
||||
.. BEGIN DESCRIPTION
|
||||
|
||||
``string escape`` escapes each *STRING* in one of three ways. The first is **--style=script**. This is the default. It alters the string such that it can be passed back to ``eval`` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If **-n** or **--no-quoted** is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
|
||||
``string escape`` escapes each *STRING* in one of several ways.
|
||||
|
||||
**--style=script** (default) alters the string such that it can be passed back to ``eval`` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If **-n** or **--no-quoted** is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
|
||||
|
||||
**--style=var** ensures the string can be used as a variable name by hex encoding any non-alphanumeric characters. The string is first converted to UTF-8 before being encoded.
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ Match Glob Examples
|
||||
|
||||
::
|
||||
|
||||
>_ string match '?' a
|
||||
>_ string match 'a' a
|
||||
a
|
||||
|
||||
>_ string match 'a*b' axxb
|
||||
axxb
|
||||
|
||||
>_ string match -i 'a??B' Axxb
|
||||
>_ string match -i 'a*B' Axxb
|
||||
Axxb
|
||||
|
||||
>_ string match -- '-*' -h foo --version bar
|
||||
@@ -67,7 +67,7 @@ Match Glob Examples
|
||||
-h
|
||||
--version
|
||||
|
||||
>_ echo 'ok?' | string match '*\?'
|
||||
>_ echo 'ok?' | string match '*?'
|
||||
ok?
|
||||
|
||||
# Note that only the second STRING will match here.
|
||||
@@ -79,7 +79,7 @@ Match Glob Examples
|
||||
foo
|
||||
foo2
|
||||
|
||||
>_ string match 'foo?' 'foo1' 'foo' 'foo2'
|
||||
>_ string match 'foo*' 'foo1' 'foo' 'foo2'
|
||||
foo1
|
||||
foo2
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Description
|
||||
|
||||
.. BEGIN DESCRIPTION
|
||||
|
||||
``string repeat`` repeats the *STRING* **-n** or **--count** times. The **-m** or **--max** option will limit the number of outputted characters (excluding the newline). This option can be used by itself or in conjunction with **--count**. If both **--count** and **--max** are present, max char will be outputed unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both **--count** and **--max** will accept a number greater than or equal to zero, in the case of zero, nothing will be outputed. The first argument is interpreted as *COUNT* if **--count** or **--max** are not explicilty specified. If **-N** or **--no-newline** is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
|
||||
``string repeat`` repeats the *STRING* **-n** or **--count** times. The **-m** or **--max** option will limit the number of outputted characters (excluding the newline). This option can be used by itself or in conjunction with **--count**. If both **--count** and **--max** are present, max char will be outputted unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both **--count** and **--max** will accept a number greater than or equal to zero, in the case of zero, nothing will be outputted. The first argument is interpreted as *COUNT* if **--count** or **--max** are not explicitly specified. If **-N** or **--no-newline** is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
|
||||
|
||||
.. END DESCRIPTION
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ If **-q** or **--quiet** is given, ``string shorten`` only runs for the return v
|
||||
|
||||
The default ellipsis is ``…``. If fish thinks your system is incapable because of your locale, it will use ``...`` instead.
|
||||
|
||||
The return value is 0 if any shortening occured, 1 otherwise.
|
||||
The return value is 0 if any shortening occurred, 1 otherwise.
|
||||
|
||||
.. END DESCRIPTION
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ Description
|
||||
|
||||
.. BEGIN DESCRIPTION
|
||||
|
||||
``string trim`` removes leading and trailing whitespace from each *STRING*. If **-l** or **--left** is given, only leading whitespace is removed. If **-r** or **--right** is given, only trailing whitespace is trimmed. The **-c** or **--chars** switch causes the characters in *CHARS* to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
|
||||
``string trim`` removes leading and trailing whitespace from each *STRING*. If **-l** or **--left** is given, only leading whitespace is removed. If **-r** or **--right** is given, only trailing whitespace is trimmed.
|
||||
|
||||
The **-c** or **--chars** switch causes the set of characters in *CHARS* to be removed instead of whitespace. This is a set of characters, not a string - if you pass ``-c foo``, it will remove any "f" or "o", not just "foo" as a whole.
|
||||
|
||||
Exit status: 0 if at least one character was trimmed, or 1 otherwise.
|
||||
|
||||
.. END DESCRIPTION
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ Some helper functions, often to give you information for use in your prompt:
|
||||
- :doc:`fish_add_path <cmds/fish_add_path>` to easily add a path to $PATH.
|
||||
- :doc:`alias <cmds/alias>` to quickly define wrapper functions ("aliases").
|
||||
- :doc:`fish_delta <cmds/fish_delta>` to show what you have changed from the default configuration.
|
||||
- :doc:`export <cmds/export>` as a compatibility function for other shells.
|
||||
|
||||
Helper commands
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -10,9 +10,19 @@ import glob
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
from sphinx.highlighting import lexers
|
||||
from sphinx.errors import SphinxWarning
|
||||
from docutils import nodes
|
||||
|
||||
try:
|
||||
import sphinx_markdown_builder
|
||||
|
||||
extensions = [
|
||||
"sphinx_markdown_builder",
|
||||
]
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# -- Helper functions --------------------------------------------------------
|
||||
|
||||
|
||||
@@ -35,11 +45,14 @@ def issue_role(name, rawtext, text, lineno, inliner, options=None, content=None)
|
||||
return [link], []
|
||||
|
||||
|
||||
def remove_fish_indent_lexer(app):
|
||||
if app.builder.name in ("man", "markdown"):
|
||||
del lexers["fish-docs-samples"]
|
||||
|
||||
|
||||
# -- Load our extensions -------------------------------------------------
|
||||
def setup(app):
|
||||
# Our own pygments lexers
|
||||
from sphinx.highlighting import lexers
|
||||
|
||||
this_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
sys.path.insert(0, this_dir)
|
||||
from fish_indent_lexer import FishIndentLexer
|
||||
@@ -52,6 +65,8 @@ def setup(app):
|
||||
app.add_config_value("issue_url", default=None, rebuild="html")
|
||||
app.add_role("issue", issue_role)
|
||||
|
||||
app.connect("builder-inited", remove_fish_indent_lexer)
|
||||
|
||||
|
||||
# The default language to assume
|
||||
highlight_language = "fish-docs-samples"
|
||||
@@ -59,15 +74,22 @@ highlight_language = "fish-docs-samples"
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = "fish-shell"
|
||||
copyright = "2024, fish-shell developers"
|
||||
copyright = "fish-shell developers"
|
||||
author = "fish-shell developers"
|
||||
issue_url = "https://github.com/fish-shell/fish-shell/issues"
|
||||
|
||||
# Parsing FISH-BUILD-VERSION-FILE is possible but hard to ensure that it is in the right place
|
||||
# fish_indent is guaranteed to be on PATH for the Pygments highlighter anyway
|
||||
ret = subprocess.check_output(
|
||||
("fish_indent", "--version"), stderr=subprocess.STDOUT
|
||||
).decode("utf-8")
|
||||
if "FISH_BUILD_VERSION_FILE" in os.environ:
|
||||
f = open(os.environ["FISH_BUILD_VERSION_FILE"], "r")
|
||||
ret = f.readline().strip()
|
||||
elif "FISH_BUILD_VERSION" in os.environ:
|
||||
ret = os.environ["FISH_BUILD_VERSION"]
|
||||
else:
|
||||
ret = subprocess.check_output(
|
||||
("../build_tools/git_version_gen.sh", "--stdout"), stderr=subprocess.STDOUT
|
||||
).decode("utf-8")
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = ret.strip().split(" ")[-1]
|
||||
# The short X.Y version
|
||||
|
||||
@@ -154,7 +154,7 @@ in :ref:`config.fish <configuration>`.
|
||||
|
||||
How do I run a command from history?
|
||||
------------------------------------
|
||||
Type some part of the command, and then hit the :kbd:`up` (``↑``) or :kbd:`ctrl-down` (``↓``) arrow keys to navigate through history matches, or press :kbd:`ctrl-r` to open the history in a searchable pager. In this pager you can press :kbd:`ctrl-r` or :kbd:`ctrl-s` to move to older or younger history respectively.
|
||||
Type some part of the command, and then hit the :kbd:`up` (``↑``) or :kbd:`down` (``↓``) arrow keys to navigate through history matches, or press :kbd:`ctrl-r` to open the history in a searchable pager. In this pager you can press :kbd:`ctrl-r` or :kbd:`ctrl-s` to move to older or younger history respectively.
|
||||
|
||||
Additional default key bindings include :kbd:`ctrl-p` (up) and :kbd:`ctrl-n` (down). See :ref:`Searchable command history <history-search>` for more information.
|
||||
|
||||
@@ -168,7 +168,7 @@ In general, fish's history recall works like this:
|
||||
|
||||
- Like other shells, the Up arrow, ``up`` recalls whole lines, starting from the last executed line. So instead of typing ``!!``, you would just hit the up-arrow.
|
||||
|
||||
- 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 filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. If you want to see more context, you can press ``ctlr-b`` to open the history in the pager.
|
||||
- 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 filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. If you want to see more context, you can press ``ctrl-r`` to open the history in the pager.
|
||||
|
||||
- ``alt-up`` recalls individual arguments, starting from the last argument in the last executed line. This can be used instead of "!$".
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
|
||||
|
||||
- :kbd:`alt-enter` inserts a newline at the cursor position. This is useful to add a line to a commandline that's already complete.
|
||||
|
||||
- :kbd:`alt-left` (``←``) and :kbd:`alt-right` (``→``) move the cursor one argument left or right, or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (``→``) (or :kbd:`alt-f`) accepts the first argument in the suggestion.
|
||||
- :kbd:`alt-left` (``←``) and :kbd:`alt-right` (``→``) move the cursor one word left or right (to the next space or punctuation mark), or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (``→``) (or :kbd:`alt-f`) accepts the first word in the suggestion.
|
||||
|
||||
- :kbd:`ctrl-left` (``←``) and :kbd:`ctrl-right` (``→``) move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over.
|
||||
|
||||
@@ -327,8 +327,12 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
|
||||
|
||||
- :kbd:`alt-d` or :kbd:`ctrl-delete` moves the next word to the :ref:`killring`.
|
||||
|
||||
- :kbd:`alt-d` lists the directory history if the command line is empty.
|
||||
|
||||
- :kbd:`alt-delete` moves the next argument to the :ref:`killring`.
|
||||
|
||||
- :kbd:`shift-delete` removes the current history item or autosuggestion from the command history.
|
||||
|
||||
- :kbd:`alt-h` (or :kbd:`f1`) shows the manual page for the current command, if one exists.
|
||||
|
||||
- :kbd:`alt-l` lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed.
|
||||
@@ -360,11 +364,13 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
|
||||
|
||||
- :kbd:`ctrl-b`, :kbd:`ctrl-f` move the cursor one character left or right or accept the autosuggestion just like the :kbd:`left` (``←``) and :kbd:`right` (``→``) shared bindings (which are available as well).
|
||||
|
||||
- :kbd:`alt-b`, :kbd:`alt-f` move the cursor one word left or right, or accept one word of the autosuggestion. If the command line is empty, moves forward/backward in the directory history instead.
|
||||
|
||||
- :kbd:`ctrl-n`, :kbd:`ctrl-p` move the cursor up/down or through history, like the up and down arrow shared bindings.
|
||||
|
||||
- :kbd:`delete` or :kbd:`backspace` or :kbd:`ctrl-h` removes one character forwards or backwards respectively.
|
||||
|
||||
- :kbd:`ctrl-backspace` removes one word backwards and :kbd:`alt-backspace` removes one argument backwards.
|
||||
- :kbd:`alt-backspace` removes one word backwards. If supported by the terminal, :kbd:`ctrl-backspace` does the same.
|
||||
|
||||
- :kbd:`alt-<` moves to the beginning of the commandline, :kbd:`alt->` moves to the end.
|
||||
|
||||
@@ -382,7 +388,7 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
|
||||
|
||||
- :kbd:`ctrl-z`, :kbd:`ctrl-_` (:kbd:`ctrl-/` on some terminals) undo the most recent edit of the line.
|
||||
|
||||
- :kbd:`alt-/` reverts the most recent undo.
|
||||
- :kbd:`alt-/` or :kbd:`ctrl-shift-z` reverts the most recent undo.
|
||||
|
||||
- :kbd:`ctrl-r` opens the history in a pager. This will show history entries matching the search, a few at a time. Pressing :kbd:`ctrl-r` again will search older entries, pressing :kbd:`ctrl-s` (that otherwise toggles pager search) will go to newer entries. The search bar will always be selected.
|
||||
|
||||
@@ -476,6 +482,7 @@ Command mode is also known as normal mode.
|
||||
- :kbd:`p` pastes text from the :ref:`killring`.
|
||||
|
||||
- :kbd:`u` undoes the most recent edit of the command line.
|
||||
|
||||
- :kbd:`ctrl-r` redoes the most recent edit.
|
||||
|
||||
- :kbd:`[` and :kbd:`]` search the command history for the previous/next token containing the token under the cursor before the search was started. See the :ref:`history <history-search>` section for more information on history searching.
|
||||
@@ -497,6 +504,8 @@ Insert mode
|
||||
|
||||
- :kbd:`backspace` removes one character to the left.
|
||||
|
||||
- :kbd:`ctrl-n` accepts the autosuggestion.
|
||||
|
||||
.. _vi-mode-visual:
|
||||
|
||||
Visual mode
|
||||
|
||||
@@ -266,8 +266,9 @@ Consider this helper function::
|
||||
Now let's see a few cases::
|
||||
|
||||
# Redirect both stderr and stdout to less
|
||||
# (can also be spelt as `&|`)
|
||||
print 2>&1 | less
|
||||
# or
|
||||
print &| less
|
||||
|
||||
# Show the "out" on stderr, silence the "err"
|
||||
print >&2 2>/dev/null
|
||||
@@ -869,7 +870,7 @@ but if you need multiple or the command doesn't read from standard input, "proce
|
||||
|
||||
This creates a temporary file, stores the output of the command in that file and prints the filename, so it is given to the outer command.
|
||||
|
||||
Fish has a default limit of 100 MiB on the data it will read in a command sustitution. If that limit is reached the command (all of it, not just the command substitution - the outer command won't be executed at all) fails and ``$status`` is set to 122. This is so command substitutions can't cause the system to go out of memory, because typically your operating system has a much lower limit, so reading more than that would be useless and harmful. This limit can be adjusted with the ``fish_read_limit`` variable (`0` meaning no limit). This limit also affects the :doc:`read <cmds/read>` command.
|
||||
Fish has a default limit of 100 MiB on the data it will read in a command substitution. If that limit is reached the command (all of it, not just the command substitution - the outer command won't be executed at all) fails and ``$status`` is set to 122. This is so command substitutions can't cause the system to go out of memory, because typically your operating system has a much lower limit, so reading more than that would be useless and harmful. This limit can be adjusted with the ``fish_read_limit`` variable (`0` meaning no limit). This limit also affects the :doc:`read <cmds/read>` command.
|
||||
|
||||
.. [#] One exception: Setting ``$IFS`` to empty will disable line splitting. This is deprecated, use :doc:`string split <cmds/string-split>` instead.
|
||||
|
||||
@@ -1844,7 +1845,7 @@ The "locale" of a program is its set of language and regional settings that depe
|
||||
|
||||
.. envvar:: LC_MONETARY
|
||||
|
||||
Determines currency, how it is formated, and the symbols used.
|
||||
Determines currency, how it is formatted, and the symbols used.
|
||||
|
||||
.. envvar:: LC_NUMERIC
|
||||
|
||||
@@ -2021,17 +2022,21 @@ You can see the current list of features via ``status features``::
|
||||
qmark-noglob on 3.0 ? no longer globs
|
||||
regex-easyesc on 3.1 string replace -r needs fewer \\'s
|
||||
ampersand-nobg-in-token on 3.4 & only backgrounds if followed by a separating character
|
||||
remove-percent-self off 3.8 %self is no longer expanded (use $fish_pid)
|
||||
test-require-arg off 3.8 builtin test requires an argument
|
||||
remove-percent-self off 4.0 %self is no longer expanded (use $fish_pid)
|
||||
test-require-arg off 4.0 builtin test requires an argument
|
||||
keyboard-protocols on 4.0 Use keyboard protocols (kitty, xterm's modifyotherkeys
|
||||
|
||||
Here is what they mean:
|
||||
|
||||
- ``stderr-nocaret`` was introduced in fish 3.0 (and made the default in 3.3). It makes ``^`` an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use ``2>`` instead. This can no longer be turned off since fish 3.5. The flag can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored.
|
||||
- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 3.8). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
|
||||
- ``regex-easyesc`` was introduced in 3.1. It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
|
||||
- ``ampersand-nobg-in-token`` was introduced in fish 3.4. It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
|
||||
- ``remove-percent-self`` turns off the special ``%self`` expansion. It was introduced in 3.8. To get fish's pid, you can use the :envvar:`fish_pid` variable.
|
||||
- ``test-require-arg`` removes :doc:`builtin test <cmds/test>`'s one-argument form (``test "string"``. It was introduced in 3.8. To test if a string is non-empty, use ``test -n "string"``. If disabled, any call to ``test`` that would change sends a :ref:`debug message <debugging-fish>` of category "deprecated-test", so starting fish with ``fish --debug=deprecated-test`` can be used to find offending calls.
|
||||
- ``stderr-nocaret`` was introduced in fish 3.0 and cannot be turned off since fish 3.5. It can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored. The flag made ``^`` an ordinary character instead of denoting an stderr redirection. Use ``2>`` instead.
|
||||
- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 4.0). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
|
||||
- ``regex-easyesc`` was introduced in 3.1 (and made the default in 3.5). It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
|
||||
- ``ampersand-nobg-in-token`` was introduced in fish 3.4 (and made the default in 3.5). It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
|
||||
- ``remove-percent-self`` turns off the special ``%self`` expansion. It was introduced in 4.0. To get fish's pid, you can use the :envvar:`fish_pid` variable.
|
||||
- ``test-require-arg`` removes :doc:`builtin test <cmds/test>`'s one-argument form (``test "string"``. It was introduced in 4.0. To test if a string is non-empty, use ``test -n "string"``. If disabled, any call to ``test`` that would change sends a :ref:`debug message <debugging-fish>` of category "deprecated-test", so starting fish with ``fish --debug=deprecated-test`` can be used to find offending calls.
|
||||
- ``keyboard-protocols`` lets fish turn on various keyboard protocols including the kitty keyboard protocol.
|
||||
It was introduced in 4.0 and is on by default.
|
||||
Disable it with ``no-keyboard-protocols`` to work around bugs in your terminal.
|
||||
|
||||
|
||||
These changes are introduced off by default. They can be enabled on a per session basis::
|
||||
@@ -2052,12 +2057,6 @@ Prefixing a feature with ``no-`` turns it off instead. E.g. to reenable the ``?`
|
||||
|
||||
set -Ua fish_features no-qmark-noglob
|
||||
|
||||
Currently, the following features are enabled by default:
|
||||
|
||||
- stderr-nocaret - ``^`` no longer redirects stderr, use ``2>``. Enabled by default in fish 3.3.0. No longer changeable since fish 3.5.0.
|
||||
- regex-easyesc - ``string replace -r`` requires fewer backslashes in the replacement part. Enabled by default in fish 3.5.0.
|
||||
- ampersand-nobg-in-token - ``&`` in the middle of a word is a normal character instead of backgrounding. Enabled by default in fish 3.5.0.
|
||||
|
||||
.. _event:
|
||||
|
||||
Event handlers
|
||||
|
||||
@@ -53,7 +53,6 @@ body {
|
||||
div.related ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.related {
|
||||
@@ -71,12 +70,10 @@ div.related h3 {
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
width: 230px;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
@@ -113,7 +110,6 @@ div.sphinxsidebar ul {
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
color: var(--secondary-link-color);
|
||||
margin: 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
@@ -548,10 +544,6 @@ div.sphinxsidebar ul {
|
||||
}
|
||||
|
||||
|
||||
div.bodywrapper {
|
||||
margin-left: 230px;
|
||||
}
|
||||
|
||||
aside.footnote > .label {
|
||||
display: inline;
|
||||
}
|
||||
@@ -565,19 +557,36 @@ div.documentwrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.document {
|
||||
display: grid;
|
||||
grid-template: 1fr min-content / 12rem minmax(0,1fr);
|
||||
}
|
||||
|
||||
/* On screens that are less than 700px wide remove anything non-essential
|
||||
- the sidebar, the gradient background, ... */
|
||||
@media screen and (max-width: 700px) {
|
||||
div.document {
|
||||
display: grid;
|
||||
grid-template: 30vh min-content / 100%;
|
||||
}
|
||||
div.sphinxsidebar {
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: relative;
|
||||
/* To separate the "side"bar from the content below */
|
||||
border-bottom: 1px solid;
|
||||
border-color: var(--sidebar-border-color);
|
||||
}
|
||||
div.bodywrapper {
|
||||
|
||||
/* Reduce margins to save space */
|
||||
div.sphinxsidebar ul ul, div.bodywrapper, div.content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar h3, div.sphinxsidebar h4 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
flex-basis: content;
|
||||
@@ -585,14 +594,15 @@ div.documentwrapper {
|
||||
}
|
||||
div.sphinxsidebarwrapper {
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
justify-content: space-between;
|
||||
}
|
||||
div.sphinxsidebarwrapper > h3:nth-child(5) {
|
||||
display: none;
|
||||
}
|
||||
div#searchbox {
|
||||
#searchbox {
|
||||
display: none !important;
|
||||
}
|
||||
div.content {margin-left: 0;}
|
||||
div.body {
|
||||
padding: 1rem;
|
||||
}
|
||||
@@ -613,6 +623,9 @@ div.documentwrapper {
|
||||
|
||||
/* On print media remove anything non-essential. */
|
||||
@media print {
|
||||
div.document {
|
||||
display: block;
|
||||
}
|
||||
.inline-search {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ BuildRequires: cargo gettext gcc xz pcre2-devel
|
||||
BuildRequires: rust >= 1.70
|
||||
# Packaging guidelines say to use a BuildRequires: rust-packaging, but it adds no value for our package
|
||||
|
||||
BuildRequires: cmake >= 3.19
|
||||
BuildRequires: cmake >= 3.15
|
||||
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: update-desktop-files
|
||||
@@ -31,8 +31,15 @@ BuildRequires: glibc-langpack-en
|
||||
%endif
|
||||
BuildRequires: python3 procps
|
||||
|
||||
%if 0%{?suse_version}
|
||||
Requires: terminfo-base
|
||||
%else
|
||||
Requires: ncurses-base
|
||||
%endif
|
||||
Requires: file
|
||||
Requires: python3
|
||||
Requires: man
|
||||
Requires: procps
|
||||
|
||||
# Although the build scripts mangle the version number to be RPM compatible
|
||||
# for continuous builds (transforming the output of `git describe`), Fedora 32+
|
||||
|
||||
@@ -9,3 +9,5 @@ license = "MIT"
|
||||
[dependencies]
|
||||
libc = "0.2.155"
|
||||
widestring = { version = "1.0.2", optional = true }
|
||||
unicode-segmentation = "1.12.0"
|
||||
unicode-width = "0.2.0"
|
||||
|
||||
@@ -73,7 +73,7 @@ macro_rules! sprintf {
|
||||
/// - `args`: Iterator over the arguments to format.
|
||||
///
|
||||
/// # Returns
|
||||
/// A `Result` which is `Ok` containing the number of characters written on success, or an `Error`.
|
||||
/// A `Result` which is `Ok` containing the width of the string written on success, or an `Error`.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
use std::fmt::{self, Write};
|
||||
use std::mem;
|
||||
use std::result::Result;
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
|
||||
#[cfg(feature = "widestring")]
|
||||
use widestring::Utf32Str as wstr;
|
||||
@@ -382,7 +384,7 @@ pub fn sprintf_locale(
|
||||
}
|
||||
|
||||
// Read field width. We do not support $.
|
||||
let width = if s.at(0) == Some('*') {
|
||||
let desired_width = if s.at(0) == Some('*') {
|
||||
let arg_width = args.next().ok_or(Error::MissingArg)?.as_sint()?;
|
||||
s.advance_by(1);
|
||||
if arg_width < 0 {
|
||||
@@ -397,7 +399,7 @@ pub fn sprintf_locale(
|
||||
};
|
||||
|
||||
// Optionally read precision. We do not support $.
|
||||
let mut prec: Option<usize> = if s.at(0) == Some('.') && s.at(1) == Some('*') {
|
||||
let mut desired_precision: Option<usize> = if s.at(0) == Some('.') && s.at(1) == Some('*') {
|
||||
// "A negative precision is treated as though it were missing."
|
||||
// Here we assume the precision is always signed.
|
||||
s.advance_by(2);
|
||||
@@ -410,7 +412,7 @@ pub fn sprintf_locale(
|
||||
None
|
||||
};
|
||||
// Disallow precisions larger than i32::MAX, in keeping with C.
|
||||
if prec.unwrap_or(0) > i32::MAX as usize {
|
||||
if desired_precision.unwrap_or(0) > i32::MAX as usize {
|
||||
return Err(Error::Overflow);
|
||||
}
|
||||
|
||||
@@ -429,7 +431,7 @@ pub fn sprintf_locale(
|
||||
// "If a precision is given with a numeric conversion (d, i, o, u, i, x, and X),
|
||||
// the 0 flag is ignored." p is included here.
|
||||
let spec_is_numeric = matches!(conv_spec, CS::d | CS::u | CS::o | CS::p | CS::x | CS::X);
|
||||
if spec_is_numeric && prec.is_some() {
|
||||
if spec_is_numeric && desired_precision.is_some() {
|
||||
flags.zero_pad = false;
|
||||
}
|
||||
|
||||
@@ -443,13 +445,22 @@ pub fn sprintf_locale(
|
||||
CS::e | CS::f | CS::g | CS::a | CS::E | CS::F | CS::G | CS::A => {
|
||||
// Floating point types handle output on their own.
|
||||
let float = arg.as_float()?;
|
||||
let len = format_float(f, float, width, prec, flags, locale, conv_spec, buf)?;
|
||||
let len = format_float(
|
||||
f,
|
||||
float,
|
||||
desired_width,
|
||||
desired_precision,
|
||||
flags,
|
||||
locale,
|
||||
conv_spec,
|
||||
buf,
|
||||
)?;
|
||||
out_len = out_len.checked_add(len).ok_or(Error::Overflow)?;
|
||||
continue 'main;
|
||||
}
|
||||
CS::p => {
|
||||
const PTR_HEX_DIGITS: usize = 2 * mem::size_of::<*const u8>();
|
||||
prec = prec.map(|p| p.max(PTR_HEX_DIGITS));
|
||||
desired_precision = desired_precision.map(|p| p.max(PTR_HEX_DIGITS));
|
||||
let uint = arg.as_uint()?;
|
||||
if uint != 0 {
|
||||
prefix = "0x";
|
||||
@@ -479,8 +490,8 @@ pub fn sprintf_locale(
|
||||
if uint != 0 {
|
||||
write!(buf, "{:o}", uint)?;
|
||||
}
|
||||
if flags.alt_form && prec.unwrap_or(0) <= buf.len() + 1 {
|
||||
prec = Some(buf.len() + 1);
|
||||
if flags.alt_form && desired_precision.unwrap_or(0) <= buf.len() + 1 {
|
||||
desired_precision = Some(buf.len() + 1);
|
||||
}
|
||||
buf
|
||||
}
|
||||
@@ -514,10 +525,38 @@ pub fn sprintf_locale(
|
||||
CS::s => {
|
||||
// also 'S'
|
||||
let s = arg.as_str(buf)?;
|
||||
let p = prec.unwrap_or(s.len()).min(s.len());
|
||||
prec = Some(p);
|
||||
flags.zero_pad = false;
|
||||
&s[..p]
|
||||
match desired_precision {
|
||||
Some(precision) => {
|
||||
// from man printf(3)
|
||||
// "the maximum number of characters to be printed from a string"
|
||||
// We interpret this to mean the maximum width when printed, as defined by
|
||||
// Unicode grapheme cluster width.
|
||||
let mut byte_len = 0;
|
||||
let mut width = 0;
|
||||
let mut graphemes = s.graphemes(true);
|
||||
// Iteratively add single grapheme clusters as long as the fit within the
|
||||
// width limited by precision.
|
||||
while width < precision {
|
||||
match graphemes.next() {
|
||||
Some(grapheme) => {
|
||||
let grapheme_width = grapheme.width();
|
||||
if width + grapheme_width <= precision {
|
||||
byte_len += grapheme.len();
|
||||
width += grapheme_width;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
None => break,
|
||||
}
|
||||
}
|
||||
let p = precision.min(width);
|
||||
desired_precision = Some(p);
|
||||
&s[..byte_len]
|
||||
}
|
||||
None => s,
|
||||
}
|
||||
}
|
||||
};
|
||||
// Numeric output should be empty iff the value is 0.
|
||||
@@ -528,23 +567,26 @@ pub fn sprintf_locale(
|
||||
// Decide if we want to apply thousands grouping to the body, and compute its size.
|
||||
// Note we have already errored out if grouped is set and this is non-numeric.
|
||||
let wants_grouping = flags.grouped && locale.thousands_sep.is_some();
|
||||
let body_len = match wants_grouping {
|
||||
let body_width = match wants_grouping {
|
||||
// We assume that text representing numbers is ASCII, so len == width.
|
||||
true => body.len() + locale.separator_count(body.len()),
|
||||
false => body.len(),
|
||||
false => body.width(),
|
||||
};
|
||||
|
||||
// Resolve the precision.
|
||||
// In the case of a non-numeric conversion, update the precision to at least the
|
||||
// length of the string.
|
||||
let prec = if !spec_is_numeric {
|
||||
prec.unwrap_or(body_len)
|
||||
let desired_precision = if !spec_is_numeric {
|
||||
desired_precision.unwrap_or(body_width)
|
||||
} else {
|
||||
prec.unwrap_or(1).max(body_len)
|
||||
desired_precision.unwrap_or(1).max(body_width)
|
||||
};
|
||||
|
||||
let prefix_len = prefix.len();
|
||||
let unpadded_width = prefix_len.checked_add(prec).ok_or(Error::Overflow)?;
|
||||
let width = width.max(unpadded_width);
|
||||
let prefix_width = prefix.width();
|
||||
let unpadded_width = prefix_width
|
||||
.checked_add(desired_precision)
|
||||
.ok_or(Error::Overflow)?;
|
||||
let width = desired_width.max(unpadded_width);
|
||||
|
||||
// Pad on the left with spaces to the desired width?
|
||||
if !flags.left_adj && !flags.zero_pad {
|
||||
@@ -560,7 +602,8 @@ pub fn sprintf_locale(
|
||||
}
|
||||
|
||||
// Pad on the left to the given precision?
|
||||
pad(f, '0', prec, body_len)?;
|
||||
// TODO: why pad with 0 here?
|
||||
pad(f, '0', desired_precision, body_width)?;
|
||||
|
||||
// Output the actual value, perhaps with grouping.
|
||||
if wants_grouping {
|
||||
|
||||
@@ -13,6 +13,7 @@ macro_rules! sprintf_check {
|
||||
$(,)? // optional trailing comma
|
||||
) => {
|
||||
{
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
let mut target = String::new();
|
||||
let mut args = [$($arg.to_arg()),*];
|
||||
let len = $crate::printf_c_locale(
|
||||
@@ -20,7 +21,7 @@ macro_rules! sprintf_check {
|
||||
$fmt.as_ref() as &str,
|
||||
&mut args,
|
||||
).expect("printf failed");
|
||||
assert!(len == target.len(), "Wrong length returned: {} vs {}", len, target.len());
|
||||
assert_eq!(len, target.width(), "Wrong length returned");
|
||||
target
|
||||
}
|
||||
};
|
||||
@@ -723,6 +724,18 @@ fn test_huge_precision_g() {
|
||||
sprintf_err!("%.2147483648g", f => Error::Overflow);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_non_ascii() {
|
||||
assert_fmt!("%3s", "ö" => " ö");
|
||||
assert_fmt!("%3s", "🇺🇳" => " 🇺🇳");
|
||||
assert_fmt!("%.3s", "🇺🇳🇺🇳" => "🇺🇳");
|
||||
assert_fmt!("%.3s", "a🇺🇳" => "a🇺🇳");
|
||||
assert_fmt!("%.3s", "aa🇺🇳" => "aa");
|
||||
assert_fmt!("%3.3s", "aa🇺🇳" => " aa");
|
||||
assert_fmt!("%.1s", "𒈙a" => "𒈙");
|
||||
assert_fmt!("%3.3s", "👨👨👧👧" => " 👨👨👧👧");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_errors() {
|
||||
use Error::*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
complete -c VBoxSDL -l startvm -x -d "Set virtual machine to start" -a "(__fish_print_VBox_vms)"
|
||||
|
||||
complete -c VBoxSDL -l seperate -d "Run separate VM process or attach to a running VM"
|
||||
complete -c VBoxSDL -l separate -d "Run separate VM process or attach to a running VM"
|
||||
complete -c VBoxSDL -l hda -f -d "Set temporary first hard disk"
|
||||
complete -c VBoxSDL -l fda -f -d "Set temporary first floppy disk"
|
||||
complete -c VBoxSDL -l cdrom -r -d "Set temporary CDROM/DVD" -a "none\tunmount"
|
||||
|
||||
@@ -14,7 +14,7 @@ complete -c acpi -s A -l without-ac-adapter -d 'Suppress ac-adapter information'
|
||||
complete -c acpi -s V -l everything -d 'Show every device, overrides above options'
|
||||
complete -c acpi -s s -l show-empty -d 'Show non-operational devices'
|
||||
complete -c acpi -s S -l hide-empty -d 'Hide non-operational devices'
|
||||
complete -c acpi -s c -l celcius -d 'Use celsius as the temperature unit'
|
||||
complete -c acpi -s c -l cooling -d 'Show cooling device information'
|
||||
complete -c acpi -s f -l fahrenheit -d 'Use fahrenheit as the temperature unit'
|
||||
complete -c acpi -s k -l kelvin -d 'Use kelvin as the temperature unit'
|
||||
complete -c acpi -s d -l directory -d '<dir> path to ACPI info (/proc/acpi)'
|
||||
|
||||
@@ -64,6 +64,16 @@ function __fish_adb_list_uninstallable_packages
|
||||
__fish_adb_run_command pm list packages -3 | string replace 'package:' ''
|
||||
end
|
||||
|
||||
function __fish_adb_list_local_files
|
||||
set -l token (commandline -ct)*
|
||||
|
||||
# Unquoted $token to expand the array
|
||||
# Return list of directories suffixed with '/'
|
||||
find $token -maxdepth 0 -type d 2>/dev/null | string replace -r '$' /
|
||||
# Return list of files
|
||||
find $token -maxdepth 0 -type f -o -type l 2>/dev/null
|
||||
end
|
||||
|
||||
function __fish_adb_list_files
|
||||
set -l token (commandline -ct)
|
||||
|
||||
@@ -187,7 +197,8 @@ complete -n '__fish_seen_subcommand_from reconnect' -c adb -x -a device -d 'Kick
|
||||
# commands that accept listing device files
|
||||
complete -n '__fish_seen_subcommand_from shell' -c adb -f -a "(__fish_adb_list_files)" -d 'File on device'
|
||||
complete -n '__fish_seen_subcommand_from pull' -c adb -F -a "(__fish_adb_list_files)" -d 'File on device'
|
||||
complete -n '__fish_seen_subcommand_from push' -c adb -F -a "(__fish_adb_list_files)" -d 'File on device'
|
||||
complete -n '__fish_seen_subcommand_from push' -c adb -ka "(__fish_adb_list_files)" -d 'File on device'
|
||||
complete -n '__fish_seen_subcommand_from push' -c adb -ka "(__fish_adb_list_local_files)"
|
||||
|
||||
# logcat
|
||||
complete -n '__fish_seen_subcommand_from logcat' -c adb -f
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
complete -c apt-build -l help -d "Display help and exit"
|
||||
complete -f -c apt-build -a update -d "Update list of packages"
|
||||
complete -f -c apt-build -a upgrade -d "Upgrade packages"
|
||||
complete -f -c apt-bulid -a world -d "Rebuild your system"
|
||||
complete -f -c apt-build -a world -d "Rebuild your system"
|
||||
complete -x -c apt-build -a install -d "Build and install a new package"
|
||||
complete -x -c apt-build -a source -d "Download and extract a source"
|
||||
complete -x -c apt-build -a info -d "Info on a package"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
|
||||
for i in (commandline -xpc)
|
||||
if contains -- $i auto manual hold unhold showauto showmanual showhold
|
||||
if contains -- $i auto manual minimize-manual hold unhold showauto showmanual showhold
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -23,6 +23,7 @@ complete -c apt-mark -n __fish_apt_use_package -a '(__fish_print_apt_packages)'
|
||||
complete -c apt-mark -s h -l help -d 'Display help and exit'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-mark -a auto -d 'Mark a package as automatically installed'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-mark -a manual -d 'Mark a package as manually installed'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-mark -a minimize-manual -d 'Mark all dependencies of meta packages as auto'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-mark -a hold -d 'Hold a package, prevent automatic installation or removal'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-mark -a unhold -d 'Cancel a hold on a package'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-mark -a showauto -d 'Show automatically installed packages'
|
||||
@@ -31,4 +32,6 @@ complete -f -n __fish_apt_no_subcommand -c apt-mark -a showhold -d 'Show held pa
|
||||
complete -c apt-mark -s v -l version -d 'Display version and exit'
|
||||
complete -r -c apt-mark -s c -l config-file -d 'Specify a config file'
|
||||
complete -r -c apt-mark -s o -l option -d 'Set a config option'
|
||||
complete -c apt-mark -l color -d 'Turn colors on'
|
||||
complete -c apt-mark -l no-color -d 'Turn colors off'
|
||||
complete -r -c apt-mark -s f -l file -d 'Write package statistics to a file'
|
||||
|
||||
12
share/completions/batsh.fish
Normal file
12
share/completions/batsh.fish
Normal file
@@ -0,0 +1,12 @@
|
||||
set -l command batsh
|
||||
|
||||
complete -c $command -f
|
||||
|
||||
complete -c $command -s h -l help \
|
||||
-a 'pager\tdefault plain groff' \
|
||||
-d 'Show help'
|
||||
|
||||
complete -c $command -s v -l version -d 'Show version'
|
||||
|
||||
complete -c $command \
|
||||
-a 'bash\t"Compile to Bash" batsh\t"Format file" winbat\t"Compile to Batch"'
|
||||
@@ -72,7 +72,7 @@ function __fish_bind_complete
|
||||
printf '%sshift-\tShift modifier…\n' $prefix
|
||||
set -l key_names minus comma backspace delete escape \
|
||||
enter up down left right pageup pagedown home end insert tab \
|
||||
space f(seq 12)
|
||||
space menu printscreen f(seq 12)
|
||||
printf '%s\tNamed key\n' $prefix$key_names
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
set -l commands status install update remove is-installed random-seed systemd-efi-options reboot-to-firmware list set-default set-oneshot
|
||||
set -l commands status install update remove is-installed random-seed systemd-efi-options reboot-to-firmware list set-default set-oneshot set-timeout set-timeout-oneshot
|
||||
|
||||
# Execute `bootctl list` and return entries
|
||||
function __bootctl_entries
|
||||
if not type -q jq
|
||||
return 1
|
||||
end
|
||||
|
||||
bootctl list --json short | jq '.[] | "\(.id)\t\(.showTitle)"' --raw-output
|
||||
end
|
||||
|
||||
complete -c bootctl -f
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a status -d 'Show status of EFI variables'
|
||||
@@ -13,6 +22,9 @@ complete -c bootctl -n "__fish_seen_subcommand_from reboot-to-firmware" -a 'true
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a list -d 'List boot loader entries'
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-default -d 'Set default boot loader entry'
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-oneshot -d 'Set default boot loader entry (Once)'
|
||||
complete -c bootctl -n "__fish_seen_subcommand_from set-default set-oneshot" -x -a '(__bootctl_entries)'
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout -d 'Set default boot loader timeout'
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout-oneshot -d 'Set default boot loader timeout (Once)'
|
||||
|
||||
complete -c bootctl -s h -l help -d 'Show this help'
|
||||
complete -c bootctl -l version -d 'Print version'
|
||||
|
||||
62
share/completions/btrbk.fish
Normal file
62
share/completions/btrbk.fish
Normal file
@@ -0,0 +1,62 @@
|
||||
# Filter Completion
|
||||
function __fish_btrbk_complete_filter
|
||||
btrbk list config --format col:h:snapshot_name,source_subvolume,target_url | string replace -r '([^ ]+)\s+([^ ]+)\s+([^ ]*)' '$1\t$2 -> $3'
|
||||
end
|
||||
|
||||
# options with arguments
|
||||
complete -c btrbk -l format -x -d 'Change output format' -a "table long raw"
|
||||
complete -c btrbk -l loglevel -s l -x -d 'Set logging level' -a "error warn info debug trace"
|
||||
complete -c btrbk -l exclude -x -d 'Exclude configured sections' -a "(__fish_btrbk_complete_filter)"
|
||||
complete -c btrbk -l override -x -d 'Globally override a configuration option'
|
||||
|
||||
# options with file completion
|
||||
complete -c btrbk -l config -r -s c -d 'Specify configuration file'
|
||||
complete -c btrbk -l lockfile -r -d 'Create and check lockfile'
|
||||
|
||||
# options without arguments
|
||||
complete -c btrbk -l help -s h -d 'Display this help message'
|
||||
complete -c btrbk -l version -d 'Display version information'
|
||||
complete -c btrbk -l dry-run -s n -d 'Perform a trial run with no changes made'
|
||||
complete -c btrbk -l preserve -s p -d 'Preserve all (do not delete anything)'
|
||||
complete -c btrbk -l preserve-snapshots -d 'Preserve snapshots (do not delete snapshots)'
|
||||
complete -c btrbk -l preserve-backups -d 'Preserve backups (do not delete backups)'
|
||||
complete -c btrbk -l wipe -d 'Delete all but latest snapshots'
|
||||
complete -c btrbk -l verbose -s v -d 'Be more verbose (increase logging level)'
|
||||
complete -c btrbk -l quiet -s q -d 'Be quiet (do not print backup summary)'
|
||||
complete -c btrbk -l table -s t -d 'Change output to table format'
|
||||
complete -c btrbk -l long -s L -d 'Change output to long format'
|
||||
complete -c btrbk -l print-schedule -s S -d 'Print scheduler details (for the "run" command)'
|
||||
complete -c btrbk -l progress -d 'Show progress bar on send-receive operation'
|
||||
|
||||
# uncommon options from manpage
|
||||
complete -c btrbk -l single-column -s 1 -d 'Print output as a single column'
|
||||
complete -c btrbk -l pretty -d 'Print pretty table output with lowercase and underlined column headings'
|
||||
complete -c btrbk -l raw -d 'Create raw targets for archive command'
|
||||
|
||||
# subcommands
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a run -d 'Run snapshot and backup operations'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a dryrun -d 'Show what would be executed without running btrfs commands'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a snapshot -d 'Run snapshot operations only'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a resume -d 'Run backup operations and delete snapshots'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a prune -d 'Only delete snapshots and backups'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a archive -d 'Recursively copy all subvolumes (src -> dst)'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a clean -d 'Delete incomplete (garbled) backups'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a stats -d 'Print snapshot/backup statistics'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a usage -d 'Print filesystem usage'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a ls -d 'List all btrfs subvolumes below a given path'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a origin -d 'Print origin information for a subvolume'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a diff -d 'List file changes between related subvolumes'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a extents -d 'Calculate accurate disk space usage for a path'
|
||||
complete -c btrbk -f -n __fish_use_subcommand -a list -d 'List snapshots and backups'
|
||||
|
||||
# subsubcommands for "list"
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a all -d 'List all snapshots and backups'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a snapshots -d 'List snapshots only'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a backups -d 'List backups and correlated snapshots'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a latest -d 'List most recent snapshots and backups'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a config -d 'List configured source/snapshot/target relations'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a source -d 'List configured source/snapshot relations'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a volume -d 'List configured volume sections'
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a target -d 'List configured targets'
|
||||
|
||||
complete -c btrbk -n '__fish_seen_subcommand_from run dryrun snapshot resume prune clean' -x -a '(__fish_btrbk_complete_filter)'
|
||||
@@ -102,33 +102,36 @@ complete -f -c btrfs -n $restore -s S -l symlink -d 'Restore symbolic links'
|
||||
complete -f -c btrfs -n $restore -s v -l verbose -d Verbose
|
||||
complete -f -c btrfs -n $restore -s i -l ignore-errors -d 'Ignore errors'
|
||||
complete -f -c btrfs -n $restore -s o -l overwrite -d Overwrite
|
||||
complete -f -c btrfs -n $restore -s t -d 'Tree location'
|
||||
complete -f -c btrfs -n $restore -s f -d 'Filesystem location'
|
||||
complete -f -c btrfs -n $restore -s u -l super -d 'Super mirror'
|
||||
complete -f -c btrfs -n $restore -s r -l root -d 'Root objectid'
|
||||
complete -f -c btrfs -n $restore -s t -r -d 'Tree location'
|
||||
complete -f -c btrfs -n $restore -s f -r -d 'Filesystem location'
|
||||
complete -f -c btrfs -n $restore -s u -l super -r -d 'Super mirror'
|
||||
complete -f -c btrfs -n $restore -s r -l root -r -d 'Root objectid'
|
||||
complete -f -c btrfs -n $restore -s d -d 'Find dir'
|
||||
complete -f -c btrfs -n $restore -s l -l list-roots -d 'List tree roots'
|
||||
complete -f -c btrfs -n $restore -s D -l dry-run -d 'Only list files that would be recovered'
|
||||
complete -f -c btrfs -n $restore -l path-regex -d 'Restore only filenames matching regex'
|
||||
complete -f -c btrfs -n $restore -l path-regex -r -d 'Restore only filenames matching regex'
|
||||
complete -f -c btrfs -n $restore -s c -d 'Ignore case (--path-regex only)'
|
||||
|
||||
# btrfs send
|
||||
complete -f -c btrfs -n $send -s e -d ''
|
||||
complete -f -c btrfs -n $send -s p -d 'Send an incremental stream from <parent> to <subvol>'
|
||||
complete -f -c btrfs -n $send -s c -d 'Use this snapshot as a clone source for an incremental send'
|
||||
complete -f -c btrfs -n $send -s f -d 'Output is normally written to stdout'
|
||||
complete -f -c btrfs -n $send -s p -r -d 'Send an incremental stream from <parent> to <subvol>'
|
||||
complete -f -c btrfs -n $send -s c -r -d 'Use this snapshot as a clone source for an incremental send'
|
||||
complete -f -c btrfs -n $send -s f -r -d 'Output is normally written to stdout'
|
||||
complete -f -c btrfs -n $send -l no-data -d 'send in NO_FILE_DATA mode'
|
||||
complete -f -c btrfs -n $send -s v -l verbose -d 'Enable verbose output to stderr'
|
||||
complete -f -c btrfs -n $send -s q -l quiet -d 'Suppress all messages, except errors'
|
||||
complete -f -c btrfs -n $send -l proto -a '0 1 2' -r -d 'Use send protocol version'
|
||||
complete -f -c btrfs -n $send -l proto -l compressed-data -d 'Send compressed data directly'
|
||||
|
||||
# btrfs receive
|
||||
complete -f -c btrfs -n $receive -s v -d 'Increase verbosity about performed actions'
|
||||
complete -f -c btrfs -n $receive -s q -l quiet -d 'Suppress all messages, except errors'
|
||||
complete -f -c btrfs -n $receive -s f -d 'Read the stream from FILE instead of stdin'
|
||||
complete -f -c btrfs -n $receive -s f -r -d 'Read the stream from FILE instead of stdin'
|
||||
complete -f -c btrfs -n $receive -s e -d 'Terminate after receiving an <end cmd> marker in the stream'
|
||||
complete -f -c btrfs -n $receive -s C -l chroot -d 'Confine the process to <mount> using chroot'
|
||||
complete -f -c btrfs -n $receive -s E -l max-errors -d 'Terminate when NUMBER errors occur'
|
||||
complete -f -c btrfs -n $receive -s m -d 'The root mount point of the destination filesystem'
|
||||
complete -f -c btrfs -n $receive -s E -l max-errors -r -d 'Terminate when NUMBER errors occur'
|
||||
complete -f -c btrfs -n $receive -s m -r -d 'The root mount point of the destination filesystem'
|
||||
complete -f -c btrfs -n $receive -l force-decompress -r -d 'Always decompress data'
|
||||
complete -f -c btrfs -n $receive -l dump -d 'Dump stream metadata'
|
||||
|
||||
# btrfs help
|
||||
@@ -147,9 +150,11 @@ complete -f -c btrfs -n $subvolume -a show -d 'Show more information about the s
|
||||
complete -f -c btrfs -n $subvolume -a sync -d 'Wait until given subvolume(s) are completely removed from the filesystem.'
|
||||
# btrfs subvolume create
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume create' -s i -d 'Add subvolume to a qgroup (can be given multiple times)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume create' -s p -d 'Create any missing parent directories'
|
||||
# btrfs subvolume delete
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s c -l commit-after -d 'Wait for transaction commit at the end of the operation'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s C -l commit-each -d 'Wait for transaction commit after deleting each subvolume'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s R -l recursive -d 'Delete subvolumes beneath each subvolume recursively'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s v -l verbose -d 'Verbose output of operations'
|
||||
# btrfs subvolume list
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s o -d 'Print only subvolumes below specified path'
|
||||
@@ -164,8 +169,8 @@ complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s s -d 'List on
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s r -d 'List readonly subvolumes (including snapshots)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s d -d 'List deleted subvolumes that are not yet cleaned'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s t -d 'Print the result as a table'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s G -d 'Filter the subvolumes by generation'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s C -d 'Filter the subvolumes by ogeneration'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s G -r -d 'Filter the subvolumes by generation'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s C -r -d 'Filter the subvolumes by ogeneration'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -l sort -d 'List the subvolume in order' -a '{gen,ogen,rootid,path}'
|
||||
# btrfs subvolume snapshot
|
||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume snapshot' -s r -d 'Create a readonly snapshot'
|
||||
@@ -194,6 +199,7 @@ complete -f -c btrfs -n $filesystem -a defragment -d 'Defragment a file or a dir
|
||||
complete -f -c btrfs -n $filesystem -a resize -d 'Resize a filesystem'
|
||||
complete -f -c btrfs -n $filesystem -a label -d 'Get or change the label of a filesystem'
|
||||
complete -f -c btrfs -n $filesystem -a usage -d 'Show detailed information about internal filesystem usage.'
|
||||
complete -f -c btrfs -n $filesystem -a mkswapfile -d 'Create a new swapfile'
|
||||
# btrfs filesystem df
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem df' -s b -l raw -d 'Show raw numbers in bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem df' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||
@@ -230,9 +236,12 @@ complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s v -d '
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s r -d 'Defragment files recursively'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s c -d 'Compress the file while defragmenting' -ra '{zlib,lzo,zstd}'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s f -d 'Flush data to disk immediately after defragmenting'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s s -d 'Defragment only from NUMBER byte onward'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s l -d 'Defragment only up to LEN bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s t -d 'Target extent SIZE hint'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s s -r -d 'Defragment only from NUMBER byte onward'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s l -r -d 'Defragment only up to LEN bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s t -r -d 'Target extent SIZE hint'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -l step -r -d 'Defragment in steps of SIZE'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s L -l level -r -d 'Specify compression levels'
|
||||
|
||||
# btrfs filesystem usage
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s b -l raw -d 'Show raw numbers in bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||
@@ -244,6 +253,11 @@ complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s m -l mbytes
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s g -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s t -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s T -d 'Show data in tabular format'
|
||||
# btrfs filesystem mkswapfile
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem mkswapfile' -s s -l size -r -d 'Swapfile size'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem mkswapfile' -s U -l uuid -r -d 'UUID for the swapfile'
|
||||
# btrfs filesystem resize
|
||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem resize' -l enqueue -d 'Wait for other exclusive operations'
|
||||
|
||||
# btrfs balance
|
||||
complete -f -c btrfs -n $balance -a start -d 'Balance chunks across the devices'
|
||||
@@ -252,13 +266,23 @@ complete -f -c btrfs -n $balance -a cancel -d 'Cancel running or paused balance'
|
||||
complete -f -c btrfs -n $balance -a resume -d 'Resume interrupted balance'
|
||||
complete -f -c btrfs -n $balance -a status -d 'Show status of running or paused balance'
|
||||
# btrfs balance start
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s d -d 'Act on data chunks with FILTERS'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s m -d 'Act on metadata chunks with FILTERS'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s s -d 'Act on system chunks with FILTERS (only under -f)'
|
||||
function __btrfs_balance_filters
|
||||
set -l profiles raid{0,1{,c3,c4},10,5,6} dup single
|
||||
set -l btrfs_balance_filters \
|
||||
profiles=$profiles\t"Balances only block groups with the given profiles" \
|
||||
convert=$profiles\t"Convert selected block groups to given profile" \
|
||||
usage= devid= vrange= limit= strips= soft
|
||||
set -l prefix (commandline -tc | string replace -r '^-d' -- '' | string match -rg '^(.*?)?[^,]*$' -- $token)
|
||||
printf "%s\n" "$prefix"$btrfs_balance_filters
|
||||
end
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s d -ra '(__btrfs_balance_filters)' -d 'Act on data chunks with FILTERS'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s m -ra '(__btrfs_balance_filters)' -d 'Act on metadata chunks with FILTERS'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s s -ra '(__btrfs_balance_filters)' -d 'Act on system chunks with FILTERS (only under -f)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s v -d 'Be verbose'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s f -d 'Force a reduction of metadata integrity'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l full-balance -d 'Do not print warning and do not delay start'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l background -l bg -d 'Run the balance as a background process'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l enqueue -d 'Wait for other exclusive operations'
|
||||
# btrfs balance status
|
||||
complete -f -c btrfs -n '__btrfs_command_groups balance status' -s v -d 'Be verbose'
|
||||
|
||||
@@ -279,6 +303,10 @@ complete -f -c btrfs -n '__btrfs_command_groups device scan' -s u -l forget -d '
|
||||
# btrfs device stats
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s c -l check -d 'Return non-zero if any stat counter is not zero'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s z -l reset -d 'Show current stats and reset values to zero'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s T -d "Print stats in a tabular form"
|
||||
# btrfs device remove
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device remove' -l enqueue -d 'Wait for other exclusive operations'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device remove' -l force -d 'Skip the safety timeout for removing multiple devices'
|
||||
# btrfs device usage
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device usage' -s b -l raw -d 'Show raw numbers in bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups device usage' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||
@@ -295,12 +323,18 @@ complete -f -c btrfs -n $scrub -a start -d 'Start a new scrub. If a scrub is alr
|
||||
complete -f -c btrfs -n $scrub -a cancel -d 'Cancel a running scrub'
|
||||
complete -f -c btrfs -n $scrub -a resume -d 'Resume previously canceled or interrupted scrub'
|
||||
complete -f -c btrfs -n $scrub -a status -d 'Show status of running or finished scrub'
|
||||
complete -f -c btrfs -n $scrub -a limit -d 'Show or set scrub limits on devices of the given filesystem'
|
||||
# btrfs scrub limit
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub limit' -s d -l devid -d 'Select the device by DEVID to apply the limit'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub limit' -s l -l limit -d 'Set the limit of the device'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub limit' -s a -l all -d 'Apply the limit to all devices'
|
||||
# btrfs scrub start
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s B -d 'Do not background'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s d -d 'Stats per device (-B only)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s q -d 'Be quiet'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s r -d 'Read only mode'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s R -d 'Raw print mode, print full data instead of summary'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -l limit -d 'Set the scrub throughput limit'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s c -d 'Set ioprio class (see ionice(1) manpage)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s n -d 'Set ioprio classdata (see ionice(1) manpage)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s f -d 'Force starting new scrub'
|
||||
@@ -321,6 +355,9 @@ complete -f -c btrfs -n $rescue -a chunk-recover -d 'Recover the chunk tree by s
|
||||
complete -f -c btrfs -n $rescue -a super-recover -d 'Recover bad superblocks from good copies'
|
||||
complete -f -c btrfs -n $rescue -a zero-log -d 'Clear the tree log. Usable if it\'s corrupted and prevents mount.'
|
||||
complete -f -c btrfs -n $rescue -a fix-device-size -d 'Re-align device and super block sizes'
|
||||
complete -f -c btrfs -n $rescue -a clear-ino-cache -d 'Remove leftover items pertaining to the deprecated inode cache feature'
|
||||
complete -f -c btrfs -n $rescue -a clear-space-cache -d 'Completely remove the on-disk data of free space cache of given version'
|
||||
complete -f -c btrfs -n $rescue -a clear-uuid-tree -d 'Clear the UUID tree'
|
||||
# btrfs rescue chunk-recover
|
||||
complete -f -c btrfs -n '__btrfs_command_groups rescue chunk-recover' -s y -d 'Assume an answer of YES to all questions'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups rescue chunk-recover' -s v -d 'Verbose mode'
|
||||
@@ -337,6 +374,8 @@ complete -f -c btrfs -n $inspect_internal -a min-dev-size -d 'Get the minimum si
|
||||
complete -f -c btrfs -n $inspect_internal -a dump-tree -d 'Dump tree structures from a given device'
|
||||
complete -f -c btrfs -n $inspect_internal -a dump-super -d 'Dump superblock from a device in a textual form'
|
||||
complete -f -c btrfs -n $inspect_internal -a tree-stats -d 'Print various stats for trees'
|
||||
complete -f -c btrfs -n $inspect_internal -a list-chunks -d 'Enumerate chunks on all devices'
|
||||
complete -f -c btrfs -n $inspect_internal -a map-swapfile -d 'Find device-specific physical offset of file that can be used for hibernation'
|
||||
# btrfs inspect-internal inode-resolve
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal inode-resolve' -s v -d 'Verbose mode'
|
||||
# btrfs inspect-internal logical-resolve
|
||||
@@ -351,20 +390,50 @@ complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s d
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s r -l roots -d 'Print only short root node info'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s R -l backups -d 'Print short root node info and backup root info'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s u -l uuid -d 'Print only the uuid tree'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s b -l block -d 'Print info from the specified BLOCK only'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s t -l tree -d 'Print only tree with the given ID'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s b -l block -r -d 'Print info from the specified BLOCK only'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s t -l tree -r -d 'Print only tree with the given ID'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l follow -d 'Use with -b, to show all children tree blocks of <block_num>'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l noscan -d 'Do not scan the devices from the filesystem'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l bfs -d 'Breadth-first traversal of the trees, print nodes, then leaves'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l dfs -d 'Depth-first traversal of the trees'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l hide-names -d 'Print placeholder instead of names'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l csum-headers -d 'Print b-tree node checksums in headers'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l csum-items -d 'Print checksums stored in checksum items'
|
||||
|
||||
# btrfs inspect-internal dump-super
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s f -l full -d 'Print full superblock information, backup roots etc.'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s a -l all -d 'Print information about all superblocks'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s s -l super -d 'Specify which SUPER-BLOCK copy to print out' -ra '{0,1,2}'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s F -l force -d 'Attempt to dump superblocks with bad magic'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -l bytenr -d 'Specify alternate superblock OFFSET'
|
||||
# btrfs inspect-internal logical-resolve
|
||||
complete -f -c btrfs -n '__btrfs_command_groups logical-resolve' -s P -d 'Print inodes instead of resolving paths'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups logical-resolve' -s o -d 'Ignore offsets, find all references to an extent'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups logical-resolve' -s s -r -d 'Set internal buffer size for storing file names'
|
||||
# btrfs inspect-internal tree-stats
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -s b -d 'Show raw numbers in bytes'
|
||||
# btrfs inspect-internal list-chunks
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l sort -ra 'devid pstart lstart usage length' -d 'Sort by a column (ascending)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l raw -d 'Show raw numbers in bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l iec -d 'Use 1024 as a base (KiB, MiB, GiB, TiB)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l si -d 'Use 1000 as a base (kB, MB, GB, TB)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l kbytes -d 'Show sizes in KiB, or kB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l mbytes -d 'Show sizes in MiB, or MB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
||||
# btrfs inspect-internal map-swapfile
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal map-swapfile' -l resume-offset -s r -d 'Print the value suitable as resume offset for /sys/power/resume_offset.'
|
||||
# btrfs inspect-internal tree-stats
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -s t -r -d 'Print stats only for the given treeid'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l raw -s b -d 'Show raw numbers in bytes'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l iec -d 'Use 1024 as a base (KiB, MiB, GiB, TiB)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l si -d 'Use 1000 as a base (kB, MB, GB, TB)'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l kbytes -d 'Show sizes in KiB, or kB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l mbytes -d 'Show sizes in MiB, or MB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
||||
|
||||
# btrfs property
|
||||
complete -f -c btrfs -n $property -a get -d 'Get a property value of a btrfs object'
|
||||
@@ -381,9 +450,12 @@ complete -f -c btrfs -n '__btrfs_command_groups property list' -s t -d 'List pro
|
||||
complete -f -c btrfs -n $quota -a enable -d 'Enable subvolume quota support for a filesystem.'
|
||||
complete -f -c btrfs -n $quota -a disable -d 'Disable subvolume quota support for a filesystem.'
|
||||
complete -f -c btrfs -n $quota -a rescan -d 'Trash all qgroup numbers and scan the metadata again with the current config.'
|
||||
# btrfs quota enable
|
||||
complete -f -c btrfs -n '__btrfs_command_groups quota enable' -s s -l simple -d 'Use simple quotas'
|
||||
# btrfs quota rescan
|
||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s s -d 'Show status of a running rescan operation'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s w -d 'Wait for rescan operation to finish'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s s -l status -d 'Show status of a running rescan operation'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s w -l wait -d 'Wait for rescan operation to finish'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s W -l wait-norescan -d 'Wait for rescan to finish without starting it'
|
||||
|
||||
# btrfs qgroup
|
||||
complete -f -c btrfs -n $qgroup -a assign -d 'Assign SRC as the child qgroup of DST'
|
||||
@@ -391,6 +463,7 @@ complete -f -c btrfs -n $qgroup -a remove -d 'Remove a child qgroup SRC from DST
|
||||
complete -f -c btrfs -n $qgroup -a create -d 'Create a subvolume quota group.'
|
||||
complete -f -c btrfs -n $qgroup -a destroy -d 'Destroy a quota group.'
|
||||
complete -f -c btrfs -n $qgroup -a show -d 'Show subvolume quota groups.'
|
||||
complete -f -c btrfs -n $qgroup -a clear-stale -d 'Clear all stale qgroups whose subvolume does not exist'
|
||||
complete -f -c btrfs -n $qgroup -a limit -d 'Set the limits a subvolume quota group.'
|
||||
# btrfs qgroup assign
|
||||
complete -f -c btrfs -n '__btrfs_command_groups qgroup assign' -l rescan -d 'Schedule qutoa rescan if needed'
|
||||
@@ -424,5 +497,7 @@ complete -f -c btrfs -n $replace -a cancel -d 'Cancel a running device replace o
|
||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s r -d 'Only read from <srcdev> if no other zero-defect mirror exists'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s f -d 'Force using and overwriting <targetdev>'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s B -d 'Do not background'
|
||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -l enqueue -d "Wait if there's another exclusive operation running"
|
||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s K -l nodiscard -d 'Do not perform TRIM on DEVICES'
|
||||
# btrfs replace status
|
||||
complete -f -c btrfs -n '__btrfs_command_groups replace status' -s 1 -d 'Only print once until the replace operation finishes'
|
||||
|
||||
@@ -61,7 +61,7 @@ complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l pull -d 'If destina
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l remember -d 'Remember the specified location as a default'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l force -d 'Merge even if the destination tree has uncommitted changes'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l reprocess -d 'Reprocess to reduce spurious conflicts'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l uncommited -d 'Apply uncommitted changes from a working copy, instead of branch changes'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l uncommitted -d 'Apply uncommitted changes from a working copy, instead of branch changes'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l show-base -d 'Show base revision text in conflicts'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l preview -d 'Instead of merging, show a diff of the merge'
|
||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l interactive -s i -d 'Select changes interactively'
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
## --- WRITTEN MANUALLY ---
|
||||
set -l __fish_cargo_subcommands (cargo --list 2>&1 | string replace -rf '^\s+([^\s]+)\s*(.*)' '$1\t$2' | string escape)
|
||||
|
||||
# Append user-installed extensions (e.g. cargo-foo, invokable as `cargo foo`) to the list of subcommands (à la git)
|
||||
set -la __fish_cargo_subcommands (complete -C'cargo-' | string replace -rf '^cargo-(\w+).*' '$1')
|
||||
|
||||
complete -c cargo -f -c cargo -n __fish_use_subcommand -a "$__fish_cargo_subcommands"
|
||||
complete -c cargo -x -c cargo -n '__fish_seen_subcommand_from help' -a "$__fish_cargo_subcommands"
|
||||
|
||||
@@ -53,27 +50,6 @@ end
|
||||
complete -c cargo -n '__fish_seen_subcommand_from run test build debug check' -l package \
|
||||
-xa "(__fish_cargo_packages)"
|
||||
|
||||
# Look up crates.io crates matching the single argument provided to this function
|
||||
function __fish_cargo_search
|
||||
if test (string length -- "$argv[1]") -le 2
|
||||
# Don't waste time searching for strings with too many results to realistically
|
||||
# provide a meaningful completion within our results limit.
|
||||
return
|
||||
end
|
||||
|
||||
# This doesn't do a prefix search, so bump up the limit a tiny bit to try and
|
||||
# get enough results to show something.
|
||||
cargo search --color never --quiet --limit 20 -- $argv[1] 2>/dev/null |
|
||||
# Filter out placeholders and "... and xxx more crates"
|
||||
string match -rvi '^\.\.\.|= "0.0.0"|# .*(reserved|yanked)' |
|
||||
# Remove the version number and map the description
|
||||
string replace -rf '^([^ ]+).*# (.*)' '$1\t$2'
|
||||
end
|
||||
|
||||
# Complete possible crate names by search the crates.io index
|
||||
complete -c cargo -n '__fish_seen_subcommand_from add install' -n '__fish_is_nth_token 2' \
|
||||
-a "(__fish_cargo_search (commandline -ct))"
|
||||
|
||||
## --- AUTO-GENERATED WITH `cargo complete fish` ---
|
||||
# Manually massaged to improve some descriptions
|
||||
complete -c cargo -n __fish_use_subcommand -l explain -d 'Run `rustc --explain CODE`'
|
||||
@@ -737,6 +713,7 @@ complete -c cargo -n "__fish_seen_subcommand_from tree" -s v -l verbose -d 'Use
|
||||
complete -c cargo -n "__fish_seen_subcommand_from tree" -l frozen -d 'Require Cargo.lock and cache are up to date'
|
||||
complete -c cargo -n "__fish_seen_subcommand_from tree" -l locked -d 'Require Cargo.lock is up to date'
|
||||
complete -c cargo -n "__fish_seen_subcommand_from tree" -l offline -d 'Run without accessing the network'
|
||||
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -fa '(cargo install --list | string replace -rf "(\S+) (.*):" \'$1\t$2\')'
|
||||
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -s p -l package -d 'Package to uninstall'
|
||||
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -l bin -d 'Only uninstall the binary NAME'
|
||||
complete -c cargo -n "__fish_seen_subcommand_from uninstall" -l root -d 'Directory to uninstall packages from'
|
||||
|
||||
@@ -49,10 +49,10 @@ function __fish_clj_tools -V bb_helper
|
||||
bb -e "$bb_helper" tools
|
||||
end
|
||||
|
||||
complete -c clj -s X -x -r -k -a "(__fish_complete_list : __fish_clj_aliases)" -d "Use concatenated aliases to modify classpath or supply exec fn/args"
|
||||
complete -c clj -s A -x -r -k -a "(__fish_complete_list : __fish_clj_aliases)" -d "Use concatenated aliases to modify classpath"
|
||||
complete -c clj -s M -x -r -k -a "(__fish_complete_list : __fish_clj_aliases)" -d "Use concatenated aliases to modify classpath or supply main opts"
|
||||
complete -c clj -s T -x -r -k -a "(__fish_complete_list : __fish_clj_tools)" -d "Invoke tool by name or via aliases ala -X"
|
||||
complete -c clj -s X -x -r -k -a "(__fish_stripprefix='^-\w*X' __fish_complete_list : __fish_clj_aliases)" -d "Use concatenated aliases to modify classpath or supply exec fn/args"
|
||||
complete -c clj -s A -x -r -k -a "(__fish_stripprefix='^-\w*A' __fish_complete_list : __fish_clj_aliases)" -d "Use concatenated aliases to modify classpath"
|
||||
complete -c clj -s M -x -r -k -a "(__fish_stripprefix='^-\w*M' __fish_complete_list : __fish_clj_aliases)" -d "Use concatenated aliases to modify classpath or supply main opts"
|
||||
complete -c clj -s T -x -r -k -a "(__fish_stripprefix='^-\w*T' __fish_complete_list : __fish_clj_tools)" -d "Invoke tool by name or via aliases ala -X"
|
||||
|
||||
complete -c clj -f -o Sdeps -r -d "Deps data to use as the last deps file to be merged"
|
||||
complete -c clj -f -o Spath -d "Compute classpath and echo to stdout only"
|
||||
|
||||
@@ -1,37 +1,4 @@
|
||||
function __cmd_complete_args -d 'Function to generate args'
|
||||
set -l current_token (commandline -tc)
|
||||
|
||||
switch $current_token
|
||||
case '/t:*'
|
||||
echo -e '0\tBlack
|
||||
1\tBlue
|
||||
2\tGreen
|
||||
3\tAqua
|
||||
4\tRed
|
||||
5\tPurple
|
||||
6\tYellow
|
||||
7\tWhite
|
||||
8\tGray
|
||||
9\tLight blue
|
||||
A\tLight green
|
||||
B\tLight aqua
|
||||
C\tLight red
|
||||
D\tLight purple
|
||||
E\tLight yellow
|
||||
F\tBright white' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
|
||||
case '/e:*'
|
||||
echo -e 'on\tEnable command extensions
|
||||
off\tDisable command extensions' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
|
||||
case '/f:*'
|
||||
echo -e 'on\tEnable file and directory name completion
|
||||
off\tDisable file and directory name completion' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
|
||||
case '/v:*'
|
||||
echo -e 'on\tEnable delayed environment variable expansion
|
||||
off\tDisable delayed environment variable expansion' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }"
|
||||
end
|
||||
end
|
||||
|
||||
complete -c cmd -f -a '(__cmd_complete_args)'
|
||||
complete -c cmd -f -a '(__fish_cmd__complete_args)'
|
||||
|
||||
complete -c cmd -f -n 'not __fish_seen_argument -w c -w k' -a /c \
|
||||
-d 'Carry out the command specified by string and then stop'
|
||||
|
||||
@@ -16,14 +16,12 @@ complete -c code -l user-data-dir -ra "(__fish_complete_directories)" -d 'Specif
|
||||
complete -c code -l profile -d 'Opens the provided folder or workspace with the given profile'
|
||||
complete -c code -s v -l version -d 'Print version'
|
||||
complete -c code -s h -l help -d 'Print usage'
|
||||
complete -c code -l folder-uri -d 'Opens a window with given folder uri(s)'
|
||||
complete -c code -l file-uri -d 'Opens a window with given file uri(s)'
|
||||
|
||||
# Extensions management
|
||||
complete -c code -l extensions-dir -d 'Set the root path for extensions'
|
||||
complete -c code -l extensions-dir -r -d 'Set the root path for extensions'
|
||||
complete -c code -l list-extensions -d 'List the installed extensions'
|
||||
complete -c code -l show-versions -d 'Show versions of installed extensions' -n '__fish_seen_argument -l list-extensions'
|
||||
complete -c code -l category -d 'Filters installed extensions by provided category' -n '__fish_seen_argument -l list-extensions'
|
||||
complete -c code -l category -x -d 'Filters installed extensions by provided category' -n '__fish_seen_argument -l list-extensions'
|
||||
complete -c code -l install-extension -ra "(__fish_complete_vscode_extensions)" -d 'Installs or updates the extension'
|
||||
complete -c code -l force -n '__fish_seen_argument -l install-extension' -d 'Updates to the latest version'
|
||||
complete -c code -l pre-release -n '__fish_seen_argument -l install-extension' -d 'Installs the pre-release version'
|
||||
@@ -35,12 +33,13 @@ complete -c code -l disable-extensions -d 'Disable all installed extensions'
|
||||
|
||||
# Troubleshooting
|
||||
complete -c code -l verbose -d 'Print verbose output (implies --wait)'
|
||||
complete -c code -l log -a 'critical error warn info debug trace off' -d 'Log level to use (default: info)'
|
||||
complete -c code -l log -xa 'critical error warn info debug trace off' -d 'Log level to use (default: info)'
|
||||
complete -c code -s s -l status -d 'Print process usage and diagnostics information'
|
||||
complete -c code -l prof-startup -d 'Run CPU profiler during startup'
|
||||
complete -c code -l sync -d 'Turn sync on or off'
|
||||
complete -c code -l inspect-extensions -d 'Allow debugging and profiling of extensions'
|
||||
complete -c code -l sync -xa 'on off' -d 'Turn sync on or off'
|
||||
complete -c code -l inspect-extensions -x -d 'Allow debugging and profiling of extensions'
|
||||
complete -c code -l inspect-brk-extensions -x -d 'Allow debugging and profiling of extensions'
|
||||
complete -c code -l disable-lcd-text -d 'Disable LCD font rendering'
|
||||
complete -c code -l disable-gpu -d 'Disable GPU hardware acceleration'
|
||||
complete -c code -l disable-chromium-sandbox -d 'Disable the Chromium sandbox environment'
|
||||
complete -c code -l telemetry -d 'Shows all telemetry events which VS code collects'
|
||||
|
||||
@@ -5,7 +5,7 @@ complete -c create_ap -l version -d 'Print version number'
|
||||
complete -c create_ap -s c -x -d 'Channel number'
|
||||
complete -c create_ap -s w -x -a '1 2 1+2' -d 'WPA version to use'
|
||||
complete -c create_ap -s n -d 'Disable Internet sharing'
|
||||
complete -c create_ap -s m -x -a 'nat brigde none' -d 'Method for Internet sharing'
|
||||
complete -c create_ap -s m -x -a 'nat bridge none' -d 'Method for Internet sharing'
|
||||
complete -c create_ap -l psk -d 'Use 64 hex digits pre-shared-key'
|
||||
complete -c create_ap -l hidden -d 'Make the Access Point hidden'
|
||||
complete -c create_ap -l mac-filter -d 'Enable MAC address filtering'
|
||||
|
||||
@@ -94,3 +94,6 @@ complete -c cryptsetup -l veracrypt-query-pim -d "Query Personal Iteration Multi
|
||||
complete -c cryptsetup -l verbose -s v -d "Shows more detailed error messages"
|
||||
complete -c cryptsetup -l verify-passphrase -s y -d "Verifies the passphrase by asking for it twice"
|
||||
complete -c cryptsetup -l version -s V -d "Print package version"
|
||||
|
||||
# subcommands
|
||||
complete -c cryptsetup -n "__fish_seen_subcommand_from close status resize" -f -r -a "(path basename /dev/mapper/* | string match -v control)"
|
||||
|
||||
@@ -6,6 +6,6 @@ complete -c csvlens -l filter -r -d "Use this regex to filter rows to display by
|
||||
complete -c csvlens -l find -r -d "Use this regex to find and highlight matches by default"
|
||||
complete -c csvlens -s i -l ignore-case -d "Searches ignore case. Ignored if any uppercase letters are present in the search string"
|
||||
complete -c csvlens -l echo-column -r -d "Print the value of this column to stdout for the selected row"
|
||||
complete -c csvlens -l debug "Show stats for debugging"
|
||||
complete -c csvlens -l debug -d "Show stats for debugging"
|
||||
complete -c csvlens -s h -l help -f -d "Print help"
|
||||
complete -c csvlens -s V -l version -f -d "Print version"
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
delta --generate-completion fish | source
|
||||
# Older versions of delta do not have a --generate-completion option and will complain
|
||||
# to stderr but emit nothing to stdout, making it safe (but a no-op) to source.
|
||||
delta --generate-completion fish 2>/dev/null | source
|
||||
|
||||
@@ -14,11 +14,6 @@ function __fish_diskutil_mounted_volumes
|
||||
printf '%s\n' $mountpoints
|
||||
end
|
||||
|
||||
function __fish_diskutil_writeable_volumes
|
||||
set -l mountpoints (path filter -w /Volumes/*)
|
||||
printf '%s\n' $mountpoints
|
||||
end
|
||||
|
||||
function __fish_diskutil_using_not_subcommand
|
||||
not __fish_seen_subcommand_from apfs
|
||||
and not __fish_seen_subcommand_from appleRAID
|
||||
@@ -58,7 +53,7 @@ complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand umountDisk' -a
|
||||
|
||||
# eject
|
||||
complete -f -c diskutil -n __fish_use_subcommand -a eject -d 'Eject a volume or disk'
|
||||
complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_writeable_volumes ; __fish_diskutil_devices)'
|
||||
complete -f -c diskutil -n '__fish_diskutil_using_not_subcommand eject' -a '(__fish_diskutil_mounted_volumes ; __fish_diskutil_devices)'
|
||||
|
||||
# mount
|
||||
complete -f -c diskutil -n __fish_use_subcommand -a mount -d 'Mount a single volume'
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
# Completions for the dnf command
|
||||
#
|
||||
|
||||
function __dnf_is_dnf5
|
||||
path resolve -- $PATH/dnf | path filter | string match -q -- '*/dnf5'
|
||||
end
|
||||
|
||||
function __dnf_list_installed_packages
|
||||
dnf repoquery --cacheonly "$cur*" --qf "%{name}" --installed </dev/null
|
||||
dnf repoquery --cacheonly "$cur*" --qf "%{name}\n" --installed </dev/null
|
||||
end
|
||||
|
||||
function __dnf_list_available_packages
|
||||
@@ -15,9 +19,14 @@ function __dnf_list_available_packages
|
||||
return
|
||||
end
|
||||
set -l results
|
||||
# dnf --cacheonly list --available gives a list of non-installed packages dnf is aware of,
|
||||
# but it is slow as molasses. Unfortunately, sqlite3 is not available oob (Fedora Server 32).
|
||||
if type -q sqlite3
|
||||
if __dnf_is_dnf5
|
||||
# dnf5 provides faster completions than repoquery, but does not maintain the
|
||||
# same sqlite db as dnf4
|
||||
set results (dnf --complete=2 dnf install "$tok*")
|
||||
else if type -q sqlite3
|
||||
# dnf --cacheonly list --available gives a list of non-installed packages dnf is aware of,
|
||||
# but it is slow as molasses. Unfortunately, sqlite3 is not available oob (Fedora Server 32).
|
||||
|
||||
# This schema is bad, there is only a "pkg" field with the full
|
||||
# packagename-version-release.fedorarelease.architecture
|
||||
# tuple. We are only interested in the packagename.
|
||||
@@ -26,7 +35,7 @@ function __dnf_list_available_packages
|
||||
else
|
||||
# In some cases dnf will ask for input (e.g. to accept gpg keys).
|
||||
# Connect it to /dev/null to try to stop it.
|
||||
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}" --available </dev/null 2>/dev/null)
|
||||
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}\n" --available </dev/null 2>/dev/null)
|
||||
end
|
||||
if set -q results[1]
|
||||
set results (string match -r -- '.*\\.rpm$' $files) $results
|
||||
@@ -37,7 +46,7 @@ function __dnf_list_available_packages
|
||||
end
|
||||
|
||||
function __dnf_list_transactions
|
||||
if type -q sqlite3
|
||||
if not __dnf_is_dnf5 && type -q sqlite3
|
||||
sqlite3 /var/lib/dnf/history.sqlite "SELECT id, cmdline FROM trans" 2>/dev/null | string replace "|" \t
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
function __fish_doas_print_remaining_args
|
||||
set -l tokens (commandline -xpc) (commandline -ct)
|
||||
set -l tokens (commandline -xpc | string escape) (commandline -ct)
|
||||
set -e tokens[1]
|
||||
# These are all the options mentioned in the man page for openbsd's "doas" (in that order).
|
||||
set -l opts a= C= L n s u=
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
complete -c dust -s d -l depth -d "Depth to show"
|
||||
complete -c dust -s n -l number-of-lines -d "Number of lines of output to show"
|
||||
complete -c dust -s p -l full-paths -d "Subdirectories will not have their path shortened"
|
||||
complete -c dust -s X -l ignore-directory -d "Exclude any file or directory with this name"
|
||||
complete -c dust -s I -l ignore-all-in-file -d "Exclude any file or directory with a regex"
|
||||
complete -c dust -s L -l dereference-links -d "dereference sym links - Treat sym links as directories and go into them"
|
||||
complete -c dust -s x -l limit-filesystem -d "Only count the files and directories on the same filesystem as the supplied directory"
|
||||
complete -c dust -s s -l apparent-size -d "Use file length instead of blocks"
|
||||
complete -c dust -s r -l reverse -d "Print tree upside down (biggest highest)"
|
||||
complete -c dust -s c -l no-colors -d "No colors will be printed"
|
||||
complete -c dust -s C -l force-colors -d "Force colors print"
|
||||
complete -c dust -s b -l no-percent-bars -d "No percent bars or percentages will be displayed"
|
||||
complete -c dust -s B -l bars-on-right -d "percent bars moved to right side of screen"
|
||||
complete -c dust -s z -l min-size -d "Minimum size file to include in output"
|
||||
complete -c dust -s R -l screen-reader -d "For screen readers"
|
||||
complete -c dust -l skip-total -d "No total row will be displayed"
|
||||
complete -c dust -s f -l filecount -d "Directory 'size' is number of child files instead of disk size"
|
||||
complete -c dust -s i -l ignore_hidden -d "Do not display hidden files"
|
||||
complete -c dust -s v -l invert-filter -d "Exclude filepaths matching this regex"
|
||||
complete -c dust -s e -l filter -d "Only include filepaths matching this regex"
|
||||
complete -c dust -s t -l file_types -d "show only these file types"
|
||||
complete -c dust -s w -l terminal_width -d "Specify width of output"
|
||||
complete -c dust -s P -l no-progress -d "Disable the progress indication"
|
||||
complete -c dust -s D -l only-dir -d "Only directories will be displayed"
|
||||
complete -c dust -s F -l only-file -d "Only files will be displayed (finds your largest files)"
|
||||
complete -c dust -s o -l output-format -d "Changes output display size"
|
||||
complete -c dust -s S -l stack-size -d "Specify memory to use as stack size"
|
||||
complete -c dust -s h -l help -d "Print help"
|
||||
complete -c dust -s V -l version -d "Print version"
|
||||
24
share/completions/elm.fish
Normal file
24
share/completions/elm.fish
Normal file
@@ -0,0 +1,24 @@
|
||||
set -l commands repl init reactor make install bump diff publish
|
||||
|
||||
complete -c elm -f
|
||||
# repl completions
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a repl -d 'Open up an interactive programming session'
|
||||
complete -c elm -n "__fish_seen_subcommand_from repl" -l no-colors -d 'Turn off the colors in REPL'
|
||||
complete -c elm -n "__fish_seen_subcommand_from repl" -l interpreter -d 'Path to an alternative JS interpreter'
|
||||
# reactor completions
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a reactor -d 'Compile code with a click'
|
||||
complete -c elm -n "__fish_seen_subcommand_from reactor" -l port -d 'Compile code with a click'
|
||||
# make completions
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a make -d 'Compiles Elm code in JS or HTML'
|
||||
complete -c elm -n "__fish_seen_subcommand_from make" -l output -F -r -d 'Specify the name of resulting JS file'
|
||||
complete -c elm -n "__fish_seen_subcommand_from make" -l debug -d 'Turn on the time-travelling debugger'
|
||||
complete -c elm -n "__fish_seen_subcommand_from make" -l optimize -d 'Turn on optimizations to make code smaller and faster'
|
||||
complete -c elm -n "__fish_seen_subcommand_from make" -l docs -d 'Generate a JSON file of documentation for a package'
|
||||
#other commands completions
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a init -d 'Start an Elm project'
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a install -d 'Fetches packages from Elm repository'
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a bump -d 'Figures out the next version number based on API changes'
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a diff -d 'See what changed in a package between different versions'
|
||||
complete -c elm -n "not __fish_seen_subcommand_from $commands" -a publish -d 'Publishes your package on package.elm-lang.org so anyone in the community can use it'
|
||||
|
||||
complete -c elm -l help -d "Show a more detailed description"
|
||||
@@ -62,7 +62,7 @@ end
|
||||
|
||||
# Get the text after all env arguments and variables, so we can complete it as a regular command
|
||||
function __fish_env_remaining_args -V is_gnu
|
||||
set -l argv (commandline -xpc) (commandline -ct)
|
||||
set -l argv (commandline -xpc | string escape) (commandline -ct)
|
||||
if set -q is_gnu[1]
|
||||
argparse -s i/ignore-environment u/unset= help version -- $argv 2>/dev/null
|
||||
or return 0
|
||||
|
||||
@@ -85,7 +85,7 @@ complete -c equery -n '__fish_seen_subcommand_from f files' -s s -l timestamp -d
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -s t -l type -d "Include file type in output"
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -l tree -d "Display results in a tree"
|
||||
complete -c equery -n '__fish_seen_subcommand_from f files' -s f -l filter -d "Filter output by file type" \
|
||||
-xa "(__fish_complete_list , __fish_equery_files_filter_args)"
|
||||
-xa "(__fish_stripprefix='^(--filter=|-\w*f)' __fish_complete_list , __fish_equery_files_filter_args)"
|
||||
|
||||
# has + hasuse
|
||||
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s I -l exclude-installed -d "Exclude installed pkgs from search path"
|
||||
|
||||
@@ -1,26 +1 @@
|
||||
function __fish_exercism_no_subcommand -d 'Test if exercism has yet to be given the subcommand'
|
||||
for i in (commandline -xpc)
|
||||
if contains -- $i demo debug configure fetch restore submit unsubmit tracks download help
|
||||
return 1
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
complete -c exercism -s c -l config -d 'path to config file [$EXERCISM_CONFIG_FILE, $XDG_CONFIG_HOME]'
|
||||
complete -c exercism -s v -l verbose -d "turn on verbose logging"
|
||||
complete -c exercism -s h -l help -d "show help"
|
||||
complete -c exercism -s v -l version -d "print the version"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a configure -d "Writes config values to a JSON file"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a debug -d "Outputs useful debug information"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a download -d "Downloads a solution given the ID of the latest iteration"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a fetch -d "Fetches the next unsubmitted problem in each track"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a list -d "Lists the available problems for a language track, given its ID"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a open -d "Opens exercism.io on given problem"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a restore -d "Downloads the most recent iteration for each of your solutions on exercism.io"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a skip -d "Skips a problem given a track ID and problem slug"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a status -d "Fetches information about your progress with a given language track"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a submit -d "Submits a new iteration to a problem on exercism.io"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a tracks -d "Lists the available language tracks"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a upgrade -d "Upgrades the CLI to the latest released version"
|
||||
complete -f -n __fish_exercism_no_subcommand -c exercism -a help -d "show help"
|
||||
exercism completion fish | source
|
||||
|
||||
55
share/completions/firejail.fish
Normal file
55
share/completions/firejail.fish
Normal file
@@ -0,0 +1,55 @@
|
||||
function __fish_firejail_profiles
|
||||
path basename -- /etc/firejail/*.profile ~/.config/firejail/*.profile
|
||||
end
|
||||
|
||||
function __fish_firejail_complete_sandboxes
|
||||
firejail --list | string replace -rf -- '([^:]+):([^:]+):([^:]+):(.*)' '$1\t$3: $4 ($2)\n$3\t$1: $4 ($2)'
|
||||
end
|
||||
|
||||
complete -c firejail -f
|
||||
complete -c firejail -l help -d 'Show help and exit'
|
||||
complete -c firejail -l version -d 'Show version and exit'
|
||||
complete -c firejail -l debug -d 'Print debug info'
|
||||
complete -c firejail -l debug-blacklists -d 'Debug blacklisting'
|
||||
complete -c firejail -l debug-whitelists -d 'Debug whitelisting'
|
||||
complete -c firejail -l debug-caps -d 'Print known capabilities and exit'
|
||||
complete -c firejail -l debug-errnos -d 'Print known error numbers and exit'
|
||||
complete -c firejail -l debug-private-lib -d 'Debug --private-lib'
|
||||
complete -c firejail -l debug-protocols -d 'Print known protocols and exit'
|
||||
complete -c firejail -l debug-syscalls -d 'Print known syscalls and exit'
|
||||
complete -c firejail -l debug-syscalls32 -d 'Print known 32-bit syscalls and exit'
|
||||
complete -c firejail -l list -d 'List all sandboxes'
|
||||
complete -c firejail -l tree -d 'Print a tree of all sandboxes'
|
||||
complete -c firejail -l top -d 'Monitor sandboxes (like `top`)'
|
||||
complete -c firejail -l shutdown -d 'Show help and exit'
|
||||
|
||||
# Profiles
|
||||
# Note: firejail's option parsing is weird and *requires* the --foo=bar form
|
||||
# So we don't use -r
|
||||
complete -c firejail -l profiles -d 'Load a custom security profile' -a '(__fish_firejail_profiles)'
|
||||
|
||||
# Sandboxes
|
||||
complete -c firejail -l join -d 'Join existing sandbox' -a '(__fish_firejail_complete_sandboxes)'
|
||||
|
||||
# Files
|
||||
complete -c firejail -l hosts-file -d 'Show help and exit' -a '(__fish_firejail_profiles)'
|
||||
|
||||
# directory
|
||||
complete -c firejail -l chroot -d 'Chroot into this directory' -a '(__fish_complete_directories)'
|
||||
complete -c firejail -l tmpfs -d 'Mount tmpfs into sandbox' -a '(__fish_complete_directories)'
|
||||
complete -c firejail -l blacklist -d 'Blacklist dir or file' -F
|
||||
complete -c firejail -l noblacklist -d 'Disable blacklist for dir or file' -F
|
||||
complete -c firejail -l whitelist -d 'Whitelist dir or file' -F
|
||||
complete -c firejail -l nowhitelist -d 'Disable whitelist for dir or file' -F
|
||||
complete -c firejail -l read-only -d 'Set dir or file read-only' -F
|
||||
complete -c firejail -l read-write -d 'Set dir or file read-write' -F
|
||||
# TODO: Comma-separated ("/etc/foo,/usr/etc/foo" bind-mounts /etc/foo on /usr/etc/foo)
|
||||
complete -c firejail -l bind -d 'Bind-mount file on top of another' -F
|
||||
complete -c firejail -l private -d 'Mount temporary home directories and delete on exit' -F
|
||||
complete -c firejail -l netfilter -d 'Enable firewall given by this file' -F
|
||||
|
||||
# Interfaces
|
||||
complete -c firejail -l net -d 'Enable network namespace connected to this interface' -a '(__fish_print_interfaces)'
|
||||
|
||||
# Commands
|
||||
complete -c firejail -a '(__fish_complete_subcommand)'
|
||||
2
share/completions/fish-lsp.fish
Normal file
2
share/completions/fish-lsp.fish
Normal file
@@ -0,0 +1,2 @@
|
||||
__fish_cache_sourced_completions fish-lsp complete
|
||||
or fish-lsp complete | source
|
||||
1
share/completions/folderify.fish
Normal file
1
share/completions/folderify.fish
Normal file
@@ -0,0 +1 @@
|
||||
folderify --completions fish | source
|
||||
1
share/completions/gcloud.fish
Normal file
1
share/completions/gcloud.fish
Normal file
@@ -0,0 +1 @@
|
||||
complete -c gcloud -f -a '(__fish_argcomplete_complete gcloud)'
|
||||
@@ -16,6 +16,7 @@ complete -c gem -n __fish_use_subcommand -xa cleanup -d "Cleanup old versions of
|
||||
complete -c gem -n __fish_use_subcommand -xa contents -d "Display the contents of the installed gems"
|
||||
complete -c gem -n __fish_use_subcommand -xa dependency -d "Show the dependencies of an installed gem"
|
||||
complete -c gem -n __fish_use_subcommand -xa environment -d "Display RubyGems environmental information"
|
||||
complete -c gem -n __fish_use_subcommand -xa fetch -d "Download a gem into current directory"
|
||||
complete -c gem -n __fish_use_subcommand -xa help -d "Provide help on the 'gem' command"
|
||||
complete -c gem -n __fish_use_subcommand -xa install -d "Install a gem into the local repository"
|
||||
complete -c gem -n __fish_use_subcommand -xa list -d "Display all gems whose name starts with STRING"
|
||||
@@ -86,6 +87,9 @@ complete $dep_opt -s p -l pipe -d "Pipe Format (name --version ver)"
|
||||
set -l env_opt -c gem -n 'contains environment (commandline -pxc)'
|
||||
complete $env_opt -xa "packageversion\t'display the package version' gemdir\t'display the path where gems are installed' gempath\t'display path used to search for gems' version\t'display the gem format version' remotesources\t'display the remote gem servers'"
|
||||
|
||||
set -l fetch_opt -c gem -n 'contains fetch (commandline -pxc)'
|
||||
complete $fetch_opt -s v -l version -d "Specify version of gem to download" -x
|
||||
|
||||
##
|
||||
# help
|
||||
set -l help_opt -c gem -n 'contains help (commandline -pxc)'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# gh, at least as of version 1.17.5, does not write errors to stderr, causing
|
||||
# `checks/completions.fish` to fail if the `gh-completion` module is missing.
|
||||
# It also does not exit with a non-zero error code, making this harder than it needs to be :(
|
||||
set completion "$(gh completion --shell fish)"
|
||||
set completion "$(gh completion --shell fish 2>/dev/null)"
|
||||
string match -rq '^Error' -- $completion && return -1
|
||||
echo $completion | source
|
||||
|
||||
27
share/completions/git-subtree.fish
Normal file
27
share/completions/git-subtree.fish
Normal file
@@ -0,0 +1,27 @@
|
||||
complete -f -c git -a subtree -d 'Manage git subtrees'
|
||||
# Git subtree common completions
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -s q -l quiet -d 'Suppress output'
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -s d -l debug -d 'Debug output'
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -s P -l path -d 'Path to the subtree'
|
||||
|
||||
# Git subtree subcommands
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -a add -d "Add a new subtree to the repository"
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -a merge -d "Merge changes from a subtree into the repository"
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -a split -d "Extract a subtree from the repository"
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -a pull -d "Fetch and integrate changes from a remote subtree"
|
||||
complete -f -c git -n '__fish_git_using_command subtree' -a push -d "Push changes to a remote subtree"
|
||||
|
||||
# Completions for push and split subcommands
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split' -l annotate -d 'Annotate the commit'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split' -s b -l branch -d 'Branch to split'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split' -l ignore-joins -d 'Ignore joins during history reconstruction'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split' -l onto -d 'Specify the commit ID to start history reconstruction'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split' -l rejoin -d 'Merge the synthetic history back into the main project'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split; and __fish_contains_opt rejoin' -l squash -d 'Merge subtree changes as a single commit'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split; and __fish_contains_opt rejoin' -l no-squash -d 'Do not merge subtree changes as a single commit'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from push split; and __fish_contains_opt rejoin' -s m -l message -d 'Use the given message as the commit message for the merge commit'
|
||||
|
||||
# Completion for add and merge subcommands
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from add merge' -l squash -d 'Merge subtree changes as a single commit'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from add merge' -l no-squash -d 'Do not merge subtree changes as a single commit'
|
||||
complete -f -c git -n '__fish_git_using_command subtree; and __fish_seen_subcommand_from add merge' -s m -l message -d 'Use the given message as the commit message for the merge commit'
|
||||
@@ -653,6 +653,7 @@ function __fish_git_aliased_command
|
||||
end
|
||||
end
|
||||
|
||||
set -g __fish_git_aliases
|
||||
git config -z --get-regexp 'alias\..*' | while read -lz alias cmdline
|
||||
set -l command (__fish_git_aliased_command $cmdline)
|
||||
string match -q --regex '\w+' -- $command; or continue
|
||||
@@ -778,7 +779,8 @@ function __fish_git_custom_commands
|
||||
# if any of these completion results match the name of the builtin git commands,
|
||||
# but it's simpler just to blacklist these names. They're unlikely to change,
|
||||
# and the failure mode is we accidentally complete a plumbing command.
|
||||
for name in (string replace -r "^.*/git-([^/]*)" '$1' $PATH/git-*)
|
||||
set -l git_subcommands $PATH/git-*
|
||||
for name in (string replace -r "^.*/git-([^/]*)" '$1' $git_subcommands)
|
||||
switch $name
|
||||
case cvsserver receive-pack shell upload-archive upload-pack
|
||||
# skip these
|
||||
@@ -882,9 +884,16 @@ short\t<sha1> / <author> / <title line>
|
||||
medium\t<sha1> / <author> / <author date> / <title> / <commit msg>
|
||||
full\t<sha1> / <author> / <committer> / <title> / <commit msg>
|
||||
fuller\t<sha1> / <author> / <author date> / <committer> / <committer date> / <title> / <commit msg>
|
||||
reference\t<abbrev-hash> (<title-line>, <short-author-date>)
|
||||
email\t<sha1> <date> / <author> / <author date> / <title> / <commit msg>
|
||||
mboxrd\tLike email, but lines in the commit message starting with \"From \" are quoted with \">\"
|
||||
raw\tShow the entire commit exactly as stored in the commit object
|
||||
format:\tSpecify which information to show"
|
||||
format:\tSpecify which information to show
|
||||
"
|
||||
__fish_git config -z --get-regexp '^pretty\.' 2>/dev/null | while read -lz key value
|
||||
set -l name (string replace -r '^.*?\.' '' -- $key)
|
||||
printf "%s\t%s\n" $name $value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -892,6 +901,15 @@ function __fish_git_is_rebasing
|
||||
test -e (__fish_git rev-parse --absolute-git-dir)/rebase-merge
|
||||
end
|
||||
|
||||
function __fish_git_filters
|
||||
printf "%s\n" \
|
||||
blob:none\t"omits all blobs" \
|
||||
blob:limit=\t"omits blobs by size" \
|
||||
object:type={tag,commit,tree,blob}\t"omit object which are not of the requested type" \
|
||||
sparse:oid=\t"omit blobs not required for a sparse checkout" \
|
||||
tree:\t"omits all blobs and trees"
|
||||
end
|
||||
|
||||
# general options
|
||||
complete git -f -l help -s h -d 'Display manual of a Git command'
|
||||
complete git -f -n __fish_git_needs_command -l version -s v -d 'display git version'
|
||||
@@ -1026,6 +1044,7 @@ complete -f -c git -n '__fish_git_using_command fetch' -l unshallow -d 'Convert
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l refetch -d 'Re-fetch without negotiating common commits'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l negotiation-tip -d 'Only report commits reachable from these tips' -kxa '(__fish_git_commits; __fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l negotiate-only -d "Don't fetch, only show commits in common with the server"
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l filter -ra '(__fish_git_filters)' -d 'Request a subset of objects from server'
|
||||
|
||||
# TODO other options
|
||||
|
||||
@@ -1340,6 +1359,7 @@ complete -f -c git -n '__fish_git_using_command clone' -s o -l origin -d 'Use a
|
||||
complete -f -c git -n '__fish_git_using_command clone' -s b -l branch -d 'Use a specific branch instead of the one used by the cloned repository'
|
||||
complete -f -c git -n '__fish_git_using_command clone' -l depth -d 'Truncate the history to a specified number of revisions'
|
||||
complete -f -c git -n '__fish_git_using_command clone' -l recursive -d 'Initialize all submodules within the cloned repository'
|
||||
complete -f -c git -n '__fish_git_using_command clone' -l filter -ra '(__fish_git_filters)' -d 'Partial clone by requesting a subset of objects from server'
|
||||
|
||||
### commit
|
||||
complete -c git -n __fish_git_needs_command -a commit -d 'Record changes to the repository'
|
||||
@@ -1440,7 +1460,7 @@ complete -c git -n '__fish_git_using_command diff' -s 1 -l base -d 'Compare the
|
||||
complete -c git -n '__fish_git_using_command diff' -s 2 -l ours -d 'Compare the working tree with the "our branch"'
|
||||
complete -c git -n '__fish_git_using_command diff' -s 3 -l theirs -d 'Compare the working tree with the "their branch"'
|
||||
complete -c git -n '__fish_git_using_command diff' -s 0 -d 'Omit diff output for unmerged entries and just show "Unmerged"'
|
||||
complete -c git -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt cached staged' -a '(
|
||||
complete -c git -n '__fish_git_using_command diff' -k -n 'not __fish_git_contains_opt cached staged' -a '(
|
||||
set -l kinds modified
|
||||
contains -- -- (commandline -xpc) && set -a kinds deleted modified-staged-deleted
|
||||
__fish_git_files $kinds
|
||||
@@ -1588,6 +1608,7 @@ complete -c git -n '__fish_git_using_command log rev-list' -l bisect
|
||||
complete -c git -n '__fish_git_using_command log rev-list' -l stdin -d 'Read commits from stdin'
|
||||
complete -c git -n '__fish_git_using_command log rev-list' -l cherry-mark -d 'Mark equivalent commits with = and inequivalent with +'
|
||||
complete -c git -n '__fish_git_using_command log rev-list' -l cherry-pick -d 'Omit equivalent commits'
|
||||
complete -f -c git -n '__fish_git_using_command rev-list' -l filter -ra '(__fish_git_filters)' -d 'Omits objects from the list of printed objects'
|
||||
complete -c git -n '__fish_git_using_command log' -l left-only
|
||||
complete -c git -n '__fish_git_using_command log' -l right-only
|
||||
complete -c git -n '__fish_git_using_command log' -l cherry
|
||||
@@ -1791,6 +1812,8 @@ complete -f -c git -n '__fish_git_using_command merge' -l rerere-autoupdate -d '
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-rerere-autoupdate -d 'Do not use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l abort -d 'Abort the current conflict resolution process'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l continue -d 'Conclude current conflict resolution process'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l autostash -d 'Before starting merge, stash local changes, and apply stash when done'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-autostash -d 'Do not stash local changes before starting merge'
|
||||
|
||||
### merge-base
|
||||
complete -f -c git -n __fish_git_needs_command -a merge-base -d 'Find a common ancestor for a merge'
|
||||
@@ -2271,6 +2294,7 @@ complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subco
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -s N -l no-fetch -d "Don't fetch new objects from the remote"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l remote -d "Instead of using superproject's SHA-1, use the state of the submodule's remote-tracking branch"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l force -d "Discard local changes when switching to a different commit & always run checkout"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l filter -ra '(__fish_git_filters)' -d 'Request a subset of objects from server'
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from add' -l force -d "Also add ignored submodule path"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l force -d "Remove even with local changes"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l all -d "Remove all submodules"
|
||||
@@ -2562,16 +2586,17 @@ complete -c git -n __fish_git_needs_command -a '(__fish_git_custom_commands)' -d
|
||||
function __fish_git_complete_custom_command -a subcommand
|
||||
set -l cmd (commandline -xpc)
|
||||
set -e cmd[1] # Drop "git".
|
||||
set -lx subcommand_args
|
||||
set -l subcommand_args
|
||||
if argparse -s (__fish_git_global_optspecs) -- $cmd
|
||||
set subcommand_args $argv[2..] # Drop the subcommand.
|
||||
set subcommand_args (string escape -- $argv[2..]) # Drop the subcommand.
|
||||
end
|
||||
complete -C "git-$subcommand \$subcommand_args "(commandline -ct)
|
||||
complete -C "git-$subcommand $subcommand_args "(commandline -ct)
|
||||
end
|
||||
|
||||
# source git-* commands' autocompletion file if exists
|
||||
set -l __fish_git_custom_commands_completion
|
||||
for file in (path filter -xZ $PATH/git-* | path basename)
|
||||
set -l git_subcommands $PATH/git-*
|
||||
for file in (path filter -xZ $git_subcommands | path basename)
|
||||
# Already seen this command earlier in $PATH.
|
||||
contains -- $file $__fish_git_custom_commands_completion
|
||||
and continue
|
||||
|
||||
@@ -4,5 +4,5 @@ complete -c gpasswd -s d -l delete -d 'Remove user from group' -xa '(__fish_comp
|
||||
complete -c gpasswd -s h -l help -d 'Print help'
|
||||
complete -c gpasswd -s r -l remove-password -d 'Remove the GROUP\'s password'
|
||||
complete -c gpasswd -s R -l restrict -d 'Restrict access to GROUP to its members'
|
||||
complete -c gpasswd -s M -l members -d 'Set the list of members of GROUP' -xa '(__fish_complete_list , __fish_complete_users)'
|
||||
complete -c gpasswd -s A -l administrators -d 'set the list of administrators for GROUP' -xa '(__fish_complete_list , __fish_complete_users)'
|
||||
complete -c gpasswd -s M -l members -d 'Set the list of members of GROUP' -xa "(__fish_stripprefix='^(--members=|-\w*M)' __fish_complete_list , __fish_complete_users)"
|
||||
complete -c gpasswd -s A -l administrators -d 'set the list of administrators for GROUP' -xa "(__fish_stripprefix='^(--administrators=|-\w*A)' __fish_complete_list , __fish_complete_users)"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
complete -c gprof -s A -l annoted-source -d "Print annotated source"
|
||||
complete -c gprof -s A -l annotated-source -d "Print annotated source"
|
||||
complete -c gprof -s b -l brief -d "Do not print explanations"
|
||||
complete -c gprof -s C -l exec-counts -d "Print tally"
|
||||
complete -c gprof -s i -l file-info -d "Display summary"
|
||||
|
||||
1
share/completions/gsutil.fish
Normal file
1
share/completions/gsutil.fish
Normal file
@@ -0,0 +1 @@
|
||||
complete -c gsutil -f -a '(__fish_argcomplete_complete gsutil)'
|
||||
68
share/completions/guild.fish
Normal file
68
share/completions/guild.fish
Normal file
@@ -0,0 +1,68 @@
|
||||
function __fish_guild__complete_warnings
|
||||
guild compile -Whelp |
|
||||
string replace --filter --regex '^\s+`([a-z\-]+)\'\s+(.+)' '$1\t$2'
|
||||
|
||||
printf '%s\n' 0 2 3
|
||||
echo 1\tdefault
|
||||
end
|
||||
|
||||
function __fish_guild__complete_optimizations
|
||||
guild compile -Ohelp |
|
||||
string replace --filter --regex '^\s+-O(.+)' '$1\nno-$1'
|
||||
|
||||
printf '%s\n' 0 1 3
|
||||
echo 2\tdefault
|
||||
end
|
||||
|
||||
set -l command guild
|
||||
complete -c $command -f
|
||||
|
||||
set -l compile_condition '__fish_seen_subcommand_from compile'
|
||||
complete -c $command -a 'compile\tCompile scripts' -n "not $compile_condition"
|
||||
|
||||
complete -c $command -s h -l help -d 'Show help' -n $compile_condition
|
||||
complete -c $command -l version -d 'Show version' -n $compile_condition
|
||||
|
||||
complete -c $command -s L -l load-path -F \
|
||||
-d 'Specify the directory to prepend to module load path' \
|
||||
-n $compile_condition
|
||||
|
||||
complete -c $command -s o -l output -F \
|
||||
-d 'Specify the output file to put bytecode in' \
|
||||
-n $compile_condition
|
||||
|
||||
complete -c $command -s x -x \
|
||||
-d 'Specify the extension to prepend to extension list' \
|
||||
-n $compile_condition
|
||||
|
||||
complete -c $command -s W -l warning \
|
||||
-a "(__fish_stripprefix='^(--warning=|-\w*W)' __fish_complete_list , __fish_guild__complete_warnings)" \
|
||||
-d 'Specify the warning level for a compilation' \
|
||||
-n $compile_condition
|
||||
|
||||
complete -c $command -s O -l optimize \
|
||||
-a '(__fish_guild__complete_optimizations)' \
|
||||
-d 'Specify the optimization level for a compilation' \
|
||||
-n $compile_condition
|
||||
|
||||
for standard in 6 7
|
||||
set -l option r$standard"rc"
|
||||
|
||||
complete -c $command -l $option \
|
||||
-d "Use $(string upper -- $option) compatible mode" \
|
||||
-n $compile_condition
|
||||
end
|
||||
|
||||
complete -c $command -s f -l from \
|
||||
-a 'scheme\tdefault elisp ecmascript' \
|
||||
-d 'Specify the language for sources' \
|
||||
-n $compile_condition
|
||||
|
||||
complete -c $command -s t -l to \
|
||||
-a 'rtl\tdefault' \
|
||||
-d 'Specify the language for an output' \
|
||||
-n $compile_condition
|
||||
|
||||
complete -c $command -s T -l target \
|
||||
-d 'Specify the target for a code' \
|
||||
-n $compile_condition
|
||||
115
share/completions/guile.fish
Normal file
115
share/completions/guile.fish
Normal file
@@ -0,0 +1,115 @@
|
||||
function __fish_guile__complete_srfis
|
||||
printf '%s\n' 0\t'cond-expand' \
|
||||
1\t'List library' \
|
||||
2\t'and-let*' \
|
||||
4\t'Homogeneous numeric vector datatypes' \
|
||||
6\t'Basic String Ports' \
|
||||
8\t'receive' \
|
||||
9\t'define-record-type' \
|
||||
10\t'Hash-Comma Reader Extension' \
|
||||
11\t'let-values' \
|
||||
13\t'String Library' \
|
||||
14\t'Character-set Library' \
|
||||
16\t'case-lambda' \
|
||||
17\t'Generalized set!' \
|
||||
18\t'Multithreading support' \
|
||||
19\t'Time/Date Library' \
|
||||
23\t'Error Reporting' \
|
||||
26\t'specializing parameters' \
|
||||
27\t'Sources of Random Bits' \
|
||||
28\t'Basic Format Strings' \
|
||||
30\t'Nested Multi-line Comments' \
|
||||
31\t'A special form ‘rec’ for recursive evaluation' \
|
||||
34\t'Exception handling for programs' \
|
||||
35\t'Conditions' \
|
||||
37\t'args-fold' \
|
||||
38\t'External Representation for Data With Shared Structure' \
|
||||
39\t'Parameters' \
|
||||
41\t'Streams' \
|
||||
42\t'Eager Comprehensions' \
|
||||
43\t'Vector Library' \
|
||||
45\t'Primitives for Expressing Iterative Lazy Algorithms' \
|
||||
46\t'Basic syntax-rules Extensions' \
|
||||
55\t'Requiring Features' \
|
||||
60\t'Integers as Bits' \
|
||||
61\t'A more general cond clause' \
|
||||
62\t'S-expression comments' \
|
||||
64\t'A Scheme API for test suites' \
|
||||
67\t'Compare procedures' \
|
||||
69\t'Basic hash tables' \
|
||||
71\t'Extended let-syntax for multiple values' \
|
||||
87\t'in case clauses' \
|
||||
88\t'Keyword Objects' \
|
||||
98\t'Accessing environment variables' \
|
||||
105\t'Curly-infix expressions' \
|
||||
111\t'Boxes' \
|
||||
119\t'Wisp: simpler indentation-sensitive Scheme'
|
||||
end
|
||||
|
||||
function __fish_guile__complete_function_names
|
||||
set -l path (commandline -poc |
|
||||
string match --regex '.*\\.scm$' |
|
||||
sed -n 1p)
|
||||
|
||||
test -e "$path" && begin
|
||||
cat $path |
|
||||
string match --all --groups-only --regex '\(\s*define\s+\(\s*(\w+)'
|
||||
end
|
||||
end
|
||||
|
||||
set -l command guile
|
||||
complete -c $command -f
|
||||
|
||||
complete -c $command -s h -l help -d 'Show help'
|
||||
complete -c $command -s v -l version -d 'Show version'
|
||||
complete -c $command -s s -F -r -d 'Specify the script to run'
|
||||
complete -c $command -s c -x -d 'Specify the code to run'
|
||||
|
||||
complete -c $command -s L -F -r \
|
||||
-d 'Specify the directory to prepend to module load path'
|
||||
|
||||
complete -c $command -s C -F -r \
|
||||
-d 'Specify the directory to prepend to module load path for compiled files'
|
||||
|
||||
complete -c $command -s x -x \
|
||||
-a '.scm\tdefault' \
|
||||
-d 'Specify the extension to prepend to extension list'
|
||||
|
||||
complete -c $command -s l -F -r -d 'Specify the script to load'
|
||||
|
||||
complete -c $command -s e -x \
|
||||
-a '(__fish_guile__complete_function_names)' \
|
||||
-d 'Specify the entry point of a script'
|
||||
|
||||
complete -c $command -o ds \
|
||||
-d 'Treat the last -s option as if it occurred at this point'
|
||||
|
||||
complete -c $command -l use-srfi \
|
||||
-a "(__fish_stripprefix='^--use-srfi=' __fish_complete_list , __fish_guile__complete_srfis)" \
|
||||
-d 'Specify the SRFI modules to load'
|
||||
|
||||
for standard in 6 7
|
||||
set -l option r$standard"rc"
|
||||
|
||||
complete -c $command -l $option \
|
||||
-d "Use $(string upper -- $option) compatible mode"
|
||||
end
|
||||
|
||||
complete -c $command -l debug -d 'Use debug mode'
|
||||
complete -c $command -l no-debug -d "Don't use debug mode"
|
||||
complete -c $command -s q -d "Don't load .guile file"
|
||||
|
||||
complete -c $command -l listen \
|
||||
-a '37146\tdefault' \
|
||||
-d 'Specify the port to list to'
|
||||
|
||||
complete -c $command -l auto-compile -d 'Compile scripts automatically'
|
||||
|
||||
complete -c $command -l fresh-auto-compile \
|
||||
-d 'Compile scripts automatically forcefully'
|
||||
|
||||
complete -c $command -l no-auto-compile -d "Don't compile scripts automatically"
|
||||
|
||||
complete -c $command -l language \
|
||||
-a 'scheme\tdefault elisp ecmascript' \
|
||||
-d 'Specify the language for sources'
|
||||
@@ -58,7 +58,7 @@ complete -c hashcat -l restore -d "Restore session from --session"
|
||||
complete -c hashcat -l restore-disable -d "Do not write restore file"
|
||||
complete -c hashcat -l restore-file-path -rF -d "Specific path to restore file"
|
||||
complete -c hashcat -s o -l outfile -rF -d "Define outfile for recovered hash"
|
||||
complete -c hashcat -l outfile-format -xa "(__fish_complete_list , __fish_hashcat_outfile_formats)" -d "Outfile formats to use"
|
||||
complete -c hashcat -l outfile-format -xa "(__fish_stripprefix='^--outfile-format=' __fish_complete_list , __fish_hashcat_outfile_formats)" -d "Outfile formats to use"
|
||||
complete -c hashcat -l outfile-autohex-disable -d "Disable the use of \$HEX[] in output plains"
|
||||
complete -c hashcat -l outfile-check-timer -x -d "Sets seconds between outfile checks"
|
||||
complete -c hashcat -l wordlist-autohex-disable -d "Disable the conversion of \$HEX[] from the wordlist"
|
||||
@@ -106,7 +106,7 @@ complete -c hashcat -l backend-ignore-metal -d "Do not try to open Metal interfa
|
||||
complete -c hashcat -l backend-ignore-opencl -d "Do not try to open OpenCL interface on startup"
|
||||
complete -c hashcat -s I -l backend-info -d "Show info about detected backend API devices"
|
||||
complete -c hashcat -s d -l backend-devices -x -d "Backend devices to use"
|
||||
complete -c hashcat -s D -l opencl-device-types -xa "(__fish_complete_list , __fish_hashcat_device_types)" -d "OpenCL device-types to use"
|
||||
complete -c hashcat -s D -l opencl-device-types -xa "(__fish_stripprefix='^(--opencl-device-types=|-\w*D)' __fish_complete_list , __fish_hashcat_device_types)" -d "OpenCL device-types to use"
|
||||
complete -c hashcat -s O -l optimized-kernel-enable -d "Enable optimized kernels (limits password length)"
|
||||
complete -c hashcat -s M -l multiply-accel-disable -d "Disable multiply kernel-accel with processor count"
|
||||
complete -c hashcat -s w -l workload-profile -d "Enable a specific workload profile" -xa "
|
||||
|
||||
@@ -15,7 +15,7 @@ complete -c htop -l readonly -d 'Disable all system and process changing feature
|
||||
complete -c htop -l version -s V -d 'Show version and exit'
|
||||
complete -c htop -l tree -s t -d 'Show processes in tree view'
|
||||
complete -c htop -l highlight-changes -s H -d 'Highlight new and old processes' -x
|
||||
complete -c htop -l drop-capabilites -d 'Drop unneeded Linux capabilites (Requires libpcap support)' -xka "
|
||||
complete -c htop -l drop-capabilities -d 'Drop unneeded Linux capabilities (Requires libpcap support)' -xka "
|
||||
off
|
||||
basic
|
||||
strict
|
||||
|
||||
29
share/completions/iftop.fish
Normal file
29
share/completions/iftop.fish
Normal file
@@ -0,0 +1,29 @@
|
||||
function __fish_iftop_sort_orders
|
||||
echo -e "2s\tSort by 2s traffic average"
|
||||
echo -e "10s\tSort by 10s traffic average (default)"
|
||||
echo -e "40s\tSort by 40s traffic average"
|
||||
echo -e "source\tSort by source address"
|
||||
echo -e "destination\tSort by destination address"
|
||||
end
|
||||
|
||||
complete -c iftop -f
|
||||
|
||||
complete -c iftop -s h -d "Print a summary of usage"
|
||||
complete -c iftop -s n -d "Don't do hostname lookups"
|
||||
complete -c iftop -s N -d "Don't resolve port number to service names"
|
||||
complete -c iftop -s p -d "Run in promiscuous mode"
|
||||
complete -c iftop -s P -d "Turn on port display"
|
||||
complete -c iftop -s l -d "Include link-local IPv6 addresses"
|
||||
complete -c iftop -s b -d "Don't display bar graphs of traffic"
|
||||
complete -c iftop -s m -x -d "Set the upper limit for the bandwidth scale"
|
||||
complete -c iftop -s B -d "Show bandwidth rates in bytes/s rather than bits/s"
|
||||
complete -c iftop -s i -xa "(__fish_print_interfaces)" -d "Listen to packets on interface"
|
||||
complete -c iftop -s f -x -d "Use filter code to select the packets to count"
|
||||
complete -c iftop -s F -x -d "Filter to only specified IPv4 network"
|
||||
complete -c iftop -s G -x -d "Filter to only specified IPv6 network"
|
||||
complete -c iftop -s c -r -d "Use specified config file"
|
||||
complete -c iftop -s o -xa "(__fish_iftop_sort_orders)" -d "Sort by specified column"
|
||||
|
||||
complete -c iftop -s t -d "Use text interface without ncurses"
|
||||
complete -c iftop -s L -x -d "Number of lines to print with -t"
|
||||
complete -c iftop -s s -x -d "With -t, print single output after specific number of seconds"
|
||||
@@ -14,7 +14,7 @@ set -l ip_all_commands $ip_commands $ip_addr $ip_link $ip_neigh $ip_route $ip_ru
|
||||
|
||||
function __fish_ip_commandwords
|
||||
set -l skip 0
|
||||
set -l cmd (commandline -xpc)
|
||||
set -l cmd (commandline -xpc | string escape)
|
||||
# Remove the first word because it's "ip" or an alias for it
|
||||
set -e cmd[1]
|
||||
set -l have_command 0
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
jj util completion fish | source
|
||||
# The reason for `__this-command-does-not-exist` is that, if dynamic completion
|
||||
# is not implemented, we'd like to get an error reliably. However, the
|
||||
# behavior of `jj` without arguments depends on the value of a config, see
|
||||
# https://jj-vcs.github.io/jj/latest/config/#default-command
|
||||
if set -l completion (COMPLETE=fish jj __this-command-does-not-exist 2>/dev/null)
|
||||
# jj is new enough for dynamic completions to be implemented
|
||||
printf %s\n $completion | source
|
||||
else
|
||||
jj util completion fish | source
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ function __fish_john_formats --description "Print JohnTheRipper hash formats"
|
||||
end
|
||||
|
||||
complete -c john -l help -d "print usage summary"
|
||||
complete -c john -l single -fa "(__fish_complete_list , __fish_john_rules)" -d "single crack mode"
|
||||
complete -c john -l single -fa "(__fish_stripprefix='^--single=' __fish_complete_list , __fish_john_rules)" -d "single crack mode"
|
||||
complete -c john -l single-seed -rf -d "add static seed word(s) for all salts in single mode"
|
||||
complete -c john -l single-wordlist -rF -d "short wordlist with static seed words/morphemes"
|
||||
complete -c john -l single-user-seed -rF -d "wordlist with seeds per username"
|
||||
@@ -35,8 +35,8 @@ complete -c john -l prince-case-permute -d "permute case of first letter"
|
||||
complete -c john -l prince-mmap -d "memory-map infile"
|
||||
complete -c john -l prince-keyspace -d "just show total keyspace that would be produced"
|
||||
complete -c john -l encoding -l input-encoding -fa "$__fish_john_encodings" -d "input encoding"
|
||||
complete -c john -l rules -fa "(__fish_complete_list , __fish_john_rules)" -d "enable word mangling rules"
|
||||
complete -c john -l rules-stack -fa "(__fish_complete_list , __fish_john_rules)" -d "stacked rules"
|
||||
complete -c john -l rules -fa "(__fish_stripprefix='^--rules=' __fish_complete_list , __fish_john_rules)" -d "enable word mangling rules"
|
||||
complete -c john -l rules-stack -fa "(__fish_stripprefix='^--rules-stack=' __fish_complete_list , __fish_john_rules)" -d "stacked rules"
|
||||
complete -c john -l rules-skip-nop -d "skip any NOP rules"
|
||||
complete -c john -l incremental -fa "(john --list=inc-modes 2>/dev/null)" -d "incremental mode"
|
||||
complete -c john -l incremental-charcount -rf -d "override CharCount for incremental mode"
|
||||
@@ -97,4 +97,4 @@ complete -c john -l internal-codepage -fa "$__fish_john_encodings" -d "codepage
|
||||
complete -c john -l target-encoding -fa "$__fish_john_encodings" -d "output encoding"
|
||||
complete -c john -l tune -fa "auto report N" -d "tuning options"
|
||||
complete -c john -l force-tty -d "set up terminal for reading keystrokes"
|
||||
complete -c john -l format -fa "(__fish_complete_list , __fish_john_formats)" -d "force hash type"
|
||||
complete -c john -l format -fa "(__fish_stripprefix='^--format=' __fish_complete_list , __fish_john_formats)" -d "force hash type"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user