mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-22 10:11:13 -03:00
Compare commits
374 Commits
release-mo
...
test-drive
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc63404c96 | ||
|
|
5507bcc425 | ||
|
|
c3442602ef | ||
|
|
3437d63507 | ||
|
|
695ae02aa5 | ||
|
|
e1059b5e43 | ||
|
|
f1cf64fba0 | ||
|
|
8304fd0fd0 | ||
|
|
f4f786633d | ||
|
|
ec3b3fe321 | ||
|
|
d3762f11b5 | ||
|
|
6db0f39676 | ||
|
|
7970ca55af | ||
|
|
ccbbae95ef | ||
|
|
6d551b4459 | ||
|
|
cc9083e220 | ||
|
|
14df28382d | ||
|
|
e6d57f2fb2 | ||
|
|
4def0ac616 | ||
|
|
b574a5e4f6 | ||
|
|
9b67b2ae07 | ||
|
|
ea4e4a4279 | ||
|
|
3405621dee | ||
|
|
834001087d | ||
|
|
e697add5b5 | ||
|
|
704b911168 | ||
|
|
af137e5e96 | ||
|
|
75832b3c5d | ||
|
|
dda4371679 | ||
|
|
10f1f21a4f | ||
|
|
109ef88831 | ||
|
|
f9b79926f1 | ||
|
|
6c3150aa05 | ||
|
|
07dd088d76 | ||
|
|
93e0a33d41 | ||
|
|
dcddffd222 | ||
|
|
d842a6560e | ||
|
|
b4e8cc8b79 | ||
|
|
83eb25d45f | ||
|
|
7eb254f2ba | ||
|
|
2e12a2b6c4 | ||
|
|
a780e4da15 | ||
|
|
33dd823f45 | ||
|
|
e11e62674f | ||
|
|
e49dde87cc | ||
|
|
edfdf210c4 | ||
|
|
996fec87f4 | ||
|
|
870a8f77a0 | ||
|
|
d823444c6e | ||
|
|
abaeb4af2a | ||
|
|
670541eec8 | ||
|
|
0debddc9e5 | ||
|
|
837c32f150 | ||
|
|
9b26fff278 | ||
|
|
2b46d97c68 | ||
|
|
65ced4e2bb | ||
|
|
3710142d1d | ||
|
|
0c9c5e3a34 | ||
|
|
53912777af | ||
|
|
70bd49f612 | ||
|
|
6714818e5d | ||
|
|
7e9b35be48 | ||
|
|
7af9844de0 | ||
|
|
3129c9e939 | ||
|
|
967c4b2272 | ||
|
|
1c4e5cadf2 | ||
|
|
532abaddae | ||
|
|
7049352e61 | ||
|
|
a4f4ae76cb | ||
|
|
c3de539d46 | ||
|
|
7bb38355e8 | ||
|
|
5520ee3c65 | ||
|
|
e66f6878b5 | ||
|
|
e9b9ee8d63 | ||
|
|
17d57b70d0 | ||
|
|
cb3d004a5a | ||
|
|
5e10d75a19 | ||
|
|
050fe09af1 | ||
|
|
b531cc8b43 | ||
|
|
63e705a778 | ||
|
|
1df8de06c1 | ||
|
|
943adf4dd0 | ||
|
|
53dc7772eb | ||
|
|
64ed47bf4e | ||
|
|
6848e70e87 | ||
|
|
d5efef1cc5 | ||
|
|
e715c3e3ff | ||
|
|
13763fa318 | ||
|
|
8910390602 | ||
|
|
b6c2a4c5db | ||
|
|
a88de9d345 | ||
|
|
e8801d2ced | ||
|
|
1d620356f8 | ||
|
|
8bb6597b9b | ||
|
|
8ae12973df | ||
|
|
459fc3c887 | ||
|
|
a719f9d537 | ||
|
|
da0a93b24b | ||
|
|
8bb442f135 | ||
|
|
3fcc6482cb | ||
|
|
83b0294fc9 | ||
|
|
84f19a931d | ||
|
|
3201cb9f01 | ||
|
|
e1e963ae66 | ||
|
|
ca9c5f4cec | ||
|
|
48ae19b4b1 | ||
|
|
7ec1487016 | ||
|
|
bc26481558 | ||
|
|
41e82c8c9e | ||
|
|
376bf3a982 | ||
|
|
1e384900fa | ||
|
|
cde503b0a8 | ||
|
|
69f0d960cf | ||
|
|
ca28d0a78f | ||
|
|
6043644f52 | ||
|
|
1227b6765c | ||
|
|
905c7310c6 | ||
|
|
b1064ac3a0 | ||
|
|
1bda6043c8 | ||
|
|
d8d5913159 | ||
|
|
2ac1523e54 | ||
|
|
9cea5e0732 | ||
|
|
6f9ca42a30 | ||
|
|
b8df9648f2 | ||
|
|
66b80041cc | ||
|
|
a579abb81b | ||
|
|
b97598fa6c | ||
|
|
64cb86ac26 | ||
|
|
a14906f52f | ||
|
|
36d7049749 | ||
|
|
4b9767ce83 | ||
|
|
f6d76d2057 | ||
|
|
659c926dbd | ||
|
|
56da15d11f | ||
|
|
5e59762117 | ||
|
|
69fdbc89d6 | ||
|
|
244c55f9ce | ||
|
|
b7ae159824 | ||
|
|
6dad396498 | ||
|
|
f5a02e590d | ||
|
|
36c632889b | ||
|
|
c473aa60a7 | ||
|
|
6515862095 | ||
|
|
94dfe1b053 | ||
|
|
0b52b72ebc | ||
|
|
eade6a5672 | ||
|
|
044cea1bf3 | ||
|
|
74b1247461 | ||
|
|
9b8793a2df | ||
|
|
6c63139d23 | ||
|
|
f3dd4ee022 | ||
|
|
7bafb0d1ae | ||
|
|
46072e0fd6 | ||
|
|
c09a9246a1 | ||
|
|
e2596d13cd | ||
|
|
0153579a4c | ||
|
|
c1b460525c | ||
|
|
5de6f4bb3d | ||
|
|
54cc932215 | ||
|
|
e3864c752a | ||
|
|
03a9f4a775 | ||
|
|
7e5af914be | ||
|
|
ab4606430e | ||
|
|
774b7c7b5b | ||
|
|
6b1a9ef7ce | ||
|
|
c74afd4198 | ||
|
|
3dc49d9d93 | ||
|
|
b19a467ea6 | ||
|
|
381b38af0a | ||
|
|
965bc78d33 | ||
|
|
610338cc70 | ||
|
|
f9fb026085 | ||
|
|
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 |
@@ -24,4 +24,4 @@ tasks:
|
||||
ninja
|
||||
- test: |
|
||||
cd fish-shell/build
|
||||
env ninja test
|
||||
ninja test
|
||||
|
||||
@@ -20,4 +20,4 @@ tasks:
|
||||
ninja
|
||||
- test: |
|
||||
cd fish/build
|
||||
env ninja test
|
||||
ninja test
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -20,7 +20,6 @@ linux_task:
|
||||
# container:
|
||||
# <<: *step
|
||||
# image: ghcr.io/krobelus/fish-ci/focal-32bit:latest
|
||||
|
||||
tests_script:
|
||||
# cirrus at times gives us 32 procs and 2 GB of RAM
|
||||
# Unrestriced parallelism results in OOM
|
||||
@@ -30,7 +29,6 @@ linux_task:
|
||||
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCTEST_PARALLEL_LEVEL=6 ..
|
||||
- ninja -j 6 fish
|
||||
- ninja fish_run_tests
|
||||
|
||||
only_if: $CIRRUS_REPO_OWNER == 'fish-shell'
|
||||
|
||||
linux_arm_task:
|
||||
@@ -41,7 +39,6 @@ linux_arm_task:
|
||||
- name: jammy-armv7-32bit
|
||||
arm_container:
|
||||
image: ghcr.io/fish-shell/fish-ci/jammy-armv7-32bit
|
||||
|
||||
tests_script:
|
||||
# cirrus at times gives us 32 procs and 2 GB of RAM
|
||||
# Unrestriced parallelism results in OOM
|
||||
@@ -52,7 +49,6 @@ linux_arm_task:
|
||||
- ninja -j 6 fish
|
||||
- file ./fish
|
||||
- ninja fish_run_tests
|
||||
|
||||
# CI task disabled during RIIR transition
|
||||
only_if: false && $CIRRUS_REPO_OWNER == 'fish-shell'
|
||||
|
||||
@@ -92,5 +88,4 @@ freebsd_task:
|
||||
- sudo -u fish-user -s cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCTEST_PARALLEL_LEVEL=1 ..
|
||||
- sudo -u fish-user sh -c '. $HOME/.cargo/env; ninja -j 6 fish'
|
||||
- sudo -u fish-user sh -c '. $HOME/.cargo/env; ninja fish_run_tests'
|
||||
|
||||
only_if: $CIRRUS_REPO_OWNER == 'fish-shell'
|
||||
|
||||
@@ -22,7 +22,7 @@ indent_size = 2
|
||||
indent_size = 2
|
||||
|
||||
[share/{completions,functions}/**.fish]
|
||||
max_line_length = off
|
||||
max_line_length = unset
|
||||
|
||||
[{COMMIT_EDITMSG,git-revise-todo}]
|
||||
max_line_length = 80
|
||||
|
||||
4
.github/workflows/mac_codesign.yml
vendored
4
.github/workflows/mac_codesign.yml
vendored
@@ -13,8 +13,8 @@ jobs:
|
||||
uses: dtolnay/rust-toolchain@1.73.0
|
||||
with:
|
||||
targets: x86_64-apple-darwin
|
||||
- name: Install Rust 1.79
|
||||
uses: dtolnay/rust-toolchain@1.79
|
||||
- name: Install Rust Stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: aarch64-apple-darwin
|
||||
- name: build-and-codesign
|
||||
|
||||
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
|
||||
|
||||
83
.github/workflows/staticbuild.yml
vendored
Normal file
83
.github/workflows/staticbuild.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
name: staticbuilds
|
||||
|
||||
on:
|
||||
# release:
|
||||
# types: [published]
|
||||
# schedule:
|
||||
# - cron: "14 13 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CTEST_PARALLEL_LEVEL: "1"
|
||||
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
||||
|
||||
jobs:
|
||||
staticbuilds-linux:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@1.70
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Prepare
|
||||
run: |
|
||||
sudo apt install python3-sphinx
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
rustup target add aarch64-unknown-linux-musl
|
||||
sudo apt install musl-tools crossbuild-essential-arm64 python3-pexpect tmux -y
|
||||
- name: Build
|
||||
run: |
|
||||
CFLAGS="$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
|
||||
cargo build --release --target x86_64-unknown-linux-musl
|
||||
- name: Test
|
||||
run: |
|
||||
FISHDIR=target/x86_64-unknown-linux-musl/release/ tests/test_driver.sh tests/test.fish
|
||||
FISHDIR=target/x86_64-unknown-linux-musl/release/ tests/test_driver.sh tests/interactive.fish
|
||||
- name: Compress
|
||||
run: |
|
||||
tar -cazf fish-amd64.tar.xz -C target/x86_64-unknown-linux-musl/release/ fish{,_indent,_key_reader}
|
||||
tar -cazf fish-aarch64.tar.xz -C target/aarch64-unknown-linux-musl/release/ fish{,_indent,_key_reader}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fish-static-linux
|
||||
path: |
|
||||
fish-amd64.tar.xz
|
||||
fish-aarch64.tar.xz
|
||||
retention-days: 14
|
||||
staticbuilds-macos:
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@1.70
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Prepare
|
||||
run: |
|
||||
sudo pip3 install --break-system-packages sphinx
|
||||
rustup target add x86_64-apple-darwin
|
||||
rustup target add aarch64-apple-darwin
|
||||
- name: Build
|
||||
run: |
|
||||
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target aarch64-apple-darwin
|
||||
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-apple-darwin
|
||||
- name: Compress
|
||||
run: |
|
||||
tar -cazf fish-macos-aarch64.tar.xz -C target/aarch64-apple-darwin/release/ fish{,_indent,_key_reader}
|
||||
tar -cazf fish-macos-amd64.tar.xz -C target/x86_64-apple-darwin/release/ fish{,_indent,_key_reader}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fish-static-macos
|
||||
path: |
|
||||
fish-macos-amd64.tar.xz
|
||||
fish-macos-aarch64.tar.xz
|
||||
retention-days: 14
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -102,3 +102,6 @@ target/
|
||||
|
||||
# Generated by clangd
|
||||
/.cache
|
||||
|
||||
# JetBrains editors.
|
||||
.idea/
|
||||
|
||||
251
CHANGELOG.rst
251
CHANGELOG.rst
@@ -1,25 +1,52 @@
|
||||
fish 3.8.0 (released ???)
|
||||
===================================
|
||||
fish 4.1.0 (released ???)
|
||||
=========================
|
||||
|
||||
.. 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
|
||||
Notable improvements and fixes
|
||||
------------------------------
|
||||
|
||||
The entirety of fish's C++ code has been ported to Rust (:issue:`9512`).
|
||||
Deprecations and removed features
|
||||
---------------------------------
|
||||
|
||||
Scripting improvements
|
||||
----------------------
|
||||
|
||||
Interactive improvements
|
||||
------------------------
|
||||
- Autosuggestions are now also provided in multi-line command lines. Like `ctrl-r`, autosuggestions operate only on the current line.
|
||||
- New feature flag ``buffered-enter-noexec`` with the following effect:
|
||||
when typing a command and :kbd:`enter` while the previous one is still running, the new one will no longer execute immediately. Similarly, keys that are bound to shell commands will be ignored.
|
||||
This mitigates a security issue where a command like ``cat malicious-file.txt`` could write terminal escape codes prompting the terminal to write arbitrary text to fish's standard input.
|
||||
Such a malicious file can still potentially insert arbitrary text into the command line but can no longer execute it directly (:issue:`10987`).
|
||||
|
||||
New or improved bindings
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
- :kbd:`ctrl-z` (undo) after executing a command will restore the previous cursor position instead of placing the cursor at the end of the command line.
|
||||
- The OSC 133 prompt marking feature has learned about kitty's ``click_events=1`` flag, which allows moving fish's cursor by clicking.
|
||||
- :kbd:`ctrl-l` no longer clears the screen but only pushes to the terminal's scrollback all text above the prompt (via a new special input function ``scrollback-push``).
|
||||
This feature depends on the terminal advertising via XTGETTCAP support for the ``indn`` and ``cuu`` terminfo capabilities,
|
||||
and on the terminal supporting Synchronized Output (which is used by fish to detect features).
|
||||
If any is missing, the binding falls back to ``clear-screen``.
|
||||
|
||||
Completions
|
||||
^^^^^^^^^^^
|
||||
|
||||
Improved terminal support
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Other improvements
|
||||
------------------
|
||||
|
||||
For distributors
|
||||
----------------
|
||||
|
||||
fish 4.0b1 (released December 17, 2024)
|
||||
=======================================
|
||||
|
||||
These are the draft release notes for fish 4.0.0. Like this release of fish itself, they are in beta and are not complete. Please report any issues you find.
|
||||
|
||||
.. ignore: 751 2037 2037 3017 3018 3162 3299 4770 4865 5284 5991 6981 6996 7172 9332 9439 9440 9442 9452 9469 9480 9482 9520 9536 9541 9542 9544 9554 9556 9559 9561 9563 9566 9567 9568 9573 9575 9576 9579 9585 9586 9588 9589 9591 9592 9593 9594 9599 9600 9603 9607 9608 9612 9613 9615 9616 9619 9621 9625 9626 9630 9636 9637 9638 9641 9642 9643 9653 9654 9658 9661 9666 9671 9673 9688 9725 9726 9729 9735 9739 9745 9746 9751 9754 9765 9767 9768 9771 9777 9778 9786 9816 9818 9821 9839 9845 9856 9859 9861 9863 9864 9867 9869 9873 9874 9879 9881 9893 9894 9896 9902 9916 9923 9925 9927 9928 9930 9947 9948 9950 9952 9962 9963 9966 9968 9980 9981 9984 9990 9991 10040 10061 10090 10101 10102 10108 10114 10115 10121 10128 10129 10143 10145 10146 10161 10173 10174 10175 10179 10180 10181 10182 10184 10185 10186 10188 10195 10198 10200 10201 10204 10210 10214 10219 10220 10222 10223 10227 10228 10232 10235 10237 10241 10243 10244 10245 10246 10251 10254 10260 10263 10267 10268 10270 10272 10276 10277 10278 10279 10281 10288 10290 10291 10293 10305 10306 10307 10308 10309 10316 10317 10321 10327 10328 10329 10330 10336 10338 10340 10342 10345 10346 10347 10348 10349 10353 10354 10355 10356 10357 10358 10360 10366 10368 10370 10371 10372 10373 10377 10379 10381 10388 10389 10390 10395 10398 10400 10403 10404 10407 10408 10409 10411 10412 10415 10417 10418 10427 10429 10434 10438 10439 10440 10441 10442 10443 10445 10446 10448 10450 10451 10452 10456 10457 10462 10463 10464 10466 10467 10471 10473 10474 10479 10481 10485 10486 10487 10490 10491 10492 10494 10499 10500 10503 10505 10507 10508 10509 10510 10511 10512 10513 10518 10519 10520 10524 10528 10529 10530 10538 10541 10542 10547 10548 10549 10555 10560 10562 10564 10565 10568 10569 10572 10573 10574 10575 10578 10580 10582 10583 10588 10591 10594 10595 10596 10609 10622 10623 10627 10628 10634 10635 10636 10637 10640 10646 10647 10649 10650 10652 10653 10654 10655 10657 10659 10662 10664 10667 10669 10670 10674 10679 10681 10685 10686 10687 10688 10689 10697 10698 10702 10707 10708 10712 10713 10716 10718 10719 10721 10726 10727 10728 10731 10760 10762 10763 10767 10770 10775 10776 10778 10779 10782 10784 10789 10792 10795 10796 10801 10812 10817 10825 10836 10839 10844 10845 10847 10851 10858 10863 10864 10873 10874 10880 10885 10891 10894 10907
|
||||
|
||||
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.
|
||||
Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
|
||||
|
||||
@@ -29,36 +56,35 @@ 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.
|
||||
- Terminals that fail to ignore unrecognized OSC or CSI sequences may display garbage. We know cool-retro-term and emacs' ansi-term are affected,
|
||||
most mainstream terminals are not.
|
||||
- :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:`alt-backspace` will delete an entire argument, not just one word. The old word behavior has been moved to :kbd:`ctrl-backspace`. If your terminal doesn't support `ctrl-backspace`, consider using :kbd:`ctrl-w`, or :kbd:`alt-b` + :kbd:`alt-d`.
|
||||
- ``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.
|
||||
|
||||
- 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,127 +92,128 @@ 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.
|
||||
- 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/``. 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`).
|
||||
- :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 ``for mode in (bind --list-modes); bind -M $mode ctrl-c cancel-commandline-traditional; end`` (: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`).
|
||||
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.
|
||||
- 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.
|
||||
|
||||
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`)
|
||||
|
||||
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``.
|
||||
- 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`).
|
||||
|
||||
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.
|
||||
- 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.
|
||||
- New default cursor shapes for insert and replace mode.
|
||||
- Insert-mode :kbd:`ctrl-n` 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`).
|
||||
@@ -196,51 +223,51 @@ New or improved bindings
|
||||
- Deleting in visual mode now moves the cursor back, matching vi (:issue:`10394`).
|
||||
- Support :kbd:`%` motion (:issue:`10593`).
|
||||
- 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`).
|
||||
- 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.
|
||||
- Various new completion scripts and numerous updates to existing ones.
|
||||
- Generated completions are now stored in ``$XDG_CACHE_HOME/fish`` or ``~/.cache/fish`` by default (:issue:`10369`)
|
||||
|
||||
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`).
|
||||
- ``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 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`).
|
||||
- Additional filesystems such as AFS are properly detected as remote, which avoids certain hangs due to expensive filesystem locks (:issue:`10818`).
|
||||
|
||||
.. _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 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.
|
||||
|
||||
Some smaller changes:
|
||||
|
||||
- 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`).
|
||||
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.
|
||||
|
||||
--------------
|
||||
|
||||
|
||||
@@ -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}
|
||||
&&
|
||||
@@ -80,8 +81,6 @@ create_target(fish_key_reader)
|
||||
# Set up the docs.
|
||||
include(cmake/Docs.cmake)
|
||||
|
||||
# A helper for running tests.
|
||||
add_executable(fish_test_helper src/fish_test_helper.c)
|
||||
# Set up tests.
|
||||
include(cmake/Tests.cmake)
|
||||
|
||||
|
||||
@@ -126,4 +126,3 @@ enforcement ladder](https://github.com/mozilla/diversity).
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
|
||||
|
||||
@@ -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 test`` 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
|
||||
|
||||
@@ -196,8 +196,13 @@ The tests can be found in three places:
|
||||
- tests/pexpects for interactive tests using `pexpect <https://pexpect.readthedocs.io/en/stable/>`__
|
||||
|
||||
When in doubt, the bulk of the tests should be added as a littlecheck test in tests/checks, as they are the easiest to modify and run, and much faster and more dependable than pexpect tests. The syntax is fairly self-explanatory. It's a fish script with the expected output in ``# CHECK:`` or ``# CHECKERR:`` (for stderr) comments.
|
||||
If your littlecheck test has a specific dependency, use ``# REQUIRE: ...`` with a posix sh script.
|
||||
|
||||
The pexpects are written in python and can simulate input and output to/from a terminal, so they are needed for anything that needs actual interactivity. The runner is in build_tools/pexpect_helper.py, in case you need to modify something there.
|
||||
Tests are run in a temporary $HOME, but that is shared among the tests by default. If you need a temporary directory for your test, you should create one (e.g. with ``mktemp``).
|
||||
|
||||
The pexpects are written in python and can simulate input and output to/from a terminal, so they are needed for anything that needs actual interactivity. The runner is in tests/pexpect_helper.py, in case you need to modify something there.
|
||||
|
||||
If you need a command to do something weird to test something, maybe add it to the ``fish_test_helper`` binary (in tests/fish_test_helper.c), or see if it can already do it.
|
||||
|
||||
Local testing
|
||||
-------------
|
||||
@@ -209,6 +214,15 @@ The tests can be run on your local computer on all operating systems.
|
||||
cmake path/to/fish-shell
|
||||
make test
|
||||
|
||||
Or you can run them on a fish, without involving cmake::
|
||||
|
||||
cargo build
|
||||
FISHDIR=target/debug tests/test_driver.sh tests/test.fish # script tests, the checks
|
||||
FISHDIR=target/debug tests/test_driver.sh tests/interactive.fish # interactive tests, the pexpects
|
||||
|
||||
Here, ``FISHDIR`` refers to a directory with ``fish``, ``fish_indent`` and ``fish_key_reader`` in it.
|
||||
In this example we're in the root of the git repo and have run ``cargo build`` without ``--release``, so it's a debug build.
|
||||
|
||||
Git hooks
|
||||
---------
|
||||
|
||||
@@ -322,12 +336,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.
|
||||
|
||||
2
COPYING
2
COPYING
@@ -1,7 +1,7 @@
|
||||
Fish is a smart and user-friendly command line shell.
|
||||
|
||||
Copyright (C) 2005-2009 Axel Liljencrantz
|
||||
Copyright (C) 2009-2024 fish-shell contributors
|
||||
Copyright (C) 2009- fish-shell contributors
|
||||
|
||||
fish is free software.
|
||||
|
||||
|
||||
241
Cargo.lock
generated
241
Cargo.lock
generated
@@ -4,9 +4,9 @@ version = 3
|
||||
|
||||
[[package]]
|
||||
name = "allocator-api2"
|
||||
version = "0.2.18"
|
||||
version = "0.2.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
|
||||
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
@@ -21,10 +21,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.1.30"
|
||||
name = "block-buffer"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945"
|
||||
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
@@ -44,16 +53,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
||||
|
||||
[[package]]
|
||||
name = "dashmap"
|
||||
version = "5.5.3"
|
||||
name = "cpufeatures"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
|
||||
checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"hashbrown 0.14.5",
|
||||
"lock_api",
|
||||
"once_cell",
|
||||
"parking_lot_core",
|
||||
"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 = "digest"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -64,9 +89,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.9"
|
||||
version = "0.3.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
|
||||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
@@ -74,13 +99,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fish"
|
||||
version = "0.1.0"
|
||||
version = "4.0.0-beta.1"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
"errno",
|
||||
"fish-printf",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"lru",
|
||||
"nix",
|
||||
@@ -90,6 +114,7 @@ dependencies = [
|
||||
"portable-atomic",
|
||||
"rand",
|
||||
"rsconf",
|
||||
"rust-embed",
|
||||
"serial_test",
|
||||
"terminfo",
|
||||
"widestring",
|
||||
@@ -111,21 +136,25 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
|
||||
checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
|
||||
|
||||
[[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"
|
||||
version = "0.15.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
|
||||
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"equivalent",
|
||||
@@ -141,17 +170,11 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.159"
|
||||
version = "0.2.169"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
|
||||
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
@@ -175,7 +198,7 @@ version = "0.12.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
|
||||
dependencies = [
|
||||
"hashbrown 0.15.0",
|
||||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -316,24 +339,24 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.9.0"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2"
|
||||
checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.87"
|
||||
version = "1.0.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
|
||||
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.37"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
@@ -355,9 +378,9 @@ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.7"
|
||||
version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
|
||||
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
@@ -371,6 +394,58 @@ 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",
|
||||
"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 = "scc"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "28e1c91382686d21b5ac7959341fcb9780fa7c03773646995a87c950fa7be640"
|
||||
dependencies = [
|
||||
"sdd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.2.0"
|
||||
@@ -378,28 +453,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "serial_test"
|
||||
version = "1.0.0"
|
||||
name = "sdd"
|
||||
version = "3.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "538c30747ae860d6fb88330addbbd3e0ddbe46d662d032855596d8a8ca260611"
|
||||
checksum = "478f121bb72bbf63c52c93011ea1791dca40140dfe13f8336c4c5ac952c33aa9"
|
||||
|
||||
[[package]]
|
||||
name = "serial_test"
|
||||
version = "3.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"lazy_static",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"scc",
|
||||
"serial_test_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serial_test_derive"
|
||||
version = "1.0.0"
|
||||
version = "3.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69"
|
||||
checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[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]]
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
@@ -420,9 +512,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.109"
|
||||
version = "2.0.94"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -442,10 +534,32 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.13"
|
||||
name = "typenum"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||
|
||||
[[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"
|
||||
@@ -454,10 +568,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
name = "winapi-util"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
17
Cargo.toml
17
Cargo.toml
@@ -3,6 +3,7 @@ resolver = "2"
|
||||
members = ["printf"]
|
||||
|
||||
[workspace.package]
|
||||
# To build revisions that use Corrosion (those before 2024-01), CMake 3.19 and Rustc 1.78 seem to work.
|
||||
rust-version = "1.70"
|
||||
edition = "2021"
|
||||
|
||||
@@ -10,9 +11,13 @@ edition = "2021"
|
||||
overflow-checks = true
|
||||
lto = true
|
||||
|
||||
[profile.release-with-debug]
|
||||
inherits = "release"
|
||||
debug = true
|
||||
|
||||
[package]
|
||||
name = "fish"
|
||||
version = "0.1.0"
|
||||
version = "4.0.0-beta.1"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
default-run = "fish"
|
||||
@@ -30,8 +35,7 @@ pcre2 = { git = "https://github.com/fish-shell/rust-pcre2", tag = "0.2.9-utf32",
|
||||
|
||||
bitflags = "2.5.0"
|
||||
errno = "0.3.0"
|
||||
lazy_static = "1.4.0"
|
||||
libc = "0.2.155"
|
||||
libc = "0.2"
|
||||
# lru pulls in hashbrown by default, which uses a faster (though less DoS resistant) hashing algo.
|
||||
# disabling default features uses the stdlib instead, but it doubles the time to rewrite the history
|
||||
# files as of 22 April 2024.
|
||||
@@ -53,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 = [
|
||||
@@ -60,7 +65,7 @@ portable-atomic = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = { version = "1.0.0", default-features = false }
|
||||
serial_test = { version = "3", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0.94"
|
||||
@@ -83,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 = []
|
||||
@@ -97,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"
|
||||
|
||||
@@ -16,4 +16,3 @@ WORKDIR /src
|
||||
RUN cmake3 . &&\
|
||||
make &&\
|
||||
make install
|
||||
|
||||
|
||||
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
|
||||
--------------------------------
|
||||
|
||||
@@ -8,5 +8,4 @@ for file in *.fish
|
||||
echo FAILING FILE $file
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
175
build.rs
175
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,117 @@ 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");
|
||||
let jjdir = Path::new(env!("CARGO_MANIFEST_DIR")).join(".jj");
|
||||
let commit_id = if gitdir.exists() {
|
||||
// .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)
|
||||
read_to_string(refpath)?
|
||||
} else if jjdir.exists() {
|
||||
let output = Command::new("jj")
|
||||
.args([
|
||||
"log",
|
||||
"--revisions",
|
||||
"@",
|
||||
"--no-graph",
|
||||
"--ignore-working-copy",
|
||||
"--template",
|
||||
"commit_id",
|
||||
])
|
||||
.output()
|
||||
.unwrap();
|
||||
String::from_utf8_lossy(&output.stdout).to_string()
|
||||
} else {
|
||||
return Err("did not find either of .git or .jj".into());
|
||||
};
|
||||
let refstr = &commit_id[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
|
||||
|
||||
@@ -142,7 +142,7 @@ 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)"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
code, tt {
|
||||
font-family: ui-monospace, Menlo, monospace;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -54,6 +54,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,18 +64,13 @@ 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"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
# Copy littlecheck.py
|
||||
configure_file(build_tools/littlecheck.py littlecheck.py COPYONLY)
|
||||
|
||||
# Copy pexpect_helper.py
|
||||
configure_file(build_tools/pexpect_helper.py pexpect_helper.py COPYONLY)
|
||||
|
||||
# Suppress generating Xcode schemes for all tests, there's too many.
|
||||
set(CMAKE_XCODE_GENERATE_SCHEME 0)
|
||||
|
||||
@@ -93,22 +89,19 @@ add_custom_target(tests_buildroot_target
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_INSTALL_DIR}
|
||||
COMMAND env DESTDIR=${TEST_INSTALL_DIR} ${CMAKE_COMMAND}
|
||||
--build ${CMAKE_CURRENT_BINARY_DIR} --target install
|
||||
# Put fish_test_helper there too:
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/fish_test_helper
|
||||
${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}/bin
|
||||
# Also symlink fish to where the tests expect it to be:
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}
|
||||
${TEST_ROOT_DIR}
|
||||
DEPENDS fish fish_test_helper)
|
||||
DEPENDS fish)
|
||||
|
||||
FILE(GLOB FISH_CHECKS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/checks/*.fish)
|
||||
foreach(CHECK ${FISH_CHECKS})
|
||||
get_filename_component(CHECK_NAME ${CHECK} NAME)
|
||||
get_filename_component(CHECK ${CHECK} NAME_WE)
|
||||
add_test(NAME ${CHECK_NAME}
|
||||
COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/tests/test_driver.sh
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests/test.fish ${CHECK}
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests/test_driver.py ${CMAKE_CURRENT_BINARY_DIR}
|
||||
checks/${CHECK}.fish
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
set_tests_properties(${CHECK_NAME} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
@@ -120,8 +113,8 @@ FILE(GLOB PEXPECTS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/pexpects/*.py)
|
||||
foreach(PEXPECT ${PEXPECTS})
|
||||
get_filename_component(PEXPECT ${PEXPECT} NAME)
|
||||
add_test(NAME ${PEXPECT}
|
||||
COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/tests/test_driver.sh
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests/interactive.fish ${PEXPECT}
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests/test_driver.py ${CMAKE_CURRENT_BINARY_DIR}
|
||||
pexpects/${PEXPECT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
set_tests_properties(${PEXPECT} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
@@ -153,7 +146,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})
|
||||
|
||||
29
debian/control
vendored
29
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,21 @@ 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)
|
||||
# for col and lock
|
||||
Depends: bsdextrautils,
|
||||
file,
|
||||
# for the gettext command
|
||||
gettext-base,
|
||||
# for nroff and preconv
|
||||
groff-base,
|
||||
man-db,
|
||||
# for terminal definitions
|
||||
ncurses-base,
|
||||
# for kill
|
||||
procps,
|
||||
python3 (>=3.5),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Conflicts: fish-common
|
||||
Recommends: xsel (>=1.2.0)
|
||||
Suggests: xdg-utils
|
||||
|
||||
4
debian/copyright
vendored
4
debian/copyright
vendored
@@ -5,12 +5,12 @@ Source: https://fishshell.com/
|
||||
|
||||
Files: *
|
||||
Copyright: 2005-2009 Axel Liljencrantz <axel@liljencrantz.se>
|
||||
2009-2024 fish-shell contributors
|
||||
2009- fish-shell contributors
|
||||
License: GPL-2
|
||||
|
||||
Files: doc_src/python_docs_theme/*
|
||||
Copyright: 2001-2017 Python Software Foundation
|
||||
2020-2024 fish-shell contributors
|
||||
2020- fish-shell contributors
|
||||
License: Python
|
||||
|
||||
Files: share/tools/web_config/js/alpine.js
|
||||
|
||||
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>`.
|
||||
|
||||
|
||||
@@ -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-`` and ``shift-``.
|
||||
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`.
|
||||
@@ -171,7 +171,10 @@ The following special input functions are available:
|
||||
make the current word begin with a capital letter
|
||||
|
||||
``clear-screen``
|
||||
clears the screen and redraws the prompt. if the terminal doesn't support clearing the screen it is the same as ``repaint``.
|
||||
clears the screen and redraws the prompt.
|
||||
|
||||
``scrollback-push``
|
||||
pushes earlier output to the terminal scrollback, positioning the prompt at the top.
|
||||
|
||||
``complete``
|
||||
guess the remainder of the current token
|
||||
@@ -259,7 +262,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 +272,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 +295,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
|
||||
|
||||
@@ -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.
|
||||
@@ -40,6 +40,12 @@ The following options are available:
|
||||
**-i** or **--interactive**
|
||||
The shell is interactive.
|
||||
|
||||
**--install[=PATH]**
|
||||
When built as self-installable (via cargo), this will unpack fish's datafiles 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 datafiles to PATH/share/fish and copy itself to PATH/bin/fish.
|
||||
|
||||
**-l** or **--login**
|
||||
Act as if invoked as a login shell.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ Synopsis
|
||||
status job-control CONTROL_TYPE
|
||||
status features
|
||||
status test-feature FEATURE
|
||||
status buildinfo
|
||||
|
||||
Description
|
||||
-----------
|
||||
@@ -97,6 +98,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.
|
||||
|
||||
|
||||
@@ -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
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -59,15 +59,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(
|
||||
("fish_indent", "--version"), 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 "!$".
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -382,7 +386,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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2023,6 +2024,7 @@ You can see the current list of features via ``status features``::
|
||||
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
|
||||
buffered-enter-noexec off 4.1 enter typed while executing will not execute
|
||||
|
||||
Here is what they mean:
|
||||
|
||||
@@ -2032,6 +2034,7 @@ Here is what they mean:
|
||||
- ``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.
|
||||
- ``buffered-enter-noexec`` typing enter during command execution will insert a newline into the next commandline instead of executing it.
|
||||
|
||||
|
||||
These changes are introduced off by default. They can be enabled on a per session basis::
|
||||
|
||||
@@ -6,7 +6,7 @@ License
|
||||
License for fish
|
||||
----------------
|
||||
|
||||
``fish`` Copyright © 2005-2009 Axel Liljencrantz, 2009-2024 fish-shell contributors. ``fish`` is released under the GNU General Public License, version 2.
|
||||
``fish`` Copyright © 2005-2009 Axel Liljencrantz, 2009- fish-shell contributors. ``fish`` is released under the GNU General Public License, version 2.
|
||||
|
||||
``fish`` includes other code licensed under the GNU General Public License, version 2, including GNU ``printf``.
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -36,5 +36,4 @@ WORKDIR /home/fishuser
|
||||
|
||||
COPY fish_run_tests.sh /
|
||||
|
||||
|
||||
CMD /fish_run_tests.sh
|
||||
|
||||
@@ -38,5 +38,4 @@ WORKDIR /home/fishuser
|
||||
|
||||
COPY fish_run_tests.sh /
|
||||
|
||||
|
||||
CMD /fish_run_tests.sh
|
||||
|
||||
@@ -35,5 +35,4 @@ WORKDIR /home/fishuser
|
||||
|
||||
COPY fish_run_tests.sh /
|
||||
|
||||
|
||||
CMD /fish_run_tests.sh
|
||||
|
||||
@@ -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+
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ fn smoke() {
|
||||
#[test]
|
||||
fn test_format_string_str() {
|
||||
let mut s: &str = "hello%world%%%%%";
|
||||
assert_eq!(s.is_empty(), false);
|
||||
assert!(!s.is_empty());
|
||||
for (idx, c) in s.char_indices() {
|
||||
assert_eq!(s.at(idx), Some(c));
|
||||
}
|
||||
@@ -98,7 +98,7 @@ fn test_format_string_str() {
|
||||
assert_eq!(s.take_literal(&mut buffer), "world%%");
|
||||
|
||||
s.advance_by(1); // advancing over one more %
|
||||
assert_eq!(s.is_empty(), true); // remaining content is empty
|
||||
assert!(s.is_empty()); // remaining content is empty
|
||||
}
|
||||
|
||||
#[cfg(feature = "widestring")]
|
||||
@@ -122,7 +122,7 @@ fn test_format_string_wstr() {
|
||||
assert_eq!(s.take_literal(&mut buffer), "world%%");
|
||||
|
||||
s.advance_by(1); // advancing over one more %
|
||||
assert_eq!(s.is_empty(), true); // remaining content is empty
|
||||
assert!(s.is_empty()); // remaining content is empty
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
1
share/completions/!.fish
Normal file
1
share/completions/!.fish
Normal file
@@ -0,0 +1 @@
|
||||
complete ! --wraps not
|
||||
1
share/completions/[.fish
Normal file
1
share/completions/[.fish
Normal file
@@ -0,0 +1 @@
|
||||
complete [ --wraps test
|
||||
@@ -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,4 @@
|
||||
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
|
||||
|
||||
complete -c bootctl -f
|
||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a status -d 'Show status of EFI variables'
|
||||
@@ -13,6 +13,8 @@ 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 "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)'
|
||||
@@ -737,6 +737,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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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_volumes ; __fish_diskutil_devices)'
|
||||
|
||||
# mount
|
||||
complete -f -c diskutil -n __fish_use_subcommand -a mount -d 'Mount a single volume'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
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
|
||||
@@ -26,7 +26,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
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -1440,7 +1440,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
|
||||
|
||||
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_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_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'
|
||||
@@ -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"
|
||||
@@ -9,7 +9,7 @@ complete -c kak -o p -x -a '(command kak -l)' -d 'just send stdin as commands to
|
||||
complete -c kak -o f -x -d 'filter: for each file, select the entire buffer and execute the given keys'
|
||||
complete -c kak -o i -x -d 'backup the files on which a filter is applied using the given suffix'
|
||||
complete -c kak -o q -d 'in filter mode be quiet about errors applying keys'
|
||||
complete -c kak -o ui -x -a 'ncurses dummy json' -d 'set the type of user interface to use'
|
||||
complete -c kak -o ui -x -a 'terminal dummy json' -d 'set the type of user interface to use'
|
||||
complete -c kak -o l -d 'list existing sessions'
|
||||
complete -c kak -o clear -d 'clear dead sessions'
|
||||
complete -c kak -o debug -x -d 'initial debug option value' -a 'hooks shell profile keys commands'
|
||||
|
||||
1
share/completions/kops.fish
Normal file
1
share/completions/kops.fish
Normal file
@@ -0,0 +1 @@
|
||||
kops completion fish 2>/dev/null | source
|
||||
141
share/completions/llm.fish
Normal file
141
share/completions/llm.fish
Normal file
@@ -0,0 +1,141 @@
|
||||
# Completions for simonw/llm
|
||||
|
||||
set -l subcmds prompt aliases chat collections embed embed-models embed-multi install keys logs models openai plugins similar templates uninstall
|
||||
function __fish_llm_subcmds
|
||||
printf "%s\t%s\n" "prompt" "Execute a prompt" \
|
||||
"aliases" "Manage model aliases" \
|
||||
"chat" "Hold chat with model" \
|
||||
"collections" "View/manage embedding collections" \
|
||||
"embed" "Embed text and get/store result" \
|
||||
"embed-models" "Manage available embedding models" \
|
||||
"embed-multi" "Store embeddings for multiple strings" \
|
||||
"install" "Install PyPI packages into llm env" \
|
||||
"keys" "Manage stored API keys" \
|
||||
"logs" "Explore logged prompts/responses" \
|
||||
"models" "Manage available models" \
|
||||
"openai" "Work with OpenAI API directly" \
|
||||
"plugins" "List installed plugins" \
|
||||
"similar" "Return top-N similar IDs for collection" \
|
||||
"templates" "Manage stored prompt templates" \
|
||||
"uninstall" "Uninstall Python packages from llm env"
|
||||
end
|
||||
|
||||
complete -c llm -n __fish_is_first_token -xa "(__fish_llm_subcmds)"
|
||||
|
||||
# This applies to the base command only
|
||||
complete -c llm -n "not __fish_seen_subcommand_from $subcmds" -l version -d "Show version info"
|
||||
# This applies to the base command or any subcommands
|
||||
complete -c llm -l help -d "Show command usage info" -x
|
||||
|
||||
function __fish_llm_models
|
||||
llm models |
|
||||
string replace -r '^[^:\\n]+: (\\S+)(?: \\(aliases: )?((?:[^),\\s]+,?)?+.*?)\\)?$' '$1 $2' |
|
||||
string split ' ' -n |
|
||||
string trim -c ','
|
||||
end
|
||||
|
||||
function __fish_embedding_models
|
||||
llm models |
|
||||
string replace -r '^[^:\\n]+: (\\S+)(?: \\(aliases: )?((?:[^),\\s]+,?)?+.*?)\\)?$' '$1 $2' |
|
||||
string split ' ' -n |
|
||||
string trim -c ','
|
||||
end
|
||||
|
||||
# The default subcommand is 'prompt'
|
||||
set -l condition "not __fish_seen_subcommand_from $subcmds || __fish_seen_subcommand_from prompt"
|
||||
complete -c llm -n $condition -s s -l system -d "System prompt to use" -r
|
||||
complete -c llm -n $condition -s m -l model -d "Model to use" -xa "(__fish_llm_models)"
|
||||
complete -c llm -n $condition -s a -l attachment -d "Attachment to use" -ra'-'
|
||||
complete -c llm -n $condition -l at -d "Attachment type" -r
|
||||
complete -c llm -n $condition -l attachment-type -d "Attachment type" -r
|
||||
complete -c llm -n $condition -s n -l no-log -d "Don't log to db" -x
|
||||
complete -c llm -n $condition -s l -l log -d "Log prompt/reply to db" -x
|
||||
complete -c llm -n $condition -s c -l continue -d "Continue most recent conversation" -x
|
||||
complete -c llm -n $condition -l key -d "API key to use" -r
|
||||
complete -c llm -n $condition -l save -d "Save prompt as template with name" -x
|
||||
|
||||
# llm aliases
|
||||
set -l condition "__fish_seen_subcommand_from aliases"
|
||||
complete -c llm -n $condition -xa list -d "List current aliases" -x
|
||||
complete -c llm -n $condition -xa path -d "Print path of llm's aliases.json" -x
|
||||
complete -c llm -n $condition -xa remove -d "Remove an llm alias" -r
|
||||
complete -c llm -n $condition -xa set -d "Set an alias for a model" -r
|
||||
|
||||
# llm aliases
|
||||
set -l condition "__fish_seen_subcommand_from chat"
|
||||
complete -c llm -n $condition -s s -l system -d "System prompt to use" -r
|
||||
complete -c llm -n $condition -s m -l model -d "Model to use" -xa "(__fish_llm_models)"
|
||||
complete -c llm -n $condition -l cid -d "Continue conversation with given id" -x
|
||||
complete -c llm -n $condition -l conversation -d "Continue conversation with given id" -x
|
||||
complete -c llm -n $condition -s t -l template -d "Template to use" -x
|
||||
complete -c llm -n $condition -s p -l param -d "Set template parameter to value" -x
|
||||
complete -c llm -n $condition -s o -l option -d "Set key/value option for model" -x
|
||||
complete -c llm -n $condition -l no-stream -d "Do not stream output" -x
|
||||
complete -c llm -n $condition -l key -d "API key to use" -x
|
||||
|
||||
# llm collections
|
||||
set -l condition "__fish_seen_subcommand_from collections"
|
||||
complete -c llm -n $condition -xa list -d "List collections" -x
|
||||
complete -c llm -n $condition -xa delete -d "Delete specified collection" -x
|
||||
complete -c llm -n $condition -xa path -d "Print path to embeddings database" -x
|
||||
|
||||
# llm embed
|
||||
set -l condition "__fish_seen_subcommand_from embed"
|
||||
complete -c llm -n $condition -s i -l input -d "File to embed" -r
|
||||
complete -c llm -n $condition -s m -l model -d "Model to use" -xa "(__fish_embedding_models)"
|
||||
complete -c llm -n $condition -l store -d "Store the text itself in the db" -x
|
||||
complete -c llm -n $condition -s d -l database -d "Path to db to use" -r
|
||||
complete -c llm -n $condition -s c -l content -d "Text content to embed" -x
|
||||
complete -c llm -n $condition -l binary -d "Treat input as binary" -x
|
||||
complete -c llm -n $condition -l metadata -d "JSON object metadata to store" -x
|
||||
complete -c llm -n $condition -s f -l format -d "Output format" -xa "json blob base64 hex"
|
||||
|
||||
# llm embed-models
|
||||
set -l condition "__fish_seen_subcommand_from embed-models"
|
||||
complete -c llm -n $condition -xa list -d "List available embedding models" -x
|
||||
complete -c llm -n $condition -xa default -d "Show or set default embedding model" -x
|
||||
|
||||
# llm embed-multi
|
||||
set -l condition "__fish_seen_subcommand_from embed-multi"
|
||||
complete -c llm -n $condition -l format -xa "json csv tsv nl" -d "Format of input (default: auto-detected)"
|
||||
complete -c llm -n $condition -l files -r -d "Embed files in DIR matching GLOB"
|
||||
complete -c llm -n $condition -l encoding -r -d "Encoding to use when reading input"
|
||||
complete -c llm -n $condition -l binary -d "Treat input as binary"
|
||||
complete -c llm -n $condition -l sql -x -d "Read input using this SQL query"
|
||||
complete -c llm -n $condition -l attach -x -d "Attach db ALIAS from PATH"
|
||||
complete -c llm -n $condition -l batch-size -x -d "Batch size to use for embeddings"
|
||||
complete -c llm -n $condition -l prefix -x -d "Prefix to add to the IDs"
|
||||
complete -c llm -n $condition -s m -l model -d "Embedding model to use" -xa "(__fish_embedding_models)"
|
||||
complete -c llm -n $condition -l store -d "Store the text itself in the db"
|
||||
complete -c llm -n $condition -s d -l database -d "Path to db to use"
|
||||
|
||||
# llm install
|
||||
set -l condition "__fish_seen_subcommand_from install"
|
||||
complete -c llm -n $condition -s U -l upgrade -d "Upgrade packages to latest version" -x
|
||||
complete -c llm -n $condition -s e -l editable -d "Install project in editable mode from PATH" -r
|
||||
complete -c llm -n $condition -l force-reinstall -d "Reinstall all packages, even if up-to-date" -x
|
||||
complete -c llm -n $condition -l no-cache-dir -d "Disable cache" -x
|
||||
|
||||
# llm keys
|
||||
set -l condition "__fish_seen_subcommand_from keys"
|
||||
complete -c llm -n $condition -xa list -d "List names of all stored keys"
|
||||
complete -c llm -n $condition -xa get -d "Print saved key"
|
||||
complete -c llm -n $condition -xa path -d "Print path of llm's keys.json"
|
||||
complete -c llm -n $condition -xa set -d "Save a key in llm's keys.json"
|
||||
|
||||
# llm logs
|
||||
set -l condition "__fish_seen_subcommand_from logs"
|
||||
complete -c llm -n $condition -xa list -d "List recent prompts and responses"
|
||||
complete -c llm -n $condition -xa off -d "Turn off logging"
|
||||
complete -c llm -n $condition -xa on -d "Turn on logging"
|
||||
complete -c llm -n $condition -xa path -d "Print path to llm's logs.db"
|
||||
complete -c llm -n $condition -xa status -d "Show current status of db logging"
|
||||
|
||||
# llm models
|
||||
set -l condition "__fish_seen_subcommand_from models"
|
||||
complete -c llm -n $condition -xa list -d "List available models" -x
|
||||
complete -c llm -n $condition -xa default -d "Show or set default model" -x
|
||||
|
||||
# llm plugins
|
||||
set -l condition "__fish_seen_subcommand_from plugins"
|
||||
complete -c llm -n $condition -l all -d "Include built-in/default plugins" -x
|
||||
@@ -1,10 +1,13 @@
|
||||
complete -c md5sum -d "Compute and check message digest" -r
|
||||
complete -c md5sum -s b -l binary -d 'Read in binary mode'
|
||||
complete -c md5sum -s c -l check -d "Read sums from files and check them"
|
||||
complete -c md5sum -s t -l text -d 'Read in text mode'
|
||||
complete -c md5sum -l quiet -d 'Don''t print OK for each successfully verified file'
|
||||
complete -c md5sum -l status -d 'Don''t output anything, status code shows success'
|
||||
complete -c md5sum -s w -l warn -d 'Warn about improperly formatted checksum lines'
|
||||
complete -c md5sum -l tag -d 'Create a BSD-style checksum'
|
||||
complete -c md5sum -s t -l text -d 'Read in text mode (default)'
|
||||
complete -c md5sum -s z -l zero -d 'End each output line with NUL, not newline, and disable file name escaping'
|
||||
complete -c md5sum -l ignore-missing -d 'Don\'t fail or report status for missing files'
|
||||
complete -c md5sum -l quiet -d 'Don\'t print OK for each successfully verified file'
|
||||
complete -c md5sum -l status -d 'Don\'t output anything, status code shows success'
|
||||
complete -c md5sum -l strict -d 'With --check, exit non-zero for any invalid input'
|
||||
complete -c md5sum -s w -l warn -d 'Warn about improperly formatted checksum lines'
|
||||
complete -c md5sum -l help -d 'Display help text'
|
||||
complete -c md5sum -l version -d 'Output version information and exit'
|
||||
|
||||
94
share/completions/mksquashfs.fish
Normal file
94
share/completions/mksquashfs.fish
Normal file
@@ -0,0 +1,94 @@
|
||||
complete -c mksquashfs -o b -d 'Data block size'
|
||||
complete -c mksquashfs -o comp -d 'Selects the compression scheme' -xa 'gzip lzo lz4 xz zstd lzma'
|
||||
complete -c mksquashfs -o noI -o noInodeCompression -d 'Do not compress inode table'
|
||||
complete -c mksquashfs -o noId -o noIdTableCompression -d 'Do not compress the uid/gid table'
|
||||
complete -c mksquashfs -o noD -o noDataCompression -d 'Do not compress data blocks'
|
||||
complete -c mksquashfs -o noF -o noFragmentCompression -d 'Do not compress fragment blocks'
|
||||
complete -c mksquashfs -o noX -o noXattrCompression -d 'Do not compress extended attributes'
|
||||
complete -c mksquashfs -o no-compression -d 'Do not compress any of the data or metadata'
|
||||
complete -c mksquashfs -o tar -d 'Read uncompressed tar file from standard in (stdin)'
|
||||
complete -c mksquashfs -o no-strip -o tarstyle -d 'Act like tar, and do not strip leading directories from source files'
|
||||
complete -c mksquashfs -o cpiostyle -d 'Act like cpio, and read file pathnames from standard in (stdin)'
|
||||
complete -c mksquashfs -o cpiostyle0 -d 'Like -cpiostyle, but filenames are null terminated'
|
||||
complete -c mksquashfs -o reproducible -d 'Build filesystems that are reproducible'
|
||||
complete -c mksquashfs -o not-reproducible -d 'Build filesystems that are not reproducible'
|
||||
complete -c mksquashfs -o mkfs-time -o fstime -xd 'Set filesystem creation timestamp'
|
||||
complete -c mksquashfs -o all-time -xd 'Set all file timestamps'
|
||||
complete -c mksquashfs -o root-time -xd 'Set root directory time'
|
||||
complete -c mksquashfs -o root-mode -xd 'Set root directory permissions to octal <mode>'
|
||||
complete -c mksquashfs -o root-uid -xa '(__fish_complete_user_ids)' -d 'Set root directory owner'
|
||||
complete -c mksquashfs -o root-gid -xa '(__fish_complete_group_ids)' -d 'Set root directory group'
|
||||
complete -c mksquashfs -o all-root -o root-owned -d 'Make all files owned by root'
|
||||
complete -c mksquashfs -o force-uid -xa '(__fish_complete_user_ids)' -d 'Set all file uids'
|
||||
complete -c mksquashfs -o force-gid -xa '(__fish_complete_group_ids)' -d 'Set all file gids'
|
||||
complete -c mksquashfs -o pseudo-override -d 'Make pseudo file uids and gids override -all-root, -force-uid and -force-gid options'
|
||||
complete -c mksquashfs -o no-exports -d 'Do not make filesystem exportable via NFS'
|
||||
complete -c mksquashfs -o exports -d 'Make filesystem exportable via NFS'
|
||||
complete -c mksquashfs -o no-sparse -d 'Do not detect sparse files'
|
||||
complete -c mksquashfs -o no-tailends -d 'Do not pack tail ends into fragments'
|
||||
complete -c mksquashfs -o tailends -o always-use-fragments -d 'Pack tail ends into fragments'
|
||||
complete -c mksquashfs -o no-fragments -d 'Do not use fragments'
|
||||
complete -c mksquashfs -o no-duplicates -d 'Do not perform duplicate checking'
|
||||
complete -c mksquashfs -o no-hardlinks -d 'Do not hardlink files, instead store duplicates'
|
||||
complete -c mksquashfs -o keep-as-directory -d 'If one source directory is specified, create a root directory containing that directory, rather than the contents of the directory'
|
||||
complete -c mksquashfs -o p -xd 'Add pseudo file definition'
|
||||
complete -c mksquashfs -o pf -rd 'Add list of pseudo file definitions from <pseudo-file>'
|
||||
complete -c mksquashfs -o sort -rd 'Sort files according to priorities in <sort_file>'
|
||||
complete -c mksquashfs -o ef -rd 'List of exclude dirs/files'
|
||||
complete -c mksquashfs -o wildcards -d 'Allow extended shell wildcards (globbing) to be used in exclude dirs/files'
|
||||
complete -c mksquashfs -o regex -d 'Allow POSIX regular expressions to be used in exclude dirs/files'
|
||||
complete -c mksquashfs -o max-depth -xd 'Descend at most <levels> of directories when scanning filesystem'
|
||||
complete -c mksquashfs -o one-file-system -d 'Do not cross filesystem boundaries'
|
||||
complete -c mksquashfs -o one-file-system-x -d 'Do not cross filesystem boundaries'
|
||||
complete -c mksquashfs -o no-xattrs -d 'Do not store extended attributes'
|
||||
complete -c mksquashfs -o xattrs -d 'Store extended attributes'
|
||||
complete -c mksquashfs -o xattrs-exclude -xd 'Exclude any xattr names matching <regex>'
|
||||
complete -c mksquashfs -o xattrs-include -xd 'Include any xattr names matching <regex>'
|
||||
complete -c mksquashfs -o xattrs-add -xd 'Add the xattr <name> with <val> to files'
|
||||
complete -c mksquashfs -o version -d 'Print version, licence and copyright message'
|
||||
complete -c mksquashfs -o exit-on-error -d 'Treat normally ignored errors as fatal'
|
||||
complete -c mksquashfs -o quiet -d 'No verbose output'
|
||||
complete -c mksquashfs -o info -d 'Print files written to filesystem'
|
||||
complete -c mksquashfs -o no-progress -d 'Do not display the progress bar'
|
||||
complete -c mksquashfs -o progress -d 'Display progress bar when using the -info option'
|
||||
complete -c mksquashfs -o percentage -d 'Display a percentage rather than the full progress bar'
|
||||
complete -c mksquashfs -o throttle -xd 'Throttle the I/O input rate by the given percentage'
|
||||
complete -c mksquashfs -o limit -xd 'Limit the I/O input rate to the given percentage'
|
||||
complete -c mksquashfs -o processors -xd 'Use <number> processors'
|
||||
complete -c mksquashfs -o mem -xd 'Use <size> physical memory for caches'
|
||||
complete -c mksquashfs -o mem-percent -xd 'Use <percent> physical memory for caches'
|
||||
complete -c mksquashfs -o mem-default -d 'Print default memory usage in Mbytes'
|
||||
complete -c mksquashfs -o noappend -d 'Do not append to existing filesystem'
|
||||
complete -c mksquashfs -o root-becomes -xd 'When appending source files/directories, make the original root become a subdirectory in the new root called <name>, rather than adding the new source items to the original root'
|
||||
complete -c mksquashfs -o no-recovery -d 'Do not generate a recovery file'
|
||||
complete -c mksquashfs -o recovery-path -rd 'Use <name> as the directory to store the recovery file'
|
||||
complete -c mksquashfs -o recover -rd 'Recover filesystem data using recovery file'
|
||||
complete -c mksquashfs -o action -xd 'Evaluate <expr> on every file, and execute <action> if it returns TRUE'
|
||||
complete -c mksquashfs -o log-action -xd 'As -action, but log expression evaluation results and actions performed'
|
||||
complete -c mksquashfs -o true-action -xd 'As -action, but only log expressions which return TRUE'
|
||||
complete -c mksquashfs -o false-action -xd 'As -action, but only log expressions which return FALSE'
|
||||
complete -c mksquashfs -o action-file -rd 'As -action, but read actions from <file>'
|
||||
complete -c mksquashfs -o log-action-file -rd 'As -log-action, but read actions from <file>'
|
||||
complete -c mksquashfs -o true-action-file -rd 'As -true-action, but read actions from <f>'
|
||||
complete -c mksquashfs -o false-action-file -rd 'As -false-action, but read actions from <f>'
|
||||
complete -c mksquashfs -o default-mode -xd 'Sets the default directory permissions to octal <mode>'
|
||||
complete -c mksquashfs -o default-uid -xa '(__fish_complete_user_ids)' -d 'Sets the default directory user'
|
||||
complete -c mksquashfs -o default-gid -xa '(__fish_complete_group_ids)' -d 'Sets the default directory group'
|
||||
complete -c mksquashfs -o ignore-zeros -d 'Allow tar files to be concatenated together and fed to Mksquashfs'
|
||||
complete -c mksquashfs -o nopad -d 'Do not pad filesystem to a multiple of 4K'
|
||||
complete -c mksquashfs -o o -o offset -xd 'Skip <offset> bytes at the beginning of FILESYSTEM'
|
||||
complete -c mksquashfs -o h -o help -d 'Print help and exit'
|
||||
|
||||
complete -c mksquashfs -o Xhelp -d 'Print compressor options for selected compressor'
|
||||
complete -c mksquashfs -o Xwindow-size -xd 'Window size in range 8 .. 15 (gzip only)'
|
||||
complete -c mksquashfs -o Xstrategy -xa 'default filtered huffman_only run_length_encoded fixed' -d 'Strategy to use (gzip only)'
|
||||
complete -c mksquashfs -o Xalgorithm -xa 'lzo1x_1 lzo1x_1_11 lzo1x_1_12 lzo1x_1_15 lzo1x_999' -d 'Algorithm to use (lzo only)'
|
||||
complete -c mksquashfs -o Xhc -d 'Compress using LZ4 High Compression (lz4 only)'
|
||||
complete -c mksquashfs -o Xbcj -xa 'x86 arm armthumb powerpc sparc ia64' -d 'Compress using filters in turn and choose the best compression (xz only)'
|
||||
complete -c mksquashfs -o Xdict-size -xd 'Set xz dictionary size (xz only)'
|
||||
|
||||
# Specialize description if compressor name appears in argv. Misdetection is possible.
|
||||
complete -c mksquashfs -o Xcompression-level -xd 'Compression level setting (lzo, gzip, zstd)'
|
||||
complete -c mksquashfs -n '__fish_seen_argument lzo' -o Xcompression-level -xd 'Sets compression level for lzo1x_999 algorithm in range 1 .. 9'
|
||||
complete -c mksquashfs -n '__fish_seen_argument gzip' -o Xcompression-level -xd 'Sets gzip compression level in range 1 .. 9'
|
||||
complete -c mksquashfs -n '__fish_seen_argument zstd' -o Xcompression-level -xd 'Sets zstd compression level in range 1 .. 22'
|
||||
@@ -141,7 +141,8 @@ complete -f -c npm -n '__fish_npm_using_command cache' -s h -l help -d 'Display
|
||||
# install-ci-test
|
||||
complete -f -c npm -n __fish_npm_needs_command -a 'ci clean-install' -d 'Clean install a project'
|
||||
complete -f -c npm -n __fish_npm_needs_command -a 'install-ci-test cit' -d 'Install a project with a clean slate and run tests'
|
||||
for c in ci clean-install ic install-clean install-clean install-ci-test cit clean-install-test sit
|
||||
# typos are intentional
|
||||
for c in ci clean-install ic install-clean isntall-clean install-ci-test cit clean-install-test sit
|
||||
complete -x -c npm -n "__fish_npm_using_command $c" -l install-strategy -a 'hoisted nested shallow linked' -d 'Install strategy'
|
||||
complete -x -c npm -n "__fish_npm_using_command $c" -l omit -a 'dev optional peer' -d 'Omit dependency type'
|
||||
complete -x -c npm -n "__fish_npm_using_command $c" -l strict-peer-deps -d 'Treat conflicting peerDependencies as failure'
|
||||
@@ -406,7 +407,8 @@ end
|
||||
complete -c npm -n __fish_npm_needs_command -a 'install add i' -d 'Install a package'
|
||||
complete -f -c npm -n __fish_npm_needs_command -a 'install-test it' -d 'Install package(s) and run tests'
|
||||
complete -f -c npm -n __fish_npm_needs_command -a 'link ln' -d 'Symlink a package folder'
|
||||
for c in install add i in ins inst insta instal isnt isnta isntal install install-test it link ln
|
||||
# typos are intentional
|
||||
for c in install add i in ins inst insta instal isnt isnta isntal isntall install-test it link ln
|
||||
complete -f -c npm -n "__fish_npm_using_command $c" -s S -l save -d 'Save to dependencies'
|
||||
complete -f -c npm -n "__fish_npm_using_command $c" -l no-save -d 'Prevents saving to dependencies'
|
||||
complete -f -c npm -n "__fish_npm_using_command $c" -s P -l save-prod -d 'Save to dependencies'
|
||||
@@ -726,4 +728,4 @@ complete -f -c npm -n '__fish_npm_using_command whoami' -a registry -d 'Check re
|
||||
complete -f -c npm -n '__fish_npm_using_command whoami' -s h -l help -d 'Display help'
|
||||
|
||||
# misc
|
||||
complete -f -c npm -n '__fish_seen_subcommand_from add i in ins inst insta instal isnt isnta isntal install; and not __fish_is_switch' -a "(__npm_filtered_list_packages \"$npm_install\")"
|
||||
complete -f -c npm -n '__fish_seen_subcommand_from add i in ins inst insta instal isnt isnta isntal isntall; and not __fish_is_switch' -a "(__npm_filtered_list_packages \"$npm_install\")"
|
||||
|
||||
@@ -2,16 +2,18 @@ function __fish_ollama_list
|
||||
ollama list 2>/dev/null | tail -n +2 | string replace --regex "\s.*" ""
|
||||
end
|
||||
|
||||
complete -c ollama -a serve -d "Start ollama"
|
||||
complete -c ollama -a create -d "Create a model from a Modelfile"
|
||||
complete -c ollama -a show -d "Show information for a model"
|
||||
complete -c ollama -a run -d "Run a model"
|
||||
complete -c ollama -a pull -d "Pull a model from a registry"
|
||||
complete -c ollama -a push -d "Push a model to a registry"
|
||||
complete -c ollama -a list -d "List models"
|
||||
complete -c ollama -a cp -d "Copy a model"
|
||||
complete -c ollama -a rm -d "Remove a model"
|
||||
complete -c ollama -a help -d "Help about any command"
|
||||
|
||||
complete -f -c ollama
|
||||
complete -c ollama -n __fish_use_subcommand -a serve -d "Start ollama"
|
||||
complete -c ollama -n __fish_use_subcommand -a create -d "Create a model from a Modelfile"
|
||||
complete -c ollama -n __fish_use_subcommand -a show -d "Show information for a model"
|
||||
complete -c ollama -n __fish_use_subcommand -a run -d "Run a model"
|
||||
complete -c ollama -n __fish_use_subcommand -a pull -d "Pull a model from a registry"
|
||||
complete -c ollama -n __fish_use_subcommand -a push -d "Push a model to a registry"
|
||||
complete -c ollama -n __fish_use_subcommand -a list -d "List models"
|
||||
complete -c ollama -n __fish_use_subcommand -a cp -d "Copy a model"
|
||||
complete -c ollama -n __fish_use_subcommand -a rm -d "Remove a model"
|
||||
complete -c ollama -n __fish_use_subcommand -a help -d "Help about any command"
|
||||
complete -c ollama -s h -l help -d "help for ollama"
|
||||
complete -c ollama -s v -l version -d "Show version information"
|
||||
complete -c ollama -f -a "(__fish_ollama_list)" --condition '__fish_seen_subcommand_from show'
|
||||
|
||||
@@ -14,6 +14,7 @@ complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a sort -d 'Sort
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s q -l quiet -d "Only return status, no output"
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s z -l null-in -d "Handle NULL-delimited input"
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s Z -l null-out -d "Print NULL-delimited output"
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] basename" -s E -l no-extension -d "Remove the extension"
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s v -l invert -d "Invert meaning of filters"
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s t -l type -d "Filter by type" -x -a '(__fish_append , file link dir block char fifo socket)'
|
||||
complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s f -d "Filter files"
|
||||
|
||||
@@ -1,23 +1,42 @@
|
||||
complete -c python -s B -d 'Don\'t write .py[co] files on import'
|
||||
complete -c python -s c -x -d "Execute argument as command"
|
||||
complete -c python -l check-hash-based-pycs -a "default always never" -d "Control validation behaviour of pyc files"
|
||||
complete -c python -s d -d "Debug on"
|
||||
complete -c python -s E -d "Ignore all PYTHON* env vars"
|
||||
complete -c python -s h -s '?' -l help -d "Display help and exit"
|
||||
complete -c python -s i -d "Interactive mode after executing commands"
|
||||
complete -c python -s m -d 'Run library module as a script (terminates option list)' -xa '(python -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||
complete -c python -s O -d "Enable optimizations"
|
||||
complete -c python -o OO -d "Remove doc-strings in addition to the -O optimizations"
|
||||
complete -c python -s s -d 'Don\'t add user site directory to sys.path'
|
||||
complete -c python -s S -d "Disable import of site module"
|
||||
complete -c python -s u -d "Unbuffered input and output"
|
||||
complete -c python -s v -d "Verbose mode"
|
||||
complete -c python -o vv -d "Even more verbose mode"
|
||||
complete -c python -s V -l version -d "Display version and exit"
|
||||
complete -c python -s W -x -d "Warning control" -a "ignore default all module once error"
|
||||
complete -c python -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
|
||||
complete -c python -f -n "__fish_is_nth_token 1" -k -a "(__fish_complete_suffix .py)"
|
||||
complete -c python -f -n "__fish_is_nth_token 1" -a - -d 'Read program from stdin'
|
||||
# This function adjusts for options with arguments (-X, -W, etc.), ensures completions stop when a script/module is set (-c, -m, file, -)
|
||||
function __fish_python_no_arg
|
||||
set -l num 1
|
||||
set -l tokens (commandline -pxc)
|
||||
set -l has_arg_list -X -W --check-hash-based-pycs
|
||||
if contains -- - $tokens
|
||||
set num (math $num - 1)
|
||||
end
|
||||
for has_arg in $has_arg_list
|
||||
if contains -- $has_arg $tokens
|
||||
set num (math $num + 1)
|
||||
end
|
||||
end
|
||||
if test (__fish_number_of_cmd_args_wo_opts) -gt $num
|
||||
return 1
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
complete -c python -n __fish_python_no_arg -s B -d 'Don\'t write .py[co] files on import'
|
||||
complete -c python -n __fish_python_no_arg -s c -x -d "Execute argument as command"
|
||||
complete -c python -n __fish_python_no_arg -l check-hash-based-pycs -a "default always never" -d "Control validation behaviour of pyc files"
|
||||
complete -c python -n __fish_python_no_arg -s d -d "Debug on"
|
||||
complete -c python -n __fish_python_no_arg -s E -d "Ignore all PYTHON* env vars"
|
||||
complete -c python -n __fish_python_no_arg -s h -s '?' -l help -d "Display help and exit"
|
||||
complete -c python -n __fish_python_no_arg -s i -d "Interactive mode after executing commands"
|
||||
complete -c python -n __fish_python_no_arg -s m -d 'Run library module as a script (terminates option list)' -xa '(python -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||
complete -c python -n __fish_python_no_arg -s O -d "Enable optimizations"
|
||||
complete -c python -n __fish_python_no_arg -o OO -d "Remove doc-strings in addition to the -O optimizations"
|
||||
complete -c python -n __fish_python_no_arg -s s -d 'Don\'t add user site directory to sys.path'
|
||||
complete -c python -n __fish_python_no_arg -s S -d "Disable import of site module"
|
||||
complete -c python -n __fish_python_no_arg -s u -d "Unbuffered input and output"
|
||||
complete -c python -n __fish_python_no_arg -s v -d "Verbose mode"
|
||||
complete -c python -n __fish_python_no_arg -o vv -d "Even more verbose mode"
|
||||
complete -c python -n __fish_python_no_arg -s V -l version -d "Display version and exit"
|
||||
complete -c python -n __fish_python_no_arg -s W -x -d "Warning control" -a "ignore default all module once error"
|
||||
complete -c python -n __fish_python_no_arg -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
|
||||
complete -c python -n __fish_python_no_arg -f -k -a "(__fish_complete_suffix .py)"
|
||||
complete -c python -n __fish_python_no_arg -f -a - -d 'Read program from stdin'
|
||||
|
||||
# Version-specific completions
|
||||
# We have to detect this at runtime because pyenv etc can change
|
||||
@@ -25,10 +44,10 @@ complete -c python -f -n "__fish_is_nth_token 1" -a - -d 'Read program from stdi
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s2"' -s 3 -d 'Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s2"' -s t -d "Warn on mixed tabs and spaces"
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s2"' -s Q -x -a "old new warn warnall" -d "Division control"
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s q -d 'Don\'t print version and copyright messages on interactive startup'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s X -x -d 'Set implementation-specific option'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s b -d 'Warn when comparing bytes with str or int'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -o bb -d 'Error when comparing bytes with str or int'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s R -d 'Turn on hash randomization'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -s I -d 'Run in isolated mode'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3"' -o VV -d 'Print further version info'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s q -d 'Don\'t print version and copyright messages on interactive startup'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s X -x -d 'Set implementation-specific option'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s b -d 'Warn when comparing bytes with str or int'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -o bb -d 'Error when comparing bytes with str or int'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s R -d 'Turn on hash randomization'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -s I -d 'Run in isolated mode'
|
||||
complete -c python -n 'python -V 2>&1 | string match -rq "^.*\s3" && __fish_python_no_arg' -o VV -d 'Print further version info'
|
||||
|
||||
@@ -1,24 +1,43 @@
|
||||
complete -c python3 -s B -d 'Don\'t write .py[co] files on import'
|
||||
complete -c python3 -s c -x -d "Execute argument as command"
|
||||
complete -c python3 -s d -d "Debug on"
|
||||
complete -c python3 -s E -d "Ignore environment variables"
|
||||
complete -c python3 -s h -s '?' -l help -d "Display help and exit"
|
||||
complete -c python3 -s i -d "Interactive mode after executing commands"
|
||||
complete -c python3 -s O -d "Enable optimizations"
|
||||
complete -c python3 -o OO -d "Remove doc-strings in addition to the -O optimizations"
|
||||
complete -c python3 -s s -d 'Don\'t add user site directory to sys.path'
|
||||
complete -c python3 -s S -d "Disable import of site module"
|
||||
complete -c python3 -s u -d "Unbuffered input and output"
|
||||
complete -c python3 -s v -d "Verbose mode"
|
||||
complete -c python3 -s V -l version -d "Display version and exit"
|
||||
complete -c python3 -s W -x -d "Warning control" -a "ignore default all module once error"
|
||||
complete -c python3 -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
|
||||
complete -c python3 -n "__fish_is_nth_token 1" -k -fa "(__fish_complete_suffix .py)"
|
||||
complete -c python3 -f -n "__fish_is_nth_token 1" -a - -d 'Read program from stdin'
|
||||
complete -c python3 -s q -d 'Don\'t print version and copyright messages on interactive startup'
|
||||
complete -c python3 -s X -x -d 'Set implementation-specific option' -a 'faulthandler showrefcount tracemalloc showalloccount importtime dev utf8 pycache_prefex=PATH:'
|
||||
complete -c python3 -s b -d 'Issue warnings for possible misuse of `bytes` with `str`'
|
||||
complete -c python3 -o bb -d 'Issue errors for possible misuse of `bytes` with `str`'
|
||||
complete -c python3 -s m -d 'Run library module as a script (terminates option list)' -xa '(python3 -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||
complete -c python3 -l check-hash-based-pycs -d 'Set pyc hash check mode' -xa "default always never"
|
||||
complete -c python3 -s I -d 'Run in isolated mode'
|
||||
# This function adjusts for options with arguments (-X, -W, etc.), ensures completions stop when a script/module is set (-c, -m, file, -)
|
||||
function __fish_python_no_arg
|
||||
set -l num 1
|
||||
set -l tokens (commandline -pxc)
|
||||
set -l has_arg_list -X -W --check-hash-based-pycs
|
||||
if contains -- - $tokens
|
||||
set num (math $num - 1)
|
||||
end
|
||||
for has_arg in $has_arg_list
|
||||
if contains -- $has_arg $tokens
|
||||
set num (math $num + 1)
|
||||
end
|
||||
end
|
||||
if test (__fish_number_of_cmd_args_wo_opts) -gt $num
|
||||
return 1
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
complete -c python3 -n __fish_python_no_arg -s B -d 'Don\'t write .py[co] files on import'
|
||||
complete -c python3 -n __fish_python_no_arg -s c -x -d "Execute argument as command"
|
||||
complete -c python3 -n __fish_python_no_arg -s d -d "Debug on"
|
||||
complete -c python3 -n __fish_python_no_arg -s E -d "Ignore environment variables"
|
||||
complete -c python3 -n __fish_python_no_arg -s h -s '?' -l help -d "Display help and exit"
|
||||
complete -c python3 -n __fish_python_no_arg -s i -d "Interactive mode after executing commands"
|
||||
complete -c python3 -n __fish_python_no_arg -s O -d "Enable optimizations"
|
||||
complete -c python3 -n __fish_python_no_arg -o OO -d "Remove doc-strings in addition to the -O optimizations"
|
||||
complete -c python3 -n __fish_python_no_arg -s s -d 'Don\'t add user site directory to sys.path'
|
||||
complete -c python3 -n __fish_python_no_arg -s S -d "Disable import of site module"
|
||||
complete -c python3 -n __fish_python_no_arg -s u -d "Unbuffered input and output"
|
||||
complete -c python3 -n __fish_python_no_arg -s v -d "Verbose mode"
|
||||
complete -c python3 -n __fish_python_no_arg -s V -l version -d "Display version and exit"
|
||||
complete -c python3 -n __fish_python_no_arg -s W -x -d "Warning control" -a "ignore default all module once error"
|
||||
complete -c python3 -n __fish_python_no_arg -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
|
||||
complete -c python3 -n __fish_python_no_arg -k -fa "(__fish_complete_suffix .py)"
|
||||
complete -c python3 -n __fish_python_no_arg -fa - -d 'Read program from stdin'
|
||||
complete -c python3 -n __fish_python_no_arg -s q -d 'Don\'t print version and copyright messages on interactive startup'
|
||||
complete -c python3 -n __fish_python_no_arg -s X -x -d 'Set implementation-specific option' -a 'faulthandler showrefcount tracemalloc showalloccount importtime dev utf8 pycache_prefex=PATH:'
|
||||
complete -c python3 -n __fish_python_no_arg -s b -d 'Issue warnings for possible misuse of `bytes` with `str`'
|
||||
complete -c python3 -n __fish_python_no_arg -o bb -d 'Issue errors for possible misuse of `bytes` with `str`'
|
||||
complete -c python3 -n __fish_python_no_arg -s m -d 'Run library module as a script (terminates option list)' -xa '(python3 -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||
complete -c python3 -n __fish_python_no_arg -l check-hash-based-pycs -d 'Set pyc hash check mode' -xa "default always never"
|
||||
complete -c python3 -n __fish_python_no_arg -s I -d 'Run in isolated mode'
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
set -l rclone_version (rclone version | string match -rg 'rclone v(.*)' | string split .)
|
||||
or return
|
||||
|
||||
# Yes, rclone's parsing here has changed, now they *require* a `-` argument
|
||||
# where previously they required *not* having it.
|
||||
if test "$rclone_version[1]" -gt 1; or test "$rclone_version[2]" -gt 62
|
||||
rclone completion fish - 2>/dev/null | source
|
||||
if set -l rclone_version (rclone version | string match -rg 'rclone v?(.*)' | string split .) &&
|
||||
test "$rclone_version[1]" -lt 1 ||
|
||||
test "$rclone_version[1]" -eq 1 &&
|
||||
test "$rclone_version[2]" -le 62
|
||||
# version is definitely <= 1.62, adding a `-` would be an error
|
||||
rclone completion fish
|
||||
else
|
||||
rclone completion fish 2>/dev/null | source
|
||||
end
|
||||
# For newer versions, this requires an `-`. Without a `-`, it would
|
||||
# try to write to /etc/completions/fish.
|
||||
# If we can't determine the version, assume a recent one. An error
|
||||
# is better than trying to write to /etc unexpectedly.
|
||||
rclone completion fish -
|
||||
end 2>/dev/null | source
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ end
|
||||
|
||||
function __resolvectl_commands
|
||||
printf "%b\n" "query\tResolve domain names or IP addresses" \
|
||||
"query\tResolve domain names, IPv4 and IPv6 addresses" \
|
||||
"service\tResolve service records" \
|
||||
"openpgp\tQuery PGP keys for email" \
|
||||
"tlsa\tQuery TLS public keys" \
|
||||
@@ -26,6 +27,9 @@ function __resolvectl_commands
|
||||
"reset-statistics\tReset statistics counters" \
|
||||
"flush-caches\tFlush DNS RR caches" \
|
||||
"reset-server-features\tFlushe all feature level information" \
|
||||
"monitor\tMonitor DNS queries" \
|
||||
"show-cache\tShow cache contents" \
|
||||
"show-server-state\tShow server state" \
|
||||
"dns\tSet per-interface DNS servers" \
|
||||
"domain\tSet per-interface search or routing domains" \
|
||||
"default-route\tSet per-interface default route flag" \
|
||||
|
||||
@@ -5,9 +5,9 @@ __fish_complete_ssh scp
|
||||
function __scp2ssh_port_number
|
||||
# There is a silly inconsistency between the ssh and scp commands regarding the short flag name
|
||||
# for specifying the TCP port number. This function deals with that by extracting the port
|
||||
# number if present and emitting it as a flag appropriate for ssh.
|
||||
# number if present.
|
||||
set -l port (commandline -c | string match -r -- ' -P ?(\d+)\b')
|
||||
and echo -p\n$port[2]
|
||||
and echo $port[2]
|
||||
end
|
||||
|
||||
function __scp_remote_target
|
||||
@@ -44,20 +44,25 @@ complete -c scp -d "Local Path" -n "not string match @ -- (commandline -ct)"
|
||||
|
||||
# Remote path
|
||||
# Get the list of remote files from the scp target.
|
||||
if string match -rq 'OpenSSH(_for_Windows)?_(?<major>\d+)\.*' -- (ssh -V 2>&1) && test "$major" -ge 9
|
||||
complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -a "
|
||||
(__scp_remote_target):( \
|
||||
command ssh (__scp2ssh_port_number) -o 'BatchMode yes' (__scp_remote_target) command\ ls\ -dp\ (__scp_remote_path_prefix)\* 2>/dev/null
|
||||
)
|
||||
"
|
||||
else
|
||||
complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -a "
|
||||
(__scp_remote_target):( \
|
||||
command ssh (__scp2ssh_port_number) -o 'BatchMode yes' (__scp_remote_target) command\ ls\ -dp\ (__scp_remote_path_prefix | string unescape)\* 2>/dev/null |
|
||||
complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -a '
|
||||
(__scp_remote_target):(
|
||||
if not set -q __fish_scp_sftp
|
||||
set -l tmp (mktemp)
|
||||
if scp -P(__scp2ssh_port_number) -o "BatchMode yes" -q -O $tmp (__scp_remote_target):/dev/null
|
||||
set -g __fish_scp_sftp true
|
||||
else
|
||||
set -g __fish_scp_sftp false
|
||||
end
|
||||
rm $tmp
|
||||
end
|
||||
if $__fish_scp_sftp
|
||||
command ssh -p(__scp2ssh_port_number) -o "BatchMode yes" (__scp_remote_target) command\ ls\ -dp\ (__scp_remote_path_prefix)\* 2>/dev/null
|
||||
else
|
||||
command ssh -p(__scp2ssh_port_number) -o "BatchMode yes" (__scp_remote_target) command\ ls\ -dp\ (__scp_remote_path_prefix | string unescape)\* 2>/dev/null |
|
||||
string escape -n
|
||||
end
|
||||
)
|
||||
"
|
||||
end
|
||||
'
|
||||
|
||||
complete -c scp -s 3 -d "Copies between two remote hosts are transferred through the local host"
|
||||
complete -c scp -s B -d "Batch mode"
|
||||
|
||||
@@ -15,6 +15,7 @@ complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_com
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-full-job-control -d "Test if all new jobs are put under job control"
|
||||
|
||||
# The subcommands that are not "is-something" which don't change the fish state.
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a buildinfo -d "Print information on how this version fish was built"
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-command -d "Print the name of the currently running command or function"
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-commandline -d "Print the currently running command with its arguments"
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-filename -d "Print the filename of the currently running script"
|
||||
|
||||
1
share/completions/tailscale.fish
Normal file
1
share/completions/tailscale.fish
Normal file
@@ -0,0 +1 @@
|
||||
tailscale completion fish | source
|
||||
1
share/completions/tex-fmt.fish
Normal file
1
share/completions/tex-fmt.fish
Normal file
@@ -0,0 +1 @@
|
||||
tex-fmt --completion fish | source
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user