mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-09 17:01:16 -03:00
Compare commits
457 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62063e24ca | ||
|
|
0f84b9fafb | ||
|
|
e7e4d8415b | ||
|
|
9cdaf1ec72 | ||
|
|
e8cc3803ca | ||
|
|
a4f5b9eb54 | ||
|
|
c5240033df | ||
|
|
303bf2cfcb | ||
|
|
d3f4b829ba | ||
|
|
4c2ce4b931 | ||
|
|
98838ac429 | ||
|
|
e67b6c1f00 | ||
|
|
1008b729a7 | ||
|
|
bc30e15774 | ||
|
|
1c3a8e0e11 | ||
|
|
970f32d87f | ||
|
|
95582ef76b | ||
|
|
89a30841f2 | ||
|
|
9397ede963 | ||
|
|
6e9590b220 | ||
|
|
687a16b260 | ||
|
|
a396fdc907 | ||
|
|
47d45f49e4 | ||
|
|
a6898467ab | ||
|
|
98bf01568d | ||
|
|
9cbd1aa147 | ||
|
|
0431f21bb2 | ||
|
|
0bc524340c | ||
|
|
3e0bd0b7e1 | ||
|
|
f2b16a822e | ||
|
|
b4ec84d8a1 | ||
|
|
93eb8e9928 | ||
|
|
8d7970bcb1 | ||
|
|
959ff84567 | ||
|
|
6ab0a3d81f | ||
|
|
83b016945e | ||
|
|
7810f4e8a1 | ||
|
|
b004635bc9 | ||
|
|
e54985bebb | ||
|
|
d00a2db5f1 | ||
|
|
e0add36488 | ||
|
|
c76ce101b8 | ||
|
|
b41c086984 | ||
|
|
9f2cc4df36 | ||
|
|
68f67ff46c | ||
|
|
6c5f86b2f7 | ||
|
|
0c0cb1784d | ||
|
|
1c4bb214d2 | ||
|
|
bb158880d5 | ||
|
|
f544fc604e | ||
|
|
56b3b27206 | ||
|
|
8af2f96b4f | ||
|
|
3552a11afa | ||
|
|
ca9910edb7 | ||
|
|
fc82840132 | ||
|
|
88502ca49f | ||
|
|
2def146c67 | ||
|
|
7e09c6e72c | ||
|
|
219a15d1db | ||
|
|
c20a71c99f | ||
|
|
d25c57ae05 | ||
|
|
efe4083dce | ||
|
|
26bf77962b | ||
|
|
0ea6703661 | ||
|
|
9238bbde65 | ||
|
|
1331b65023 | ||
|
|
9361325137 | ||
|
|
d2ed51bcad | ||
|
|
44205b188b | ||
|
|
9d7e0b281b | ||
|
|
2bc5f3c013 | ||
|
|
f9a170e5f2 | ||
|
|
78ffb50d1f | ||
|
|
bf522c9c76 | ||
|
|
480f44cd0f | ||
|
|
b8ad117e87 | ||
|
|
49567a060e | ||
|
|
299ed9f903 | ||
|
|
cf620c829b | ||
|
|
025acfe45a | ||
|
|
c0c108c870 | ||
|
|
0e2966d6dd | ||
|
|
52cfb66cf7 | ||
|
|
8ff07d46c2 | ||
|
|
648fdc18f8 | ||
|
|
a4749356ae | ||
|
|
540aea5999 | ||
|
|
82445e3e6d | ||
|
|
f5848135e3 | ||
|
|
b487f8b662 | ||
|
|
e2edc5f899 | ||
|
|
df64ba2e40 | ||
|
|
b4cc30530d | ||
|
|
9fa8fa5165 | ||
|
|
46678f2eac | ||
|
|
738a6df77d | ||
|
|
4e42740ca3 | ||
|
|
1127d7d68f | ||
|
|
4712da3eb1 | ||
|
|
10fb5f2d37 | ||
|
|
6d93f89e03 | ||
|
|
661ea41861 | ||
|
|
f45e16e59d | ||
|
|
9c53033f54 | ||
|
|
905db80c28 | ||
|
|
f10deb124b | ||
|
|
64b34c8cda | ||
|
|
5a610f60d7 | ||
|
|
542a78a4c3 | ||
|
|
f148a0ec35 | ||
|
|
e6136f08fb | ||
|
|
4612343d6e | ||
|
|
67b0860fe7 | ||
|
|
c5aa796d91 | ||
|
|
c6bffe7ceb | ||
|
|
1d4d238577 | ||
|
|
c87d063211 | ||
|
|
5d96f5d00b | ||
|
|
8e38ee884f | ||
|
|
00949fccda | ||
|
|
3991af9ed6 | ||
|
|
633fd5000e | ||
|
|
b9bd0ce3a3 | ||
|
|
e87ad48f9b | ||
|
|
b6ebf15c75 | ||
|
|
e5858522e3 | ||
|
|
e088c974dd | ||
|
|
a9034610e1 | ||
|
|
bc3d3de30a | ||
|
|
c88f648cdf | ||
|
|
54778f65f8 | ||
|
|
4fec045073 | ||
|
|
640bd7b183 | ||
|
|
5cce6d01ad | ||
|
|
dfded633c6 | ||
|
|
b961afed49 | ||
|
|
bb3700997c | ||
|
|
9fdfad1d45 | ||
|
|
e429f76e9f | ||
|
|
83a993a28e | ||
|
|
55c34cbb7c | ||
|
|
23a5e53247 | ||
|
|
d13ba046b0 | ||
|
|
80e04a1e86 | ||
|
|
2b8bb5bd7f | ||
|
|
5844164feb | ||
|
|
479fde27d7 | ||
|
|
4fced3ef5a | ||
|
|
972ed61266 | ||
|
|
1c1e643218 | ||
|
|
17a8dd8f62 | ||
|
|
37fd508a59 | ||
|
|
d991096cb4 | ||
|
|
de0a64a016 | ||
|
|
5c28473183 | ||
|
|
ce7281905d | ||
|
|
00ed0bfb5d | ||
|
|
268a9d8db3 | ||
|
|
fbfad686aa | ||
|
|
9f174d3a62 | ||
|
|
d0e8eb1700 | ||
|
|
dca932eda4 | ||
|
|
359b487793 | ||
|
|
8b27a69ae4 | ||
|
|
efb3ae6d49 | ||
|
|
b23548b2a6 | ||
|
|
48ac2ea1e0 | ||
|
|
bcf6f8572f | ||
|
|
3f7e125b57 | ||
|
|
39d4a7d13a | ||
|
|
0ff25d581c | ||
|
|
7b6c2cb8dd | ||
|
|
af1050d83f | ||
|
|
3a9c52cefa | ||
|
|
f6fb347d98 | ||
|
|
32d646a548 | ||
|
|
cf2ca56e34 | ||
|
|
d83e51a8a2 | ||
|
|
d88bee3a57 | ||
|
|
79255dfe9b | ||
|
|
5917ae8baf | ||
|
|
f5b1063a8b | ||
|
|
49d75ff689 | ||
|
|
65b9c26fb4 | ||
|
|
be781e9144 | ||
|
|
15f1b5f368 | ||
|
|
ec6fd088f2 | ||
|
|
4d3261dadc | ||
|
|
b3de630d40 | ||
|
|
86ab81dadf | ||
|
|
b5a8d6b505 | ||
|
|
8f9348ee53 | ||
|
|
b548e1d8fe | ||
|
|
b71416f610 | ||
|
|
54356da24f | ||
|
|
ba7c84fe3b | ||
|
|
706f56867c | ||
|
|
0b3e70a506 | ||
|
|
8c44eb5dd3 | ||
|
|
1893204067 | ||
|
|
b0084c3fc4 | ||
|
|
31567cea63 | ||
|
|
ce2064d8b6 | ||
|
|
0f18a4f92b | ||
|
|
bfd5e8dfbe | ||
|
|
8bfc987705 | ||
|
|
c5a6dce27a | ||
|
|
255bfffed7 | ||
|
|
39df8f0b3f | ||
|
|
bb108435bb | ||
|
|
8df5547f2d | ||
|
|
bb325e497a | ||
|
|
72ae46e922 | ||
|
|
a57b09623e | ||
|
|
4e19bfb5ed | ||
|
|
bd1e07de23 | ||
|
|
55f0f2de4c | ||
|
|
f0deafdfe7 | ||
|
|
a8b3922a74 | ||
|
|
32aef855b7 | ||
|
|
11cfa85a2a | ||
|
|
9efde28350 | ||
|
|
1f7d4c7441 | ||
|
|
770a2582de | ||
|
|
e3c6cbaaa6 | ||
|
|
837c446dc6 | ||
|
|
dd95e0a0ea | ||
|
|
ed8148233e | ||
|
|
838fd5f85e | ||
|
|
ad9b4290e5 | ||
|
|
ca98325462 | ||
|
|
908da627b8 | ||
|
|
0e485625ff | ||
|
|
9ce09fb26b | ||
|
|
d8398dbe30 | ||
|
|
867d69258d | ||
|
|
9a2b0dc275 | ||
|
|
7ffb9359f6 | ||
|
|
b032354a9f | ||
|
|
8a4ee02d24 | ||
|
|
5b64e3dbe7 | ||
|
|
4b99878a42 | ||
|
|
71ff8780c6 | ||
|
|
1dc5268847 | ||
|
|
c34e694126 | ||
|
|
cfce285a05 | ||
|
|
ccb6cb1abe | ||
|
|
8c7ba5efea | ||
|
|
1bba97984b | ||
|
|
b94600d181 | ||
|
|
a6277f0c72 | ||
|
|
ed78fd2a5f | ||
|
|
a18be7b844 | ||
|
|
8060ab27b3 | ||
|
|
148b54ca19 | ||
|
|
939ce10616 | ||
|
|
4e1b5e733f | ||
|
|
02ee112308 | ||
|
|
10785ba814 | ||
|
|
43459d1750 | ||
|
|
e358ec0ce2 | ||
|
|
7e2cba01fb | ||
|
|
c0fc80cb59 | ||
|
|
be828b50e3 | ||
|
|
91760b0771 | ||
|
|
2a22a91544 | ||
|
|
4116a9cc11 | ||
|
|
7dce2c0607 | ||
|
|
d22f22c3b3 | ||
|
|
e3c4cde042 | ||
|
|
4d8de32a16 | ||
|
|
12e6a41423 | ||
|
|
bd9c6a64e3 | ||
|
|
1da952450f | ||
|
|
4b96dd9908 | ||
|
|
3d98fd4308 | ||
|
|
1a4b1c3298 | ||
|
|
eb468ea744 | ||
|
|
2fa51f1843 | ||
|
|
51bbbc2a32 | ||
|
|
c2bca939be | ||
|
|
5e6b35696f | ||
|
|
49eb07f98f | ||
|
|
7f905b082d | ||
|
|
74be3e847f | ||
|
|
59c2ed9acf | ||
|
|
8945b7ac08 | ||
|
|
970cf45166 | ||
|
|
fd942e04cd | ||
|
|
2bf9b97ab7 | ||
|
|
3b2fb23bca | ||
|
|
26c982ac8f | ||
|
|
a56fc622ae | ||
|
|
b475878df6 | ||
|
|
9b86549eaa | ||
|
|
a5ce01cc38 | ||
|
|
1326c286fa | ||
|
|
29e02ac7a5 | ||
|
|
143757e8c6 | ||
|
|
1023d322e5 | ||
|
|
2d945afd58 | ||
|
|
5beb3a1141 | ||
|
|
cfbebb7201 | ||
|
|
cb027bfdc0 | ||
|
|
031b26584b | ||
|
|
32ed0b80da | ||
|
|
b28a18be73 | ||
|
|
446f4efa65 | ||
|
|
1c7b934402 | ||
|
|
735962d306 | ||
|
|
0118eafee1 | ||
|
|
63bd4eda55 | ||
|
|
4f835a0f0f | ||
|
|
7d1d43744a | ||
|
|
99cfca8498 | ||
|
|
9c1b3d6712 | ||
|
|
b0c2d083d6 | ||
|
|
31e2476fc8 | ||
|
|
789b2010f5 | ||
|
|
7031a736a7 | ||
|
|
77d02c1bd6 | ||
|
|
8ea2be2648 | ||
|
|
5861358238 | ||
|
|
b514ec5fe6 | ||
|
|
c06d85d175 | ||
|
|
14458682d9 | ||
|
|
380c555842 | ||
|
|
a770ff144e | ||
|
|
84bd1715d8 | ||
|
|
2f1a73754b | ||
|
|
9f98d2ec5d | ||
|
|
1f393c627b | ||
|
|
4b5b56452b | ||
|
|
e717b13e75 | ||
|
|
3e3f507012 | ||
|
|
d87bbf9433 | ||
|
|
1b668f5675 | ||
|
|
1a0b1ae238 | ||
|
|
793aff3891 | ||
|
|
448dd18685 | ||
|
|
108fe574a0 | ||
|
|
a80e680125 | ||
|
|
ff72e3f154 | ||
|
|
002c2b6170 | ||
|
|
a91e1a8cab | ||
|
|
d7b4193978 | ||
|
|
338d587f2a | ||
|
|
cd23fdac2e | ||
|
|
a960a3cde6 | ||
|
|
247d4b2c8f | ||
|
|
bb055c7c81 | ||
|
|
f13979bfbb | ||
|
|
90d52ee669 | ||
|
|
820f8bc1af | ||
|
|
f9f0ad1ef7 | ||
|
|
51b663787f | ||
|
|
71a6f979a5 | ||
|
|
9c96986b36 | ||
|
|
de03322073 | ||
|
|
fa2450db30 | ||
|
|
cc689290cd | ||
|
|
b83d8dc8c0 | ||
|
|
62807c2788 | ||
|
|
be4fa1dc1a | ||
|
|
25e02ea07f | ||
|
|
ff6a12e9c6 | ||
|
|
f3cf32a085 | ||
|
|
776fc0b7f3 | ||
|
|
492f9bb046 | ||
|
|
5af2ead85a | ||
|
|
970a963896 | ||
|
|
73cade558a | ||
|
|
95845b16c9 | ||
|
|
31a02c55b7 | ||
|
|
7469495459 | ||
|
|
b6f47f76f0 | ||
|
|
4c40283d00 | ||
|
|
351cd5bd4b | ||
|
|
bac2eef496 | ||
|
|
42ea2758b6 | ||
|
|
fa1ecb8c67 | ||
|
|
f98398b418 | ||
|
|
ac888ac6af | ||
|
|
2c702de52c | ||
|
|
4ef6a41cc4 | ||
|
|
6a8efa3f15 | ||
|
|
a7eebff916 | ||
|
|
8c4c526698 | ||
|
|
2c2b87af07 | ||
|
|
ee69a2467e | ||
|
|
c92cda9bec | ||
|
|
f184061c16 | ||
|
|
2101dd4add | ||
|
|
1f997de8bf | ||
|
|
d0d5c62ec7 | ||
|
|
1763e7d3bc | ||
|
|
7b1321f9a1 | ||
|
|
12862b11cf | ||
|
|
166d4846ee | ||
|
|
edbd3baa59 | ||
|
|
751c7cbf9c | ||
|
|
5926a75cc5 | ||
|
|
f8163f5d22 | ||
|
|
1f51274353 | ||
|
|
3e5284aaf2 | ||
|
|
df2cbe321c | ||
|
|
3f585cddfc | ||
|
|
5994e44877 | ||
|
|
0bc6a7b2ed | ||
|
|
7935b7327e | ||
|
|
666032abbd | ||
|
|
47294f4d29 | ||
|
|
f7faf0fcf7 | ||
|
|
fb283cfe4a | ||
|
|
49c16cc9a6 | ||
|
|
d751b00504 | ||
|
|
ef28931293 | ||
|
|
a7b80c9881 | ||
|
|
03c188086c | ||
|
|
753f29df4c | ||
|
|
71cfd25c1d | ||
|
|
dc4e88d7b4 | ||
|
|
fd84e07320 | ||
|
|
fcfa72e5fc | ||
|
|
2f7a73381a | ||
|
|
534646f9d3 | ||
|
|
4e2ce0af4e | ||
|
|
d2225e5ce7 | ||
|
|
d34ebe94ca | ||
|
|
2884b27367 | ||
|
|
30dcd18afb | ||
|
|
280727073a | ||
|
|
c5a8764db1 | ||
|
|
695e20c47f | ||
|
|
a76ed9942d | ||
|
|
cd62771d12 | ||
|
|
dc5bdda8e0 | ||
|
|
97127c3e03 | ||
|
|
8bcb034422 | ||
|
|
4ae4ea0169 | ||
|
|
ffdbc5a1b2 | ||
|
|
a7859191b2 | ||
|
|
ba8cbf877f | ||
|
|
972752aa1c | ||
|
|
59e50f77bc | ||
|
|
9ada7d9aad | ||
|
|
a0e639e1fa | ||
|
|
9172ab5983 | ||
|
|
585d1de653 | ||
|
|
66ef4d5eb5 | ||
|
|
a9ad49e81b | ||
|
|
c7abd09aea | ||
|
|
3badcfe58d | ||
|
|
bf44ea1350 | ||
|
|
074537a8ac | ||
|
|
73bc453eaf | ||
|
|
745129e825 |
@@ -22,4 +22,4 @@ tasks:
|
||||
ninja
|
||||
- test: |
|
||||
cd fish/build
|
||||
env SHOW_INTERACTIVE_LOG=1 ninja test
|
||||
env ninja test
|
||||
|
||||
@@ -19,4 +19,4 @@ tasks:
|
||||
ninja
|
||||
- test: |
|
||||
cd fish/build
|
||||
env SHOW_INTERACTIVE_LOG=1 ninja test
|
||||
env ninja test
|
||||
|
||||
@@ -23,4 +23,4 @@ tasks:
|
||||
gmake -j2
|
||||
- test: |
|
||||
cd fish/build
|
||||
gmake test SHOW_INTERACTIVE_LOG=1
|
||||
gmake test
|
||||
|
||||
43
.github/workflows/codeql-analysis.yml
vendored
43
.github/workflows/codeql-analysis.yml
vendored
@@ -1,43 +0,0 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '18 22 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
language: [ 'cpp', 'javascript', 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
6
.github/workflows/lockthreads.yml
vendored
6
.github/workflows/lockthreads.yml
vendored
@@ -7,8 +7,14 @@ on:
|
||||
# min 0-59 ┘ │ │ │ └ weekday 0-6
|
||||
# hour 0-23 ┘ │ └ month 1-12
|
||||
# └ day 1-31
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
permissions:
|
||||
issues: write # for dessant/lock-threads to lock issues
|
||||
pull-requests: write # for dessant/lock-threads to lock PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
|
||||
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@@ -6,6 +6,9 @@ env:
|
||||
CTEST_PARALLEL_LEVEL: "1"
|
||||
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ubuntu:
|
||||
|
||||
@@ -75,15 +78,19 @@ jobs:
|
||||
CXXFLAGS: "-fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address"
|
||||
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1
|
||||
UBSAN_OPTIONS: print_stacktrace=1:report_error_type=1
|
||||
LSAN_OPTIONS: verbosity=1:log_threads=1
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
- name: make
|
||||
run: |
|
||||
make
|
||||
- name: make test
|
||||
run: |
|
||||
make test
|
||||
# This is broken as of 2022-04-18, ASAN crashes on
|
||||
# autosuggest_suggest_special for no discernable reason.
|
||||
# Unable to reproduce locally.
|
||||
# - name: make test
|
||||
# run: |
|
||||
# make test
|
||||
|
||||
ubuntu-threadsan:
|
||||
|
||||
|
||||
176
CHANGELOG.rst
176
CHANGELOG.rst
@@ -1,3 +1,178 @@
|
||||
fish 3.5.1 (released July 20, 2022)
|
||||
===================================
|
||||
|
||||
This release of fish introduces the following small enhancements:
|
||||
|
||||
- Cursor shaping for Vi mode is enabled by default in tmux, and will be used if the outer terminal is capable (:issue:`8981`).
|
||||
- ``printf`` returns a better error when used with arguments interpreted as octal numbers (:issue:`9035`).
|
||||
- ``history merge`` when in private mode is now an error, rather than wiping out other sessions' history (:issue:`9050`).
|
||||
- The error message when launching a command that is built for the wrong architecture on macOS is more helpful (:issue:`9052`).
|
||||
- Added completions for:
|
||||
|
||||
- ``choose`` (:issue:`9065`)
|
||||
- ``expect`` (:issue:`9060`)
|
||||
- ``navi`` (:issue:`9064`)
|
||||
- ``qdbus`` (:issue:`9031`)
|
||||
- ``reflector`` (:issue:`9027`)
|
||||
|
||||
- Improvements to some completions.
|
||||
|
||||
This release also fixes a number of problems identified in fish 3.5.0.
|
||||
|
||||
- Completing ``git blame`` or ``git -C`` works correctly (:issue:`9053`).
|
||||
- On terminals that emit a ``CSI u`` sequence for :kbd:`Shift-Space`, fish inserts a space instead of printing an error. (:issue:`9054`).
|
||||
- ``status fish-path`` on Linux-based platforms could print the path with a " (deleted)" suffix (such as ``/usr/bin/fish (deleted)``), which is now removed (:issue:`9019`).
|
||||
- Cancelling an initial command (from fish's ``--init-command`` option) with :kbd:`Control-C` no longer prevents configuration scripts from running (:issue:`9024`).
|
||||
- The job summary contained extra blank lines if the prompt used multiple lines, which is now fixed (:issue:`9044`).
|
||||
- Using special input functions in bindings, in combination with ``and``/``or`` conditionals, no longer crashes (:issue:`9051`).
|
||||
|
||||
--------------
|
||||
|
||||
fish 3.5.0 (released June 16, 2022)
|
||||
===================================
|
||||
|
||||
Notable improvements and fixes
|
||||
------------------------------
|
||||
- A new ``path`` builtin command to filter and transform paths (:issue:`7659`, :issue:`8958`). For example, to list all the separate extensions used on files in /usr/share/man (after removing one extension, commonly a ".gz")::
|
||||
|
||||
path filter -f /usr/share/man/** | path change-extension '' | path extension | path sort -u
|
||||
- Tab (or any key bound to ``complete``) now expands wildcards instead of invoking completions, if there is a wildcard in the path component under the cursor (:issue:`954`, :issue:`8593`).
|
||||
- Scripts can now catch and handle the SIGINT and SIGTERM signals, either via ``function --on-signal`` or with ``trap`` (:issue:`6649`).
|
||||
|
||||
Deprecations and removed features
|
||||
---------------------------------
|
||||
- The ``stderr-nocaret`` feature flag, introduced in fish 3.0 and enabled by default in fish 3.1, has been made read-only.
|
||||
That means it is no longer possible to disable it, and code supporting the ``^`` redirection has been removed (:issue:`8857`, :issue:`8865`).
|
||||
|
||||
To recap: fish used to support ``^`` to redirect stderr, so you could use commands like::
|
||||
|
||||
test "$foo" -gt 8 ^/dev/null
|
||||
|
||||
to ignore error messages. This made the ``^`` symbol require escaping and quoting, and was a bit of a weird shortcut considering ``2>`` already worked, which is only one character longer.
|
||||
|
||||
So the above can simply become::
|
||||
|
||||
test "$foo" -gt 8 2>/dev/null
|
||||
|
||||
- The following feature flags have been enabled by default:
|
||||
|
||||
- ``regex-easyesc``, which makes ``string replace -r`` not do a superfluous round of unescaping in the replacement expression.
|
||||
That means e.g. to escape any "a" or "b" in an argument you can use ``string replace -ra '([ab])' '\\\\$1' foobar`` instead of needing 8 backslashes.
|
||||
|
||||
This only affects the *replacement* expression, not the *match* expression (the ``'([ab])'`` part in the example).
|
||||
A survey of plugins on GitHub did not turn up any affected code, so we do not expect this to affect many users.
|
||||
|
||||
This flag was introduced in fish 3.1.
|
||||
- ``ampersand-nobg-in-token``, which means that ``&`` will not create a background job if it occurs in the middle of a word. For example, ``echo foo&bar`` will print "foo&bar" instead of running ``echo foo`` in the background and then starting ``bar`` as a second job.
|
||||
|
||||
Reformatting with ``fish_indent`` would already introduce spaces, turning ``echo foo&bar`` into ``echo foo & bar``.
|
||||
|
||||
This flag was introduced in fish 3.4.
|
||||
|
||||
To turn off these flags, add ``no-regex-easyesc`` or ``no-ampersand-nobg-in-token`` to :envvar:`fish_features`` and restart fish::
|
||||
|
||||
set -Ua fish_features no-regex-easyesc
|
||||
|
||||
Like ``stderr-nocaret``, they will eventually be made read-only.
|
||||
- Most ``string`` subcommands no longer append a newline to their input if the input didn't have one (:issue:`8473`, :issue:`3847`)
|
||||
- Fish's escape sequence removal (like for ``string length --visible`` or to figure out how wide the prompt is) no longer has special support for non-standard color sequences like from Data General terminals, e.g. the Data General Dasher D220 from 1984. This removes a bunch of work in the common case, allowing ``string length --visible`` to be much faster with unknown escape sequences. We don't expect anyone to have ever used fish with such a terminal (:issue:`8769`).
|
||||
- Code to upgrade universal variables from fish before 3.0 has been removed. Users who upgrade directly from fish versions 2.7.1 or before will have to set their universal variables & abbreviations again. (:issue:`8781`)
|
||||
- The meaning of an empty color variable has changed (:issue:`8793`). Previously, when a variable was set but empty, it would be interpreted as the "normal" color. Now, empty color variables cause the same effect as unset variables - the general highlighting variable for that type is used instead. For example::
|
||||
|
||||
set -g fish_color_command blue
|
||||
set -g fish_color_keyword
|
||||
|
||||
would previously make keywords "normal" (usually white in a dark terminal). Now it'll make them blue. To achieve the previous behavior, use the normal color explicitly: ``set -g fish_color_keyword normal``.
|
||||
|
||||
This makes it easier to make self-contained color schemes that don't accidentally use color that was set before.
|
||||
``fish_config`` has been adjusted to set known color variables that a theme doesn't explicitly set to empty.
|
||||
- ``eval`` is now a reserved keyword, so it can't be used as a function name. This follows ``set`` and ``read``, and is necessary because it can't be cleanly shadowed by a function - at the very least ``eval set -l argv foo`` breaks. Fish will ignore autoload files for it, so left over ``eval.fish`` from previous fish versions won't be loaded.
|
||||
- The git prompt in informative mode now defaults to skipping counting untracked files, as this was extremely slow. To turn it on, set :envvar:`__fish_git_prompt_showuntrackedfiles` or set the git config value "bash.showuntrackedfiles" to ``true`` explicitly (which can be done for individual repositories). The "informative+vcs" sample prompt already skipped display of untracked files, but didn't do so in a way that skipped the computation, so it should be quite a bit faster in many cases (:issue:`8980`).
|
||||
- The ``__terlar_git_prompt`` function, used by the "Terlar" sample prompt, has been rebuilt as a configuration of the normal ``fish_git_prompt`` to ease maintenance, improve performance and add features (like reading per-repo git configuration). Some slight changes remain; users who absolutely must have the same behavior are encouraged to copy the old function (:issue:`9011`, :issue:`7918`, :issue:`8979`).
|
||||
|
||||
Scripting improvements
|
||||
----------------------
|
||||
- Quoted command substitution that directly follow a variable expansion (like ``echo "$var$(echo x)"``) no longer affect the variable expansion (:issue:`8849`).
|
||||
- Fish now correctly expands command substitutions that are preceded by an escaped dollar (like ``echo \$(echo)``). This regressed in version 3.4.0.
|
||||
- ``math`` can now handle underscores (``_``) as visual separators in numbers (:issue:`8611`, :issue:`8496`)::
|
||||
|
||||
math 5 + 2_123_252
|
||||
|
||||
- ``math``'s ``min`` and ``max`` functions now take a variable number of arguments instead of always requiring 2 (:issue:`8644`, :issue:`8646`)::
|
||||
|
||||
> math min 8,2,4
|
||||
2
|
||||
|
||||
- ``read`` is now faster as the last process in a pipeline (:issue:`8552`).
|
||||
- ``string join`` gained a new ``--no-empty`` flag to skip empty arguments (:issue:`8774`, :issue:`8351`).
|
||||
- ``read`` now only triggers the ``fish_read`` event, not the ``fish_prompt`` event (:issue:`8797`). It was supposed to work this way in fish 3.2.0 and later, but both events were emitted.
|
||||
- The TTY modes are no longer restored when non-interactive shells exit. This fixes wrong tty modes in pipelines with interactive commands. (:issue:`8705`).
|
||||
- Some functions shipped with fish printed error messages to standard output, but they now they rightly go to standard error (:issue:`8855`).
|
||||
- ``jobs`` now correctly reports CPU usage as a percentage, instead of as a number of clock ticks (:issue:`8919`).
|
||||
- ``process-exit`` events now fire when the process exits even if the job has not yet exited, fixing a regression in 3.4.1 (:issue:`8914`).
|
||||
|
||||
Interactive improvements
|
||||
------------------------
|
||||
- Fish now reports a special error if a command wasn't found and there is a non-executable file by that name in :envvar:`PATH` (:issue:`8804`).
|
||||
- ``less`` and other interactive commands would occasionally be stopped when run in a pipeline with fish functions; this has been fixed (:issue:`8699`).
|
||||
- Case-changing autosuggestions generated mid-token now correctly append only the suffix, instead of duplicating the token (:issue:`8820`).
|
||||
- ``ulimit`` learned a number of new options for the resource limits available on Linux, FreeBSD ande NetBSD, and returns a specific warning if the limit specified is not available on the active operating system (:issue:`8823`, :issue:`8786`).
|
||||
- The ``vared`` command can now successfully edit variables named "tmp" or "prompt" (:issue:`8836`, :issue:`8837`).
|
||||
- ``time`` now emits an error if used after the first command in a pipeline (:issue:`8841`).
|
||||
- ``fish_add_path`` now prints a message for skipped non-existent paths when using the ``-v`` flag (:issue:`8884`).
|
||||
- Since fish 3.2.0, pressing :kbd:`Control-D` while a command is running would end up inserting a space into the next commandline, which has been fixed (:issue:`8871`).
|
||||
- A bug that caused multi-line prompts to be moved down a line when pasting or switching modes has been fixed (:issue:`3481`).
|
||||
- The Web-based configuration system no longer strips too many quotes in the abbreviation display (:issue:`8917`, :issue:`8918`).
|
||||
- Fish started with ``--no-config`` will now use the default keybindings (:issue:`8493`)
|
||||
- When fish inherits a :envvar:`USER` environment variable value that doesn't correspond to the current effective user ID, it will now correct it in all cases (:issue:`8879`, :issue:`8583`).
|
||||
- Fish sets a new :envvar:`EUID`` variable containing the current effective user id (:issue:`8866`).
|
||||
- ``history search`` no longer interprets the search term as an option (:issue:`8853`)
|
||||
- The status message when a job terminates should no longer be erased by a multiline prompt (:issue:`8817`)
|
||||
|
||||
New or improved bindings
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
- The :kbd:`Alt-S` binding will now insert ``doas`` instead of ``sudo`` if necessary (:issue:`8942`).
|
||||
- The ``kill-whole-line`` special input function now kills the newline preceeding the last line. This makes ``dd`` in vi-mode clear the last line properly.
|
||||
- The new ``kill-inner-line`` special input function kills the line without any newlines, allowing ``cc`` in vi-mode to clear the line while preserving newlines (:issue:`8983`).
|
||||
- On terminals that emit special sequences for these combinations, :kbd:`Shift-Space` is bound like :kbd:`Space`, and :kbd:`Ctrl-Return` is bound like :kbd:`Return` (:issue:`8874`).
|
||||
|
||||
Improved prompts
|
||||
^^^^^^^^^^^^^^^^
|
||||
- A new ``Astronaut`` prompt (:issue:`8775`), a multi-line prompt using plain text reminiscent of the Starship.rs prompt.
|
||||
|
||||
Completions
|
||||
^^^^^^^^^^^
|
||||
- Added completions for:
|
||||
|
||||
- ``archlinux-java`` (:issue:`8911`)
|
||||
- ``apk`` (:issue:`8951`)
|
||||
- ``brightnessctl`` (:issue:`8758`)
|
||||
- ``efibootmgr`` (:issue:`9010`)
|
||||
- ``fastboot`` (:issue:`8904`)
|
||||
- ``optimus-manager`` (:issue:`8913`)
|
||||
- ``rclone`` (:issue:`8819`)
|
||||
- ``sops`` (:issue:`8821`)
|
||||
- ``tuned-adm`` (:issue:`8760`)
|
||||
- ``wg-quick`` (:issue:`8687`)
|
||||
|
||||
- ``complete`` can now be given multiple ``--condition`` options. They will be attempted in the order they were given, and only if all succeed will the completion be made available (as if they were connected with ``&&``). This helps with caching - fish's complete system stores the return value of each condition as long as the commandline doesn't change, so this can reduce the number of conditions that need to be evaluated (:issue:`8536`, :issue:`8967`).
|
||||
|
||||
Improved terminal support
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
- Working directory reporting is enabled for kitty (:issue:`8806`).
|
||||
- Changing the cursor shape is now enabled by default in iTerm2 (:issue:`3696`).
|
||||
|
||||
For distributors
|
||||
----------------
|
||||
- libatomic is now correctly detected as necessary when building on RISC-V (:issue:`8850`, :issue:`8851`).
|
||||
- In some cases, the build process found the wrong libintl on macOS. This has been corrected (:issue:`5244`).
|
||||
- The paths for completions, functions, and configuration snippets now include
|
||||
subdirectories ``fish/vendor_completions.d``, ``fish/vendor_functions.d``, and
|
||||
``fish/vendor_conf.d`` (respectively) within ``XDG_DATA_HOME`` (or ``~/.local/share``
|
||||
if not defined) (:issue:`8887`, :issue:`7816`).
|
||||
|
||||
--------------
|
||||
|
||||
fish 3.4.1 (released March 25, 2022)
|
||||
====================================
|
||||
|
||||
@@ -1749,6 +1924,7 @@ Interactive improvements
|
||||
key both on its own and as part of a control sequence, was applied to
|
||||
all control characters; this has been reduced to just the escape key.
|
||||
- Completing a function shows the description properly (:issue:`5206`).
|
||||
- `commandline` can now be used to set the commandline for the next command, restoring a behavior in 3.4.1 (:issue:`8807`).
|
||||
- Added completions for
|
||||
|
||||
- ``ansible``, including ``ansible-galaxy``, ``ansible-playbook``
|
||||
|
||||
@@ -92,7 +92,7 @@ set(FISH_BUILTIN_SRCS
|
||||
src/builtins/disown.cpp src/builtins/echo.cpp src/builtins/emit.cpp
|
||||
src/builtins/eval.cpp src/builtins/exit.cpp src/builtins/fg.cpp
|
||||
src/builtins/function.cpp src/builtins/functions.cpp src/builtins/history.cpp
|
||||
src/builtins/jobs.cpp src/builtins/math.cpp src/builtins/printf.cpp
|
||||
src/builtins/jobs.cpp src/builtins/math.cpp src/builtins/printf.cpp src/builtins/path.cpp
|
||||
src/builtins/pwd.cpp src/builtins/random.cpp src/builtins/read.cpp
|
||||
src/builtins/realpath.cpp src/builtins/return.cpp src/builtins/set.cpp
|
||||
src/builtins/set_color.cpp src/builtins/source.cpp src/builtins/status.cpp
|
||||
|
||||
@@ -34,6 +34,8 @@ fish can be installed:
|
||||
- using the `installer from fishshell.com <https://fishshell.com/>`__
|
||||
- as a `standalone app from fishshell.com <https://fishshell.com/>`__
|
||||
|
||||
Note: The minimum supported macOS version is 10.10 "Yosemite".
|
||||
|
||||
Packages for Linux
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -95,7 +97,7 @@ Running fish requires:
|
||||
The following optional features also have specific requirements:
|
||||
|
||||
- builtin commands that have the ``--help`` option or print usage
|
||||
messages require ``ul`` and either ``nroff`` or ``mandoc`` for
|
||||
messages require ``nroff`` or ``mandoc`` for
|
||||
display
|
||||
- automated completion generation from manual pages requires Python 3.5+
|
||||
- the ``fish_config`` web configuration tool requires Python 3.5+ and a web browser
|
||||
@@ -172,6 +174,8 @@ The install directory can be changed using the
|
||||
Building from source (macOS) - Xcode
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Note: The minimum supported macOS version is 10.10 "Yosemite".
|
||||
|
||||
.. code:: bash
|
||||
|
||||
mkdir build; cd build
|
||||
|
||||
@@ -9,14 +9,26 @@ set -e
|
||||
# Find the fish directory as two levels up from script directory.
|
||||
FISH_BASE_DIR="$( cd "$( dirname "$( dirname "$0" )" )" && pwd )"
|
||||
DEF_VER=unknown
|
||||
git_permission_failed=0
|
||||
|
||||
# First see if there is a version file (included in release tarballs),
|
||||
# then try git-describe, then default.
|
||||
if test -f version
|
||||
then
|
||||
VN=$(cat version) || VN="$DEF_VER"
|
||||
elif ! VN=$(git -C "$FISH_BASE_DIR" describe --always --dirty 2>/dev/null); then
|
||||
VN="$DEF_VER"
|
||||
else
|
||||
if VN=$(git -C "$FISH_BASE_DIR" describe --always --dirty 2>/dev/null); then
|
||||
:
|
||||
else
|
||||
if test $? = 128; then
|
||||
# Current git versions return status 128
|
||||
# when run in a repo owned by another user.
|
||||
# Even for describe and everything.
|
||||
# This occurs for `sudo make install`.
|
||||
git_permission_failed=1
|
||||
fi
|
||||
VN="$DEF_VER"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If the first param is --stdout, then output to stdout and exit.
|
||||
@@ -30,6 +42,15 @@ fi
|
||||
test -n "$1" && OUTPUT_DIR=$1/ || OUTPUT_DIR=
|
||||
FBVF="${OUTPUT_DIR}FISH-BUILD-VERSION-FILE"
|
||||
|
||||
if test "$VN" = unknown && test -r "$FBVF" && test "$git_permission_failed" = 1
|
||||
then
|
||||
# HACK: Git failed, so we keep the current version file.
|
||||
# This helps in case you built fish as a normal user
|
||||
# and then try to `sudo make install` it.
|
||||
date +%s > ${OUTPUT_DIR}fish-build-version-witness.txt
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -r "$FBVF"
|
||||
then
|
||||
VC=$(grep -v '^#' "$FBVF" | tr -d '"' | sed -e 's/^FISH_BUILD_VERSION=//')
|
||||
|
||||
@@ -48,8 +48,13 @@ def get_callsite():
|
||||
"""Return a triple (filename, line_number, line_text) of the call site location."""
|
||||
callstack = inspect.getouterframes(inspect.currentframe())
|
||||
for f in callstack:
|
||||
if inspect.getmodule(f.frame) is not Message.MODULE:
|
||||
return (os.path.basename(f.filename), f.lineno, f.code_context)
|
||||
# Skip call sites from this file.
|
||||
if inspect.getmodule(f.frame) is Message.MODULE:
|
||||
continue
|
||||
# Skip functions which have a truthy callsite_skip attribute.
|
||||
if getattr(f.function, "callsite_skip", False):
|
||||
continue
|
||||
return (os.path.basename(f.filename), f.lineno, f.code_context)
|
||||
return ("Unknown", -1, "")
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,13 @@ if (HAS_REDUNDANT_MOVE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wredundant-move")
|
||||
endif()
|
||||
|
||||
# Disable static destructors if we can.
|
||||
check_cxx_compiler_flag("-fno-c++-static-destructors" DISABLE_STATIC_DESTRUCTORS)
|
||||
if (DISABLE_STATIC_DESTRUCTORS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-c++-static-destructors")
|
||||
endif()
|
||||
|
||||
|
||||
# Try using CMake's own logic to locate curses/ncurses
|
||||
find_package(Curses)
|
||||
if(NOT ${CURSES_FOUND})
|
||||
@@ -89,7 +96,6 @@ check_struct_has_member("struct dirent" d_type dirent.h HAVE_STRUCT_DIRENT_D_TYP
|
||||
check_cxx_symbol_exists(dirfd "sys/types.h;dirent.h" HAVE_DIRFD)
|
||||
check_include_file_cxx(execinfo.h HAVE_EXECINFO_H)
|
||||
check_cxx_symbol_exists(flock sys/file.h HAVE_FLOCK)
|
||||
check_cxx_symbol_exists(getifaddrs ifaddrs.h HAVE_GETIFADDRS)
|
||||
check_cxx_symbol_exists(getpwent pwd.h HAVE_GETPWENT)
|
||||
check_cxx_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
|
||||
check_cxx_symbol_exists(gettext libintl.h HAVE_GETTEXT)
|
||||
@@ -128,9 +134,7 @@ check_cxx_symbol_exists(eventfd sys/eventfd.h HAVE_EVENTFD)
|
||||
check_cxx_symbol_exists(pipe2 unistd.h HAVE_PIPE2)
|
||||
check_cxx_symbol_exists(wcscasecmp wchar.h HAVE_WCSCASECMP)
|
||||
check_cxx_symbol_exists(wcsdup wchar.h HAVE_WCSDUP)
|
||||
check_cxx_symbol_exists(wcslcpy wchar.h HAVE_WCSLCPY)
|
||||
check_cxx_symbol_exists(wcsncasecmp wchar.h HAVE_WCSNCASECMP)
|
||||
check_cxx_symbol_exists(wcsndup wchar.h HAVE_WCSNDUP)
|
||||
|
||||
# These are for compatibility with Solaris 10, which places the following
|
||||
# in the std namespace.
|
||||
@@ -251,10 +255,13 @@ int main () {
|
||||
check_cxx_source_compiles("
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
std::atomic<uint64_t> x (0);
|
||||
std::atomic<uint8_t> n8 (0);
|
||||
std::atomic<uint64_t> n64 (0);
|
||||
int main() {
|
||||
uint64_t i = x.load(std::memory_order_relaxed);
|
||||
return std::atomic_is_lock_free(&x);
|
||||
uint8_t i = n8.load(std::memory_order_relaxed);
|
||||
uint64_t j = n64.load(std::memory_order_relaxed);
|
||||
return std::atomic_is_lock_free(&n8)
|
||||
& std::atomic_is_lock_free(&n64);
|
||||
}"
|
||||
LIBATOMIC_NOT_NEEDED)
|
||||
IF (NOT LIBATOMIC_NOT_NEEDED)
|
||||
|
||||
@@ -159,6 +159,7 @@ foreach(CHECK ${FISH_CHECKS})
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
set_tests_properties(${CHECK_NAME} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
set_tests_properties(${CHECK_NAME} PROPERTIES ENVIRONMENT FISH_FORCE_COLOR=1)
|
||||
add_test_target("${CHECK_NAME}")
|
||||
endforeach(CHECK)
|
||||
|
||||
@@ -171,5 +172,6 @@ foreach(PEXPECT ${PEXPECTS})
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
|
||||
)
|
||||
set_tests_properties(${PEXPECT} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
set_tests_properties(${PEXPECT} PROPERTIES ENVIRONMENT FISH_FORCE_COLOR=1)
|
||||
add_test_target("${PEXPECT}")
|
||||
endforeach(PEXPECT)
|
||||
|
||||
@@ -4,12 +4,22 @@ include(FeatureSummary)
|
||||
|
||||
option(WITH_GETTEXT "translate messages if gettext is available" ON)
|
||||
if(WITH_GETTEXT)
|
||||
if(APPLE)
|
||||
# Fix for https://github.com/fish-shell/fish-shell/issues/5244
|
||||
# via https://gitlab.kitware.com/cmake/cmake/-/issues/18921
|
||||
set(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
endif()
|
||||
find_package(Intl QUIET)
|
||||
find_package(Gettext)
|
||||
if(GETTEXT_FOUND)
|
||||
set(HAVE_GETTEXT 1)
|
||||
include_directories(${Intl_INCLUDE_DIR})
|
||||
endif()
|
||||
if(APPLE)
|
||||
set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
|
||||
unset(CMAKE_FIND_FRAMEWORK_OLD)
|
||||
endif()
|
||||
endif()
|
||||
add_feature_info(gettext GETTEXT_FOUND "translate messages with gettext")
|
||||
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#cmakedefine HAVE_FLOCK 1
|
||||
|
||||
/* Define to 1 if you have the `getifaddrs' function. */
|
||||
#cmakedefine HAVE_GETIFADDRS 1
|
||||
|
||||
/* Define to 1 if you have the `getpwent' function. */
|
||||
#cmakedefine HAVE_GETPWENT 1
|
||||
|
||||
@@ -100,15 +97,9 @@
|
||||
/* Define to 1 if you have the `wcsdup' function. */
|
||||
#cmakedefine HAVE_WCSDUP 1
|
||||
|
||||
/* Define to 1 if you have the `wcslcpy' function. */
|
||||
#cmakedefine HAVE_WCSLCPY 1
|
||||
|
||||
/* Define to 1 if you have the `wcsncasecmp' function. */
|
||||
#cmakedefine HAVE_WCSNCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `wcsndup' function. */
|
||||
#cmakedefine HAVE_WCSNDUP 1
|
||||
|
||||
/* Define to 1 if you have the `wcstod_l' function. */
|
||||
#cmakedefine HAVE_WCSTOD_L 1
|
||||
|
||||
|
||||
@@ -230,7 +230,10 @@ The following special input functions are available:
|
||||
move the selected text to the killring
|
||||
|
||||
``kill-whole-line``
|
||||
move the line to the killring
|
||||
move the line (including the following newline) to the killring. If the line is the last line, its preceeding newline is also removed
|
||||
|
||||
``kill-inner-line``
|
||||
move the line (without the following newline) to the killring
|
||||
|
||||
``kill-word``
|
||||
move the next word to the killring
|
||||
|
||||
@@ -61,7 +61,7 @@ The following options are available:
|
||||
Causes the specified command to inherit completions from *WRAPPED_COMMAND* (see below for details).
|
||||
|
||||
**-n** or **--condition** *CONDITION*
|
||||
This completion should only be used if the *CONDITION* (a shell command) returns 0. This makes it possible to specify completions that should only be used in some cases.
|
||||
This completion should only be used if the *CONDITION* (a shell command) returns 0. This makes it possible to specify completions that should only be used in some cases. If multiple conditions are specified, fish will try them in the order they are specified until one fails or all succeeded.
|
||||
|
||||
**-C** or **--do-complete** *STRING*
|
||||
Makes ``complete`` try to find all possible completions for the specified string. If there is no *STRING*, the current commandline is used instead.
|
||||
|
||||
@@ -17,7 +17,7 @@ Description
|
||||
|
||||
The following options are available:
|
||||
|
||||
- **-n**
|
||||
**-n**
|
||||
Do not output a newline.
|
||||
|
||||
**-s**
|
||||
|
||||
@@ -26,7 +26,10 @@ The ``fish_git_prompt`` function displays information about the current git repo
|
||||
|
||||
There are numerous customization options, which can be controlled with git options or fish variables. git options, where available, take precedence over the fish variable with the same function. git options can be set on a per-repository or global basis. git options can be set with the ``git config`` command, while fish variables can be set as usual with the :ref:`set <cmd-set>` command.
|
||||
|
||||
- ``$__fish_git_prompt_show_informative_status`` or the git option ``bash.showInformativeStatus`` can be set to enable the "informative" display, which will show a large amount of information - the number of untracked files, dirty files, unpushed/unpulled commits, and more. In large repositories, this can take a lot of time, so it you may wish to disable it in these repositories with ``git config --local bash.showInformativeStatus false``. It also changes the characters the prompt uses to less plain ones (``✚`` instead of ``*`` for the dirty state for example) , and if you are only interested in that, set ``$__fish_git_prompt_use_informative_chars`` instead.
|
||||
- ``$__fish_git_prompt_show_informative_status`` or the git option ``bash.showInformativeStatus`` can be set to enable the "informative" display, which will show a large amount of information - the number of dirty files, unpushed/unpulled commits, and more.
|
||||
In large repositories, this can take a lot of time, so it you may wish to disable it in these repositories with ``git config --local bash.showInformativeStatus false``. It also changes the characters the prompt uses to less plain ones (``✚`` instead of ``*`` for the dirty state for example) , and if you are only interested in that, set ``$__fish_git_prompt_use_informative_chars`` instead.
|
||||
|
||||
Because counting untracked files requires a lot of time, the number of untracked files is only shown if enabled via ``$__fish_git_prompt_showuntrackedfiles`` or the git option ``bash.showUntrackedFiles``.
|
||||
|
||||
- ``$__fish_git_prompt_showdirtystate`` or the git option ``bash.showDirtyState`` can be set to show if the repository is "dirty", i.e. has uncommitted changes.
|
||||
|
||||
@@ -77,10 +80,8 @@ A number of variables set characters and color used as indicators. Many of these
|
||||
- ``$__fish_git_prompt_color_bare`` - the color to use for a bare repository - one without a working tree
|
||||
- ``$__fish_git_prompt_color_merging`` - the color when a merge/rebase/revert/bisect or cherry-pick is in progress
|
||||
|
||||
Some variables are only used in some modes, like when informative status is enabled:
|
||||
|
||||
- ``$__fish_git_prompt_char_cleanstate`` (✔) - the character to be used when nothing else applies
|
||||
- ``$__fish_git_prompt_color_cleanstate``
|
||||
- ``$__fish_git_prompt_char_cleanstate`` (✔ in informative mode) - the character to be used when nothing else applies
|
||||
- ``$__fish_git_prompt_color_cleanstate`` (no default)
|
||||
|
||||
Variables used with ``showdirtystate``:
|
||||
|
||||
@@ -112,8 +113,10 @@ Variables used with ``showupstream`` (also implied by informative status):
|
||||
|
||||
Colors used with ``showcolorhints``:
|
||||
|
||||
- ``$__fish_git_prompt_color_branch`` (green) - the color of the branch
|
||||
- ``$__fish_git_prompt_color_branch`` (green) - the color of the branch if nothing else applies
|
||||
- ``$__fish_git_prompt_color_branch_detached`` (red) the color of the branch if it's detached (e.g. a commit is checked out)
|
||||
- ``$__fish_git_prompt_color_branch_dirty`` (no default) the color of the branch if it's dirty and not detached
|
||||
- ``$__fish_git_prompt_color_branch_staged`` (no default) the color of the branch if it just has something staged and is otherwise clean
|
||||
- ``$__fish_git_prompt_color_flags`` (--bold blue) - the default color for dirty/staged/stashed/untracked state
|
||||
|
||||
Note that all colors can also have a corresponding ``_done`` color. For example, the contents of ``$__fish_git_prompt_color_upstream_done`` is printed right _after_ the upstream.
|
||||
|
||||
@@ -33,7 +33,7 @@ The following options are available:
|
||||
Run this function when the specified named event is emitted. Fish internally generates named events, for example,when showing the prompt. Custom events can be emitted using the :ref:`emit <cmd-emit>` command.
|
||||
|
||||
**-v** *VARIABLE_NAME* or **--on-variable** *VARIABLE_NAME*
|
||||
Run this function when the variable *VARIABLE_NAME* changes value. Note that :program:`fish`` makes no guarantees on any particular timing or even that the function will be run for every single ``set``. Rather it will be run when the variable has been set at least once, possibly skipping some values or being run when the variable has been set to the same value (except for universal variables set in other shells - only changes in the value will be picked up for those).
|
||||
Run this function when the variable *VARIABLE_NAME* changes value. Note that :program:`fish` makes no guarantees on any particular timing or even that the function will be run for every single ``set``. Rather it will be run when the variable has been set at least once, possibly skipping some values or being run when the variable has been set to the same value (except for universal variables set in other shells - only changes in the value will be picked up for those).
|
||||
|
||||
**-j** *PID* or **--on-job-exit** *PID*
|
||||
Run this function when the job containing a child process with the given process identifier *PID* exits. Instead of a PID, the string 'caller' can be specified. This is only allowed when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution.
|
||||
@@ -42,7 +42,7 @@ The following options are available:
|
||||
Run this function when the fish child process with process ID PID exits. Instead of a PID, for backward compatibility, "``%self``" can be specified as an alias for ``$fish_pid``, and the function will be run when the current fish instance exits.
|
||||
|
||||
**-s** *SIGSPEC* or **--on-signal** *SIGSPEC*
|
||||
Run this function when the signal ``SIGSPEC`` is delivered. ``SIGSPEC`` can be a signal number, or the signal name, such as ``SIGHUP`` (or just ``HUP``). Note that the signal must have been delivered to :program:`fish`; for example, :kbd:`Ctrl-C` sends ``SIGINT`` to the foreground process group, which will not be :program:`fish` if you are running another command at the time.
|
||||
Run this function when the signal ``SIGSPEC`` is delivered. ``SIGSPEC`` can be a signal number, or the signal name, such as ``SIGHUP`` (or just ``HUP``). Note that the signal must have been delivered to :program:`fish`; for example, :kbd:`Ctrl-C` sends ``SIGINT`` to the foreground process group, which will not be :program:`fish` if you are running another command at the time. Observing a signal will prevent fish from exiting in response to that signal.
|
||||
|
||||
**-S** or **--no-scope-shadowing**
|
||||
Allows the function to access the variables of calling functions. Normally, any variables inside the function that have the same name as variables from the calling function are "shadowed", and their contents are independent of the calling function.
|
||||
@@ -68,6 +68,8 @@ By using one of the event handler switches, a function can be made to run automa
|
||||
|
||||
- ``fish_cancel``, which is emitted when a commandline is cleared (used for terminal-shell integration).
|
||||
|
||||
Functions may not be named the same as a reserved keyword. These are elements of fish syntax or builtin commands which are essential for the operations of the shell. Current reserved words are ``[``, ``_``, ``and``, ``argparse``, ``begin``, ``break``, ``builtin``, ``case``, ``command``, ``continue``, ``else``, ``end``, ``eval``, ``exec``, ``for``, ``function``, ``if``, ``not``, ``or``, ``read``, ``return``, ``set``, ``status``, ``string``, ``switch``, ``test``, ``time``, and ``while``.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ Syntax
|
||||
For numbers, ``.`` is always the radix character regardless of locale - ``2.5``, not ``2,5``.
|
||||
Scientific notation (``10e5``) and hexadecimal (``0xFF``) are also available.
|
||||
|
||||
``math`` allows you to use underscores as visual separators for digit grouping. For example, you can write ``1_000_000``, ``0x_89_AB_CD_EF``, and ``1.234_567_e89``.
|
||||
|
||||
Operators
|
||||
---------
|
||||
|
||||
@@ -74,17 +76,15 @@ Operators
|
||||
``-``
|
||||
for subtraction
|
||||
``*`` or ``x``
|
||||
for multiplication
|
||||
for multiplication. ``*`` is the glob character and needs to be quoted or escaped, ``x`` needs to be followed by whitespace or it looks like ``0x`` hexadecimal notation.
|
||||
``/``
|
||||
for division
|
||||
(Note that ``*`` is the glob character and needs to be quoted or escaped, ``x`` needs to be followed by whitespace or it looks like ``0x`` hexadecimal notation.)
|
||||
``^``
|
||||
for exponentiation
|
||||
``%``
|
||||
for modulo
|
||||
``(`` or ``)``
|
||||
for grouping.
|
||||
(These need to be quoted or escaped because ``()`` denotes a command substitution.)
|
||||
for grouping. These need to be quoted or escaped because ``()`` denotes a command substitution.
|
||||
|
||||
They are all used in an infix manner - ``5 + 2``, not ``+ 5 2``.
|
||||
|
||||
@@ -120,7 +120,7 @@ Functions
|
||||
arc tangent of two variables
|
||||
``bitand``, ``bitor`` and ``bitxor``
|
||||
perform bitwise operations.
|
||||
These will throw away any non-integer parts andd interpret the rest as an int.
|
||||
These will throw away any non-integer parts and interpret the rest as an int.
|
||||
``ceil``
|
||||
round number up to nearest integer
|
||||
``cos``
|
||||
@@ -140,9 +140,9 @@ Functions
|
||||
``log2``
|
||||
the base-2 logarithm
|
||||
``max``
|
||||
returns the larger of two numbers
|
||||
returns the largest of the given numbers - this takes an arbitrary number of arguments (but at least one)
|
||||
``min``
|
||||
returns the smaller of two numbers
|
||||
returns the smallest of the given numbers - this takes an arbitrary number of arguments (but at least one)
|
||||
``ncr``
|
||||
"from n choose r" combination function - how many subsets of size r can be taken from n (order doesn't matter)
|
||||
``npr``
|
||||
@@ -191,6 +191,8 @@ Examples
|
||||
|
||||
``math 'ncr(49,6)'`` prints 13983816 - that's the number of possible picks in 6-from-49 lotto.
|
||||
|
||||
``math max 5,2,3,1`` prints 5.
|
||||
|
||||
Compatibility notes
|
||||
-------------------
|
||||
|
||||
|
||||
402
doc_src/cmds/path.rst
Normal file
402
doc_src/cmds/path.rst
Normal file
@@ -0,0 +1,402 @@
|
||||
.. _cmd-path:
|
||||
|
||||
path - manipulate and check paths
|
||||
=================================
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
path basename GENERAL_OPTIONS [PATH ...]
|
||||
path dirname GENERAL_OPTIONS [PATH ...]
|
||||
path extension GENERAL_OPTIONS [PATH ...]
|
||||
path filter GENERAL_OPTIONS [-v | --invert]
|
||||
[-d] [-f] [-l] [-r] [-w] [-x] \
|
||||
[(-t | --type) TYPE] [(-p | --perm) PERMISSION] [PATH ...]
|
||||
path is GENERAL_OPTIONS [(-v | --invert)] [(-t | --type) TYPE]
|
||||
[-d] [-f] [-l] [-r] [-w] [-x]
|
||||
[(-p | --perm) PERMISSION] [PATH ...]
|
||||
path normalize GENERAL_OPTIONS [PATH ...]
|
||||
path resolve GENERAL_OPTIONS [PATH ...]
|
||||
path change-extension GENERAL_OPTIONS EXTENSION [PATH ...]
|
||||
path sort GENERAL_OPTIONS [-r | --reverse]
|
||||
[-u | --unique] [--key=basename|dirname|path] [PATH ...]
|
||||
|
||||
GENERAL_OPTIONS := [-z | --null-in] [-Z | --null-out] [-q | --quiet]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``path`` performs operations on paths.
|
||||
|
||||
PATH arguments are taken from the command line unless standard input is connected to a pipe or a file, in which case they are read from standard input, one PATH per line. It is an error to supply PATH arguments on both the command line and on standard input.
|
||||
|
||||
Arguments starting with ``-`` are normally interpreted as switches; ``--`` causes the following arguments not to be treated as switches even if they begin with ``-``. Switches and required arguments are recognized only on the command line.
|
||||
|
||||
When a path starts with ``-``, ``path filter`` and ``path normalize`` will prepend ``./`` on output to avoid it being interpreted as an option otherwise, so it's safe to pass path's output to other commands that can handle relative paths.
|
||||
|
||||
All subcommands accept a ``-q`` or ``--quiet`` switch, which suppresses the usual output but exits with the documented status. In this case these commands will quit early, without reading all of the available input.
|
||||
|
||||
All subcommands also accept a ``-Z`` or ``--null-out`` switch, which makes them print output separated with NUL instead of newlines. This is for further processing, e.g. passing to another ``path``, or ``xargs -0``. This is not recommended when the output goes to the terminal or a command substitution.
|
||||
|
||||
All subcommands also accept a ``-z`` or ``--null-in`` switch, which makes them accept arguments from stdin separated with NULL-bytes. Since Unix paths can't contain NULL, that makes it possible to handle all possible paths and read input from e.g. ``find -print0``. If arguments are given on the commandline this has no effect. This should mostly be unnecessary since ``path`` automatically starts splitting on NULL if one appears in the first PATH_MAX bytes, PATH_MAX being the operating system's maximum length for a path plus a NULL byte.
|
||||
|
||||
Some subcommands operate on the paths as strings and so work on nonexistent paths, while others need to access the paths themselves and so filter out nonexistent paths.
|
||||
|
||||
The following subcommands are available.
|
||||
|
||||
.. _cmd-path-basename:
|
||||
|
||||
"basename" subcommand
|
||||
---------------------
|
||||
|
||||
::
|
||||
|
||||
path basename [-z | --null-in] [-Z | --null-out] [-q | --quiet] [PATH ...]
|
||||
|
||||
``path basename`` returns the last path component of the given path, by removing the directory prefix and removing trailing slashes. In other words, it is the part that is not the dirname. For files you might call it the "filename".
|
||||
|
||||
It returns 0 if there was a basename, i.e. if the path wasn't empty or just slashes.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path basename ./foo.mp4
|
||||
foo.mp4
|
||||
|
||||
>_ path basename ../banana
|
||||
banana
|
||||
|
||||
>_ path basename /usr/bin/
|
||||
bin
|
||||
|
||||
>_ path basename /usr/bin/*
|
||||
# This prints all files in /usr/bin/
|
||||
# A selection:
|
||||
cp
|
||||
fish
|
||||
grep
|
||||
rm
|
||||
|
||||
"dirname" subcommand
|
||||
--------------------
|
||||
|
||||
::
|
||||
|
||||
path dirname [-z | --null-in] [-Z | --null-out] [-q | --quiet] [PATH ...]
|
||||
|
||||
``path dirname`` returns the dirname for the given path. This is the part before the last "/", discounting trailing slashes. In other words, it is the part that is not the basename (discounting superfluous slashes).
|
||||
|
||||
It returns 0 if there was a dirname, i.e. if the path wasn't empty or just slashes.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path dirname ./foo.mp4
|
||||
.
|
||||
|
||||
>_ path dirname ../banana
|
||||
..
|
||||
|
||||
>_ path dirname /usr/bin/
|
||||
/usr
|
||||
|
||||
"extension" subcommand
|
||||
-----------------------
|
||||
|
||||
::
|
||||
|
||||
path extension [-z | --null-in] [-Z | --null-out] [-q | --quiet] [PATH ...]
|
||||
|
||||
``path extension`` returns the extension of the given path. This is the part after (and including) the last ".", unless that "." followed a "/" or the basename is "." or "..", in which case there is no extension and an empty line is printed.
|
||||
|
||||
If the filename ends in a ".", only a "." is printed.
|
||||
|
||||
It returns 0 if there was an extension.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path extension ./foo.mp4
|
||||
.mp4
|
||||
|
||||
>_ path extension ../banana
|
||||
# an empty line, status 1
|
||||
|
||||
>_ path extension ~/.config
|
||||
# an empty line, status 1
|
||||
|
||||
>_ path extension ~/.config.d
|
||||
.d
|
||||
|
||||
>_ path extension ~/.config.
|
||||
.
|
||||
|
||||
>_ set -l path (path change-extension '' ./foo.mp4)
|
||||
>_ set -l extension (path extension ./foo.mp4)
|
||||
> echo $path$extension
|
||||
# reconstructs the original path again.
|
||||
./foo.mp4
|
||||
|
||||
.. _cmd-path-filter:
|
||||
|
||||
"filter" subcommand
|
||||
--------------------
|
||||
|
||||
::
|
||||
|
||||
path filter [-z | --null-in] [-Z | --null-out] [-q | --quiet] \
|
||||
[-d] [-f] [-l] [-r] [-w] [-x] \
|
||||
[-v | --invert] [(-t | --type) TYPE] [(-p | --perm) PERMISSION] [PATH ...]
|
||||
|
||||
``path filter`` returns all of the given paths that match the given checks. In all cases, the paths need to exist, nonexistent paths are always filtered.
|
||||
|
||||
The available filters are:
|
||||
|
||||
- ``-t`` or ``--type`` with the options: "dir", "file", "link", "block", "char", "fifo" and "socket", in which case the path needs to be a directory, file, link, block device, character device, named pipe or socket, respectively.
|
||||
- ``-d``, ``-f`` and ``-l`` are short for ``--type=dir``, ``--type=file`` and ``--type=link``, respectively. There are no shortcuts for the other types.
|
||||
|
||||
- ``-p`` or ``--perm`` with the options: "read", "write", and "exec", as well as "suid", "sgid", "user" (referring to the path owner) and "group" (referring to the path's group), in which case the path needs to have all of the given permissions for the current user.
|
||||
- ``-r``, ``-w`` and ``-x`` are short for ``--perm=read``, ``--perm=write`` and ``--perm=exec``, respectively. There are no shortcuts for the other permissions.
|
||||
|
||||
Note that the path needs to be *any* of the given types, but have *all* of the given permissions. This is because having a path that is both writable and executable makes sense, but having a path that is both a directory and a file doesn't. Links will count as the type of the linked-to file, so links to files count as files, links to directories count as directories.
|
||||
|
||||
The filter options can either be given as multiple options, or comma-separated - ``path filter -t dir,file`` or ``path filter --type dir --type file`` are equivalent.
|
||||
|
||||
With ``--invert``, the meaning of the filtering is inverted - any path that wouldn't pass (including by not existing) passes, and any path that would pass fails.
|
||||
|
||||
When a path starts with ``-``, ``path filter`` will prepend ``./`` to avoid it being interpreted as an option otherwise.
|
||||
|
||||
It returns 0 if at least one path passed the filter.
|
||||
|
||||
``path is`` is shorthand for ``path filter -q``, i.e. just checking without producing output, see :ref:`The is subcommand <cmd-path-is>`.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path filter /usr/bin /usr/argagagji
|
||||
# The (hopefully) nonexistent argagagji is filtered implicitly:
|
||||
/usr/bin
|
||||
|
||||
>_ path filter --type file /usr/bin /usr/bin/fish
|
||||
# Only fish is a file
|
||||
/usr/bin/fish
|
||||
|
||||
>_ path filter --type file,dir --perm exec,write /usr/bin/fish /home/me
|
||||
# fish is a file, which passes, and executable, which passes,
|
||||
# but probably not writable, which fails.
|
||||
#
|
||||
# $HOME is a directory and both writable and executable, typically.
|
||||
# So it passes.
|
||||
/home/me
|
||||
|
||||
>_ path filter -fdxw /usr/bin/fish /home/me
|
||||
# This is the same as above: "-f" is "--type=file", "-d" is "--type=dir",
|
||||
# "-x" is short for "--perm=exec" and "-w" short for "--perm=write"!
|
||||
/home/me
|
||||
|
||||
>_ path filter -fx $PATH/*
|
||||
# Prints all possible commands - the first entry of each name is what fish would execute!
|
||||
|
||||
.. _cmd-path-is:
|
||||
|
||||
"is" subcommand
|
||||
--------------------
|
||||
|
||||
::
|
||||
|
||||
path is [-z | --null-in] [-Z | --null-out] [-q | --quiet] \
|
||||
[-d] [-f] [-l] [-r] [-w] [-x] \
|
||||
[-v | --invert] [(-t | --type) TYPE] [(-p | --perm) PERMISSION] [PATH ...]
|
||||
|
||||
``path is`` is short for ``path filter -q``. It returns true if any of the given files passes the filter, but does not produce any output.
|
||||
|
||||
``--quiet`` can still be passed for compatibility but is redundant. The options are the same as for ``path filter``.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path is /usr/bin /usr/argagagji
|
||||
# /usr/bin exists, so this returns a status of 0 (true). It prints nothing.
|
||||
>_ path is /usr/argagagji
|
||||
# /usr/argagagji does not, so this returns a status of 1 (false). It also prints nothing.
|
||||
>_ path is -fx /bin/sh
|
||||
# /bin/sh is usually an executable file, so this returns true.
|
||||
|
||||
"normalize" subcommand
|
||||
-----------------------
|
||||
|
||||
::
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Leading "./" components are usually removed. But when a path starts with ``-``, ``path normalize`` will add it instead to avoid confusion with options.
|
||||
|
||||
It returns 0 if any normalization was done, i.e. any given path wasn't in canonical form.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path normalize /usr/bin//../../etc/fish
|
||||
# The "//" is squashed and the ".." components neutralize the components before
|
||||
/etc/fish
|
||||
|
||||
>_ path normalize /bin//bash
|
||||
# The "//" is squashed, but /bin isn't resolved even if your system links it to /usr/bin.
|
||||
/bin/bash
|
||||
|
||||
>_ path normalize ./my/subdirs/../sub2
|
||||
my/sub2
|
||||
|
||||
>_ path normalize -- -/foo
|
||||
./-/foo
|
||||
|
||||
"resolve" subcommand
|
||||
--------------------
|
||||
|
||||
::
|
||||
|
||||
path resolve [-z | --null-in] [-Z | --null-out] [-q | --quiet] [PATH ...]
|
||||
|
||||
``path resolve`` returns the normalized, physical and absolute versions of all paths. That means it resolves symlinks and does what ``path normalize`` does: it squashes duplicate "/" (except for two leading "//"), collapses "../" with earlier components and removes "." components. Then it turns that path into the absolute path starting from the filesystem root "/".
|
||||
|
||||
It is similar to ``realpath``, as it creates the "real", canonical version of the path. However, for paths that can't be resolved, e.g. if they don't exist or form a symlink loop, it will resolve as far as it can and normalize the rest.
|
||||
|
||||
It returns 0 if any normalization or resolution was done, i.e. any given path wasn't in canonical form.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path resolve /bin//sh
|
||||
# The "//" is squashed, and /bin is resolved if your system links it to /usr/bin.
|
||||
# sh here is bash (this is common on linux systems)
|
||||
/usr/bin/bash
|
||||
|
||||
>_ path resolve /bin/foo///bar/../baz
|
||||
# Assuming /bin exists and is a symlink to /usr/bin, but /bin/foo doesn't.
|
||||
# This resolves the /bin/ and normalizes the nonexistent rest:
|
||||
/usr/bin/foo/baz
|
||||
|
||||
"change-extension" subcommand
|
||||
-----------------------------
|
||||
|
||||
::
|
||||
|
||||
path change-extension [-z | --null-in] [-Z | --null-out] \
|
||||
[-q | --quiet] EXTENSION [PATH ...]
|
||||
|
||||
``path change-extension`` returns the given paths, with their extension changed to the given new extension. The extension is the part after (and including) the last ".", unless that "." followed a "/" or the basename is "." or "..", in which case there is no previous extension and the new one is simply added.
|
||||
|
||||
If the extension is empty, any previous extension is stripped, along with the ".". This is, of course, the inverse of ``path extension``.
|
||||
|
||||
One leading dot on the extension is ignored, so ".mp3" and "mp3" are treated the same.
|
||||
|
||||
It returns 0 if it was given any paths.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path change-extension mp4 ./foo.wmv
|
||||
./foo.mp4
|
||||
|
||||
>_ path change-extension .mp4 ./foo.wmv
|
||||
./foo.mp4
|
||||
|
||||
>_ path change-extension '' ../banana
|
||||
../banana
|
||||
# but status 1, because there was no extension.
|
||||
|
||||
>_ path change-extension '' ~/.config
|
||||
/home/alfa/.config
|
||||
# status 1
|
||||
|
||||
>_ path change-extension '' ~/.config.d
|
||||
/home/alfa/.config
|
||||
# status 0
|
||||
|
||||
>_ path change-extension '' ~/.config.
|
||||
/home/alfa/.config
|
||||
# status 0
|
||||
|
||||
"sort" subcommand
|
||||
-----------------------------
|
||||
|
||||
::
|
||||
|
||||
path sort [-z | --null-in] [-Z | --null-out] \
|
||||
[-q | --quiet] [-r | --reverse] \
|
||||
[--key=basename|dirname|path] [PATH ...]
|
||||
|
||||
|
||||
``path sort`` returns the given paths in sorted order. They are sorted in the same order as globs - alphabetically, but with runs of numerical digits compared numerically.
|
||||
|
||||
With ``--reverse`` or ``-r`` the sort is reversed.
|
||||
|
||||
With ``--key=`` only the given path of the path is compared, e.g. ``--key=dirname`` causes only the dirname to be compared, ``--key=basename`` only the basename and ``--key=path`` causes the entire path to be compared (this is the default).
|
||||
|
||||
With ``--unique`` or ``-u`` the sort is deduplicated, meaning only the first of a run that have the same key is kept. So if you are sorting by basename, then only the first of each basename is used.
|
||||
|
||||
The sort used is stable, so sorting first by basename and then by dirname works and causes the files to be grouped according to directory.
|
||||
|
||||
It currently returns 0 if it was given any paths.
|
||||
|
||||
Examples
|
||||
^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
>_ path sort 10-foo 2-bar
|
||||
2-bar
|
||||
10-foo
|
||||
|
||||
>_ path sort --invert 10-foo 2-bar
|
||||
10-foo
|
||||
2-bar
|
||||
|
||||
>_ path sort --unique --key=basename $fish_function_path/*.fish
|
||||
# prints a list of all function files fish would use, sorted by name.
|
||||
|
||||
|
||||
Combining ``path``
|
||||
-------------------
|
||||
|
||||
``path`` is meant to be easy to combine with itself, other tools and fish.
|
||||
|
||||
This is why
|
||||
|
||||
- ``path``'s output is automatically split by fish if it goes into a command substitution, so just doing ``(path ...)`` handles all paths, even those containing newlines, correctly
|
||||
- ``path`` has ``--null-in`` to handle null-delimited input (typically automatically detected!), and ``--null-out`` to pass on null-delimited output
|
||||
|
||||
Some examples of combining ``path``::
|
||||
|
||||
# Expand all paths in the current directory, leave only executable files, and print their resolved path
|
||||
path filter -zZ -xf -- * | path resolve -z
|
||||
|
||||
# The same thing, but using find (note -maxdepth needs to come first or find will scream)
|
||||
# (this also depends on your particular version of find)
|
||||
# Note the `-z` is unnecessary for any sensible version of find - if `path` sees a NULL,
|
||||
# it will split on NULL automatically.
|
||||
find . -maxdepth 1 -type f -executable -print0 | path resolve -z
|
||||
|
||||
set -l paths (path filter -p exec $PATH/fish -Z | path resolve)
|
||||
@@ -8,7 +8,7 @@ Synopsis
|
||||
|
||||
.. synopsis::
|
||||
|
||||
string collect [-N | --no-trim-newlines] [STRING ...]
|
||||
string collect [-a | --allow-empty] [-N | --no-trim-newlines] [STRING ...]
|
||||
|
||||
.. END SYNOPSIS
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Description
|
||||
|
||||
.. BEGIN DESCRIPTION
|
||||
|
||||
``string join`` joins its *STRING* arguments into a single string separated by *SEP*, which can be an empty string. Exit status: 0 if at least one join was performed, or 1 otherwise.
|
||||
``string join`` joins its *STRING* arguments into a single string separated by *SEP*, which can be an empty string. Exit status: 0 if at least one join was performed, or 1 otherwise. If ``-n`` or ``--no-empty`` is specified, empty strings are excluded from consideration (e.g. ``string join -n + a b "" c`` would expand to ``a+b+c`` not ``a+b++c``).
|
||||
|
||||
``string join0`` joins its *STRING* arguments into a single string separated by the zero byte (NUL), and adds a trailing NUL. This is most useful in conjunction with tools that accept NUL-delimited input, such as ``sort -z``. Exit status: 0 if at least one join was performed, or 1 otherwise.
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ Synopsis
|
||||
.. synopsis::
|
||||
|
||||
string match [-a | --all] [-e | --entire] [-i | --ignore-case]
|
||||
[-r | --regex] [-n | --index] [-q | --quiet] [-v | --invert]
|
||||
[-g | --groups-only] [-r | --regex] [-n | --index]
|
||||
[-q | --quiet] [-v | --invert]
|
||||
PATTERN [STRING ...]
|
||||
|
||||
.. END SYNOPSIS
|
||||
|
||||
@@ -8,10 +8,10 @@ Synopsis
|
||||
|
||||
.. synopsis::
|
||||
|
||||
string split [(-m | --max) MAX] [-n | --no-empty] [-q | --quiet]
|
||||
[-r | --right] SEP [STRING ...]
|
||||
string split0 [(-m | --max) MAX] [-n | --no-empty] [-q | --quiet]
|
||||
[-r | --right] [STRING ...]
|
||||
string split [(-f | --fields) FIELDS] [(-m | --max) MAX] [-n | --no-empty]
|
||||
[-q | --quiet] [-r | --right] SEP [STRING ...]
|
||||
string split0 [(-f | --fields) FIELDS] [(-m | --max) MAX] [-n | --no-empty]
|
||||
[-q | --quiet] [-r | --right] [STRING ...]
|
||||
|
||||
.. END SYNOPSIS
|
||||
|
||||
@@ -22,7 +22,7 @@ Description
|
||||
|
||||
``string split`` splits each *STRING* on the separator *SEP*, which can be an empty string. If **-m** or **--max** is specified, at most MAX splits are done on each *STRING*. If **-r** or **--right** is given, splitting is performed right-to-left. This is useful in combination with **-m** or **--max**. With **-n** or **--no-empty**, empty results are excluded from consideration (e.g. ``hello\n\nworld`` would expand to two strings and not three). Exit status: 0 if at least one split was performed, or 1 otherwise.
|
||||
|
||||
Use **-f** or **--fields** to print out specific fields. Unless **--allow-empty** is used, if a given field does not exist, then the command exits with status 1 and does not print anything.
|
||||
Use **-f** or **--fields** to print out specific fields. FIELDS is a comma-separated string of field numbers and/or spans. Each field is one-indexed, and will be printed on separate lines. If a given field does not exist, then the command exits with status 1 and does not print anything, unless **--allow-empty** is used.
|
||||
|
||||
See also the **--delimiter** option of the :ref:`read <cmd-read>` command.
|
||||
|
||||
@@ -53,9 +53,10 @@ Examples
|
||||
b
|
||||
c
|
||||
|
||||
>_ string split --allow-empty -f1,3,5 '' abc
|
||||
>_ string split --allow-empty -f1,3-4,5 '' abcd
|
||||
a
|
||||
c
|
||||
d
|
||||
|
||||
|
||||
NUL Delimited Examples
|
||||
|
||||
@@ -8,7 +8,7 @@ Synopsis
|
||||
|
||||
.. synopsis::
|
||||
|
||||
string sub [(-s | --start) START] [(-l | --length) LENGTH]
|
||||
string sub [(-s | --start) START] [(-e | --end) END] [(-l | --length) LENGTH]
|
||||
[-q | --quiet] [STRING ...]
|
||||
|
||||
.. END SYNOPSIS
|
||||
|
||||
@@ -8,26 +8,27 @@ Synopsis
|
||||
|
||||
.. synopsis::
|
||||
|
||||
string collect [-N | --no-trim-newlines] [STRING ...]
|
||||
string collect [-a | --allow-empty] [-N | --no-trim-newlines] [STRING ...]
|
||||
string escape [-n | --no-quoted] [--style=] [STRING ...]
|
||||
string join [-q | --quiet] SEP [STRING ...]
|
||||
string join [-q | --quiet] [-n | --no-empty] SEP [STRING ...]
|
||||
string join0 [-q | --quiet] [STRING ...]
|
||||
string length [-q | --quiet] [STRING ...]
|
||||
string lower [-q | --quiet] [STRING ...]
|
||||
string match [-a | --all] [-e | --entire] [-i | --ignore-case]
|
||||
[-r | --regex] [-n | --index] [-q | --quiet] [-v | --invert]
|
||||
[-g | --groups-only] [-r | --regex] [-n | --index]
|
||||
[-q | --quiet] [-v | --invert]
|
||||
PATTERN [STRING ...]
|
||||
string pad [-r | --right] [-c | --char CHAR] [-w | --width INTEGER]
|
||||
string pad [-r | --right] [(-c | --char) CHAR] [(-w | --width) INTEGER]
|
||||
[STRING ...]
|
||||
string repeat [(-n | --count) COUNT] [(-m | --max) MAX] [-N | --no-newline]
|
||||
[-q | --quiet] [STRING ...]
|
||||
string replace [-a | --all] [-f | --filter] [-i | --ignore-case]
|
||||
[-r | --regex] [-q | --quiet] PATTERN REPLACE [STRING ...]
|
||||
string split [(-m | --max) MAX] [-n | --no-empty] [-q | --quiet]
|
||||
[-r | --right] SEP [STRING ...]
|
||||
string split0 [(-m | --max) MAX] [-n | --no-empty] [-q | --quiet]
|
||||
[-r | --right] [STRING ...]
|
||||
string sub [(-s | --start) START] [(-l | --length) LENGTH]
|
||||
string split [(-f | --fields) FIELDS] [(-m | --max) MAX] [-n | --no-empty]
|
||||
[-q | --quiet] [-r | --right] SEP [STRING ...]
|
||||
string split0 [(-f | --fields) FIELDS] [(-m | --max) MAX] [-n | --no-empty]
|
||||
[-q | --quiet] [-r | --right] [STRING ...]
|
||||
string sub [(-s | --start) START] [(-e | --end) END] [(-l | --length) LENGTH]
|
||||
[-q | --quiet] [STRING ...]
|
||||
string trim [-l | --left] [-r | --right] [(-c | --chars) CHARS]
|
||||
[-q | --quiet] [STRING ...]
|
||||
|
||||
@@ -179,7 +179,7 @@ Parentheses and the ``-o`` and ``-a`` operators can be combined to produce more
|
||||
|
||||
if test \( -f /foo -o -f /bar \) -a \( -f /baz -o -f /bat \)
|
||||
echo Success.
|
||||
end.
|
||||
end
|
||||
|
||||
|
||||
Numerical comparisons will simply fail if one of the operands is not a number:
|
||||
|
||||
@@ -38,7 +38,7 @@ If *ARG* is absent (and there is a single *REASON*) or ``-``, each specified sig
|
||||
|
||||
If *ARG* is not present and **-p** has been supplied, then the trap commands associated with each *REASON* are displayed. If no arguments are supplied or if only **-p** is given, ``trap`` prints the list of commands associated with each signal.
|
||||
|
||||
Signal names are case insensitive and the ``SIG`` prefix is optional.
|
||||
Signal names are case insensitive and the ``SIG`` prefix is optional. Trapping a signal will prevent fish from exiting in response to that signal.
|
||||
|
||||
The exit status is 1 if any *REASON* is invalid; otherwise trap returns 0.
|
||||
|
||||
|
||||
@@ -18,14 +18,23 @@ Description
|
||||
|
||||
Use one of the following switches to specify which resource limit to set or report:
|
||||
|
||||
**-b** or **--socket-buffers**
|
||||
The maximum size of socket buffers.
|
||||
|
||||
**-c** or **--core-size**
|
||||
The maximum size of core files created. By setting this limit to zero, core dumps can be disabled.
|
||||
|
||||
**-d** or **--data-size**
|
||||
The maximum size of a process' data segment.
|
||||
|
||||
**-e** or **--nice**
|
||||
Controls the maximum nice value; on Linux, this value is subtracted from 20 to give the effective value.
|
||||
|
||||
**-f** or **--file-size**
|
||||
The maximum size of files created by the shell.
|
||||
The maximum size of files created by a process.
|
||||
|
||||
**-i** or **--pending-signals**
|
||||
The maximum number of signals that may be queued.
|
||||
|
||||
**-l** or **--lock-size**
|
||||
The maximum size that may be locked into memory.
|
||||
@@ -34,7 +43,13 @@ Use one of the following switches to specify which resource limit to set or repo
|
||||
The maximum resident set size.
|
||||
|
||||
**-n** or **--file-descriptor-count**
|
||||
The maximum number of open file descriptors (most systems do not allow this value to be set).
|
||||
The maximum number of open file descriptors.
|
||||
|
||||
**-q** or **--queue-size**
|
||||
The maximum size of data in POSIX message queues.
|
||||
|
||||
**-r** or **--realtime-priority**
|
||||
The maximum realtime scheduling priority.
|
||||
|
||||
**-s** or **--stack-size**
|
||||
The maximum stack size.
|
||||
@@ -43,18 +58,33 @@ Use one of the following switches to specify which resource limit to set or repo
|
||||
The maximum amount of CPU time in seconds.
|
||||
|
||||
**-u** or **--process-count**
|
||||
The maximum number of processes available to a single user.
|
||||
The maximum number of processes available to the current user.
|
||||
|
||||
**-w** or **--swap-size**
|
||||
The maximum swap space available to the current user.
|
||||
|
||||
**-v** or **--virtual-memory-size**
|
||||
The maximum amount of virtual memory available to the shell.
|
||||
|
||||
Note that not all these limits are available in all operating systems.
|
||||
**-y** or **--realtime-maxtime**
|
||||
The maximum contiguous realtime CPU time in microseconds.
|
||||
|
||||
**-K** or **--kernel-queues**
|
||||
The maximum number of kqueues (kernel queues) for the current user.
|
||||
|
||||
**-P** or **--ptys**
|
||||
The maximum number of pseudo-terminals for the current user.
|
||||
|
||||
**-T** or **--threads**
|
||||
The maximum number of simultaneous threads for the current user.
|
||||
|
||||
Note that not all these limits are available in all operating systems; consult the documentation for ``setrlimit`` in your operating system.
|
||||
|
||||
The value of limit can be a number in the unit specified for the resource or one of the special values ``hard``, ``soft``, or ``unlimited``, which stand for the current hard limit, the current soft limit, and no limit, respectively.
|
||||
|
||||
If limit is given, it is the new value of the specified resource. If no option is given, then **-f** is assumed. Values are in kilobytes, except for **-t**, which is in seconds and **-n** and **-u**, which are unscaled values. The exit status is 0 unless an invalid option or argument is supplied, or an error occurs while setting a new limit.
|
||||
|
||||
``ulimit`` also accepts the following switches that determine what type of limit to set:
|
||||
``ulimit`` also accepts the following options that determine what type of limit to set:
|
||||
|
||||
**-H** or **--hard**
|
||||
Sets hard resource limit.
|
||||
|
||||
@@ -111,6 +111,7 @@ By default, Fish searches the following for completions, using the first availab
|
||||
|
||||
- A directory for end-users to keep their own completions, usually ``~/.config/fish/completions`` (controlled by the ``XDG_CONFIG_HOME`` environment variable);
|
||||
- A directory for systems administrators to install completions for all users on the system, usually ``/etc/fish/completions``;
|
||||
- A user-specified directory for third-party vendor completions, usually ``~/.local/share/fish/vendor_completions.d`` (controlled by the ``XDG_DATA_HOME`` environment variable);
|
||||
- A directory for third-party software vendors to ship their own completions for their software, usually ``/usr/share/fish/vendor_completions.d``;
|
||||
- The completions shipped with fish, usually installed in ``/usr/share/fish/completions``; and
|
||||
- Completions automatically generated from the operating system's manual, usually stored in ``~/.local/share/fish/generated_completions``.
|
||||
|
||||
@@ -256,7 +256,7 @@ If the wildcard doesn't match any files, fish prints an error instead of running
|
||||
|
||||
> echo *this*does*not*exist
|
||||
fish: No matches for wildcard '*this*does*not*exist'. See `help expand`.
|
||||
echo *this*does*not*exist 2>| xsel --clipboard
|
||||
echo *this*does*not*exist
|
||||
^
|
||||
|
||||
Now, bash also tries to match files in this case, but when it doesn't find a match, it passes along the literal wildcard string instead.
|
||||
|
||||
@@ -51,7 +51,8 @@ For instance, here's bash
|
||||
|
||||
> foo="bar baz"
|
||||
> printf '"%s"\n' $foo
|
||||
# will print two lines, because we didn't double-quote, so the variable is split
|
||||
# will print two lines, because we didn't double-quote
|
||||
# this is word splitting
|
||||
"bar"
|
||||
"baz"
|
||||
|
||||
@@ -73,6 +74,26 @@ Specific elements of a list can be selected::
|
||||
|
||||
echo $list[5..7]
|
||||
|
||||
The arguments to ``set`` are ordinary, so you can also set a variable to the output of a command::
|
||||
|
||||
# Set lines to all the lines in file, one element per line
|
||||
set lines (cat file)
|
||||
|
||||
or a mixture of literal values and output::
|
||||
|
||||
> set numbers 1 2 3 (seq 5 8) 9
|
||||
> printf '%s\n' $numbers
|
||||
1
|
||||
2
|
||||
3
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
|
||||
A ``=`` is unnecessary and unhelpful with ``set`` - ``set foo = bar`` will set the variable "foo" to two values: "=" and "bar". ``set foo=bar`` will print an error.
|
||||
|
||||
See :ref:`Shell variables <variables>` for more.
|
||||
|
||||
.. [#] zsh also does not perform word splitting by default (the SH_WORD_SPLIT option controls this)
|
||||
@@ -82,7 +103,7 @@ See :ref:`Shell variables <variables>` for more.
|
||||
Wildcards (globs)
|
||||
-----------------
|
||||
|
||||
Fish only supports the ``*`` and ``**`` glob (and the deprecated ``?`` glob). If a glob doesn't match it fails the command (like with bash's ``failglob``) unless the command is ``for``, ``set`` or ``count`` or the glob is used with an environment override (``VAR=* command``), in which case it expands to nothing (like with bash's ``nullglob`` option).
|
||||
Fish only supports the ``*`` and ``**`` glob (and the deprecated ``?`` glob) as syntax. If a glob doesn't match it fails the command (like with bash's ``failglob``) unless the command is ``for``, ``set`` or ``count`` or the glob is used with an environment override (``VAR=* command``), in which case it expands to nothing (like with bash's ``nullglob`` option).
|
||||
|
||||
Globbing doesn't happen on expanded variables, so::
|
||||
|
||||
@@ -234,7 +255,7 @@ and could be written in other shells as
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# This "-" is still necessary, because the heredoc is *also* passed over stdin!
|
||||
# This "-" is still necessary - the heredoc is *also* passed over stdin!
|
||||
pacman --remove - << EOF
|
||||
xterm
|
||||
rxvt-unicode
|
||||
@@ -284,7 +305,7 @@ As an example, here's a relatively simple bash prompt:
|
||||
.. code-block:: sh
|
||||
|
||||
# <$HOSTNAME> <$PWD in blue> <Prompt Sign in Yellow> <Rest in default light white>
|
||||
export PS1='\h\[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] '
|
||||
PS1='\h\[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] '
|
||||
|
||||
and a rough fish equivalent::
|
||||
|
||||
@@ -292,7 +313,8 @@ and a rough fish equivalent::
|
||||
set -l prompt_symbol '$'
|
||||
fish_is_root_user; and set prompt_symbol '#'
|
||||
|
||||
echo -s (prompt_hostname) (set_color blue) (prompt_pwd) \
|
||||
echo -s (prompt_hostname) \
|
||||
(set_color blue) (prompt_pwd) \
|
||||
(set_color yellow) $prompt_symbol (set_color normal)
|
||||
end
|
||||
|
||||
@@ -365,7 +387,8 @@ Fish's blocking constructs look a little different. They all start with a word,
|
||||
echo foo
|
||||
end
|
||||
|
||||
# (note that bash specifically allows the word "function" as an extension, but POSIX only specifies the form without, so it's more compatible to just use the form without)
|
||||
# (bash allows the word "function",
|
||||
# but this is an extension)
|
||||
|
||||
Fish does not have an ``until``. Use ``while not`` or ``while !``.
|
||||
|
||||
@@ -383,7 +406,7 @@ This includes things like:
|
||||
|
||||
# Both sides of a pipe
|
||||
foo | while read -r bar; do
|
||||
# This variable will not be visible outside of the while loop.
|
||||
# This will not be visible outside of the loop.
|
||||
VAR=VAL
|
||||
# This background process will not be, either
|
||||
baz &
|
||||
|
||||
@@ -63,9 +63,15 @@ Default Shell
|
||||
|
||||
There are multiple ways to switch to fish (or any other shell) as your default.
|
||||
|
||||
The simpler is to set your terminal to start fish. See its configuration and set the program to start to ``/usr/local/bin/fish`` (if that's where fish is installed - substitute another location as appropriate).
|
||||
The simplest method is to set your terminal emulator (eg GNOME Terminal, Apple's Terminal.app, or Konsole) to start fish directly. See its configuration and set the program to start to ``/usr/local/bin/fish`` (if that's where fish is installed - substitute another location as appropriate).
|
||||
|
||||
The more involved and complete way is to set fish as your login shell. To do that, you need to:
|
||||
Alternatively, you can set fish as your login shell so that it will be started by all terminal logins, including SSH.
|
||||
|
||||
.. warning::
|
||||
|
||||
Setting fish as your login shell may cause issues, such as an incorrect :envvar:`PATH`. Some operating systems, including a number of Linux distributions, require the login shell to be Bourne-compatible and to read configuration from ``/etc/profile``. fish may not be suitable as a login shell on these systems.
|
||||
|
||||
To change your login shell to fish:
|
||||
|
||||
1. Add the shell to ``/etc/shells`` with::
|
||||
|
||||
@@ -75,11 +81,7 @@ The more involved and complete way is to set fish as your login shell. To do tha
|
||||
|
||||
> chsh -s /usr/local/bin/fish
|
||||
|
||||
Again, substitute the path to fish for /usr/local/bin/fish - see ``command -s fish`` inside fish. To change it back to another shell, just substitute ``/usr/local/bin/fish`` with ``/bin/bash``, ``/bin/tcsh`` or ``/bin/zsh`` as appropriate in the steps above.
|
||||
|
||||
.. warning::
|
||||
|
||||
Setting fish as your login shell may have issues, because some operating systems (including a bunch of linux distributions) only do some of their configuration in shell startup files like /etc/profile. So you could notice e.g. $PATH being wrong, and you would have to redo that setup.
|
||||
Again, substitute the path to fish for ``/usr/local/bin/fish`` - see ``command -s fish`` inside fish. To change it back to another shell, just substitute ``/usr/local/bin/fish`` with ``/bin/bash``, ``/bin/tcsh`` or ``/bin/zsh`` as appropriate in the steps above.
|
||||
|
||||
Uninstalling
|
||||
------------
|
||||
|
||||
@@ -120,6 +120,7 @@ Variable Meaning
|
||||
``fish_color_end`` process separators like ``;`` and ``&``
|
||||
``fish_color_error`` syntax errors
|
||||
``fish_color_param`` ordinary command parameters
|
||||
``fish_color_valid_path`` parameters that are filenames (if the file exists)
|
||||
``fish_color_option`` options starting with "-", up to the first "--" parameter
|
||||
``fish_color_comment`` comments like '# important'
|
||||
``fish_color_selection`` selected text in vi visual mode
|
||||
@@ -127,14 +128,17 @@ Variable Meaning
|
||||
``fish_color_escape`` character escapes like ``\n`` and ``\x70``
|
||||
``fish_color_autosuggestion`` autosuggestions (the proposed rest of a command)
|
||||
``fish_color_cwd`` the current working directory in the default prompt
|
||||
``fish_color_cwd_root`` the current working directory in the default prompt for the root user
|
||||
``fish_color_user`` the username in the default prompt
|
||||
``fish_color_host`` the hostname in the default prompt
|
||||
``fish_color_host_remote`` the hostname in the default prompt for remote sessions (like ssh)
|
||||
``fish_color_status`` the last command's nonzero exit code in the default prompt
|
||||
``fish_color_cancel`` the '^C' indicator on a canceled command
|
||||
``fish_color_search_match`` history search matches and selected pager items (background only)
|
||||
|
||||
========================================== =====================================================================
|
||||
|
||||
If a variable isn't set, fish usually tries ``$fish_color_normal``, except for:
|
||||
If a variable isn't set or is empty, fish usually tries ``$fish_color_normal``, except for:
|
||||
|
||||
- ``$fish_color_keyword``, where it tries ``$fish_color_command`` first.
|
||||
- ``$fish_color_option``, where it tries ``$fish_color_param`` first.
|
||||
@@ -178,7 +182,7 @@ Variable Meaning
|
||||
``fish_pager_color_secondary_description`` description of every second unselected completion
|
||||
========================================== ===========================================================
|
||||
|
||||
When the secondary or selected variables aren't set, the normal variables are used, except for ``$fish_pager_color_selected_background``, where the background of ``$fish_color_search_match`` is tried first.
|
||||
When the secondary or selected variables aren't set or are empty, the normal variables are used, except for ``$fish_pager_color_selected_background``, where the background of ``$fish_color_search_match`` is tried first.
|
||||
|
||||
.. _abbreviations:
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ For example, ``echo hello 2> output.stderr`` writes the standard error (file des
|
||||
|
||||
It is an error to redirect a builtin, function, or block to a file descriptor above 2. However this is supported for external commands.
|
||||
|
||||
.. [#] Previous versions of fish also allowed specifying this as ``^DESTINATION``, but that made another character special so it was deprecated and will be removed in the future. See :ref:`feature flags<featureflags>`.
|
||||
.. [#] Previous versions of fish also allowed specifying this as ``^DESTINATION``, but that made another character special so it was deprecated and removed. See :ref:`feature flags<featureflags>`.
|
||||
|
||||
.. _pipes:
|
||||
|
||||
@@ -316,7 +316,7 @@ By default ``$fish_function_path`` contains the following:
|
||||
|
||||
- A directory for users to keep their own functions, usually ``~/.config/fish/functions`` (controlled by the ``XDG_CONFIG_HOME`` environment variable).
|
||||
- A directory for functions for all users on the system, usually ``/etc/fish/functions`` (really ``$__fish_sysconfdir/functions``).
|
||||
- Directories for other software to put their own functions. These are in the directories in the ``XDG_DATA_DIRS`` environment variable, in a subdirectory called ``fish/vendor_functions.d``. The default is usually ``/usr/share/fish/vendor_functions.d`` and ``/usr/local/share/fish/vendor_functions.d``.
|
||||
- Directories for other software to put their own functions. These are in the directories under ``$__fish_user_data_dir`` (usually ``~/.local/share/fish``, controlled by the ``XDG_DATA_HOME`` environment variable) and in the ``XDG_DATA_DIRS`` environment variable, in a subdirectory called ``fish/vendor_functions.d``. The default value for ``XDG_DATA_DIRS`` is usually ``/usr/share/fish/vendor_functions.d`` and ``/usr/local/share/fish/vendor_functions.d``.
|
||||
- The functions shipped with fish, usually installed in ``/usr/share/fish/functions`` (really ``$__fish_data_dir/functions``).
|
||||
|
||||
If you are unsure, your functions probably belong in ``~/.config/fish/functions``.
|
||||
@@ -475,7 +475,7 @@ Examples:
|
||||
|
||||
- ``~/.*`` matches all hidden files (also known as "dotfiles") and directories in your home directory.
|
||||
|
||||
For most commands, if any wildcard fails to expand, the command is not executed, :ref:`$status <variables-status>` is set to nonzero, and a warning is printed. This behavior is like what bash does with ``shopt -s failglob``. There are exactly 4 exceptions, namely :ref:`set <cmd-set>`, overriding variables in :ref:`overrides <variables-override>`, :ref:`count <cmd-count>` and :ref:`for <cmd-for>`. Their globs will instead expand to zero arguments (so the command won't see them at all), like with ``shopt -s nullglob`` in bash.
|
||||
For most commands, if any wildcard fails to expand, the command is not executed, :ref:`$status <variables-status>` is set to nonzero, and a warning is printed. This behavior is like what bash does with ``shopt -s failglob``. There are exceptions, namely :ref:`set <cmd-set>` and :ref:`path <cmd-path>`, overriding variables in :ref:`overrides <variables-override>`, :ref:`count <cmd-count>` and :ref:`for <cmd-for>`. Their globs will instead expand to zero arguments (so the command won't see them at all), like with ``shopt -s nullglob`` in bash.
|
||||
|
||||
Examples::
|
||||
|
||||
@@ -1416,6 +1416,10 @@ Fish also provides additional information through the values of certain environm
|
||||
|
||||
the current username. This variable can be changed.
|
||||
|
||||
.. ENVVAR:: EUID
|
||||
|
||||
the current effective user id, set by fish at startup. This variable can be changed.
|
||||
|
||||
.. envvar:: version
|
||||
|
||||
the version of the currently running fish (also available as ``FISH_VERSION`` for backward compatibility).
|
||||
@@ -1555,7 +1559,7 @@ Configuration files are run in the following order:
|
||||
|
||||
- ``$__fish_config_dir/conf.d`` (by default, ``~/.config/fish/conf.d/``)
|
||||
- ``$__fish_sysconf_dir/conf.d`` (by default, ``/etc/fish/conf.d/``)
|
||||
- Directories for others to ship configuration snippets for their software. Fish searches the directories in the ``XDG_DATA_DIRS`` environment variable for a ``fish/vendor_conf.d`` directory; if that is not defined, the default is ``/usr/share/fish/vendor_conf.d`` and ``/usr/local/share/fish/vendor_conf.d``, unless your distribution customized this.
|
||||
- Directories for others to ship configuration snippets for their software. Fish searches the directories under ``$__fish_user_data_dir`` (usually ``~/.local/share/fish``, controlled by the ``XDG_DATA_HOME`` environment variable) and in the ``XDG_DATA_DIRS`` environment variable for a ``fish/vendor_conf.d`` directory; if not defined, the default value of ``XDG_DATA_DIRS`` is ``/usr/share/fish/vendor_conf.d`` and ``/usr/local/share/fish/vendor_conf.d``, unless your distribution customized this.
|
||||
|
||||
If there are multiple files with the same name in these directories, only the first will be executed.
|
||||
They are executed in order of their filename, sorted (like globs) in a natural order (i.e. "01" sorts before "2").
|
||||
@@ -1581,38 +1585,40 @@ You can see the current list of features via ``status features``::
|
||||
> status features
|
||||
stderr-nocaret on 3.0 ^ no longer redirects stderr
|
||||
qmark-noglob off 3.0 ? no longer globs
|
||||
regex-easyesc off 3.1 string replace -r needs fewer \\'s
|
||||
ampersand-nobg-in-token off 3.4 & only backgrounds if followed by a separating character
|
||||
regex-easyesc on 3.1 string replace -r needs fewer \\'s
|
||||
ampersand-nobg-in-token on 3.4 & only backgrounds if followed by a separating character
|
||||
|
||||
Here is what they mean:
|
||||
|
||||
- ``stderr-nocaret`` was introduced in fish 3.0 (and made the default in 3.3). It makes ``^`` an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use ``2>`` instead.
|
||||
- ``stderr-nocaret`` was introduced in fish 3.0 (and made the default in 3.3). It makes ``^`` an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use ``2>`` instead. This can no longer be turned off since fish 3.5. The flag can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored.
|
||||
- ``qmark-noglob`` was also introduced in fish 3.0. It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
|
||||
- ``regex-easyesy`` was introduced in 3.1. It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` cals if you use this anywhere.
|
||||
- ``regex-easyesc`` was introduced in 3.1. It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
|
||||
- ``ampersand-nobg-in-token`` was introduced in fish 3.4. It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
|
||||
|
||||
|
||||
These changes are introduced off by default. They can be enabled on a per session basis::
|
||||
|
||||
> fish --features qmark-noglob,stderr-nocaret
|
||||
> fish --features qmark-noglob,regex-easyesc
|
||||
|
||||
|
||||
or opted into globally for a user::
|
||||
|
||||
|
||||
> set -U fish_features stderr-nocaret qmark-noglob
|
||||
> set -U fish_features regex-easyesc qmark-noglob
|
||||
|
||||
Features will only be set on startup, so this variable will only take effect if it is universal or exported.
|
||||
|
||||
You can also use the version as a group, so ``3.0`` is equivalent to "stderr-nocaret" and "qmark-noglob". Instead of a version, the special group ``all`` enables all features.
|
||||
|
||||
Prefixing a feature with ``no-`` turns it off instead. E.g. to reenable the ``^`` redirection::
|
||||
Prefixing a feature with ``no-`` turns it off instead. E.g. to reenable the ``?`` single-character glob::
|
||||
|
||||
set -Ua fish_features no-stderr-nocaret
|
||||
set -Ua fish_features no-qmark-noglob
|
||||
|
||||
Currently, the following features are enabled by default:
|
||||
|
||||
- stderr-nocaret - ``^`` no longer redirects stderr, use ``2>``. Enabled by default in fish 3.3.0.
|
||||
- stderr-nocaret - ``^`` no longer redirects stderr, use ``2>``. Enabled by default in fish 3.3.0. No longer changeable since fish 3.5.0.
|
||||
- regex-easyesc - ``string replace -r`` requires fewer backslashes in the replacement part. Enabled by default in fish 3.5.0.
|
||||
- ampersand-nobg-in-token - ``&`` in the middle of a word is a normal character instead of backgrounding. Enabled by default in fish 3.5.0.
|
||||
|
||||
.. _event:
|
||||
|
||||
|
||||
@@ -111,6 +111,10 @@ div.documentwrapper {
|
||||
float: none;
|
||||
}
|
||||
|
||||
div.document {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.document, div.body, div.warning {
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
@@ -176,7 +180,7 @@ div.body hr {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
div.body pre {
|
||||
div.body pre, code {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #ac9;
|
||||
}
|
||||
@@ -234,6 +238,8 @@ code {
|
||||
background-color: rgba(20,20,80, .1);
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
tt, code, pre, dl > dt span ~ em, #synopsis p, #synopsis code, .command {
|
||||
@@ -264,7 +270,7 @@ pre, div[class*="highlight-"] {
|
||||
clear: unset;
|
||||
}
|
||||
|
||||
div.body tt, div.body code {
|
||||
div.body tt {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
@@ -348,6 +354,11 @@ div.sphinxsidebar ul {
|
||||
margin: 1em 10px 1em 10px;
|
||||
}
|
||||
|
||||
|
||||
div.bodywrapper {
|
||||
margin-left: 230px;
|
||||
}
|
||||
|
||||
/* On screens that are less than 700px wide remove anything non-essential
|
||||
- the sidebar, the gradient background, ... */
|
||||
@media screen and (max-width: 700px) {
|
||||
@@ -360,6 +371,10 @@ div.sphinxsidebar ul {
|
||||
div.documentwrapper {
|
||||
float: left;
|
||||
}
|
||||
div.bodywrapper {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
flex-basis: content;
|
||||
@@ -375,10 +390,6 @@ div.sphinxsidebar ul {
|
||||
display: none !important;
|
||||
}
|
||||
div.content {margin-left: 0;}
|
||||
|
||||
div.bodywrapper {
|
||||
margin: 0;
|
||||
}
|
||||
div.body {
|
||||
padding: 1rem;
|
||||
}
|
||||
@@ -460,6 +471,10 @@ div.body .internal.reference:link {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
div.body pre, code {
|
||||
border: 1px solid #536;
|
||||
}
|
||||
|
||||
.footnote, .footnote-reference {
|
||||
background-color: #101020;
|
||||
}
|
||||
@@ -517,7 +532,7 @@ div.body .internal.reference:link {
|
||||
div.body a {
|
||||
color: #2092fa;
|
||||
}
|
||||
|
||||
|
||||
/* Color based on the Name.Function (.nf) class from pygments.css. */
|
||||
.command { color: #008fd7 }
|
||||
|
||||
@@ -527,6 +542,10 @@ div.body .internal.reference:link {
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: rgba(200, 200, 255, .1);
|
||||
background-color: rgba(200, 200, 255, .2);
|
||||
}
|
||||
|
||||
.warning code {
|
||||
background-color: #604040;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,540 +0,0 @@
|
||||
/*
|
||||
* searchtools.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for the full-text search.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
* This file taken for fish from sphinx 3.5.1 to add a special error message
|
||||
* that lists short builtins.
|
||||
*
|
||||
*/
|
||||
|
||||
if (!Scorer) {
|
||||
/**
|
||||
* Simple result scoring code.
|
||||
*/
|
||||
var Scorer = {
|
||||
// Implement the following function to further tweak the score for each result
|
||||
// The function takes a result array [filename, title, anchor, descr, score]
|
||||
// and returns the new score.
|
||||
/*
|
||||
score: function(result) {
|
||||
return result[4];
|
||||
},
|
||||
*/
|
||||
|
||||
// query matches the full name of an object
|
||||
objNameMatch: 11,
|
||||
// or matches in the last dotted part of the object name
|
||||
objPartialMatch: 6,
|
||||
// Additive scores depending on the priority of the object
|
||||
objPrio: {0: 15, // used to be importantResults
|
||||
1: 5, // used to be objectResults
|
||||
2: -5}, // used to be unimportantResults
|
||||
// Used when the priority is not in the mapping.
|
||||
objPrioDefault: 0,
|
||||
|
||||
// query found in title
|
||||
title: 15,
|
||||
partialTitle: 7,
|
||||
// query found in terms
|
||||
term: 5,
|
||||
partialTerm: 2
|
||||
};
|
||||
}
|
||||
|
||||
if (!splitQuery) {
|
||||
function splitQuery(query) {
|
||||
return query.split(/\s+/);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Module
|
||||
*/
|
||||
var Search = {
|
||||
|
||||
_index : null,
|
||||
_queued_query : null,
|
||||
_pulse_status : -1,
|
||||
|
||||
htmlToText : function(htmlString) {
|
||||
var virtualDocument = document.implementation.createHTMLDocument('virtual');
|
||||
var htmlElement = $(htmlString, virtualDocument);
|
||||
htmlElement.find('.headerlink').remove();
|
||||
docContent = htmlElement.find('[role=main]')[0];
|
||||
if(docContent === undefined) {
|
||||
console.warn("Content block not found. Sphinx search tries to obtain it " +
|
||||
"via '[role=main]'. Could you check your theme or template.");
|
||||
return "";
|
||||
}
|
||||
return docContent.textContent || docContent.innerText;
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var params = $.getQueryParameters();
|
||||
if (params.q) {
|
||||
var query = params.q[0];
|
||||
$('input[name="q"]')[0].value = query;
|
||||
this.performSearch(query);
|
||||
}
|
||||
},
|
||||
|
||||
loadIndex : function(url) {
|
||||
$.ajax({type: "GET", url: url, data: null,
|
||||
dataType: "script", cache: true,
|
||||
complete: function(jqxhr, textstatus) {
|
||||
if (textstatus != "success") {
|
||||
document.getElementById("searchindexloader").src = url;
|
||||
}
|
||||
}});
|
||||
},
|
||||
|
||||
setIndex : function(index) {
|
||||
var q;
|
||||
this._index = index;
|
||||
if ((q = this._queued_query) !== null) {
|
||||
this._queued_query = null;
|
||||
Search.query(q);
|
||||
}
|
||||
},
|
||||
|
||||
hasIndex : function() {
|
||||
return this._index !== null;
|
||||
},
|
||||
|
||||
deferQuery : function(query) {
|
||||
this._queued_query = query;
|
||||
},
|
||||
|
||||
stopPulse : function() {
|
||||
this._pulse_status = 0;
|
||||
},
|
||||
|
||||
startPulse : function() {
|
||||
if (this._pulse_status >= 0)
|
||||
return;
|
||||
function pulse() {
|
||||
var i;
|
||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||
var dotString = '';
|
||||
for (i = 0; i < Search._pulse_status; i++)
|
||||
dotString += '.';
|
||||
Search.dots.text(dotString);
|
||||
if (Search._pulse_status > -1)
|
||||
window.setTimeout(pulse, 500);
|
||||
}
|
||||
pulse();
|
||||
},
|
||||
|
||||
/**
|
||||
* perform a search for something (or wait until index is loaded)
|
||||
*/
|
||||
performSearch : function(query) {
|
||||
// create the required interface elements
|
||||
this.out = $('#search-results');
|
||||
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
|
||||
this.dots = $('<span></span>').appendTo(this.title);
|
||||
this.status = $('<p class="search-summary"> </p>').appendTo(this.out);
|
||||
this.output = $('<ul class="search"/>').appendTo(this.out);
|
||||
|
||||
$('#search-progress').text(_('Preparing search...'));
|
||||
this.startPulse();
|
||||
|
||||
// index already loaded, the browser was quick!
|
||||
if (this.hasIndex())
|
||||
this.query(query);
|
||||
else
|
||||
this.deferQuery(query);
|
||||
},
|
||||
|
||||
/**
|
||||
* execute search (requires search index to be loaded)
|
||||
*/
|
||||
query : function(query) {
|
||||
var i;
|
||||
|
||||
// stem the searchterms and add them to the correct list
|
||||
var stemmer = new Stemmer();
|
||||
var searchterms = [];
|
||||
var excluded = [];
|
||||
var hlterms = [];
|
||||
var tmp = splitQuery(query);
|
||||
var objectterms = [];
|
||||
for (i = 0; i < tmp.length; i++) {
|
||||
if (tmp[i] !== "") {
|
||||
objectterms.push(tmp[i].toLowerCase());
|
||||
}
|
||||
|
||||
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
|
||||
// skip this "word"
|
||||
continue;
|
||||
}
|
||||
// stem the word
|
||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||
// prevent stemmer from cutting word smaller than two chars
|
||||
if(word.length < 3 && tmp[i].length >= 3) {
|
||||
word = tmp[i];
|
||||
}
|
||||
var toAppend;
|
||||
// select the correct list
|
||||
if (word[0] == '-') {
|
||||
toAppend = excluded;
|
||||
word = word.substr(1);
|
||||
}
|
||||
else {
|
||||
toAppend = searchterms;
|
||||
hlterms.push(tmp[i].toLowerCase());
|
||||
}
|
||||
// only add if not already in the list
|
||||
if (!$u.contains(toAppend, word))
|
||||
toAppend.push(word);
|
||||
}
|
||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
||||
|
||||
// console.debug('SEARCH: searching for:');
|
||||
// console.info('required: ', searchterms);
|
||||
// console.info('excluded: ', excluded);
|
||||
|
||||
// prepare search
|
||||
var terms = this._index.terms;
|
||||
var titleterms = this._index.titleterms;
|
||||
|
||||
// array of [filename, title, anchor, descr, score]
|
||||
var results = [];
|
||||
$('#search-progress').empty();
|
||||
|
||||
// lookup as object
|
||||
for (i = 0; i < objectterms.length; i++) {
|
||||
var others = [].concat(objectterms.slice(0, i),
|
||||
objectterms.slice(i+1, objectterms.length));
|
||||
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
||||
}
|
||||
|
||||
// lookup as search terms in fulltext
|
||||
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
|
||||
|
||||
// let the scorer override scores with a custom scoring function
|
||||
if (Scorer.score) {
|
||||
for (i = 0; i < results.length; i++)
|
||||
results[i][4] = Scorer.score(results[i]);
|
||||
}
|
||||
|
||||
// now sort the results by score (in opposite order of appearance, since the
|
||||
// display function below uses pop() to retrieve items) and then
|
||||
// alphabetically
|
||||
results.sort(function(a, b) {
|
||||
var left = a[4];
|
||||
var right = b[4];
|
||||
if (left > right) {
|
||||
return 1;
|
||||
} else if (left < right) {
|
||||
return -1;
|
||||
} else {
|
||||
// same score: sort alphabetically
|
||||
left = a[1].toLowerCase();
|
||||
right = b[1].toLowerCase();
|
||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
||||
}
|
||||
});
|
||||
|
||||
// for debugging
|
||||
//Search.lastresults = results.slice(); // a copy
|
||||
//console.info('search results:', Search.lastresults);
|
||||
|
||||
// print the results
|
||||
var resultCount = results.length;
|
||||
function displayNextItem() {
|
||||
// results left, load the summary and display it
|
||||
var listItem = $('<li></li>');
|
||||
if (results.length) {
|
||||
var item = results.pop();
|
||||
var requestUrl = "";
|
||||
var linkUrl = "";
|
||||
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
|
||||
// dirhtml builder
|
||||
var dirname = item[0] + '/';
|
||||
if (dirname.match(/\/index\/$/)) {
|
||||
dirname = dirname.substring(0, dirname.length-6);
|
||||
} else if (dirname == 'index/') {
|
||||
dirname = '';
|
||||
}
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
|
||||
linkUrl = requestUrl;
|
||||
|
||||
} else {
|
||||
// normal html builders
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
// If LINK_SUFFIX is undefined, default to ".html" - I actually don't see this being anything else.
|
||||
linkUrl = item[0] + (DOCUMENTATION_OPTIONS.LINK_SUFFIX || ".html");
|
||||
}
|
||||
listItem.append($('<a/>').attr('href',
|
||||
linkUrl +
|
||||
highlightstring + item[2]).html(item[1]));
|
||||
if (item[3]) {
|
||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||
$.ajax({url: requestUrl,
|
||||
dataType: "text",
|
||||
complete: function(jqxhr, textstatus) {
|
||||
var data = jqxhr.responseText;
|
||||
if (data !== '' && data !== undefined) {
|
||||
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
||||
}
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}});
|
||||
} else {
|
||||
// no source available, just display title
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}
|
||||
}
|
||||
// search finished, update title and status message
|
||||
else {
|
||||
Search.stopPulse();
|
||||
Search.title.text(_('Search Results'));
|
||||
if (!resultCount) {
|
||||
Search.status.text(_('Your search did not match any documents. Unfortunately search does not work with short terms, so here are some commonly used short builtins:'));
|
||||
var shortbuiltins = {
|
||||
"and": "conditionally execute a command",
|
||||
"cd": "change directory",
|
||||
"end": "end a block of commands",
|
||||
"for": "perform a set of commands multiple times",
|
||||
"if": "conditionally execute a command",
|
||||
"or": "condtionally execute a command",
|
||||
"set": "display and change shell variables",
|
||||
};
|
||||
for (var sb in shortbuiltins) {
|
||||
var li = $('<li><a href="cmds/' + sb + '.html">' + sb + " - " + shortbuiltins[sb] + '</a></li>');
|
||||
Search.output.append(li);
|
||||
}
|
||||
} else {
|
||||
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
|
||||
}
|
||||
Search.status.fadeIn(500);
|
||||
}
|
||||
}
|
||||
displayNextItem();
|
||||
},
|
||||
|
||||
/**
|
||||
* search for object names
|
||||
*/
|
||||
performObjectSearch : function(object, otherterms) {
|
||||
var filenames = this._index.filenames;
|
||||
var docnames = this._index.docnames;
|
||||
var objects = this._index.objects;
|
||||
var objnames = this._index.objnames;
|
||||
var titles = this._index.titles;
|
||||
|
||||
var i;
|
||||
var results = [];
|
||||
|
||||
for (var prefix in objects) {
|
||||
for (var name in objects[prefix]) {
|
||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||
var fullnameLower = fullname.toLowerCase()
|
||||
if (fullnameLower.indexOf(object) > -1) {
|
||||
var score = 0;
|
||||
var parts = fullnameLower.split('.');
|
||||
// check for different match types: exact matches of full name or
|
||||
// "last name" (i.e. last dotted part)
|
||||
if (fullnameLower == object || parts[parts.length - 1] == object) {
|
||||
score += Scorer.objNameMatch;
|
||||
// matches in last name
|
||||
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||
score += Scorer.objPartialMatch;
|
||||
}
|
||||
var match = objects[prefix][name];
|
||||
var objname = objnames[match[1]][2];
|
||||
var title = titles[match[0]];
|
||||
// If more than one term searched for, we require other words to be
|
||||
// found in the name/title/description
|
||||
if (otherterms.length > 0) {
|
||||
var haystack = (prefix + ' ' + name + ' ' +
|
||||
objname + ' ' + title).toLowerCase();
|
||||
var allfound = true;
|
||||
for (i = 0; i < otherterms.length; i++) {
|
||||
if (haystack.indexOf(otherterms[i]) == -1) {
|
||||
allfound = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!allfound) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var descr = objname + _(', in ') + title;
|
||||
|
||||
var anchor = match[3];
|
||||
if (anchor === '')
|
||||
anchor = fullname;
|
||||
else if (anchor == '-')
|
||||
anchor = objnames[match[1]][1] + '-' + fullname;
|
||||
// add custom score for some objects according to scorer
|
||||
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
||||
score += Scorer.objPrio[match[2]];
|
||||
} else {
|
||||
score += Scorer.objPrioDefault;
|
||||
}
|
||||
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
|
||||
*/
|
||||
escapeRegExp : function(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
},
|
||||
|
||||
/**
|
||||
* search for full-text terms in the index
|
||||
*/
|
||||
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
||||
var docnames = this._index.docnames;
|
||||
var filenames = this._index.filenames;
|
||||
var titles = this._index.titles;
|
||||
|
||||
var i, j, file;
|
||||
var fileMap = {};
|
||||
var scoreMap = {};
|
||||
var results = [];
|
||||
|
||||
// perform the search on the required terms
|
||||
for (i = 0; i < searchterms.length; i++) {
|
||||
var word = searchterms[i];
|
||||
var files = [];
|
||||
var _o = [
|
||||
{files: terms[word], score: Scorer.term},
|
||||
{files: titleterms[word], score: Scorer.title}
|
||||
];
|
||||
// add support for partial matches
|
||||
if (word.length > 2) {
|
||||
var word_regex = this.escapeRegExp(word);
|
||||
for (var w in terms) {
|
||||
if (w.match(word_regex) && !terms[word]) {
|
||||
_o.push({files: terms[w], score: Scorer.partialTerm})
|
||||
}
|
||||
}
|
||||
for (var w in titleterms) {
|
||||
if (w.match(word_regex) && !titleterms[word]) {
|
||||
_o.push({files: titleterms[w], score: Scorer.partialTitle})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// no match but word was a required one
|
||||
if ($u.every(_o, function(o){return o.files === undefined;})) {
|
||||
break;
|
||||
}
|
||||
// found search word in contents
|
||||
$u.each(_o, function(o) {
|
||||
var _files = o.files;
|
||||
if (_files === undefined)
|
||||
return
|
||||
|
||||
if (_files.length === undefined)
|
||||
_files = [_files];
|
||||
files = files.concat(_files);
|
||||
|
||||
// set score for the word in each file to Scorer.term
|
||||
for (j = 0; j < _files.length; j++) {
|
||||
file = _files[j];
|
||||
if (!(file in scoreMap))
|
||||
scoreMap[file] = {};
|
||||
scoreMap[file][word] = o.score;
|
||||
}
|
||||
});
|
||||
|
||||
// create the mapping
|
||||
for (j = 0; j < files.length; j++) {
|
||||
file = files[j];
|
||||
if (file in fileMap && fileMap[file].indexOf(word) === -1)
|
||||
fileMap[file].push(word);
|
||||
else
|
||||
fileMap[file] = [word];
|
||||
}
|
||||
}
|
||||
|
||||
// now check if the files don't contain excluded terms
|
||||
for (file in fileMap) {
|
||||
var valid = true;
|
||||
|
||||
// check if all requirements are matched
|
||||
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
|
||||
searchterms.filter(function(term){return term.length > 2}).length
|
||||
if (
|
||||
fileMap[file].length != searchterms.length &&
|
||||
fileMap[file].length != filteredTermCount
|
||||
) continue;
|
||||
|
||||
// ensure that none of the excluded terms is in the search result
|
||||
for (i = 0; i < excluded.length; i++) {
|
||||
if (terms[excluded[i]] == file ||
|
||||
titleterms[excluded[i]] == file ||
|
||||
$u.contains(terms[excluded[i]] || [], file) ||
|
||||
$u.contains(titleterms[excluded[i]] || [], file)) {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if we have still a valid result we can add it to the result list
|
||||
if (valid) {
|
||||
// select one (max) score for the file.
|
||||
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
|
||||
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
|
||||
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to return a node containing the
|
||||
* search summary for a given text. keywords is a list
|
||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
||||
* words. the first one is used to find the occurrence, the
|
||||
* latter for highlighting it.
|
||||
*/
|
||||
makeSearchSummary : function(htmlText, keywords, hlwords) {
|
||||
var text = Search.htmlToText(htmlText);
|
||||
var textLower = text.toLowerCase();
|
||||
var start = 0;
|
||||
$.each(keywords, function() {
|
||||
var i = textLower.indexOf(this.toLowerCase());
|
||||
if (i > -1)
|
||||
start = i;
|
||||
});
|
||||
start = Math.max(start - 120, 0);
|
||||
var excerpt = ((start > 0) ? '...' : '') +
|
||||
$.trim(text.substr(start, 240)) +
|
||||
((start + 240 - text.length) ? '...' : '');
|
||||
var rv = $('<div class="context"></div>').text(excerpt);
|
||||
$.each(hlwords, function() {
|
||||
rv = rv.highlightText(this, 'highlighted');
|
||||
});
|
||||
return rv;
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
Search.init();
|
||||
});
|
||||
@@ -88,7 +88,11 @@ cp -a CONTRIBUTING.rst %{buildroot}%{_datadir}/doc/fish/
|
||||
%if 0%{?__builddir:1}
|
||||
cd %__builddir
|
||||
%endif
|
||||
make test SHOW_INTERACTIVE_LOG=1
|
||||
# Fedora uses __cmake_builddir
|
||||
%if 0%{?__cmake_builddir:1}
|
||||
cd %__cmake_builddir
|
||||
%endif
|
||||
make fish_run_tests
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
4
po/en.po
4
po/en.po
@@ -62480,6 +62480,10 @@ msgstr ""
|
||||
msgid "Edit variable value"
|
||||
msgstr "Edit variable value"
|
||||
|
||||
#: /tmp/fish/implicit/share/functions/fish_add_path.fish:1
|
||||
msgid "Skipping non-existent path: %s\n"
|
||||
msgstr "Skipping non-existent path: %s\n"
|
||||
|
||||
#~ msgid "%ls: No function name given\n"
|
||||
#~ msgstr "%ls: No function name given\n"
|
||||
|
||||
|
||||
@@ -14,46 +14,45 @@ complete -f -c 7z -n __fish_use_subcommand -a u -d Update
|
||||
complete -f -c 7z -n __fish_use_subcommand -a x -d "Extract with full paths"
|
||||
|
||||
# Switches
|
||||
complete -f -c 7z -o - -d "Stop switches parsing"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e l t x" -o ai -d "Include archives"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e l t x" -o an -d "Disable archive_name field"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e x" -o ao -d "Overwrite mode"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e l t x" -o ax -d "Exclude archives"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e u x" -o bb -d "Set output log level"
|
||||
complete -f -c 7z -o bd -d "Disable progress indicator"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e h l u x" -o bs -d "Set output stream"
|
||||
complete -f -c 7z -o bt -d "Show execution time statistics"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e h l rn t u x" -o i -d "Include filenames"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d h rn u" -o m -d "Set compression method"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e x" -o o -d "Set output directory"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e rn t u x" -o p -d "Set password"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e h l rn t u x" -o r -d "Recurse subdirectories"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a" -o sa -d "Set archive name mode"
|
||||
complete -f -c 7z -o scc -d "Set charset for console I/O"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e h x" -o scrc -d "Set hash function"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a u" -o scs -d "Set charset for list files"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a" -o sdel -d "Delete files after compression"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a u" -o seml -d "Send archive by email"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d u" -o sfx -d "Create SFX archive"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a e h u x" -o si -d "Read data from stdin"
|
||||
complete -f -c 7z -o slp -d "Set large pages mode"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from l" -o slt -d "Show technical information"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a e u x" -o sni -d "Store NT security information"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e h l t u x" -o sns -d "Store NTFS alternate streams"
|
||||
complete -f -c 7z -o snh -d "Store hard links"
|
||||
complete -f -c 7z -o snl -d "Store symbolic links"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a e u x" -o so -d "Write data to stdout"
|
||||
complete -f -c 7z -o spd -d "Disable wildcard matching"
|
||||
complete -f -c 7z -o spe -d "Eliminate duplication of root folder"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e u x" -o spf -d "Use fully qualified file paths"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e l t u x" -o ssc -d "Set sensitive case mode"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a h u" -o ssw -d "Compress shared files"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d rn u" -o stl -d "Set archive timestamp"
|
||||
complete -f -c 7z -o stm -d "Set CPU thread affinity mask"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e l t u x" -o stx -d "Exclude archive type"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e l t u x" -o t -d "Type of archive"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d rn u" -o u -d "Update options"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a" -o v -d "Create volumes"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d rn u" -o w -d "Assign work directory"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from a d e h l rn t u x" -o x -d "Exclude filenames"
|
||||
complete -f -c 7z -n "__fish_seen_subcommand_from e x" -o y -d "Assume yes on all queries"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e l t x" -o ai -d "Include archives"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e l t x" -o an -d "Disable archive_name field"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e x" -o ao -d "Overwrite mode"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e l t x" -o ax -d "Exclude archives"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e u x" -o bb -d "Set output log level"
|
||||
complete -c 7z -o bd -d "Disable progress indicator"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e h l u x" -o bs -d "Set output stream"
|
||||
complete -c 7z -o bt -d "Show execution time statistics"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e h l rn t u x" -o i -d "Include filenames"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d h rn u" -o m -d "Set compression method"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e x" -o o -d "Set output directory"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e rn t u x" -o p -d "Set password"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e h l rn t u x" -o r -d "Recurse subdirectories"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a" -o sa -d "Set archive name mode"
|
||||
complete -c 7z -o scc -d "Set charset for console I/O"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e h x" -o scrc -d "Set hash function"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a u" -o scs -d "Set charset for list files"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a" -o sdel -d "Delete files after compression"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a u" -o seml -d "Send archive by email"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d u" -o sfx -d "Create SFX archive"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a e h u x" -o si -d "Read data from stdin"
|
||||
complete -c 7z -o slp -d "Set large pages mode"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from l" -o slt -d "Show technical information"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a e u x" -o sni -d "Store NT security information"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e h l t u x" -o sns -d "Store NTFS alternate streams"
|
||||
complete -c 7z -o snh -d "Store hard links"
|
||||
complete -c 7z -o snl -d "Store symbolic links"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a e u x" -o so -d "Write data to stdout"
|
||||
complete -c 7z -o spd -d "Disable wildcard matching"
|
||||
complete -c 7z -o spe -d "Eliminate duplication of root folder"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e u x" -o spf -d "Use fully qualified file paths"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e l t u x" -o ssc -d "Set sensitive case mode"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a h u" -o ssw -d "Compress shared files"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d rn u" -o stl -d "Set archive timestamp"
|
||||
complete -c 7z -o stm -d "Set CPU thread affinity mask"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e l t u x" -o stx -d "Exclude archive type"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e l t u x" -o t -d "Type of archive"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d rn u" -o u -d "Update options"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a" -o v -d "Create volumes"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d rn u" -o w -d "Assign work directory"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from a d e h l rn t u x" -o x -d "Exclude filenames"
|
||||
complete -c 7z -n "__fish_seen_subcommand_from e x" -o y -d "Assume yes on all queries"
|
||||
|
||||
@@ -75,6 +75,22 @@ function __fish_adb_list_files
|
||||
__fish_adb_run_command find -H "$token*" -maxdepth 0 -type f 2\>/dev/null
|
||||
end
|
||||
|
||||
function __fish_adb_completion_for_pull
|
||||
set -l token (commandline -opc)
|
||||
__fish_adb_list_files
|
||||
if test (count $token) -gt 2
|
||||
__fish_complete_path
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_adb_completion_for_push
|
||||
set -l token (commandline -opc)
|
||||
__fish_complete_path
|
||||
if test (count $token) -gt 2
|
||||
__fish_adb_list_files
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Generic options, must come before command
|
||||
complete -n __fish_adb_no_subcommand -c adb -s s -x -a "(__fish_adb_get_devices)" -d 'Device to communicate with'
|
||||
@@ -123,6 +139,7 @@ complete -n '__fish_seen_subcommand_from install' -c adb -s s -d 'Install on SD
|
||||
complete -n '__fish_seen_subcommand_from install' -c adb -l algo -d 'Algorithm name'
|
||||
complete -n '__fish_seen_subcommand_from install' -c adb -l key -d 'Hex-encoded key'
|
||||
complete -n '__fish_seen_subcommand_from install' -c adb -l iv -d 'Hex-encoded iv'
|
||||
complete -n '__fish_seen_subcommand_from install' -c adb -ka '(__fish_complete_suffix .apk)'
|
||||
|
||||
# uninstall
|
||||
complete -n '__fish_seen_subcommand_from uninstall' -c adb -s k -d 'Keep the data and cache directories'
|
||||
@@ -164,4 +181,5 @@ 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 pull' -c adb -f -a "(__fish_adb_completion_for_pull)" -d 'File on device'
|
||||
complete -n '__fish_seen_subcommand_from push' -c adb -f -a "(__fish_adb_completion_for_push)" -d 'File on device'
|
||||
|
||||
@@ -15,7 +15,7 @@ complete -c adduser -l gid -d 'When creating a group, force the groupid to be th
|
||||
complete -c adduser -l group -d 'Create a group'
|
||||
complete -c adduser -l help -d 'Display brief instructions'
|
||||
complete -c adduser -l home -d 'Use specified directory as the user\'s home directory' -x -a '(__fish_complete_directories)'
|
||||
complete -c adduser -l shell -d 'Use shell as the user\'s login shell, rather than the default' -x -a '(string match --regex '^[^#].*' < /etc/shells)'
|
||||
complete -c adduser -l shell -d 'Use shell as the user\'s login shell, rather than the default' -x -a "(string match --regex '^[^#].*' < /etc/shells; type -afp nologin)"
|
||||
complete -c adduser -l ingroup -d 'Add the new user to GROUP instead of a usergroup or the default group' -x -a '(cut -d : -f 1 /etc/group)'
|
||||
complete -c adduser -l no-create-home -d 'Do not create the home directory'
|
||||
complete -c adduser -l quiet -d 'Suppress informational messages, only show warnings and errors'
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# Completions for apk (Alpine Package Keeper)
|
||||
|
||||
# Package name
|
||||
complete -f -c apk -n "__fish_seen_subcommand_from add info fetch dot" -a "(apk search -q)" -d Package
|
||||
complete -f -c apk -n "__fish_seen_subcommand_from del fix version manifest" -a "(apk info -q)" -d Package
|
||||
complete -c apk -n "__fish_seen_subcommand_from add" -a "(apk search -q)" -d Package
|
||||
complete -c apk -n "__fish_seen_subcommand_from manifest" -a "(apk info -q)" -d Package
|
||||
complete -f -c apk -n "__fish_seen_subcommand_from info fetch dot" -a "(apk search -q)" -d Package
|
||||
complete -f -c apk -n "__fish_seen_subcommand_from del fix version" -a "(apk info -q)" -d Package
|
||||
|
||||
# Global options
|
||||
complete -f -c apk -s h -l help -d "Show help"
|
||||
|
||||
9
share/completions/archlinux-java.fish
Normal file
9
share/completions/archlinux-java.fish
Normal file
@@ -0,0 +1,9 @@
|
||||
complete -c archlinux-java -f
|
||||
complete -c archlinux-java -n __fish_use_subcommand -a status -d 'List installed Java environments and enabled one'
|
||||
complete -c archlinux-java -n __fish_use_subcommand -a set -d 'Force <JAVA_ENV> as default'
|
||||
complete -c archlinux-java -n __fish_use_subcommand -a unset -d 'Unset current default Java environment'
|
||||
complete -c archlinux-java -n __fish_use_subcommand -a get -d 'Return the short name of the Java environment set as default'
|
||||
complete -c archlinux-java -n __fish_use_subcommand -a fix -d 'Fix an invalid/broken default Java environment configuration'
|
||||
complete -c archlinux-java -n __fish_use_subcommand -a help -d 'Show help'
|
||||
|
||||
complete -c archlinux-java -n "__fish_seen_subcommand_from set" -a "(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)"
|
||||
3
share/completions/brightnessctl.fish
Normal file
3
share/completions/brightnessctl.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
complete -f brightnessctl
|
||||
complete -c brightnessctl -n "test (__fish_number_of_cmd_args_wo_opts) = 1" \
|
||||
-xa "info get set max"
|
||||
15
share/completions/choose.fish
Normal file
15
share/completions/choose.fish
Normal file
@@ -0,0 +1,15 @@
|
||||
complete choose --no-files
|
||||
|
||||
# flags:
|
||||
complete choose -s c -l character-wise -d "Choose fields by character number"
|
||||
complete choose -s d -l debug -d "Activate debug mode"
|
||||
complete choose -s x -l exclusive -d "Use exclusive ranges, similar to array indexing in many programming languages"
|
||||
complete choose -x -s h -l help -d "Prints help information"
|
||||
complete choose -s n -l non-greedy -d "Use non-greedy field separators"
|
||||
complete choose -l one-indexed -d "Index from 1 instead of 0"
|
||||
complete choose -s V -l version -d "Prints version information"
|
||||
|
||||
# options:
|
||||
complete choose -x -s f -l field-separator -d "Specify field separator other than whitespace, using Rust `regex` syntax"
|
||||
complete choose -r -s i -l input -d "Specify input file"
|
||||
complete choose -x -s o -l output-field-separator -d "Specify output field separator"
|
||||
@@ -21,7 +21,7 @@ complete -c code -l file-uri -d 'Opens a window with given file uri(s)'
|
||||
complete -c code -l extensions-dir -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 install-extension -xa "(__fish_complete_vscode_extensions)" -d 'Installs or updates the extension'
|
||||
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 'Avoid prompts when installing'
|
||||
complete -c code -l enable-proposed-api -xa "(__fish_complete_vscode_extensions)" -d 'Enables proposed API features for extensions'
|
||||
complete -c code -l uninstall-extension -xa "(__fish_complete_vscode_extensions)" -d 'Uninstall extension'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
if cp --version 2>/dev/null >/dev/null # GNU cp
|
||||
complete -c cp -s a -l archive -d "Same as -dpR"
|
||||
complete -c cp -l attributes-only -d "Copy just the attributes"
|
||||
complete -c cp -s b -l backup -d "Make backup of each existing destination file" -a "none off numbered t existing nil simple never"
|
||||
complete -c cp -l copy-contents -d "Copy contents of special files when recursive"
|
||||
complete -c cp -s d -d "Same as --no-dereference --preserve=link"
|
||||
@@ -15,17 +16,20 @@ if cp --version 2>/dev/null >/dev/null # GNU cp
|
||||
complete -c cp -l help -d "Display help and exit"
|
||||
complete -c cp -l version -d "Display version and exit"
|
||||
complete -c cp -s L -l dereference -d "Always follow symbolic links"
|
||||
complete -c cp -s n -l no-clobber -d "Do not overwrite an existing file"
|
||||
complete -c cp -s P -l no-dereference -d "Never follow symbolic links"
|
||||
complete -c cp -s p -d "Same as --preserve=mode,ownership,timestamps"
|
||||
complete -c cp -f -l preserve -d "Preserve ATTRIBUTES if possible" -xa "mode ownership timestamps links all"
|
||||
complete -c cp -f -l no-preserve -r -d "Don't preserve ATTRIBUTES" -xa "mode ownership timestamps links all"
|
||||
complete -c cp -l parents -d "Use full source file name under DIRECTORY"
|
||||
complete -c cp -s r -s R -l recursive -d "Copy directories recursively"
|
||||
complete -c cp -l reflink -d "Control clone/CoW copies" -xa "always auto never"
|
||||
complete -c cp -l remove-destination -d "First remove existing destination files"
|
||||
complete -c cp -f -l sparse -r -d "Control creation of sparse files" -xa "always auto never"
|
||||
complete -c cp -s s -l symbolic-link -d "Make symbolic links instead of copying"
|
||||
complete -c cp -s T -l no-target-directory -d "Treat DEST as a normal file"
|
||||
complete -c cp -s x -l one-file-system -d "Stay on this file system"
|
||||
complete -c cp -s Z -d "Set SELinux context of copy to default type"
|
||||
complete -c cp -s X -l context -r -d "Set SELinux context of copy to CONTEXT"
|
||||
else # BSD/macOS
|
||||
set -l uname (uname -s)
|
||||
|
||||
@@ -2,9 +2,9 @@ complete -c date -f -d "display or set date and time"
|
||||
if date --version >/dev/null 2>/dev/null
|
||||
complete -c date -s d -l date -d "Display date described by string" -x
|
||||
complete -c date -s f -l file -d "Display date for each line in file" -r
|
||||
complete -c date -s I -l iso-8601 -d "Output in ISO-8601 format" -x -a "date hours minutes seconds"
|
||||
complete -c date -s I -l iso-8601 -d "Use ISO 8601 output format" -x -a "date hours minutes seconds"
|
||||
complete -c date -s s -l set -d "Set time" -x
|
||||
complete -c date -s R -l rfc-2822 -d "Output RFC-2822 date string"
|
||||
complete -c date -s R -l rfc-2822 -d "Output in RFC 2822 format"
|
||||
complete -c date -s r -l reference -d "Display last modification time of file" -r
|
||||
complete -c date -s u -l utc -d "Print/set UTC time" -f
|
||||
complete -c date -l universal -d "Print/set UTC time" -f
|
||||
@@ -12,19 +12,27 @@ if date --version >/dev/null 2>/dev/null
|
||||
complete -c date -s v -l version -d "Display version and exit" -f
|
||||
else
|
||||
complete -c date -s u -d 'Display or set UTC time' -f
|
||||
complete -c date -s j -d "Don't actually set the clock" -f
|
||||
complete -c date -s d -d "Set system's value for DST" -x
|
||||
complete -c date -s j -d "Don't try to set the date" -f
|
||||
|
||||
set -l uname (uname -s)
|
||||
|
||||
test "$uname" != OpenBSD
|
||||
and complete -c date -s n -d 'Set clock for local machine only' -f
|
||||
|
||||
switch $uname
|
||||
case FreeBSD Darwin DragonFly
|
||||
# only -u is actually POSIX. Rest are BSD extensions:
|
||||
complete -c date -s r -d "Show file mtime, or format seconds" -r
|
||||
complete -c date -s v -d 'Adjust clock +/- by time specified' -f
|
||||
complete -c date -s r -d "Format path mtime or UNIX timestamp" -r
|
||||
complete -c date -s v -d 'Adjust clock ± time specified' -f
|
||||
complete -c date -s R -d "Use RFC 2822 output format"
|
||||
|
||||
set -l release_major (printf '%d' (uname -r) 2>/dev/null)
|
||||
|
||||
# -d,t gone in Monterey, FreeBSD 13
|
||||
if test \( "$uname" = FreeBSD -a "$release_major" -lt 13 \) -o \( "$uname" = Darwin -a "$release_major" -lt 21 \)
|
||||
complete -c date -s t -d "Set system's minutes west of GMT" -x
|
||||
complete -c date -s d -d "Set system's value for DST" -x
|
||||
else
|
||||
complete -c date -s I -d "Use ISO 8601 output format" -x -a "date hours minutes seconds"
|
||||
end
|
||||
|
||||
case NetBSD OpenBSD
|
||||
complete -c date -s a -d "Change clock slowly with adjtime" -x
|
||||
complete -c date -s r -d "Show date given seconds since epoch" -x
|
||||
@@ -35,6 +43,5 @@ else
|
||||
complete -c date -s z -d "Specify timezone for output" -x
|
||||
end
|
||||
|
||||
complete -c date -s t -d "Set system's minutes west of GMT" -x
|
||||
complete -c date -s f -d 'Use format string to parse date' -f
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
function __dnf_list_installed_packages
|
||||
dnf repoquery --cacheonly "$cur*" --qf "%{NAME}" --installed
|
||||
dnf repoquery --cacheonly "$cur*" --qf "%{NAME}" --installed </dev/null
|
||||
end
|
||||
|
||||
function __dnf_list_available_packages
|
||||
@@ -24,7 +24,9 @@ function __dnf_list_available_packages
|
||||
set results (sqlite3 /var/cache/dnf/packages.db "SELECT pkg FROM available WHERE pkg LIKE \"$tok%\"" 2>/dev/null |
|
||||
string replace -r -- '-[^-]*-[^-]*$' '')
|
||||
else
|
||||
set results (dnf repoquery --cacheonly "$tok*" --qf "%{NAME}" --available 2>/dev/null)
|
||||
# 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)
|
||||
end
|
||||
if set -q results[1]
|
||||
set results (string match -r -- '.*\\.rpm$' $files) $results
|
||||
|
||||
@@ -8,7 +8,7 @@ complete -x -f -c dpkg-reconfigure -s h -l help -d 'Display help'
|
||||
# General options
|
||||
complete -f -c dpkg-reconfigure -s f -l frontend -r -a "dialog readline noninteractive gnome kde editor web" -d 'Set configuration frontend'
|
||||
complete -f -c dpkg-reconfigure -s p -l priority -r -a "low medium high critical" -d 'Set priority threshold'
|
||||
complete -f -c dpkg-reconfigure -l default-priority -d "Use current default ("(echo get debconf/priority | debconf-communicate | string match -r '\w+$')") priority threshold"
|
||||
complete -f -c dpkg-reconfigure -l default-priority -d "Use current default ("(echo get debconf/priority | debconf-communicate 2>/dev/null | string match -r '\w+$')") priority threshold"
|
||||
complete -f -c dpkg-reconfigure -s u -l unseen-only -d 'Show only unseen question'
|
||||
complete -f -c dpkg-reconfigure -l force -d 'Reconfigure also inconsistent packages'
|
||||
complete -f -c dpkg-reconfigure -l no-reload -d 'Prevent reloading templates'
|
||||
|
||||
38
share/completions/efibootmgr.fish
Normal file
38
share/completions/efibootmgr.fish
Normal file
@@ -0,0 +1,38 @@
|
||||
function __efibootmgr_list_bootnum
|
||||
efibootmgr | string match -r -- "Boot\d+.+" |
|
||||
string split -m1 -f2 -- Boot |
|
||||
string replace -r -- "\* | " "\t"
|
||||
end
|
||||
|
||||
complete -f -c efibootmgr -s a -l active -d "sets bootnum active"
|
||||
complete -f -c efibootmgr -s A -l inactive -d "sets bootnum inactive"
|
||||
complete -f -c efibootmgr -s b -l bootnum -d "modify BootXXXX (hex)" -ra '(__efibootmgr_list_bootnum)'
|
||||
complete -f -c efibootmgr -s B -l delete-bootnum -d "delete bootnum"
|
||||
complete -f -c efibootmgr -s c -l create -d "create new variable bootnum and add to bootorder"
|
||||
complete -f -c efibootmgr -s C -l create-only -d "create new variable bootnum and do not add to bootorder"
|
||||
complete -f -c efibootmgr -s D -l remove-dups -d "remove duplicate values from BootOrder"
|
||||
complete -F -c efibootmgr -s d -l disk -d "disk containing loader (Default: /dev/sda)"
|
||||
complete -f -c efibootmgr -s r -l driver -d "Operate on Driver variables, not Boot Variables."
|
||||
complete -f -c efibootmgr -s e -l edd -d "force EDD 1.0 or 3.0 creation variables, or guess" -ra "1 3 -1"
|
||||
complete -f -c efibootmgr -s E -l device -d "EDD 1.0 device number (Default: 0x80)" -r
|
||||
complete -f -c efibootmgr -s g -l gpt -d "force disk with invalid PMBR to be treated as GPT"
|
||||
complete -F -c efibootmgr -s i -l iface -d "create a netboot entry for the named interface" -r
|
||||
complete -F -c efibootmgr -s l -l loader -d "EFI loader file location (Default: \EFI\BOOT\grub.efi)" -r
|
||||
complete -f -c efibootmgr -s L -l label -d "Boot manager display label (Default: Linux)"
|
||||
complete -f -c efibootmgr -s m -l mirror-below-4G -d "t|f mirror memory below 4GB"
|
||||
complete -f -c efibootmgr -s M -l mirror-above-4G -d "X percentage memory to mirror above 4GB"
|
||||
complete -f -c efibootmgr -s n -l bootnext -d "set BootNext to XXXX (hex)" -ra '(__efibootmgr_list_bootnum)'
|
||||
complete -f -c efibootmgr -s N -l delete-bootnext -d "delete BootNext"
|
||||
complete -f -c efibootmgr -s o -l bootorder -d "explicitly set BootOrder XXXX,YYYY,ZZZZ (hex)"
|
||||
complete -f -c efibootmgr -s O -l delete-bootorder -d "delete BootOrder"
|
||||
complete -f -c efibootmgr -s p -l part -d "partition containing loader (Default: 1)"
|
||||
complete -f -c efibootmgr -s q -l quiet -d "be quiet"
|
||||
complete -f -c efibootmgr -s t -l timeout -d "set boot manager timeout waiting for user input." -r
|
||||
complete -f -c efibootmgr -s T -l delete-timeout -d "delete Timeout."
|
||||
complete -f -c efibootmgr -s u -l unicode -l UCS-2 -d "handle extra args as Unicode(UCS-2)"
|
||||
complete -f -c efibootmgr -s v -l verbose -d "print additional information"
|
||||
complete -f -c efibootmgr -s V -l version -d "return version and exit"
|
||||
complete -f -c efibootmgr -s w -l write-signature -d "write unique sig to MBR if needed"
|
||||
complete -f -c efibootmgr -s y -l sysprep -d "Operate on SysPrep variables, not Boot Variables."
|
||||
complete -F -c efibootmgr -s @ -l append-binary-args -d "append extra args from file (use - for stdin)" -r
|
||||
complete -f -c efibootmgr -s h -l help -d "show help/usage"
|
||||
@@ -1,14 +1,16 @@
|
||||
set -l is_gnu
|
||||
if env --version &>/dev/null
|
||||
set -l is_gnu --is-gnu
|
||||
set is_gnu --is-gnu
|
||||
end
|
||||
|
||||
function __fish_env_remaining_args -V is_gnu
|
||||
set -l argv (commandline -opc) (commandline -ct)
|
||||
if set -q is_gnu[1]
|
||||
argparse -s i/ignore-environment u/unset= help version -- (commandline -opc) (commandline -ct) 2>/dev/null
|
||||
or return 1
|
||||
argparse -s i/ignore-environment u/unset= help version -- $argv 2>/dev/null
|
||||
or return 0
|
||||
else
|
||||
argparse -s 0 i P= S= u= v -- (commandline -opc) (commandline -ct) 2>/dev/null
|
||||
or return 1
|
||||
argparse -s 0 i P= S= u= v -- $argv 2>/dev/null
|
||||
or return 0
|
||||
end
|
||||
|
||||
# argv[1] is `env` or an alias.
|
||||
@@ -27,7 +29,7 @@ function __fish_env_remaining_args -V is_gnu
|
||||
string join \n -- $argv
|
||||
|
||||
# Return true if there is a subcommand.
|
||||
set -q argv[1]
|
||||
test -n "$argv[1]"
|
||||
end
|
||||
|
||||
function __fish_complete_env_subcommand
|
||||
|
||||
9
share/completions/expect.fish
Normal file
9
share/completions/expect.fish
Normal file
@@ -0,0 +1,9 @@
|
||||
complete -c expect -s c -r -d "execute command"
|
||||
complete -c expect -s d -n "__fish_not_contain_opt -s d" -d "diagnostic output"
|
||||
complete -c expect -s D -x -r -a "0 1" -n "__fish_not_contain_opt -s D" -d "debug value"
|
||||
complete -c expect -s f -r -d "script path"
|
||||
complete -c expect -s i -n "__fish_not_contain_opt -s i" -d "interactive mode"
|
||||
complete -c expect -s v -n "__fish_not_contain_opt -s v" -d "print version"
|
||||
complete -c expect -s N -n "__fish_not_contain_opt -s N" -d "skip global rc"
|
||||
complete -c expect -s n -n "__fish_not_contain_opt -s n" -d "skip user rc"
|
||||
complete -c expect -s b -n "__fish_not_contain_opt -s b" -d "read line by line"
|
||||
69
share/completions/fastboot.fish
Normal file
69
share/completions/fastboot.fish
Normal file
@@ -0,0 +1,69 @@
|
||||
set -l commands flashall getvar oem flashing reboot update erase format devices flash get_staged help stage boot fetch
|
||||
|
||||
function __fish_fastboot_list_partition_or_file
|
||||
if __fish_seen_subcommand_from (__fish_fastboot_list_partition){_a,_b,}
|
||||
__fish_complete_path
|
||||
else
|
||||
__fish_fastboot_list_partition
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_fastboot_list_partition
|
||||
set -l partitions boot bootloader dtbo modem odm odm_dlkm oem product pvmfw radio recovery system vbmeta vendor vendor_dlkm cache userdata system_ext
|
||||
for i in $partitions
|
||||
echo $i
|
||||
end
|
||||
end
|
||||
|
||||
complete -c fastboot -s h -l help -d 'Show this message'
|
||||
complete -c fastboot -s v -l verbose -d 'Verbose output'
|
||||
complete -c fastboot -l version -d 'Display version'
|
||||
|
||||
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s w -d 'Wipe userdata'
|
||||
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s s -d 'Specify a device'
|
||||
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s S -d 'Break into sparse files no larger than SIZE'
|
||||
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -l slot -d 'Use SLOT; \'all\' for both slots, \'other\' for non-current slot (default: current active slot)' -xa "all other a b"
|
||||
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -l set-active -d 'Sets the active slot before rebooting' -xa "a b"
|
||||
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a flashall -d 'Flash all partitions from $ANDROID_PRODUCT_OUT'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a getvar -d 'Display given bootloader variable'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a oem -d 'Execute OEM-specific command'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a flashing -d 'Lock/unlock'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a reboot -d 'Reboot device'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a update -d 'Flash all partitions from an update.zip package'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a erase -d 'Erase a flash partition'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a format -d 'Format a flash partition'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a devices -d 'List devices in bootloader'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a flash -d 'Flash given partition'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a help -d 'Show help message'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a stage -d 'Sends given file to stage for the next command'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a get_staged -d 'Writes data staged by the last command to a file'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a fetch -d 'Fetch a partition image from the device'
|
||||
complete -f -n "not __fish_seen_subcommand_from $commands" -c fastboot -a boot -d 'Download and boot kernel from RAM'
|
||||
|
||||
# flash
|
||||
complete -n '__fish_seen_subcommand_from flash' -c fastboot -f -a "(__fish_fastboot_list_partition_or_file)"
|
||||
complete -n '__fish_seen_subcommand_from flash' -c fastboot -l skip-secondary -d 'Don\'t flash secondary slots in flashall/update'
|
||||
complete -n '__fish_seen_subcommand_from flash' -c fastboot -l skip-reboot -d 'Don\'t reboot device after flashing'
|
||||
complete -n '__fish_seen_subcommand_from flash' -c fastboot -l disable-verity -d 'Sets disable-verity when flashing vbmeta'
|
||||
complete -n '__fish_seen_subcommand_from flash' -c fastboot -l disable-verification -d 'Sets disable-verification when flashing vbmeta'
|
||||
complete -n '__fish_seen_subcommand_from flash' -c fastboot -l force -d 'Force a flash operation that may be unsafe'
|
||||
|
||||
# boot
|
||||
complete -n '__fish_seen_subcommand_from boot' -c fastboot
|
||||
|
||||
# fetch
|
||||
complete -n '__fish_seen_subcommand_from fetch' -c fastboot -f -a "(__fish_fastboot_list_partition)"
|
||||
|
||||
# devices
|
||||
complete -n '__fish_seen_subcommand_from devices' -c fastboot -f
|
||||
complete -n '__fish_seen_subcommand_from devices' -c fastboot -s l -d 'device paths'
|
||||
|
||||
# format
|
||||
complete -n '__fish_seen_subcommand_from format' -c fastboot -f -a "(__fish_fastboot_list_partition_or_file)"
|
||||
|
||||
# erase
|
||||
complete -n '__fish_seen_subcommand_from erase' -c fastboot -f -a "(__fish_fastboot_list_partition)"
|
||||
|
||||
# flashing
|
||||
complete -n '__fish_seen_subcommand_from flashing' -c fastboot -f -a "lock unlock lock_critical unlock_critical get_unlock_ability"
|
||||
@@ -4,7 +4,14 @@ complete -c file -s b -l brief -d 'Do not prepend filenames to output lines'
|
||||
complete -c file -s c -l checking-printout -d 'Print the parsed form of the magic file'
|
||||
complete -c file -s C -l compile -d 'Write an output file containing a pre-parsed version of file'
|
||||
complete -c file -s h -l no-dereference -d 'Do not follow symlinks'
|
||||
complete -c file -s i -l mime -d 'Output mime type strings instead human readable strings'
|
||||
|
||||
if test (uname) = Darwin
|
||||
complete -c file -s i -d 'Do not classify regular file contents'
|
||||
complete -c file -s I -l mime -d 'Output mime type strings instead human readable strings'
|
||||
else
|
||||
complete -c file -s i -l mime -d 'Output mime type strings instead human readable strings'
|
||||
end
|
||||
|
||||
complete -c file -s k -l keep-going -d 'Don\'t stop at the first match'
|
||||
complete -c file -s L -l dereference -d 'Follow symlinks'
|
||||
complete -c file -s n -l no-buffer -d 'Flush stdout after checking each file'
|
||||
|
||||
@@ -16,7 +16,7 @@ complete -c fzf -s d -l delimiter -d 'Field delimiter regex for --nth and --with
|
||||
complete -c fzf -l no-sort -d 'Do not sort the result'
|
||||
complete -c fzf -n 'string match "+*" -- (commandline -ct)' -a +s -d 'Do not sort the result'
|
||||
complete -c fzf -l tac -d 'Reverse the order of the input'
|
||||
complete -c fzf -l phony -d 'Do not perform search'
|
||||
complete -c fzf -l disabled -d 'Do not perform search'
|
||||
complete -c fzf -l tiebreak -d 'Sort criteria when breaking ties' -x -a 'length begin end index'
|
||||
|
||||
# Interface
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
#
|
||||
|
||||
complete -c gdb -o help -s h -d 'List all options, with brief explanations'
|
||||
complete -c gdb -o symbols -s s -d 'Read symbol table from file file' -r
|
||||
complete -c gdb -o symbols -s s -d 'Read symbol table from <file>' -r
|
||||
complete -c gdb -o write -d 'Enable writing into executable and core files'
|
||||
complete -c gdb -o exec -s e -d 'Use file file as the executable file to execute when appropri ate, and for examining pure data in conjunction with a core dump' -r
|
||||
complete -c gdb -o se -d 'Read symbol table from file file and use it as the executable file' -r
|
||||
complete -c gdb -o core -s c -d 'Use file file as a core dump to examine' -r
|
||||
complete -c gdb -o command -s x -d 'Execute GDB commands from file file' -r
|
||||
complete -c gdb -o directory -s d -d 'Add directory to the path to search for source files' -x -a '(__fish_complete_directories (commandline -ct))'
|
||||
complete -c gdb -o exec -s e -d 'Set executable' -r
|
||||
complete -c gdb -o se -d 'Read symbol table from <file> and execute it' -r
|
||||
complete -c gdb -o core -s c -d 'Use <file> as a core dump to examine' -r
|
||||
complete -c gdb -o command -s x -d 'Execute GDB commands from <file>' -r
|
||||
complete -c gdb -o directory -s d -d 'Add directory with source files' -x -a '(__fish_complete_directories (commandline -ct))'
|
||||
complete -c gdb -o nx -s n -d 'Do not execute commands from any .gdbinit files'
|
||||
complete -c gdb -o quiet -s q -d Quiet
|
||||
complete -c gdb -o batch -d 'Run in batch mode'
|
||||
complete -c gdb -o cd -d 'Run GDB using directory as its working directory, instead of the current directory' -x -a '(__fish_complete_directories (commandline -ct))'
|
||||
complete -c gdb -o fullname -s f -d 'Emacs sets this option when it runs GDB as a subprocess'
|
||||
complete -c gdb -s b -d 'Bps Set the line speed (baud rate or bits per second) of any serial interface used by GDB for remote debugging'
|
||||
complete -c gdb -o tty -d 'Run using device for your programs standard input and output' -r
|
||||
complete -c gdb -l args -d 'Pass arguments after the program name to the program when it is run'
|
||||
complete -c gdb -o cd -d 'Set GDB\'s working directory' -x -a '(__fish_complete_directories (commandline -ct))'
|
||||
complete -c gdb -o fullname -s f -d 'Used by Emacs'
|
||||
complete -c gdb -s b -d 'Set throughput in bps for remote debugging'
|
||||
complete -c gdb -o tty -d 'Set device for the program\'s stdin/stdout' -r
|
||||
complete -c gdb -l args -d 'Pass arguments to the program after its name'
|
||||
complete -c gdb -o tui -d 'Run GDB using a text (console) user interface'
|
||||
|
||||
@@ -342,7 +342,11 @@ function __fish_git_files
|
||||
if string match -q '../*' -- $file
|
||||
or string match -q ':*' -- (commandline -ct)
|
||||
set -l fromroot (builtin realpath -- $file 2>/dev/null)
|
||||
and set fromroot (string replace -- "$root/" ":/" "$fromroot")
|
||||
# `:` starts pathspec "magic", and the second `:` terminates it.
|
||||
# `/` is the magic letter for "from repo root".
|
||||
# If we didn't terminate it we'd have to escape any special chars
|
||||
# (non-alphanumeric, glob or regex special characters, in whatever dialect git uses)
|
||||
and set fromroot (string replace -- "$root/" ":/:" "$fromroot")
|
||||
and printf '%s\t%s\n' "$fromroot" $d
|
||||
end
|
||||
end
|
||||
@@ -476,13 +480,14 @@ function __fish_git_files
|
||||
end
|
||||
set -a file (string join / -- $previous)
|
||||
|
||||
# The filename with ":/" prepended.
|
||||
# The filename with ":/:" prepended.
|
||||
if string match -q '../*' -- $file
|
||||
or string match -q ':*' -- (commandline -ct)
|
||||
set file (string replace -- "$root/" ":/" "$root/$relfile")
|
||||
set file (string replace -- "$root/" ":/:" "$root/$relfile")
|
||||
end
|
||||
|
||||
if test "$root/$relfile" = (pwd -P)/$relfile
|
||||
and not string match -q ':*' -- (commandline -ct)
|
||||
set file $relfile
|
||||
end
|
||||
|
||||
@@ -502,12 +507,12 @@ function __fish_git_rev_files
|
||||
|
||||
# List files in $rev's index, skipping the "tree ..." header, but appending
|
||||
# the parent path, which git does not include in the output (and fish requires)
|
||||
printf "$path%s\n" (git show $rev:$path | sed '1,2d')
|
||||
printf "$path%s\n" (__fish_git show $rev:$path | sed '1,2d')
|
||||
end
|
||||
|
||||
# Provides __fish_git_rev_files completions for the current token
|
||||
function __fish_git_complete_rev_files
|
||||
set -l split (string split -m 1 ":" (commandline -ot))
|
||||
set -l split (string split -m 1 ":" -- (commandline -ot))
|
||||
set -l rev $split[1]
|
||||
set -l path $split[2]
|
||||
|
||||
@@ -625,7 +630,7 @@ git config -z --get-regexp 'alias\..*' | while read -lz alias cmdline
|
||||
string match -q --regex '\w+' -- $command; or continue
|
||||
# Git aliases can contain chars that variable names can't - escape them.
|
||||
set -l alias (string replace 'alias.' '' -- $alias | string escape --style=var)
|
||||
set -g __fish_git_alias_$alias $command
|
||||
set -g __fish_git_alias_$alias $command $cmdline
|
||||
end
|
||||
|
||||
function __fish_git_using_command
|
||||
@@ -638,11 +643,39 @@ function __fish_git_using_command
|
||||
# Check aliases.
|
||||
set -l varname __fish_git_alias_(string escape --style=var -- $cmd)
|
||||
set -q $varname
|
||||
and contains -- $$varname $argv
|
||||
and contains -- $$varname[1][1] $argv
|
||||
and return 0
|
||||
return 1
|
||||
end
|
||||
|
||||
function __fish_git_contains_opt
|
||||
# Check if an option has been given
|
||||
# First check the commandline normally
|
||||
__fish_contains_opt $argv
|
||||
and return
|
||||
|
||||
# Now check the alias
|
||||
argparse s= -- $argv
|
||||
set -l cmd (__fish_git_needs_command)
|
||||
set -l varname __fish_git_alias_(string escape --style=var -- $cmd)
|
||||
if set -q $varname
|
||||
echo -- $$varname | read -lat toks
|
||||
set toks (string replace -r '(-.*)=.*' '' -- $toks)
|
||||
for i in $argv
|
||||
if contains -- --$i $toks
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
for i in $_flag_s
|
||||
if string match -qr -- "^-$i|^-[^-]*$i" $toks
|
||||
return 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return 1
|
||||
end
|
||||
function __fish_git_stash_using_command
|
||||
set -l cmd (commandline -opc)
|
||||
__fish_git_using_command stash
|
||||
@@ -897,17 +930,43 @@ complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l ign
|
||||
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l submodule -a '(__fish_git_diff_opt submodule)' -d 'Specify how differences in submodules are shown'
|
||||
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l ws-error-highlight -a '(__fish_git_diff_opt ws-error-highlight)' -d 'Highlight whitespace errors in lines of the diff'
|
||||
|
||||
complete -f -c git -n '__fish_git_using_command fetch pull' -l unshallow -d 'Convert a shallow repository to a complete one'
|
||||
complete -f -c git -n '__fish_git_using_command fetch pull' -l set-upstream -d 'Add upstream (tracking) reference'
|
||||
|
||||
#### fetch
|
||||
complete -f -c git -n __fish_git_needs_command -a fetch -d 'Download objects and refs from another repository'
|
||||
# Suggest "repository", then "refspec" - this also applies to e.g. push/pull
|
||||
complete -f -c git -n '__fish_git_using_command fetch; and not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d Remote
|
||||
complete -f -c git -n '__fish_git_using_command fetch; and __fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s q -l quiet -d 'Be quiet'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s v -l verbose -d 'Be verbose'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s a -l append -d 'Append ref names and object names'
|
||||
# TODO --upload-pack
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -n 'not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d Remote
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -n '__fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s q -l quiet -d 'Be more quiet'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s v -l verbose -d 'Be more verbose'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s a -l append -d 'Append to .git/FETCH_HEAD instead of overwriting'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l upload-pack -d 'Path to upload pack on remote end'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s f -l force -d 'Force update of local branches'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s p -l prune -d 'Remove remote-tracking references that no longer exist on the remote'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s p -l prune -d 'Prune remote-tracking branches no longer on remote'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l all -d 'Fetch all remotes'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l atomic -d 'Use atomic transfer to update references'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s m -l multiple -d 'Fetch from multiple remotes'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s t -l tags -d 'Fetch all tags and associated objects'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s P -l prune-tags -d 'Prune local tags no longer on remote and clobber changed tags'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l prefetch -d 'Modify the refspec to replace all refs within refs/prefetch/'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s j -l jobs -d 'Numbers of submodules fetched in parallel'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s n -d 'Do not fetch all tags (--no-tags)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l dry-run -d 'Dry run'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l depth -d 'Limit number of commits'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l with-fetch-head -d 'Write fetched references to the FETCH_HEAD file'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l update-shallow -d 'Accept refs that update .git/shallow'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s k -l keep -d 'Keep downloaded pack'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -s u -l update-head-ok -d 'Allow updating of HEAD ref'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l progress -d 'Force progress reporting'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l deepen -d 'Deepen history of shallow clones'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l shallow-since -d 'Deepen history of shallow repository based on time'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l shallow-exclude -d 'Deepen history of shallow clone, excluding rev'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l unshallow -d 'Convert to a complete repository'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l refetch -d 'Re-fetch without negotiating common commits'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l negotiation-tip -d 'Only report commits reachable from these tips' -xa '(__fish_git_commits; __fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command fetch' -l negotiate-only -d "Don't fetch, only show commits in common with the server"
|
||||
|
||||
# TODO other options
|
||||
|
||||
#### filter-branch
|
||||
@@ -928,40 +987,40 @@ complete -c git -n '__fish_git_using_command filter-branch' -s f -l force -d 'Fi
|
||||
### remote
|
||||
set -l remotecommands add rm remove show prune update rename set-head set-url set-branches get-url
|
||||
complete -f -c git -n __fish_git_needs_command -a remote -d 'Manage set of tracked repositories'
|
||||
complete -f -c git -n '__fish_git_using_command remote' -a '(__fish_git_remotes)'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -s v -l verbose -d 'Be verbose'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a add -d 'Adds a new remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a rm -d 'Removes a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a remove -d 'Removes a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a show -d 'Shows a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a prune -d 'Deletes all stale tracking branches'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a update -d 'Fetches updates'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a rename -d 'Renames a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a set-head -d 'Sets the default branch for a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a set-url -d 'Changes URLs for a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a get-url -d 'Retrieves URLs for a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and not __fish_seen_subcommand_from $remotecommands" -a set-branches -d 'Changes the list of branches tracked by a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from add " -s f -d 'Once the remote information is set up git fetch <name> is run'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from add " -l tags -d 'Import every tag from a remote with git fetch <name>'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from add " -l no-tags -d "Don't import tags from a remote with git fetch <name>"
|
||||
complete -f -c git -n '__fish_git_using_command remote; and __fish_seen_subcommand_from remove' -xa '(__fish_git_remotes)'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from set-branches" -l add -d 'Add to the list of currently tracked branches instead of replacing it'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from set-url" -l push -d 'Manipulate push URLs instead of fetch URLs'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from set-url" -l add -d 'Add new URL instead of changing the existing URLs'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from set-url" -l delete -d 'Remove URLs that match specified URL'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from get-url" -l push -d 'Query push URLs rather than fetch URLs'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from get-url" -l all -d 'All URLs for the remote will be listed'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from show" -s n -d 'Remote heads are not queried, cached information is used instead'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from prune" -l dry-run -d 'Report what will be pruned but do not actually prune it'
|
||||
complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcommand_from update" -l prune -d 'Prune all remotes that are updated'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from $remotecommands" -a '(__fish_git_remotes)'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -s v -l verbose -d 'Be verbose'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a add -d 'Adds a new remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a rm -d 'Removes a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a remove -d 'Removes a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a show -d 'Shows a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a prune -d 'Deletes all stale tracking branches'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a update -d 'Fetches updates'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a rename -d 'Renames a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a set-head -d 'Sets the default branch for a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a set-url -d 'Changes URLs for a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a get-url -d 'Retrieves URLs for a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "not __fish_seen_subcommand_from $remotecommands" -a set-branches -d 'Changes the list of branches tracked by a remote'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from add " -s f -d 'Once the remote information is set up git fetch <name> is run'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from add " -l tags -d 'Import every tag from a remote with git fetch <name>'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from add " -l no-tags -d "Don't import tags from a remote with git fetch <name>"
|
||||
complete -f -c git -n '__fish_git_using_command remote' -n '__fish_seen_subcommand_from remove' -xa '(__fish_git_remotes)'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from set-branches" -l add -d 'Add to the list of currently tracked branches instead of replacing it'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from set-url" -l push -d 'Manipulate push URLs instead of fetch URLs'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from set-url" -l add -d 'Add new URL instead of changing the existing URLs'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from set-url" -l delete -d 'Remove URLs that match specified URL'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from get-url" -l push -d 'Query push URLs rather than fetch URLs'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from get-url" -l all -d 'All URLs for the remote will be listed'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from show" -s n -d 'Remote heads are not queried, cached information is used instead'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from prune" -l dry-run -d 'Report what will be pruned but do not actually prune it'
|
||||
complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcommand_from update" -l prune -d 'Prune all remotes that are updated'
|
||||
|
||||
### show
|
||||
complete -f -c git -n __fish_git_needs_command -a show -d 'Shows the last commit of a branch'
|
||||
complete -f -c git -n '__fish_git_using_command show; and not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command show; and not contains -- -- (commandline -opc)' -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command show; and not contains -- -- (commandline -opc)' -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_needs_rev_files; and not contains -- -- (commandline -opc)' -xa '(__fish_git_complete_rev_files)'
|
||||
complete -F -c git -n '__fish_git_using_command show; and contains -- -- (commandline -opc)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_needs_rev_files' -n 'not contains -- -- (commandline -opc)' -xa '(__fish_git_complete_rev_files)'
|
||||
complete -F -c git -n '__fish_git_using_command show' -n 'contains -- -- (commandline -opc)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l format -d 'Pretty-print the contents of the commit logs in a given format' -a '(__fish_git_show_opt format)'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l abbrev-commit -d 'Show only a partial hexadecimal commit object name'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l no-abbrev-commit -d 'Show the full 40-byte hexadecimal commit object name'
|
||||
@@ -971,12 +1030,25 @@ complete -f -c git -n '__fish_git_using_command show' -l expand-tabs -d 'Perform
|
||||
complete -f -c git -n '__fish_git_using_command show' -l no-expand-tabs -d 'Do not perform a tab expansion in the log message'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l notes -k -a '(__fish_git_refs)' -d 'Show the notes that annotate the commit'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l no-notes -d 'Do not show notes'
|
||||
complete -f -c git -n '__fish_git_using_command show' -s s -l no-patch -d 'Suppress diff output'
|
||||
complete -f -c git -n '__fish_git_using_command show' -l show-signature -d 'Check the validity of a signed commit object'
|
||||
|
||||
|
||||
### show-branch
|
||||
complete -f -c git -n __fish_git_needs_command -a show-branch -d 'Shows the commits on branches'
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -k -a '(__fish_git_refs)' -d Rev
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -s r -l remotes -d "Shows the remote tracking branches"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -s a -l all -d "Show both remote-tracking branches and local branches"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l current -d "Includes the current branch to the list of revs to be shown"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l topo-order -d "Makes commits appear in topological order"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l date-order -d "Makes commits appear in date order"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l sparse -d "Shows merges only reachable from one tip"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l no-name -d "Do not show naming strings for each commit"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l sha1-name -d "Name commits with unique prefix"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l no-color -d "Turn off colored output"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l merge-base -d "Determine merge bases for the given commits"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l independent -d "Show which refs can't be reached from any other"
|
||||
complete -f -c git -n '__fish_git_using_command show-branch' -l topics -d "Show only commits that are not on the first given branch"
|
||||
# TODO options
|
||||
|
||||
### add
|
||||
@@ -1032,21 +1104,25 @@ complete -f -c git -n '__fish_git_using_command am' -l quit -d 'Abort without re
|
||||
complete -c git -n '__fish_git_using_command am' -l show-current-patch -a 'diff raw' -d 'Show message at which patch failures occured'
|
||||
|
||||
### checkout
|
||||
complete -F -c git -n '__fish_git_using_command checkout; and contains -- -- (commandline -opc)'
|
||||
complete -F -c git -n '__fish_git_using_command checkout' -n 'contains -- -- (commandline -opc)'
|
||||
complete -f -c git -n __fish_git_needs_command -a checkout -d 'Checkout and switch to a branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -opc)' -a '(__fish_git_tags)' -d Tag
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -opc)' -a '(__fish_git_heads)' -d Head
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -opc)' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -opc)' -a '(__fish_git_local_branches)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout; and not contains -- -- (commandline -opc)' -a '(__fish_git_recent_commits --all)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_files modified deleted modified-staged-deleted)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_recent_commits --all)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_tags)' -d Tag
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_heads)' -d Head
|
||||
complete -k -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_local_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -s b -d 'Create a new branch'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -s B -d 'Create a new branch or reset existing to start point'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -s t -l track -d 'Track a new branch'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -l theirs -d 'Keep staged changes'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -l ours -d 'Keep unmerged changes'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -l recurse-submodules -d 'Update the work trees of submodules'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -l no-recurse-submodules -d 'Do not update the work trees of submodules'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -l progress -d 'Report progress even if not connected to a terminal'
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -l no-progress -d "Don't report progress"
|
||||
complete -f -c git -n '__fish_git_using_command checkout' -s f -l force -d 'Switch even if working tree differs or unmerged files exist'
|
||||
# TODO options
|
||||
|
||||
### apply
|
||||
@@ -1061,7 +1137,7 @@ complete -f -c git -n '__fish_git_using_command apply' -s 3 -l 3way -d 'Attempt
|
||||
complete -F -c git -n '__fish_git_using_command apply' -l build-fake-ancestor -d 'Build a temporary index containing these blobs'
|
||||
complete -f -c git -n '__fish_git_using_command apply' -s R -l reverse -d 'Apply the patch in reverse'
|
||||
complete -f -c git -n '__fish_git_using_command apply' -l reject -d 'Leave rejected hunks in *.rej files'
|
||||
complete -f -c git -n '__fish_git_using_command apply; and __fish_contains_opt numstat' -s z -d 'Do not munge pathnames'
|
||||
complete -f -c git -n '__fish_git_using_command apply' -n '__fish_git_contains_opt numstat' -s z -d 'Do not munge pathnames'
|
||||
complete -x -c git -n '__fish_git_using_command apply am' -s p -d 'Remove n leading path components'
|
||||
complete -x -c git -n '__fish_git_using_command apply am' -s C -d 'Ensure n that lines of surrounding context match'
|
||||
complete -f -c git -n '__fish_git_using_command apply' -l unidiff-zero -d 'Do not break on diffs generated using --unified=0'
|
||||
@@ -1081,11 +1157,14 @@ complete -f -c git -n '__fish_git_using_command apply' -l unsafe-paths -d 'Allow
|
||||
|
||||
### archive
|
||||
complete -f -c git -n __fish_git_needs_command -a archive -d 'Create an archive of files from a named tree'
|
||||
complete -f -c git -n '__fish_git_using_command archive' -s l -l list -d "Show all available formats"
|
||||
complete -f -c git -n '__fish_git_using_command archive' -s v -l verbose -d "Be verbose"
|
||||
complete -f -c git -n '__fish_git_using_command archive' -l worktree-attributes -d "Look for attributes in .gitattributes files in the working tree as well"
|
||||
# TODO options
|
||||
|
||||
### bisect
|
||||
complete -f -c git -n __fish_git_needs_command -a bisect -d 'Find the change that introduced a bug by binary search'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_prev_arg_in bisect' -xa "
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_prev_arg_in bisect' -xa "
|
||||
start\t'Start a new bisect session'
|
||||
bad\t'Mark a commit as bad'
|
||||
new\t'Mark a commit as new'
|
||||
@@ -1100,19 +1179,19 @@ log\t'Record a bisect log file'
|
||||
run\t'Bisect automaically with the given command as discriminator'
|
||||
help\t'Print a synopsis of all commands'
|
||||
"
|
||||
complete -c git -n '__fish_git_using_command bisect; and __fish_seen_argument --' -F
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from start' -l term-new -l term-bad -x -d 'Use another term instead of new/bad'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from start' -l term-old -l term-good -x -d 'Use another term instead of old/good'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from start' -l no-checkout -d 'Do not checkout tree, only update BISECT_HEAD'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from start' -l first-parent -d 'On merge commits, follow only the first parent commit'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from start; and not contains -- -- (commandline -opc)' -a '(__fish_git_refs)'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from bad new good old' -a '(__fish_git_refs)'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from terms' -l --term-good -d 'Print the term for the old state'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from terms' -l --term-bad -d 'Print the term for the new state'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from skip' -a '(__fish_git_ranges)'
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from reset' -a '(__fish_git_refs)'
|
||||
complete -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from replay' -F
|
||||
complete -f -c git -n '__fish_git_using_command bisect; and __fish_seen_subcommand_from run' -xa '(__fish_complete_subcommand --fcs-skip=3)'
|
||||
complete -c git -n '__fish_git_using_command bisect' -n '__fish_seen_argument --' -F
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l term-new -l term-bad -x -d 'Use another term instead of new/bad'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l term-old -l term-good -x -d 'Use another term instead of old/good'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l no-checkout -d 'Do not checkout tree, only update BISECT_HEAD'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l first-parent -d 'On merge commits, follow only the first parent commit'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_refs)'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from bad new good old' -a '(__fish_git_refs)'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from terms' -l --term-good -d 'Print the term for the old state'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from terms' -l --term-bad -d 'Print the term for the new state'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from skip' -a '(__fish_git_ranges)'
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from reset' -a '(__fish_git_refs)'
|
||||
complete -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from replay' -F
|
||||
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from run' -xa '(__fish_complete_subcommand --fcs-skip=3)'
|
||||
|
||||
### branch
|
||||
complete -f -c git -n __fish_git_needs_command -a branch -d 'List, create, or delete branches'
|
||||
@@ -1130,6 +1209,7 @@ complete -f -c git -n '__fish_git_using_command branch' -l no-track -d 'Do not t
|
||||
complete -f -c git -n '__fish_git_using_command branch' -l set-upstream-to -d 'Set remote branch to track'
|
||||
complete -f -c git -n '__fish_git_using_command branch' -l merged -d 'List branches that have been merged'
|
||||
complete -f -c git -n '__fish_git_using_command branch' -l no-merged -d 'List branches that have not been merged'
|
||||
complete -f -c git -n '__fish_git_using_command branch' -l unset-upstream -d 'Remove branch upstream information'
|
||||
|
||||
### cherry
|
||||
complete -f -c git -n __fish_git_needs_command -a cherry -d 'Find commits yet to be applied to upstream [upstream [head]]'
|
||||
@@ -1140,7 +1220,7 @@ complete -f -c git -n '__fish_git_using_command cherry' -k -a '(__fish_git_refs)
|
||||
complete -f -c git -n __fish_git_needs_command -a cherry-pick -d 'Apply the change introduced by an existing commit'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -k -a '(__fish_git_ranges)'
|
||||
# TODO: Filter further
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick; and __fish_git_possible_commithash' -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -n '__fish_git_possible_commithash' -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -s e -l edit -d 'Edit the commit message prior to committing'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -s x -d 'Append info in generated commit on the origin of the cherry-picked change'
|
||||
complete -f -c git -n '__fish_git_using_command cherry-pick' -s n -l no-commit -d 'Apply changes without making any commit'
|
||||
@@ -1183,9 +1263,11 @@ complete -x -c git -n '__fish_git_using_command commit' -s m -l message -d 'Use
|
||||
complete -f -c git -n '__fish_git_using_command commit' -l no-edit -d 'Use the selected commit message without launching an editor'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -l no-gpg-sign -d 'Do not sign commit'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -s n -l no-verify -d 'Do not run pre-commit and commit-msg hooks'
|
||||
complete -f -c git -n '__fish_git_using_command commit; and __fish_contains_opt fixup squash' -k -a '(__fish_git_recent_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -n '__fish_git_contains_opt fixup squash' -k -a '(__fish_git_recent_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -l allow-empty -d 'Create a commit with no changes'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -l allow-empty-message -d 'Create a commit with no commit message'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -s s -l signoff -d 'Append Signed-off-by trailer to commit message'
|
||||
complete -f -c git -n '__fish_git_using_command commit' -l no-signoff -d 'Do not append Signed-off-by trailer to commit message'
|
||||
# TODO options
|
||||
|
||||
### count-objects
|
||||
@@ -1245,7 +1327,7 @@ complete -f -c git -n '__fish_git_using_command describe' -l first-parent -d 'Fo
|
||||
|
||||
### diff
|
||||
complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits, commit and working tree, etc'
|
||||
complete -c git -n '__fish_git_using_command diff; and not contains -- -- (commandline -opc)' -k -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -opc)' -k -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index'
|
||||
complete -c git -n '__fish_git_using_command diff' -l staged -d 'Show diff of changes in the index'
|
||||
complete -c git -n '__fish_git_using_command diff' -l no-index -d 'Compare two paths on the filesystem'
|
||||
@@ -1255,12 +1337,12 @@ 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; and not __fish_contains_opt cached staged' -a '(
|
||||
complete -c git -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt cached staged' -a '(
|
||||
set -l kinds modified
|
||||
contains -- -- (commandline -opc) && set -a kinds deleted modified-staged-deleted
|
||||
__fish_git_files $kinds
|
||||
)'
|
||||
complete -c git -n '__fish_git_using_command diff; and __fish_contains_opt cached staged' -fa '(__fish_git_files all-staged)'
|
||||
complete -c git -n '__fish_git_using_command diff' -n '__fish_git_contains_opt cached staged' -fa '(__fish_git_files all-staged)'
|
||||
|
||||
### Function to list available tools for git difftool and mergetool
|
||||
|
||||
@@ -1274,7 +1356,7 @@ end
|
||||
|
||||
### difftool
|
||||
complete -c git -n __fish_git_needs_command -a difftool -d 'Open diffs in a visual tool'
|
||||
complete -c git -n '__fish_git_using_command difftool; and not contains -- -- (commandline -opc)' -k -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command difftool' -n 'not contains -- -- (commandline -opc)' -k -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command difftool' -l cached -d 'Visually show diff of changes in the index'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -a '(
|
||||
set -l kinds modified
|
||||
@@ -1290,6 +1372,7 @@ complete -f -c git -n '__fish_git_using_command difftool' -s t -l tool -d 'Use t
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -l tool-help -d 'Print a list of diff tools that may be used with `--tool`'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -l trust-exit-code -d 'Exit when an invoked diff tool returns a non-zero exit code'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -s x -l extcmd -d 'Specify a custom command for viewing diffs'
|
||||
complete -f -c git -n '__fish_git_using_command difftool' -l no-gui -d 'Overrides --gui setting'
|
||||
# TODO options
|
||||
|
||||
### gc
|
||||
@@ -1304,17 +1387,57 @@ complete -f -c git -n '__fish_git_using_command gc' -l keep-largest-pack -d 'Ign
|
||||
|
||||
### grep
|
||||
complete -c git -n __fish_git_needs_command -a grep -d 'Print lines matching a pattern'
|
||||
# TODO options
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l cached -d 'Search blobs registered in the index file'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l no-index -d 'Search files in the current directory not managed by Git'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l untracked -d 'Search also in untracked files'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l no-exclude-standard -d 'Also search in ignored files by not honoring the .gitignore mechanism'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l exclude-standard -d 'Do not search ignored files specified via the .gitignore mechanism'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l recurse-submodules -d 'Recursively search in each submodule that is active and checked out in the repository'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s a -l text -d 'Process binary files as if they were text'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l textconv -d 'Honor textconv filter settings'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l no-textconv -d 'Do not honor textconv filter settings'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s i -l ignore-case -d 'Ignore case differences between the patterns and the files'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s I -d 'Don\'t match the pattern in binary files'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s r -l recursive -d 'Descend into levels of directories endlessly'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l no-recursive -d 'Do not descend into directories'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s w -l word-regexp -d 'Match the pattern only at word boundary'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s v -l invert-match -d 'Select non-matching lines'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l full-name -d 'Forces paths to be output relative to the project top directory'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s E -l extended-regexp -d 'Use POSIX extended regexp for patterns'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s G -l basic-regexp -d 'Use POSIX basic regexp for patterns'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s P -l perl-regexp -d 'Use Perl-compatible regular expressions for patterns'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s F -l fixed-strings -d 'Don\'t interpret pattern as a regex'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s n -l line-number -d 'Prefix the line number to matching lines'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l column -d 'Prefix the 1-indexed byte-offset of the first match from the start of the matching line'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s l -l files-with-matches -d 'Show only the names of files that contain matches'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s L -l files-without-match -d 'Show only the names of files that do not contain matches'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s z -l null -d 'Use \\0 as the delimiter for pathnames in the output, and print them verbatim'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s o -l only-matching -d 'Print only the matched parts of a matching line'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s c -l count -d 'Instead of showing every matched line, show the number of lines that match'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l no-color -d 'Turn off match highlighting, even when the configuration file gives the default to color output'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l break -d 'Print an empty line between matches from different files'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l heading -d 'Show the filename above the matches in that file instead of at the start of each shown line'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s p -l show-function -d 'Show the line that contains the function name of the match, unless the match is a function name itself'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s W -l function-context -d 'Show the surrounding text from the line containing a function name up to the one before the next function name'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s e -d 'The next parameter is the pattern'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l and -d 'Combine patterns using and'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l or -d 'Combine patterns using or'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l not -d 'Combine patterns using not'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -l all-match -d 'Only match files that can match all the pattern expressions when giving multiple'
|
||||
complete -f -c git -n '__fish_git_using_command grep' -s q -l quiet -d 'Just exit with status 0 when there is a match and with non-zero status when there isn\'t'
|
||||
# TODO options, including max-depth, h, open-files-in-pager, contexts, threads, file
|
||||
|
||||
### init
|
||||
complete -f -c git -n __fish_git_needs_command -a init -d 'Create an empty git repository or reinitialize an existing one'
|
||||
complete -f -c git -n '__fish_git_using_command init' -s q -l quiet -d 'Only print error and warning messages'
|
||||
complete -f -c git -n '__fish_git_using_command init' -l bare -d 'Create a bare repository'
|
||||
# TODO options
|
||||
|
||||
### log
|
||||
complete -c git -n __fish_git_needs_command -a shortlog -d 'Show commit shortlog'
|
||||
complete -c git -n __fish_git_needs_command -a log -d 'Show commit logs'
|
||||
complete -c git -n '__fish_git_using_command log; and not contains -- -- (commandline -opc)' -k -a '(__fish_git_ranges)'
|
||||
|
||||
complete -c git -n '__fish_git_using_command log' -a '(__fish_git ls-files)'
|
||||
complete -c git -n '__fish_git_using_command log' -n 'not contains -- -- (commandline -opc)' -k -a '(__fish_git_ranges)'
|
||||
complete -c git -n '__fish_git_using_command log' -l follow -d 'Continue listing file history beyond renames'
|
||||
complete -c git -n '__fish_git_using_command log' -l no-decorate -d 'Don\'t print ref names'
|
||||
complete -f -c git -n '__fish_git_using_command log' -l decorate -a 'short\tHide\ prefixes full\tShow\ full\ ref\ names auto\tHide\ prefixes\ if\ printed\ to\ terminal no\tDon\\\'t\ display\ ref' -d 'Print out ref names'
|
||||
@@ -1477,7 +1600,7 @@ complete -c git -n '__fish_git_using_command ls-files' -s d -l deleted -d 'Show
|
||||
complete -c git -n '__fish_git_using_command ls-files' -s m -l modified -d 'Show modified files in the output'
|
||||
complete -c git -n '__fish_git_using_command ls-files' -s o -l others -d 'Show other (i.e. untracked) files in the output'
|
||||
complete -c git -n '__fish_git_using_command ls-files' -s i -l ignored -d 'Show only ignored files in the output'
|
||||
complete -c git -n '__fish_git_using_command ls-files' -s s -l staged -d "Show staged contents' mode bits, object name and stage number in the output"
|
||||
complete -c git -n '__fish_git_using_command ls-files' -s s -l stage -d "Show staged contents' mode bits, object name and stage number in the output"
|
||||
complete -c git -n '__fish_git_using_command ls-files' -l directory -d 'If a whole directory is classified as "other", show just its name'
|
||||
complete -c git -n '__fish_git_using_command ls-files' -l no-empty-directory -d 'Do not list empty directories'
|
||||
complete -c git -n '__fish_git_using_command ls-files' -s u -l unmerged -d 'Show unmerged files in the output'
|
||||
@@ -1560,8 +1683,8 @@ complete -f -c git -n '__fish_git_using_command merge' -l progress -d 'Force pro
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-progress -d 'Force no progress status'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l allow-unrelated-histories -d 'Allow merging even when branches do not share a common history'
|
||||
complete -x -c git -n '__fish_git_using_command merge' -s m -d 'Set the commit message'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s rerere-autoupdate -d 'If possible, use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -s no-rerere-autoupdate -d 'Do not use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l rerere-autoupdate -d 'If possible, use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l no-rerere-autoupdate -d 'Do not use previous conflict resolutions'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l abort -d 'Abort the current conflict resolution process'
|
||||
complete -f -c git -n '__fish_git_using_command merge' -l continue -d 'Conclude current conflict resolution process'
|
||||
|
||||
@@ -1570,7 +1693,7 @@ complete -f -c git -n __fish_git_needs_command -a merge-base -d 'Find as good co
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -s a -l all -d 'Output all merge bases for the commits, instead of just one'
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -l octopus -d 'Compute the best common ancestors of all supplied commits'
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -l independent -d 'Print a minimal subset of the supplied commits with the same ancestors.'
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -l independent -d 'Print a minimal subset of the supplied commits with the same ancestors'
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -l is-ancestor -d 'Check if the first commit is an ancestor of the second commit'
|
||||
complete -f -c git -n '__fish_git_using_command merge-base' -l fork-point -d 'Find the point at which a branch forked from another branch ref'
|
||||
|
||||
@@ -1586,6 +1709,7 @@ complete -c git -n '__fish_git_using_command mergetool' -s O -d 'Process files i
|
||||
|
||||
### mv
|
||||
complete -c git -n __fish_git_needs_command -a mv -d 'Move or rename a file, a directory, or a symlink'
|
||||
complete -f -c git -n '__fish_git_using_command mv' -a '(__fish_git ls-files)'
|
||||
complete -f -c git -n '__fish_git_using_command mv' -s f -l force -d 'Force rename/moving even if target exists'
|
||||
complete -f -c git -n '__fish_git_using_command mv' -s k -d 'Skip rename/move which can lead to error'
|
||||
complete -f -c git -n '__fish_git_using_command mv' -s n -l dry-run -d 'Only show what would happen'
|
||||
@@ -1594,39 +1718,42 @@ complete -f -c git -n '__fish_git_using_command mv' -s v -l verbose -d 'Report n
|
||||
### notes
|
||||
set -l notescommands add copy append edit show merge remove # list prune get-ref
|
||||
complete -c git -n __fish_git_needs_command -a notes -d 'Add or inspect object notes'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a list -d 'List notes for given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a add -d 'Add notes for a given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a copy -d 'Copy notes from object1 to object2'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a append -d 'Append to the notes of existing object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a edit -d 'Edit notes for a given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a show -d 'Show notes for given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a merge -d 'Merge the given notes ref to current notes ref'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a remove -d 'Remove notes for given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a prune -d 'Remove notes for non-existing/unreachable objects'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and not __fish_seen_subcommand_from $notescommands" -a get-ref -d 'Print current notes ref'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from $notescommands" -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from add copy" -s f -l force -d 'Overwrite existing notes'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from add append edit" -l allow-empty -d 'Allow empty note'
|
||||
complete -r -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from add append" -s F -l file -d 'Read note message from file'
|
||||
complete -x -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from add append" -s m -l message -d 'Use this note message'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from add append" -s C -l reuse-message -a '(__fish_git_commits)' -d 'Copy note from object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from add append" -s c -l reedit-message -a '(__fish_git_commits)' -d 'Copy and edit note from object'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from copy remove" -l stdin -d 'Read object names from stdin'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from merge remove prune" -s v -l verbose -d 'Be more verbose'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from merge remove prune" -s q -l quiet -d 'Operate quietly'
|
||||
complete -x -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from merge" -s s -l strategy -d 'Merge strategy to use to resolve conflicts' -a "
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a list -d 'List notes for given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a add -d 'Add notes for a given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a copy -d 'Copy notes from object1 to object2'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a append -d 'Append to the notes of existing object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a edit -d 'Edit notes for a given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a show -d 'Show notes for given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a merge -d 'Merge the given notes ref to current notes ref'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a remove -d 'Remove notes for given object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a prune -d 'Remove notes for non-existing/unreachable objects'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "not __fish_seen_subcommand_from $notescommands" -a get-ref -d 'Print current notes ref'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from $notescommands" -ka '(__fish_git_commits)'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from add copy" -s f -l force -d 'Overwrite existing notes'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from add append edit" -l allow-empty -d 'Allow empty note'
|
||||
complete -r -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from add append" -s F -l file -d 'Read note message from file'
|
||||
complete -x -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from add append" -s m -l message -d 'Use this note message'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from add append" -s C -l reuse-message -a '(__fish_git_commits)' -d 'Copy note from object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from add append" -s c -l reedit-message -a '(__fish_git_commits)' -d 'Copy and edit note from object'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from copy remove" -l stdin -d 'Read object names from stdin'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from merge remove prune" -s v -l verbose -d 'Be more verbose'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from merge remove prune" -s q -l quiet -d 'Operate quietly'
|
||||
complete -x -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from merge" -s s -l strategy -d 'Merge strategy to use to resolve conflicts' -a "
|
||||
manual\t'Instruct the user to resolve merge conflicts'
|
||||
ours\t'Resolve conflicts in favour of local version'
|
||||
theirs\t'Resolve conflicts in favour of remote version'
|
||||
union\t'Resolve conflicts by concatenating local and remote versions'
|
||||
cat_sort_uniq\t'Concatenate, sort and remove duplicate lines'
|
||||
"
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from merge" -l commit -d 'Finalize git notes merge'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from merge" -l abort -d 'Abort git notes merge'
|
||||
complete -f -c git -n "__fish_git_using_command notes; and __fish_seen_subcommand_from remove" -l ignore-missing -d 'Do not throw error on deleting non-existing object note'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from merge" -l commit -d 'Finalize git notes merge'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from merge" -l abort -d 'Abort git notes merge'
|
||||
complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcommand_from remove" -l ignore-missing -d 'Do not throw error on deleting non-existing object note'
|
||||
|
||||
### prune
|
||||
complete -f -c git -n __fish_git_needs_command -a prune -d 'Prune all unreachable objects from the object database'
|
||||
complete -f -c git -n '__fish_git_using_command prune' -s n -l dry-run -d 'Just report what it would remove'
|
||||
complete -f -c git -n '__fish_git_using_command prune' -s v -l verbose -d 'Report all removed objects'
|
||||
complete -f -c git -n '__fish_git_using_command prune' -l progress -d 'Show progress'
|
||||
# TODO options
|
||||
|
||||
### pull
|
||||
@@ -1642,8 +1769,8 @@ complete -f -c git -n '__fish_git_using_command pull' -l no-tags -d 'Disable aut
|
||||
complete -f -c git -n '__fish_git_using_command pull' -s p -l prune -d 'Remove remote-tracking references that no longer exist on the remote'
|
||||
# TODO --upload-pack
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l progress -d 'Force progress status'
|
||||
complete -f -c git -n '__fish_git_using_command pull; and not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command pull; and __fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -n 'not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command pull' -n '__fish_git_branch_for_remote' -a '(__fish_git_branch_for_remote)'
|
||||
# Options related to merging
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l commit -d "Autocommit the merge"
|
||||
complete -f -c git -n '__fish_git_using_command pull' -l no-commit -d "Don't autocommit the merge"
|
||||
@@ -1681,17 +1808,17 @@ complete -f -c git -n '__fish_git_using_command range-diff' -l no-dual-color -d
|
||||
|
||||
### push
|
||||
complete -f -c git -n __fish_git_needs_command -a push -d 'Update remote refs along with associated objects'
|
||||
complete -f -c git -n '__fish_git_using_command push; and not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote' -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote' -ka '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote' -ka '(__fish_git_heads)'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n 'not __fish_git_branch_for_remote' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -ka '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -ka '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -ka '(__fish_git_heads)'
|
||||
# The "refspec" here is an optional "+" to signify a force-push
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "+*" -- (commandline -ct)' -a '+(__fish_git_branches | string replace -r \t".*" "")' -d 'Force-push branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q "+*" -- (commandline -ct)' -a '+(__fish_git_branches | string replace -r \t".*" "")' -d 'Force-push branch'
|
||||
# git push REMOTE :BRANCH deletes BRANCH on remote REMOTE
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q ":*" -- (commandline -ct)' -a ':(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Delete remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q ":*" -- (commandline -ct)' -a ':(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Delete remote branch'
|
||||
# then src:dest (where both src and dest are git objects, so we want to complete branches)
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "+*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Force-push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push; and __fish_git_branch_for_remote; and string match -q "*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q "+*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Force-push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -n '__fish_git_branch_for_remote' -n 'string match -q "*:*" -- (commandline -ct)' -a '(commandline -ct | string replace -r ":.*" ""):(__fish_git_branch_for_remote | string replace -r \t".*" "")' -d 'Push local branch to remote branch'
|
||||
complete -f -c git -n '__fish_git_using_command push' -l all -d 'Push all refs under refs/heads/'
|
||||
complete -f -c git -n '__fish_git_using_command push' -l prune -d "Remove remote branches that don't have a local counterpart"
|
||||
complete -f -c git -n '__fish_git_using_command push' -l mirror -d 'Push all refs under refs/'
|
||||
@@ -1701,7 +1828,7 @@ complete -f -c git -n '__fish_git_using_command push' -l follow-tags -d 'Push al
|
||||
complete -f -c git -n '__fish_git_using_command push' -s n -l dry-run -d 'Do everything except actually send the updates'
|
||||
complete -f -c git -n '__fish_git_using_command push' -l porcelain -d 'Produce machine-readable output'
|
||||
complete -f -c git -n '__fish_git_using_command push' -s f -l force -d 'Force update of remote refs'
|
||||
complete -f -c git -n '__fish_git_using_command push' -s f -l force-with-lease -d 'Force update of remote refs, stopping if other\'s changes would be overwritten'
|
||||
complete -f -c git -n '__fish_git_using_command push' -l force-with-lease -d 'Force update of remote refs, stopping if other\'s changes would be overwritten'
|
||||
complete -f -c git -n '__fish_git_using_command push' -s u -l set-upstream -d 'Add upstream (tracking) reference'
|
||||
complete -f -c git -n '__fish_git_using_command push' -s q -l quiet -d 'Be quiet'
|
||||
complete -f -c git -n '__fish_git_using_command push' -s v -l verbose -d 'Be verbose'
|
||||
@@ -1713,13 +1840,13 @@ complete -f -c git -n __fish_git_needs_command -a rebase -d 'Forward-port local
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_remotes)' -d 'Remote alias'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_heads)' -d Head
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_recent_commits)'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command rebase; and __fish_git_is_rebasing' -l continue -d 'Restart the rebasing process'
|
||||
complete -f -c git -n '__fish_git_using_command rebase; and __fish_git_is_rebasing' -l abort -d 'Abort the rebase operation'
|
||||
complete -f -c git -n '__fish_git_using_command rebase; and __fish_git_is_rebasing' -l edit-todo -d 'Edit the todo list'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_tags)' -d Tag -k
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -a '(__fish_git_recent_commits)' -k
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l continue -d 'Restart the rebasing process'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l abort -d 'Abort the rebase operation'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l edit-todo -d 'Edit the todo list'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -l keep-empty -d "Keep the commits that don't change anything"
|
||||
complete -f -c git -n '__fish_git_using_command rebase; and __fish_git_is_rebasing' -l skip -d 'Restart the rebasing process by skipping the current patch'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -n '__fish_git_is_rebasing' -l skip -d 'Restart the rebasing process by skipping the current patch'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -s m -l merge -d 'Use merging strategies to rebase'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -s q -l quiet -d 'Be quiet'
|
||||
complete -f -c git -n '__fish_git_using_command rebase' -s v -l verbose -d 'Be verbose'
|
||||
@@ -1748,20 +1875,20 @@ complete -f -c git -n __fish_git_needs_command -a reflog -d 'Manage reflog infor
|
||||
complete -f -c git -n '__fish_git_using_command reflog' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command reflog' -a '(__fish_git_heads)' -d Head
|
||||
|
||||
complete -f -c git -n "__fish_git_using_command reflog; and not __fish_seen_subcommand_from $reflogcommands" -a "$reflogcommands"
|
||||
complete -f -c git -n "__fish_git_using_command reflog" -n "not __fish_seen_subcommand_from $reflogcommands" -a "$reflogcommands"
|
||||
|
||||
### reset
|
||||
complete -c git -n __fish_git_needs_command -a reset -d 'Reset current HEAD to the specified state'
|
||||
complete -f -c git -n '__fish_git_using_command reset' -l hard -d 'Reset the index and the working tree'
|
||||
complete -f -c git -n '__fish_git_using_command reset' -l soft -d 'Reset head without touching the index or the working tree'
|
||||
complete -f -c git -n '__fish_git_using_command reset' -l mixed -d 'The default: reset the index but not the working tree'
|
||||
complete -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
complete -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_branches)'
|
||||
# reset can either undo changes to versioned modified files,
|
||||
# or remove files from the staging area.
|
||||
# Deleted files seem to need a "--" separator.
|
||||
complete -f -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -opc)' -a '(__fish_git_files all-staged modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset; and contains -- -- (commandline -opc)' -a '(__fish_git_files all-staged deleted modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset; and not contains -- -- (commandline -opc)' -a '(__fish_git_reflog)' -d Reflog
|
||||
complete -f -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_files all-staged modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset' -n 'contains -- -- (commandline -opc)' -a '(__fish_git_files all-staged deleted modified)'
|
||||
complete -f -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_reflog)' -d Reflog
|
||||
# TODO options
|
||||
|
||||
### restore and switch
|
||||
@@ -1778,9 +1905,9 @@ complete -f -c git -n '__fish_git_using_command restore' -l ignore-unmerged -d '
|
||||
complete -f -c git -n '__fish_git_using_command restore' -l ignore-skip-worktree-bits -d 'Ignore the sparse-checkout file and unconditionally restore any files in <pathspec>'
|
||||
complete -f -c git -n '__fish_git_using_command restore' -l overlay -d 'Never remove files when restoring'
|
||||
complete -f -c git -n '__fish_git_using_command restore' -l no-overlay -d 'Remove files when restoring (default)'
|
||||
complete -f -c git -n '__fish_git_using_command restore; and not contains -- --staged (commandline -opc)' -a '(__fish_git_files modified deleted modified-staged-deleted unmerged)'
|
||||
complete -f -c git -n '__fish_git_using_command restore; and contains -- --staged (commandline -opc)' -a '(__fish_git_files added modified-staged deleted-staged renamed copied)'
|
||||
complete -F -c git -n '__fish_git_using_command restore; and __fish_contains_opt -s s source'
|
||||
complete -f -c git -n '__fish_git_using_command restore' -n 'not __fish_git_contains_opt -s S staged' -a '(__fish_git_files modified deleted modified-staged-deleted unmerged)'
|
||||
complete -f -c git -n '__fish_git_using_command restore' -n '__fish_git_contains_opt -s S staged' -a '(__fish_git_files added modified-staged deleted-staged renamed copied)'
|
||||
complete -F -c git -n '__fish_git_using_command restore' -n '__fish_git_contains_opt -s s source'
|
||||
# switch options
|
||||
complete -f -c git -n __fish_git_needs_command -a switch -d 'Switch to a branch'
|
||||
complete -k -f -c git -n '__fish_git_using_command switch' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
@@ -1818,17 +1945,24 @@ complete -f -c git -n '__fish_git_using_command revert' -ka '(__fish_git_commits
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l continue -d 'Continue the operation in progress'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l abort -d 'Cancel the operation'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l skip -d 'Skip the current commit and continue with the rest of the sequence'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l quit -d 'Forget about the current operation in progress'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l no-edit -d 'Do not start the commit message editor'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -s n -l no-commit -d 'Apply changes to index but don\'t create a commit'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -s s -l signoff -d 'Add a Signed-off-by trailer at the end of the commit message'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l rerere-autoupdate -d 'Allow the rerere mechanism to update the index with the result of auto-conflict resolution'
|
||||
complete -f -c git -n '__fish_git_using_command revert' -l no-rerere-autoupdate -d 'Prevent the rerere mechanism from updating the index with auto-conflict resolution'
|
||||
# TODO options
|
||||
|
||||
### rm
|
||||
complete -c git -n __fish_git_needs_command -a rm -d 'Remove files from the working tree and the index'
|
||||
complete -c git -n '__fish_git_using_command rm' -l cached -d 'Unstage files from the index'
|
||||
complete -c git -n '__fish_git_using_command rm; and __fish_contains_opt cached' -f -a '(__fish_git_files all-staged)'
|
||||
complete -c git -n '__fish_git_using_command rm' -n '__fish_git_contains_opt cached' -f -a '(__fish_git_files all-staged)'
|
||||
complete -c git -n '__fish_git_using_command rm' -l ignore-unmatch -d 'Exit with a zero status even if no files matched'
|
||||
complete -c git -n '__fish_git_using_command rm' -s r -d 'Allow recursive removal'
|
||||
complete -c git -n '__fish_git_using_command rm' -s q -l quiet -d 'Be quiet'
|
||||
complete -c git -n '__fish_git_using_command rm' -s f -l force -d 'Override the up-to-date check'
|
||||
complete -c git -n '__fish_git_using_command rm' -s n -l dry-run -d 'Dry run'
|
||||
complete -c git -n '__fish_git_using_command rm' -l sparse -d 'Allow updating index entries outside of the sparse-checkout cone'
|
||||
# TODO options
|
||||
|
||||
### status
|
||||
@@ -1839,6 +1973,10 @@ complete -f -c git -n '__fish_git_using_command status' -l porcelain -d 'Give th
|
||||
complete -f -c git -n '__fish_git_using_command status' -s z -d 'Terminate entries with null character'
|
||||
complete -f -c git -n '__fish_git_using_command status' -s u -l untracked-files -x -a 'no normal all' -d 'The untracked files handling mode'
|
||||
complete -f -c git -n '__fish_git_using_command status' -l ignore-submodules -x -a 'none untracked dirty all' -d 'Ignore changes to submodules'
|
||||
complete -f -c git -n '__fish_git_using_command status' -s v -l verbose -d 'Also show the textual changes that are staged to be committed'
|
||||
complete -f -c git -n '__fish_git_using_command status' -l no-ahead-behind -d 'Do not display detailed ahead/behind upstream-branch counts'
|
||||
complete -f -c git -n '__fish_git_using_command status' -l renames -d 'Turn on rename detection regardless of user configuration'
|
||||
complete -f -c git -n '__fish_git_using_command status' -l no-renames -d 'Turn off rename detection regardless of user configuration'
|
||||
# TODO options
|
||||
|
||||
### stripspace
|
||||
@@ -1848,7 +1986,7 @@ complete -f -c git -n '__fish_git_using_command stripspace' -s c -l comment-line
|
||||
|
||||
### tag
|
||||
complete -f -c git -n __fish_git_needs_command -a tag -d 'Create, list, delete or verify a tag object signed with GPG'
|
||||
complete -f -c git -n '__fish_git_using_command tag; and __fish_not_contain_opt -s d; and __fish_not_contain_opt -s v; and test (count (commandline -opc | string match -r -v \'^-\')) -eq 3' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_not_contain_opt -s d' -n '__fish_not_contain_opt -s v' -n 'test (count (commandline -opc | string match -r -v \'^-\')) -eq 3' -a '(__fish_git_branches)'
|
||||
complete -f -c git -n '__fish_git_using_command tag' -s a -l annotate -d 'Make an unsigned, annotated tag object'
|
||||
complete -f -c git -n '__fish_git_using_command tag' -s s -l sign -d 'Make a GPG-signed tag'
|
||||
complete -f -c git -n '__fish_git_using_command tag' -s d -l delete -d 'Remove a tag'
|
||||
@@ -1856,62 +1994,62 @@ complete -f -c git -n '__fish_git_using_command tag' -s v -l verify -d 'Verify s
|
||||
complete -f -c git -n '__fish_git_using_command tag' -s f -l force -d 'Force overwriting existing tag'
|
||||
complete -f -c git -n '__fish_git_using_command tag' -s l -l list -d 'List tags'
|
||||
complete -f -c git -n '__fish_git_using_command tag' -l contains -xka '(__fish_git_commits)' -d 'List tags that contain a commit'
|
||||
complete -f -c git -n '__fish_git_using_command tag; and __fish_contains_opt -s d delete -s v verify' -a '(__fish_git_tags)' -d Tag
|
||||
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_git_contains_opt -s d delete -s v verify' -a '(__fish_git_tags)' -d Tag
|
||||
# TODO options
|
||||
|
||||
### worktree
|
||||
set -l git_worktree_commands add list lock move prune remove unlock
|
||||
complete -c git -n __fish_git_needs_command -a worktree -d 'Manage multiple working trees'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a add -d 'Create a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a list -d 'List details of each worktree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a lock -d 'Lock a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a move -d 'Move a working tree to a new location'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a prune -d 'Prune working tree information in $GIT_DIR/worktrees'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a remove -d 'Remove a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree; and not __fish_seen_subcommand_from $git_worktree_commands" -a unlock -d 'Unlock a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a add -d 'Create a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a list -d 'List details of each worktree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a lock -d 'Lock a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a move -d 'Move a working tree to a new location'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a prune -d 'Prune working tree information in $GIT_DIR/worktrees'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a remove -d 'Remove a working tree'
|
||||
complete -f -c git -n "__fish_git_using_command worktree" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a unlock -d 'Unlock a working tree'
|
||||
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add move remove' -s f -l force -d 'Override safeguards'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add move remove' -s f -l force -d 'Override safeguards'
|
||||
|
||||
complete -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add'
|
||||
complete -k -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -a '(__fish_git_branches)'
|
||||
complete -k -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -a '(__fish_git_heads)' -d Head
|
||||
complete -k -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -a '(__fish_git_tags)' -d Tag
|
||||
complete -k -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
complete -k -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -a '(__fish_git_local_branches)'
|
||||
complete -x -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -s b -d 'Create a new branch'
|
||||
complete -x -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -s B -d 'Create a new branch even if it already exists'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l detach -d 'Detach HEAD in the new working tree'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l checkout -d 'Checkout <commit-ish> after creating working tree'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l no-checkout -d 'Suppress checkout'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l guess-remote
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l no-guess-remote
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l track -d 'Mark <commit-ish> as "upstream" from the new branch'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l no-track -d 'Don\'t mark <commit-ish> as "upstream" from the new branch'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -l lock -d 'Lock working tree after creation'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from add' -s q -l quiet -d 'Suppress feedback messages'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from list' -l porcelain -d 'Output in an easy-to-parse format for scripts'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from lock' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -x -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from lock' -l reason -d 'An explanation why the working tree is locked'
|
||||
complete -x -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from move; and not __fish_any_arg_in (__fish_git_complete_worktrees)' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -x -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from move; and __fish_any_arg_in (__fish_git_complete_worktrees)' -a '(__fish_complete_directories)'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from prune' -s n -l dry-run -d 'Do not remove anything'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from prune' -s v -l verbose -d 'Report all removals'
|
||||
complete -x -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from prune' -l expire -d 'Only expire unused working trees older than <time>'
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from remove' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -f -c git -n '__fish_git_using_command worktree; and __fish_seen_subcommand_from unlock' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add'
|
||||
complete -k -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -a '(__fish_git_branches)'
|
||||
complete -k -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -a '(__fish_git_heads)' -d Head
|
||||
complete -k -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -a '(__fish_git_tags)' -d Tag
|
||||
complete -k -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -a '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
|
||||
complete -k -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -a '(__fish_git_local_branches)'
|
||||
complete -x -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -s b -d 'Create a new branch'
|
||||
complete -x -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -s B -d 'Create a new branch even if it already exists'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l detach -d 'Detach HEAD in the new working tree'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l checkout -d 'Checkout <commit-ish> after creating working tree'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l no-checkout -d 'Suppress checkout'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l guess-remote
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l no-guess-remote
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l track -d 'Mark <commit-ish> as "upstream" from the new branch'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l no-track -d 'Don\'t mark <commit-ish> as "upstream" from the new branch'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -l lock -d 'Lock working tree after creation'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from add' -s q -l quiet -d 'Suppress feedback messages'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from list' -l porcelain -d 'Output in an easy-to-parse format for scripts'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from lock' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -x -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from lock' -l reason -d 'An explanation why the working tree is locked'
|
||||
complete -x -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from move' -n 'not __fish_any_arg_in (__fish_git_complete_worktrees)' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -x -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from move' -n '__fish_any_arg_in (__fish_git_complete_worktrees)' -a '(__fish_complete_directories)'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from prune' -s n -l dry-run -d 'Do not remove anything'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from prune' -s v -l verbose -d 'Report all removals'
|
||||
complete -x -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from prune' -l expire -d 'Only expire unused working trees older than <time>'
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from remove' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcommand_from unlock' -a '(__fish_git_complete_worktrees)' -d Worktree
|
||||
|
||||
### stash
|
||||
complete -c git -n __fish_git_needs_command -a stash -d 'Stash away changes'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a list -d 'List stashes'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a show -d 'Show the changes recorded in the stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a pop -d 'Apply and remove a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a apply -d 'Apply a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a clear -d 'Remove all stashed states'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a drop -d 'Remove a single stashed state from the stash list'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a create -d 'Create a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a save -d 'Save a new stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a branch -d 'Create a new branch from a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash; and __fish_git_stash_not_using_subcommand' -a push -d 'Create a new stash with given files'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a list -d 'List stashes'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a show -d 'Show the changes recorded in the stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a pop -d 'Apply and remove a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a apply -d 'Apply a single stashed state'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a clear -d 'Remove all stashed states'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a drop -d 'Remove a single stashed state from the stash list'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a create -d 'Create a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a save -d 'Save a new stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a branch -d 'Create a new branch from a stash'
|
||||
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_not_using_subcommand' -a push -d 'Create a new stash with given files'
|
||||
|
||||
complete -f -c git -n '__fish_git_stash_using_command apply' -a '(__fish_git_complete_stashes)'
|
||||
complete -f -c git -n '__fish_git_stash_using_command branch' -a '(__fish_git_complete_stashes)'
|
||||
@@ -1962,36 +2100,36 @@ complete -f -c git -n '__fish_git_using_command format-patch' -l no-numbered -s
|
||||
## git submodule
|
||||
set -l submodulecommands add status init deinit update set-branch set-url summary foreach sync absorbgitdirs
|
||||
complete -f -c git -n __fish_git_needs_command -a submodule -d 'Initialize, update or inspect submodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a add -d 'Add a submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a status -d 'Show submodule status'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a init -d 'Initialize all submodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a deinit -d 'Unregister the given submodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a update -d 'Update all submodules'
|
||||
complete -x -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a set-branch -d 'Sets the default remote tracking branch for the submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a set-url -d 'Sets the URL of the specified submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a summary -d 'Show commit summary'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a foreach -d 'Run command on each submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a sync -d 'Sync submodules\' URL with .gitmodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -a absorbgitdirs -d 'Move submodule\'s git directory to current .git/module directory'
|
||||
complete -f -c git -n "__fish_git_using_command submodule; and not __fish_seen_subcommand_from $submodulecommands" -s q -l quiet -d "Only print error messages"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -l init -d "Initialize all submodules"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -l checkout -d "Checkout the superproject's commit on a detached HEAD in the submodule"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -l merge -d "Merge the superproject's commit into the current branch of the submodule"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -l rebase -d "Rebase current branch onto the superproject's commit"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -s N -l no-fetch -d "Don't fetch new objects from the remote"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -l remote -d "Instead of using superproject's SHA-1, use the state of the submodule's remote-tracking branch"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from update' -l force -d "Discard local changes when switching to a different commit & always run checkout"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from add' -l force -d "Also add ignored submodule path"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from deinit' -l force -d "Remove even with local changes"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from deinit' -l all -d "Remove all submodules"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from deinit; and not contains -- -- (commandline -opc)' -a '(__fish_git_submodules)' -d Submodule
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from set-branch' -s b -l branch -d "Specify the branch to use"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from set-branch' -s d -l default -d "Use default branch of the submodule"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from status summary' -l cached -d "Use the commit stored in the index"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from status; and not contains -- -- (commandline -opc)' -a '(__fish_git_submodules)' -d Submodule
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from summary' -l files -d "Compare the commit in the index with submodule HEAD"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from foreach update status' -l recursive -d "Traverse submodules recursively"
|
||||
complete -f -c git -n '__fish_git_using_command submodule; and __fish_seen_subcommand_from foreach' -a "(__fish_complete_subcommand --fcs-skip=3)"
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a add -d 'Add a submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a status -d 'Show submodule status'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a init -d 'Initialize all submodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a deinit -d 'Unregister the given submodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a update -d 'Update all submodules'
|
||||
complete -x -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a set-branch -d 'Sets the default remote tracking branch for the submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a set-url -d 'Sets the URL of the specified submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a summary -d 'Show commit summary'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a foreach -d 'Run command on each submodule'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a sync -d 'Sync submodules\' URL with .gitmodules'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -a absorbgitdirs -d 'Move submodule\'s git directory to current .git/module directory'
|
||||
complete -f -c git -n "__fish_git_using_command submodule" -n "not __fish_seen_subcommand_from $submodulecommands" -s q -l quiet -d "Only print error messages"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l init -d "Initialize all submodules"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l checkout -d "Checkout the superproject's commit on a detached HEAD in the submodule"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l merge -d "Merge the superproject's commit into the current branch of the submodule"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l rebase -d "Rebase current branch onto the superproject's commit"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -s N -l no-fetch -d "Don't fetch new objects from the remote"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l remote -d "Instead of using superproject's SHA-1, use the state of the submodule's remote-tracking branch"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from update' -l force -d "Discard local changes when switching to a different commit & always run checkout"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from add' -l force -d "Also add ignored submodule path"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l force -d "Remove even with local changes"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l all -d "Remove all submodules"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_submodules)' -d Submodule
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from set-branch' -s b -l branch -d "Specify the branch to use"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from set-branch' -s d -l default -d "Use default branch of the submodule"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from status summary' -l cached -d "Use the commit stored in the index"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from status' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_submodules)' -d Submodule
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from summary' -l files -d "Compare the commit in the index with submodule HEAD"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from foreach update status' -l recursive -d "Traverse submodules recursively"
|
||||
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from foreach' -a "(__fish_complete_subcommand --fcs-skip=3)"
|
||||
|
||||
## git whatchanged
|
||||
complete -f -c git -n __fish_git_needs_command -a whatchanged -d 'Show logs with difference each commit introduces'
|
||||
@@ -2104,7 +2242,7 @@ complete -F -c git -n '__fish_git_using_command config' -l blob -d 'Read config
|
||||
|
||||
# If no argument is specified, it's as if --get was used
|
||||
# Use -k with `__fish_git_config_keys` so that user defined values are shown first
|
||||
complete -c git -n '__fish_git_using_command config; and __fish_is_nth_token 2' -kfa '(__fish_git_config_keys)'
|
||||
complete -c git -n '__fish_git_using_command config' -n '__fish_is_nth_token 2' -kfa '(__fish_git_config_keys)'
|
||||
complete -f -c git -n '__fish_git_using_command config' -l get -d 'Get config with name' -kra '(__fish_git_config_keys)'
|
||||
complete -f -c git -n '__fish_git_using_command config' -l get-all -d 'Get all values matching key' -ka '(__fish_git_config_keys)'
|
||||
complete -f -c git -n '__fish_git_using_command config' -l get-urlmatch -d 'Get value specific for the section url' -r
|
||||
@@ -2127,7 +2265,7 @@ complete -f -c git -n '__fish_git_using_command config' -s z -l null -d 'Termina
|
||||
complete -f -c git -n '__fish_git_using_command config' -l name-only -d 'Show variable names only'
|
||||
complete -f -c git -n '__fish_git_using_command config' -l includes -d 'Respect include directives'
|
||||
complete -f -c git -n '__fish_git_using_command config' -l show-origin -d 'Show origin of configuration'
|
||||
complete -f -c git -n '__fish_git_using_command config; and __fish_seen_argument get' -l default -d 'Use default value when missing entry'
|
||||
complete -f -c git -n '__fish_git_using_command config' -n '__fish_seen_argument get' -l default -d 'Use default value when missing entry'
|
||||
|
||||
## Custom commands (git-* commands installed in the PATH)
|
||||
complete -c git -n __fish_git_needs_command -a '(__fish_git_custom_commands)' -d 'Custom command'
|
||||
@@ -2154,9 +2292,6 @@ for file in $PATH/git-*
|
||||
contains -- $subcommand $__fish_git_custom_commands_completion
|
||||
and continue
|
||||
|
||||
complete -C "git-$subcommand " >/dev/null
|
||||
if test (complete -c git-$subcommand | count) -gt 0
|
||||
complete -c git -f -n "__fish_git_using_command $subcommand" -a "(__fish_git_complete_custom_command $subcommand)"
|
||||
end
|
||||
complete -c git -f -n "__fish_git_using_command $subcommand" -a "(__fish_git_complete_custom_command $subcommand)"
|
||||
set -a __fish_git_custom_commands_completion $subcommand
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ complete -c gunzip -k -x -a "(
|
||||
"
|
||||
complete -c gunzip -s f -l force -d Overwrite
|
||||
complete -c gunzip -s h -l help -d "Display help and exit"
|
||||
complete -c gunzip -s k -l keep -d "Keep input files"
|
||||
complete -c gunzip -s l -l list -d "List compression information"
|
||||
complete -c gunzip -s L -l license -d "Print license"
|
||||
complete -c gunzip -s n -l no-name -d "Do not save/restore filename"
|
||||
|
||||
@@ -8,6 +8,7 @@ complete -c gzip -s d -l decompress -k -x -a "
|
||||
|
||||
complete -c gzip -s f -l force -d Overwrite
|
||||
complete -c gzip -s h -l help -d "Display help and exit"
|
||||
complete -c gzip -s k -l keep -d "Keep input files"
|
||||
complete -c gzip -s l -l list -d "List compression information"
|
||||
complete -c gzip -s L -l license -d "Print license"
|
||||
complete -c gzip -s n -l no-name -d "Do not save/restore filename"
|
||||
|
||||
@@ -78,11 +78,10 @@ complete $heroku_looking -xa plugins -d 'manage plugins to the heroku gem'
|
||||
complete $heroku_looking -xa regions -d 'list available regions'
|
||||
complete $heroku_looking -xa stack -d 'manage the stack for an app'
|
||||
complete $heroku_looking -xa status -d 'check status of heroku platform'
|
||||
complete $heroku_looking -xa twofactor
|
||||
complete $heroku_looking -xa update -d 'update the heroku client'
|
||||
complete $heroku_looking -xa version -d 'display version'
|
||||
|
||||
complete $heroku_looking -xa git:clone -d "APP DIRECTORY clones a heroku app to your local machine at DIRECTORY (defaults to app name)"
|
||||
complete $heroku_looking -xa git:clone -d "clones heroku application to machine at DIRECTORY. defaults to app name."
|
||||
complete $heroku_looking -xa git:remote -d "adds a git remote to an app repo (-a APP)"
|
||||
|
||||
# Addons subcommands
|
||||
|
||||
@@ -298,27 +298,27 @@ function __fish_complete_ip
|
||||
end
|
||||
# TODO: Moar
|
||||
end
|
||||
case show save flush # These take the same args
|
||||
switch $cmd[-2]
|
||||
case dev
|
||||
__fish_ip_device
|
||||
case scope
|
||||
__fish_ip_scope
|
||||
case to
|
||||
# Prefix
|
||||
case label
|
||||
# Label-pattern
|
||||
case '*'
|
||||
printf '%s\t%s\n' up "Only active devices" \
|
||||
dev "Limit to a certain device" \
|
||||
scope "Limit scope" \
|
||||
to "Limit prefix" \
|
||||
label "Limit by label" \
|
||||
dynamic "(Ipv6 only) Limit to dynamic addresses" \
|
||||
permanent "(Ipv6 only) Limit to permanent addresses"
|
||||
__fish_ip_device
|
||||
# TODO: Moar
|
||||
end
|
||||
end
|
||||
case show save flush # These take the same args
|
||||
switch $cmd[-2]
|
||||
case dev
|
||||
__fish_ip_device
|
||||
case scope
|
||||
__fish_ip_scope
|
||||
case to
|
||||
# Prefix
|
||||
case label
|
||||
# Label-pattern
|
||||
case '*'
|
||||
printf '%s\t%s\n' up "Only active devices" \
|
||||
dev "Limit to a certain device" \
|
||||
scope "Limit scope" \
|
||||
to "Limit prefix" \
|
||||
label "Limit by label" \
|
||||
dynamic "(Ipv6 only) Limit to dynamic addresses" \
|
||||
permanent "(Ipv6 only) Limit to permanent addresses"
|
||||
__fish_ip_device
|
||||
# TODO: Moar
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -405,6 +405,7 @@ function __fish_complete_ip
|
||||
case netns
|
||||
if not set -q cmd[3]
|
||||
printf '%s\t%s\n' add "Add network namespace" \
|
||||
attach "Attach process to network namespace" \
|
||||
delete "Delete network namespace" \
|
||||
set "Change network namespace attributes" \
|
||||
identify "Display network namespace for a process id" \
|
||||
@@ -416,9 +417,33 @@ function __fish_complete_ip
|
||||
else
|
||||
switch $cmd[2]
|
||||
case delete
|
||||
__fish_ip_netns_list
|
||||
if not set -q cmd[4]
|
||||
__fish_ip_netns_list
|
||||
end
|
||||
case exec
|
||||
__fish_ip_netns_list
|
||||
if not set -q cmd[4]
|
||||
__fish_ip_netns_list
|
||||
else
|
||||
__fish_complete_subcommand --commandline $cmd[4..-1]
|
||||
end
|
||||
case pids
|
||||
if not set -q cmd[4]
|
||||
__fish_ip_netns_list
|
||||
end
|
||||
case set
|
||||
if not set -q cmd[4]
|
||||
__fish_ip_netns_list
|
||||
end
|
||||
case attach
|
||||
if not set -q cmd[4]
|
||||
__fish_ip_netns_list
|
||||
else
|
||||
__fish_complete_pids
|
||||
end
|
||||
case identify
|
||||
if not set -q cmd[4]
|
||||
__fish_complete_pids
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
complete -c isatty -x -k -a "stdin stdout stderr"
|
||||
complete -c isatty -x
|
||||
|
||||
if test -d /dev/fd
|
||||
complete -c isatty -k -a "(string replace /dev/fd/ '' /dev/fd/*)"
|
||||
end
|
||||
|
||||
complete -c isatty -k -a "stderr" -d "2"
|
||||
complete -c isatty -k -a "stdout" -d "1"
|
||||
complete -c isatty -k -a "stdin" -d "0"
|
||||
|
||||
@@ -19,7 +19,8 @@ for i in $__kill_signals
|
||||
and complete -c killall -s s -x -a "$number $name"
|
||||
end
|
||||
|
||||
complete -c killall -xa '(__fish_complete_proc)'
|
||||
|
||||
complete -c killall -xa '(__fish_complete_proc | string replace -r -- "^-" "")'
|
||||
|
||||
if killall --version >/dev/null 2>/dev/null # GNU
|
||||
complete -c killall -s e -l exact -d 'Require an exact match for very long names'
|
||||
@@ -32,15 +33,13 @@ if killall --version >/dev/null 2>/dev/null # GNU
|
||||
else # probably BSD
|
||||
complete -c killall -s v -d 'Print what is done'
|
||||
complete -c killall -s e -d 'Use effective UID instead of the real UID for -u'
|
||||
complete -c killall -s help
|
||||
complete -c killall -o help
|
||||
complete -c killall -s l -d 'List names of available signals'
|
||||
complete -c killall -s m -d 'Case sensitive process matching'
|
||||
complete -c killall -s s -d "Simulate, send no signals"
|
||||
complete -c killall -s d -d "Simulate & summarize, send no signals"
|
||||
complete -c killall -s u -x -a "(__fish_complete_users)" -d "kill given user's processes"
|
||||
complete -c killall -s -u -l user -x -a "(__fish_complete_users)"
|
||||
complete -c killall -s t -d 'Limit to processes on specified TTY'
|
||||
complete -c killall -s t -xa "(ps a -o tty | sed 1d | uniq)"
|
||||
complete -c killall -s t -xa "(ps a -o tty | sed 1d | uniq)" -d 'Limit to processes on specified TTY'
|
||||
complete -c killall -s c -x -d 'Limit to processes matching pattern'
|
||||
complete -c killall -s z -d "Don't skip zombies"
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
function __kitty_completions
|
||||
# Send all words up to the one before the cursor
|
||||
commandline -cop | kitty +complete fish
|
||||
function __ksi_completions
|
||||
set --local ct (commandline --current-token)
|
||||
set --local tokens (commandline --tokenize --cut-at-cursor --current-process)
|
||||
printf "%s\n" $tokens $ct | command kitty +complete fish2
|
||||
end
|
||||
|
||||
complete -f -c kitty -a "(__kitty_completions)"
|
||||
complete -f -c kitty -a "(__ksi_completions)"
|
||||
|
||||
@@ -1 +1 @@
|
||||
kubectl completion fish | source
|
||||
kubectl completion fish 2>/dev/null | source
|
||||
|
||||
@@ -6,7 +6,7 @@ for cmd in $commands
|
||||
complete -c localectl -n "not __fish_seen_subcommand_from $commands" -a $cmd
|
||||
end
|
||||
set -l localevars LANG LC_MESSAGES LC_{CTYPE,NUMERIC,TIME,COLLATE,MONETARY,MESSAGES,PAPER,NAME,ADDRESS,TELEPHONE,MEASUREMENT,IDENTIFICATION,ALL}
|
||||
set -l locales $localevars=(localectl list-locales)
|
||||
set -l locales $localevars=(localectl list-locales 2>/dev/null)
|
||||
|
||||
function __fish_localectl_layout
|
||||
set -l cmd (commandline -poc)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function __fish_lxc_no_subcommand -d 'Test if lxc has yet to be given the command'
|
||||
for i in (commandline --tokenize --cut-at-cursor --current-process)
|
||||
if contains -- $i config copy delete exec file help image launch list move network profile publish remote restore restart snapshot start stop
|
||||
if contains -- $i config console copy delete exec file help image info launch list move network pause profile publish remote rename restart restore shell snapshot start stop
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -8,10 +8,11 @@ function __fish_lxc_no_subcommand -d 'Test if lxc has yet to be given the comman
|
||||
end
|
||||
|
||||
function __fish_lxc_list_containers
|
||||
lxc list -c n | string match -r '\| [a-zA-Z_-]+' | string replace -r '\| ' ''
|
||||
lxc list -c n | string match -r '\| [a-zA-Z0-9_-]+' | string replace -r '\| ' ''
|
||||
end
|
||||
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments config -d 'Manage configuration.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments console -d 'Attach to instance console.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments copy -d 'Copy containers within or in between lxd instances.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments delete -d 'Delete containers or snapshots.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments exec -d 'Execute the specified command in a container.'
|
||||
@@ -31,8 +32,10 @@ complete --condition __fish_lxc_no_subcommand --command lxc --no-files --argumen
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments profile -d 'Manage configuration profiles.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments publish -d 'Publish containers as images.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments remote -d 'Manage remote LXD servers.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments rename -d 'Rename instance or snapshot.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments restart -d 'Changes state of one or more containers to restart.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments restore -d 'Set the current state of a container back to a snapshot.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments shell -d 'Execute commands in instance.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments snapshot -d 'Create a read-only snapshot of a container.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments start -d 'Changes state of one or more containers to start.'
|
||||
complete --condition __fish_lxc_no_subcommand --command lxc --no-files --arguments stop -d 'Changes state of one or more containers to stop.'
|
||||
@@ -41,11 +44,6 @@ complete --condition __fish_lxc_no_subcommand --command lxc --no-files --argumen
|
||||
# config
|
||||
complete --condition '__fish_seen_subcommand_from config' --command lxc --no-files --arguments "device get set unset show edit trust"
|
||||
|
||||
# exec
|
||||
complete --condition '__fish_seen_subcommand_from exec' --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
|
||||
set -l subcommands_taking_name console copy delete exec export info move pause publish rename restart restore shell snapshot start stop
|
||||
complete --condition "__fish_seen_subcommand_from $subcommands_taking_name" --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
|
||||
|
||||
# start
|
||||
complete --condition '__fish_seen_subcommand_from start' --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
|
||||
|
||||
# stop
|
||||
complete --condition '__fish_seen_subcommand_from stop' --command lxc --no-files --arguments "(__fish_lxc_list_containers)"
|
||||
|
||||
@@ -36,6 +36,10 @@ complete -c man -s w -l path -d "Only print locations"
|
||||
complete -c man -s W -d "Only print locations"
|
||||
|
||||
complete -c man -n 'string match -q -- "*/*" (commandline -t | string collect)' --force-files
|
||||
if echo | MANPAGER=cat command man -l - &>/dev/null
|
||||
complete -c man -s l -l local-file -d "Local file" -r
|
||||
if command -q man
|
||||
# We have a conditionally-defined man function,
|
||||
# so we need to check for existence here.
|
||||
if echo | MANPAGER=cat command man -l - &>/dev/null
|
||||
complete -c man -s l -l local-file -d "Local file" -r
|
||||
end
|
||||
end
|
||||
|
||||
@@ -59,7 +59,7 @@ complete -f -c mix -n '__fish_mix_using_command escript.build' -l force -d "forc
|
||||
complete -f -c mix -n '__fish_mix_using_command escript.build' -l no-compile -d "skips compilation to .beam files"
|
||||
|
||||
# new subcommand
|
||||
complete -f -c mix -n '__fish_mix_using_command new' -l sup -d "can be given to generate an OTP application skeleton including a supervision tree"
|
||||
complete -f -c mix -n '__fish_mix_using_command new' -l sup -d "generate an OTP application skeleton with a supervision tree"
|
||||
complete -f -c mix -n '__fish_mix_using_command new' -l umbrella -d "can be given to generate an umbrella project"
|
||||
complete -f -c mix -n '__fish_mix_using_command new' -l app -d "can be given in order to name the OTP application"
|
||||
complete -f -c mix -n '__fish_mix_using_command new' -l module -d "can be given in order to name the modules in the generated code skeleton"
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
set -l options (string replace -fr '^\s*--([\w-]+).*' '$1' -- (command mpv --list-options 2>/dev/null))
|
||||
for opt in $options
|
||||
complete -c mpv -l "$opt"
|
||||
end
|
||||
|
||||
set -l flag_options (string replace -fr '^\s*--([\w-]+).*Flag.*' '$1' -- (command mpv --list-options 2>/dev/null))
|
||||
for flag_opt in $flag_options
|
||||
complete -c mpv -l "no-$flag_opt"
|
||||
end
|
||||
set -l options (command mpv --list-options 2>/dev/null)
|
||||
complete -c mpv -l(string replace -fr '^\s*--([\w-]+).*' '$1' -- $options)
|
||||
complete -c mpv -lno-(string replace -fr '^\s*--([\w-]+).*Flag.*' '$1' -- $options)
|
||||
|
||||
complete -c mpv -l start -x -d "Seek to given position (%, s, hh:mm:ss)"
|
||||
complete -c mpv -l no-audio -d "Disable audio"
|
||||
|
||||
29
share/completions/navi.fish
Normal file
29
share/completions/navi.fish
Normal file
@@ -0,0 +1,29 @@
|
||||
complete navi --no-files
|
||||
|
||||
set --local sub_commands fn help info repo widget
|
||||
set --local options best-match cheatsh finder fzf-overrides fzf-overrides-var help path print query tag-rules tldr version
|
||||
|
||||
# subcommands
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands && \
|
||||
not __fish_contains_opt -s h -s p -s q -s V $options" -a "$sub_commands"
|
||||
|
||||
set --local internal_functions "url::open welcome widget::last_command map::expand"
|
||||
complete navi -n "__fish_seen_subcommand_from fn && not __fish_seen_subcommand_from $internal_functions" \
|
||||
-k -a $internal_functions
|
||||
|
||||
set --local supported_shells "bash zsh fish elvish"
|
||||
complete navi -n "__fish_seen_subcommand_from widget && not __fish_seen_subcommand_from $supported_shells" -k -a $supported_shells
|
||||
|
||||
# options
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -l best-match -d "Returns the best match"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l cheatsh -d "Searches for cheatsheets using the cheat.sh repository"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l finder -a "fzf skim" -d "Finder application to use"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l fzf-overrides -d "Finder overrides for snippet selection"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l fzf-overrides-var -d "Finder overrides for variable selection"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -s h -l help -d "Print help information"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -r -s p -l path -d "Colon-separated list of paths containing .cheat files"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -l print -d "Instead of executing a snippet, prints it to stdout"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -s q -l query -d "Prepopulates the search field"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l tag-rules -d "[Experimental] Comma-separated list that acts as filter for tags. Parts starting with ! represent negation"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l tldr -d "Searches for cheatsheets using the tldr-pages repository"
|
||||
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -s V -l version -d "Print version information"
|
||||
13
share/completions/optimus-manager.fish
Normal file
13
share/completions/optimus-manager.fish
Normal file
@@ -0,0 +1,13 @@
|
||||
complete -c optimus-manager -f
|
||||
complete -c optimus-manager -l switch -d 'Set the GPU mode to MODE. You need to log out then log in to apply the change' -xa 'integrated nvidia hybrid'
|
||||
complete -c optimus-manager -l temp-config -d 'Set a path to a temporary configuration file to use for the next reboot ONLY' -r
|
||||
complete -c optimus-manager -s h -l help -d 'show this help message and exit'
|
||||
complete -c optimus-manager -s v -l version -d 'Print version and exit'
|
||||
complete -c optimus-manager -l status -d 'Print current status of optimus-manager'
|
||||
complete -c optimus-manager -l print-mode -d 'Print the GPU mode that your current desktop session is running on'
|
||||
complete -c optimus-manager -l print-next-mode -d 'Print the GPU mode that will be used the next time you log into your session'
|
||||
complete -c optimus-manager -l print-startup -d 'Print the GPU mode that will be used on startup'
|
||||
complete -c optimus-manager -l unset-temp-config -d 'Undo --temp-config (unset temp config path)'
|
||||
complete -c optimus-manager -l no-confirm -d 'Do not ask for confirmation and skip all warnings when switching GPUs'
|
||||
complete -c optimus-manager -l cleanup -d 'Remove auto-generated configuration files left over by the daemon'
|
||||
|
||||
33
share/completions/path.fish
Normal file
33
share/completions/path.fish
Normal file
@@ -0,0 +1,33 @@
|
||||
# Completion for builtin path
|
||||
# This follows a strict command-then-options approach, so we can just test the number of tokens
|
||||
complete -f -c path -n "test (count (commandline -opc)) -le 2" -s h -l help -d "Display help and exit"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a basename -d 'Give basename for given paths'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a dirname -d 'Give dirname for given paths'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a extension -d 'Give extension for given paths'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a change-extension -d 'Change extension for given paths'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a normalize -d 'Normalize given paths (remove ./, resolve ../ against other components..)'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a resolve -d 'Normalize given paths and resolve symlinks'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a filter -d 'Print paths that match a filter'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a is -d 'Return true if any path matched a filter'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a sort -d 'Sort paths'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2" -s q -l quiet -d "Only return status, no output"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2" -s z -l null-in -d "Handle NULL-delimited input"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2" -s Z -l null-out -d "Print NULL-delimited output"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s v -l invert -d "Invert meaning of filters"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[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 -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s f -d "Filter files"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s d -d "Filter directories"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s l -d "Filter symlinks"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s p -l perm -d "Filter by permission" -x -a '(__fish_append , read write exec suid sgid user group)'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s r -d "Filter readable paths"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s w -d "Filter writable paths"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s x -d "Filter executable paths"
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" \
|
||||
-l key -x -a 'basename\t"Sort only by basename" dirname\t"Sort only by dirname" path\t"Sort by full path"'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" -s u -l unique -d 'Only leave the first of each run with the same key'
|
||||
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" -s r -l reverse -d 'Reverse the order'
|
||||
|
||||
# Turn on file completions again.
|
||||
# match takes a glob as first arg, expand takes only globs.
|
||||
# We still want files completed then!
|
||||
complete -F -c path -n "test (count (commandline -opc)) -ge 2"
|
||||
25
share/completions/qdbus.fish
Normal file
25
share/completions/qdbus.fish
Normal file
@@ -0,0 +1,25 @@
|
||||
function __fish_qdbus_complete
|
||||
argparse system 'bus=' literal help -- (commandline --cut-at-cursor --tokenize) 2>/dev/null
|
||||
or return
|
||||
if set -q _flag_help
|
||||
return
|
||||
end
|
||||
set -l qdbus_flags $_flag_system
|
||||
if set -q _flag_bus
|
||||
set -a qdbus_flags --bus $_flag_bus
|
||||
end
|
||||
set argc (count $argv)
|
||||
if test $argc -le 3
|
||||
# avoid completion of property value
|
||||
qdbus $qdbus_flags $argv[2] $argv[3] | string replace --regex '^(property(\ read)?|signal|method) ((\{.+\})|([^\ ]+)) ([^\(]+)(\(.+?\))?' '$6\t$1 $3 $7' | string trim
|
||||
end
|
||||
end
|
||||
|
||||
complete -c qdbus -f
|
||||
|
||||
complete -c qdbus -l system -d 'connect to the system bus'
|
||||
complete -c qdbus -l bus -r -d 'connect to a custom bus'
|
||||
complete -c qdbus -l literal -d 'print replies literally'
|
||||
complete -c qdbus -l help -d 'print usage'
|
||||
|
||||
complete -c qdbus -a '(__fish_qdbus_complete)'
|
||||
@@ -69,6 +69,10 @@ complete -f -c rbenv -n __fish_rbenv_needs_command -a init -d 'Configure the she
|
||||
complete -f -c rbenv -n __fish_rbenv_needs_command -a install -d 'Install a Ruby version'
|
||||
complete -f -c rbenv -n '__fish_rbenv_using_command install' -a '(__fish_rbenv_official_rubies)'
|
||||
|
||||
### uninstall
|
||||
complete -f -c rbenv -n __fish_rbenv_needs_command -a uninstall -d 'Uninstall a Ruby version'
|
||||
complete -f -c rbenv -n '__fish_rbenv_using_command uninstall' -a '(__fish_rbenv_installed_rubies)'
|
||||
|
||||
### local
|
||||
complete -f -c rbenv -n __fish_rbenv_needs_command -a local -d 'Set or show the local application-specific Ruby version'
|
||||
complete -f -c rbenv -n '__fish_rbenv_using_command local' -a '(__fish_rbenv_installed_rubies)'
|
||||
|
||||
1
share/completions/rclone.fish
Normal file
1
share/completions/rclone.fish
Normal file
@@ -0,0 +1 @@
|
||||
rclone completion fish 2>/dev/null | source
|
||||
30
share/completions/reflector.fish
Normal file
30
share/completions/reflector.fish
Normal file
@@ -0,0 +1,30 @@
|
||||
complete -c reflector -f
|
||||
# options
|
||||
complete -c reflector -s h -l help -d 'Show help'
|
||||
complete -c reflector -l connection-timeout -d 'The number of seconds to wait before a connection times out'
|
||||
complete -c reflector -l download-timeout -d 'The number of seconds to wait before a download times out'
|
||||
complete -c reflector -l list-countries -d 'Display a table of the distribution of servers by country'
|
||||
complete -c reflector -l cache-timeout -d 'The cache timeout in seconds for the data retrieved from the Arch Linux Mirror Status API'
|
||||
complete -c reflector -l url -d 'The URL from which to retrieve the mirror data in JSON format'
|
||||
complete -c reflector -l save -d 'Save the mirrorlist to the given path'
|
||||
complete -c reflector -l sort -d 'Sort the mirrorlist' -xa 'age rate country score delay'
|
||||
complete -c reflector -l threads -d 'The number of threads to use for downloading'
|
||||
complete -c reflector -l verbose -d 'Print extra information'
|
||||
complete -c reflector -l info -d 'Print mirror information instead of a mirror list'
|
||||
|
||||
# filters
|
||||
complete -c reflector -s a -l age -d 'Only return mirrors that have synchronized in the last n hours'
|
||||
complete -c reflector -l delay -d 'Only return mirrors with a reported sync delay of n hours or less, where n is a float'
|
||||
complete -c reflector -s c -l country -d 'Restrict mirrors to selected countries' -xa "(reflector --list-countries | cut -f 1 -d ' ' | tail -n +3)"
|
||||
complete -c reflector -s f -l fastest -d 'Return the n fastest mirrors that meet the other criteria'
|
||||
complete -c reflector -s i -l include -d 'Include servers that match <regex>'
|
||||
complete -c reflector -s x -l exclude -d 'Exclude servers that match <regex>'
|
||||
complete -c reflector -s l -l latest -d 'Limit the list to the n most recently synchronized servers'
|
||||
complete -c reflector -l score -d 'Limit the list to the n servers with the highest score'
|
||||
complete -c reflector -s n -l number -d 'Return at most n mirrors'
|
||||
complete -c reflector -s p -l protocol -d 'Match one of the given protocols' -xa 'http https ftp rsync'
|
||||
complete -c reflector -l completion-percent -d 'Set the minimum completion percent for the returned mirrors'
|
||||
complete -c reflector -l isos -d 'Only return mirrors that host ISOs'
|
||||
complete -c reflector -l ipv4 -d 'Only return mirrors that support IPv4'
|
||||
complete -c reflector -l ipv6 -d 'Only return mirrors that support IPv6'
|
||||
|
||||
@@ -176,6 +176,28 @@ complete -c rsync -d Hostname -a "
|
||||
#
|
||||
# Remote path
|
||||
#
|
||||
# Unfortunately, the escaping changed in version 3.2.4.
|
||||
# Even more unfortunate, rsync's version output is horrible:
|
||||
# rsync version v3.2.4 protocol version 31
|
||||
# Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
|
||||
# Web site: https://rsync.samba.org/
|
||||
# ... (and then a ton of lines about capabilities)
|
||||
#
|
||||
# This includes multiple spaces, the version might start with "v" depending on whether it's
|
||||
# built from a git tag or not...
|
||||
|
||||
set -l new_escaping # has an element if the new escaping style introduced in 3.2.4 is required
|
||||
|
||||
set -l rsync_ver (rsync --version |
|
||||
string replace -rf '^rsync +version\D+([\d.]+) .*' '$1' |
|
||||
string split .)
|
||||
|
||||
if test "$rsync_ver[1]" -gt 3 2>/dev/null
|
||||
or test "$rsync_ver[1]" -eq 3 -a "$rsync_ver[2]" -gt 2 2>/dev/null
|
||||
or test "$rsync_ver[1]" -eq 3 -a "$rsync_ver[2]" -eq 2 -a "$rsync_ver[3]" -gt 3 2>/dev/null
|
||||
set new_escaping 1
|
||||
end
|
||||
|
||||
complete -c rsync -d "Remote path" -n "commandline -ct | string match -q '*:*'" -xa "
|
||||
(
|
||||
# Prepend any user@host:/path information supplied before the remote completion.
|
||||
@@ -183,7 +205,6 @@ complete -c rsync -d "Remote path" -n "commandline -ct | string match -q '*:*'"
|
||||
)(
|
||||
# Get the list of remote files from the specified rsync server.
|
||||
rsync --list-only (__rsync_remote_target) 2>/dev/null | string replace -r '^d.*' '\$0/' |
|
||||
string replace -r '(\S+\s+){4}' '' | # drop the first four columns
|
||||
string escape -n
|
||||
string replace -r '(\S+\s+){4}' '' $(set -q new_escaping[1]; or echo ' | string escape -n'; echo)
|
||||
)
|
||||
"
|
||||
|
||||
@@ -20,7 +20,7 @@ complete -c rustc -f -l extern
|
||||
complete -c rustc -f -l sysroot
|
||||
complete -c rustc -x -l color -a 'auto always never'
|
||||
|
||||
set -l rust_docs (rustc -C help \
|
||||
set -l rust_docs (rustc -C help 2>/dev/null \
|
||||
| string replace -r -i '(\s+)-C(.+)(\s+)--(\s+)([^\n]+)' '$2 $5' \
|
||||
| string trim \
|
||||
| string match -r '^.*[^:]$')
|
||||
@@ -34,7 +34,7 @@ end
|
||||
|
||||
# rustc -Z is only available with the nightly toolchain, which may not be installed
|
||||
if rustc +nightly >/dev/null 2>&1
|
||||
set -l rust_docs (rustc +nightly -Z help \
|
||||
set -l rust_docs (rustc +nightly -Z help 2>/dev/null \
|
||||
| string replace -r -i '(\s+)-Z(.+)--(\s+)([^\n]+)' '$2 $4' \
|
||||
| string trim \
|
||||
| string match -r '^.*[^:]$')
|
||||
@@ -47,7 +47,7 @@ if rustc +nightly >/dev/null 2>&1
|
||||
end
|
||||
end
|
||||
|
||||
set -l rust_docs (rustc -W help \
|
||||
set -l rust_docs (rustc -W help 2>/dev/null \
|
||||
| string match -r \
|
||||
'(?:\s+)(?:.+)(?:\s+)(?:allow|warn|deny|forbid)(?:\s+){2}(?:[^\n]+)' \
|
||||
| string replace -r -i \
|
||||
|
||||
@@ -59,9 +59,12 @@ complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -
|
||||
"
|
||||
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"
|
||||
complete -c scp -s D -x -d "Connect directly to a local SFTP server"
|
||||
complete -c scp -s l -x -d "Bandwidth limit"
|
||||
complete -c scp -s O -d "Use original SCP protocol instead of SFTP"
|
||||
complete -c scp -s P -x -d Port
|
||||
complete -c scp -s p -d "Preserves modification times, access times, and modes from the original file"
|
||||
complete -c scp -s R -d "Copies between two remote hosts are performed by executing scp on the origin host"
|
||||
complete -c scp -s r -d "Recursively copy"
|
||||
complete -c scp -s S -d "Encryption program"
|
||||
complete -c scp -s T -d "Disable strict filename checking"
|
||||
|
||||
164
share/completions/sops.fish
Normal file
164
share/completions/sops.fish
Normal file
@@ -0,0 +1,164 @@
|
||||
# Completion for SOPS (Secrets OPerationS)
|
||||
|
||||
function __fish_sops_no_subcommand --description "Test if there is a subcommand given"
|
||||
not __fish_sops_print_remaining_args
|
||||
end
|
||||
|
||||
function __fish_sops_print_remaining_args --description "Print remaining argument given"
|
||||
set -l cmd (commandline -poc) (commandline -ct)
|
||||
set -e cmd[1]
|
||||
set -l opts d/decrypt e/encrypt r/rotate i/in-place s/show-master-keys v/version
|
||||
set -a opts extract ignore-mac verbose enable-local-keyservice
|
||||
set -a opts k/kms= p/pgp= a/age=
|
||||
set -a opts gcp-kms= aws-profile= azure-kv= hc-vault-transit= input-type= output-type=
|
||||
set -a opts add-gcp-kms= rm-gcp-kms= add-azure-kv= rm-azure-kv= add-kms= rm-kms=
|
||||
set -a opts add-hc-vault-transit= rm-hc-vault-transit= add-age= rm-age= add-pgp= rm-pgp=
|
||||
set -a opts unencrypted-suffix= encrypted-suffix= unencrypted-regex= encrypted-regex=
|
||||
set -a opts config= encryption-context= set= shamir-secret-sharing-threshold= output= keyservice=
|
||||
argparse -s $opts -- $cmd 2>/dev/null
|
||||
if test -n "$argv"
|
||||
and not string match -qr '^-' $argv[1]
|
||||
string join0 -- $argv
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_sops_commands --description "Test if argument(s) match a sops command"
|
||||
set -l args (__fish_sops_print_remaining_args | string split0)
|
||||
if string match -qr $argv $args[1]
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
# Primary commands
|
||||
complete -F -c sops -n __fish_is_first_token -a exec-env -d "Execute a command with decrypted values inserted into the environment"
|
||||
complete -F -c sops -n __fish_is_first_token -a exec-file -d "Execute a command with decrypted contents as a temporary file"
|
||||
complete -F -c sops -n __fish_is_first_token -a publish -d "Publish sops file or directory to a configured destination"
|
||||
complete -F -c sops -n __fish_is_first_token -a keyservice -d "Start a SOPS key kervice server"
|
||||
complete -F -c sops -n __fish_is_first_token -a groups -d "Modify the groups on a SOPS file"
|
||||
complete -F -c sops -n __fish_is_first_token -a updatekeys -d "Update the keys of a SOPS file using the config file"
|
||||
complete -F -c sops -n __fish_is_first_token -a help -d "Shows a list of commands or help for one command"
|
||||
complete -F -c sops -n __fish_is_first_token -a h -d "Shows a list of commands or help for one command"
|
||||
|
||||
# Primary flags without parameters
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -s d -l decrypt -d "Decrypt a file and output the result to stdout"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -s e -l encrypt -d "Encrypt a file and output the result to stdout"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -s r -l rotate -d "Generate new encryption key & reencrypt with the new key"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -s i -l in-place -d "Write output back to the same file instead of stdout"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -s s -l show-master-keys -d "Display master encryption keys in the file during editing"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -l extract -d "Extract a specific key or branch from decrypted input document"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -l ignore-mac -d "Ignore Message Authentication Code during decryption"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -l verbose -d "Enable verbose logging output"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -l enable-local-keyservice -d "Use local key service"
|
||||
complete -F -c sops -n __fish_sops_no_subcommand -s v -l version -d "Print the version"
|
||||
|
||||
# Primary flags with required parameters
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -s k -l kms -d "Comma separated list of KMS ARNs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -s p -l pgp -d "Comma separated list of PGP fingerprints"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -s a -l age -d "Comma separated list of age recipients"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l gcp-kms -d "Comma separated list of GCP KMS resource IDs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l aws-profile -d "The AWS profile to use for requests to AWS"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l azure-kv -d "Comma separated list of Azure Key Vault URLs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l hc-vault-transit -d "Comma separated list of Vault's key URI"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l input-type -d "Currently json, yaml, dotenv and binary are supported."
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l output-type -d "Currently json, yaml, dotenv and binary are supported."
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l add-gcp-kms -d "Comma-separated list of GCP KMS key resource IDs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l rm-gcp-kms -d "Remove comma-separated list of GCP KMS key resource IDs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l add-azure-kv -x -d "Add comma-separated list of Azure Key Vault key URLs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l rm-azure-kv -x -d "Remove comma-separated list of Azure Key Vault key URLs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l add-kms -x -d "Add comma-separated list of KMS ARNs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l rm-kms -x -d "Remove comma-separated list of KMS ARNs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l add-hc-vault-transit -x -d "Add comma-separated list of Vault's URI key"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l rm-hc-vault-transit -x -d "Remove comma-separated list of Vault's URI key"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l add-age -x -d "Add comma-separated list of age recipients fingerprints"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l rm-age -x -d "Remove comma-separated list of age recipients fingerprints"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l add-pgp -x -d "Add comma-separated list of PGP fingerprints"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l rm-pgp -x -d "Remove comma-separated list of PGP fingerprints"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l unencrypted-suffix -d "Override the unencrypted key suffix"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l encrypted-suffix -d "Override the encrypted key suffix"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l unencrypted-regex -d "Set the unencrypted key suffix"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l encrypted-regex -d "Set the encrypted key suffix"
|
||||
complete -r -c sops -n __fish_sops_no_subcommand -l config -d "Path to sops' config file"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l encryption-context -d "Comma separated list of KMS encryption context key:value pairs"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l set -d "Set a specific key or branch in the input document (edit mode)"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l shamir-secret-sharing-threshold -x -d "Number of master keys required to retrieve the data key with shamir"
|
||||
complete -r -c sops -n __fish_sops_no_subcommand -l output -d "Save the output after encryption or decryption to file"
|
||||
complete -x -c sops -n __fish_sops_no_subcommand -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# Global flags
|
||||
complete -F -c sops -s h -l help -d "Show help"
|
||||
|
||||
# exec-env flags
|
||||
complete -F -c sops -n "__fish_sops_commands exec-env" -l background -d "Background the process and don\'t wait for it to complete"
|
||||
complete -x -c sops -n "__fish_sops_commands exec-env" -l user -a "(__fish_print_users)" -d "The user to run the command as"
|
||||
complete -F -c sops -n "__fish_sops_commands exec-env" -l enable-local-keyservice -d "Use local key service"
|
||||
complete -x -c sops -n "__fish_sops_commands exec-env" -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# exec-file flags
|
||||
complete -F -c sops -n "__fish_sops_commands exec-file" -l background -d "Background the process and don\'t wait for it to complete"
|
||||
complete -F -c sops -n "__fish_sops_commands exec-file" -l no-fifo -d "Use a regular file instead of a fifo to temporarily hold the decrypted contents"
|
||||
complete -x -c sops -n "__fish_sops_commands exec-file" -l user -a "(__fish_print_users)" -d "The user to run the command as"
|
||||
complete -x -c sops -n "__fish_sops_commands exec-file" -l input-type -a "json yaml dotenv binary" -d "Currently json, yaml, dotenv and binary are supported"
|
||||
complete -x -c sops -n "__fish_sops_commands exec-file" -l output-type -a "json yaml dotenv binary" -d "Currently json, yaml, dotenv and binary are supported"
|
||||
complete -F -c sops -n "__fish_sops_commands exec-file" -l filename -d "Filename for the temporarily file (default: tmp-file)"
|
||||
complete -F -c sops -n "__fish_sops_commands exec-file" -l enable-local-keyservice -d "Use local key service"
|
||||
complete -x -c sops -n "__fish_sops_commands exec-file" -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# publish flags
|
||||
complete -F -c sops -n "__fish_sops_commands publish" -s y -l yes -d "Pre-approve all changes and run non-interactively"
|
||||
complete -F -c sops -n "__fish_sops_commands publish" -l omit-extensions -d "Omit file extensions in destination path when publishing sops file"
|
||||
complete -F -c sops -n "__fish_sops_commands publish" -l recursive -d "If source path is a directory, publish all its content recursively"
|
||||
complete -F -c sops -n "__fish_sops_commands publish" -l verbose -d "Enable verbose logging output"
|
||||
complete -F -c sops -n "__fish_sops_commands publish" -l enable-local-keyservice -d "use local key service"
|
||||
complete -x -c sops -n "__fish_sops_commands publish" -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# keyservice flags
|
||||
complete -x -c sops -n "__fish_sops_commands keyservice" -l network -l net -a "tcp;unix" -d "Network to listen on (default: \"tcp\")"
|
||||
complete -x -c sops -n "__fish_sops_commands keyservice" -l address -l addr -a "(__fish_print_addresses | cut -f1):" -d "Address to listen on (default: \"127.0.0.1:5000\")"
|
||||
complete -F -c sops -n "__fish_sops_commands keyservice" -l prompt -d "Prompt user to confirm every incoming request"
|
||||
complete -F -c sops -n "__fish_sops_commands keyservice" -l verbose -d "Enable verbose logging output"
|
||||
|
||||
# groups subcommands
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_prev_arg_in groups" -a add -d "Add a new group to a SOPS file"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_prev_arg_in groups" -a delete -d "Delete a key group from a SOPS file"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_prev_arg_in add" -a "(__fish_print_users)"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_prev_arg_in delete" -a "(__fish_print_users)"
|
||||
|
||||
# groups add flags
|
||||
complete -F -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -s f -l file -d "The file to add the group to"
|
||||
complete -F -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -s i -l in-place -d "Write output back to the same file instead of stdout"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l pgp -d "The PGP fingerprints the new group should contain"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l kms -d "The KMS ARNs the new group should contain"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l aws-profile -d "The AWS profile to use for requests to AWS"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l gcp-kms -d "The GCP KMS Resource ID the new group should contain"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l azure-kv -d "The Azure Key Vault key URL the new group should contain"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l hc-vault-transit -d "The full vault path to the key used to encrypt/decrypt"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l age -d "The age recipient the new group should contain. Can be specified more than once"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l shamir-secret-sharing-threshold -d "Number of master keys required to retrieve data key with shamir"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l encryption-context -d "Comma separated list of KMS encryption context key:value pairs"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l enable-local-keyservice -d "Use local key service"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from add" -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# groups delete flags
|
||||
complete -F -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from delete" -s f -l file -d "The file to add the group to"
|
||||
complete -F -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from delete" -s i -l in-place -d "Write output back to the same file instead of stdout"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from delete" -l shamir-secret-sharing-threshold -d "Number of master keys required to retrieve data key with shamir"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from delete" -l enable-local-keyservice -d "Use local key service"
|
||||
complete -x -c sops -n "__fish_sops_commands groups; and __fish_seen_subcommand_from delete" -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# updatekeys flags
|
||||
complete -F -c sops -n "__fish_sops_commands updatekeys" -s y -l yes -d "Pre-approve all changes and run non-interactively"
|
||||
complete -F -c sops -n "__fish_sops_commands updatekeys" -l enable-local-keyservice -d "Use local key service"
|
||||
complete -x -c sops -n "__fish_sops_commands updatekeys" -l keyservice -d "Specify key services to use in addition to the local one"
|
||||
|
||||
# help options
|
||||
complete -x -c sops -n "__fish_sops_commands help; or __fish_sops_commands h" -a exec-env -d "Execute a command with decrypted values inserted into the environment"
|
||||
complete -x -c sops -n "__fish_sops_commands help; or __fish_sops_commands h" -a exec-file -d "Execute a command with decrypted contents as a temporary file"
|
||||
complete -x -c sops -n "__fish_sops_commands help; or __fish_sops_commands h" -a publish -d "Publish sops file or directory to a configured destination"
|
||||
complete -x -c sops -n "__fish_sops_commands help; or __fish_sops_commands h" -a keyservice -d "Start a SOPS key kervice server"
|
||||
complete -x -c sops -n "__fish_sops_commands help; or __fish_sops_commands h" -a groups -d "Modify the groups on a SOPS file"
|
||||
complete -x -c sops -n "__fish_sops_commands help; or __fish_sops_commands h" -a updatekeys -d "Update the keys of a SOPS file using the config file"
|
||||
@@ -26,7 +26,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 stack-trace -d "Print a list of all function calls leading up to running the current command"
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a features -d "List all feature flags"
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a test-feature -d "Test if a feature flag is enabled"
|
||||
complete -f -c status -n "__fish_seen_subcommand_from test-feature" -a '(status features)'
|
||||
complete -f -c status -n "__fish_seen_subcommand_from test-feature" -a '(status features | sed "s/\s\+\S*\s\+\S*/\t/")'
|
||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a fish-path -d "Print the path to the current instance of fish"
|
||||
|
||||
# The job-control command changes fish state.
|
||||
|
||||
@@ -2,56 +2,57 @@
|
||||
# This follows a strict command-then-options approach, so we can just test the number of tokens
|
||||
complete -f -c string
|
||||
complete -f -c string -n "test (count (commandline -opc)) -le 2" -s h -l help -d "Display help and exit"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and not contains -- (commandline -opc)[2] escape collect pad" -s q -l quiet -d "Do not print output"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "not contains -- (commandline -opc)[2] escape collect pad" -s q -l quiet -d "Do not print output"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a lower
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a upper
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a length
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] length" -s V -l visible -d "Use the visible width, excluding escape sequences"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] length" -s V -l visible -d "Use the visible width, excluding escape sequences"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a sub
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sub" -s s -l start -xa "(seq 1 10)"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sub" -s e -l end -xa "(seq 1 10)"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sub" -s l -l length -xa "(seq 1 10)"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] sub" -s s -l start -xa "(seq 1 10)"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] sub" -s e -l end -xa "(seq 1 10)"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] sub" -s l -l length -xa "(seq 1 10)"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a split
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a split0
|
||||
complete -x -c string -n 'test (count (commandline -opc)) -ge 2; and string match -qr split0\?\$ -- (commandline -opc)[2]' -s m -l max -a "(seq 1 10)" -d "Specify maximum number of splits"
|
||||
complete -x -c string -n 'test (count (commandline -opc)) -ge 2; and string match -qr split0\?\$ -- (commandline -opc)[2]' -s f -l fields -a "(seq 1 10)" -d "Specify fields"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2; and string match -qr split0\?\$ -- (commandline -opc)[2]' -s r -l right -d "Split right-to-left"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2; and string match -qr split0\?\$ -- (commandline -opc)[2]' -s n -l no-empty -d "Empty results excluded"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a collect
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2; and string match -qr collect\$ -- (commandline -opc)[2]' -s N -l no-trim-newlines -d "Don't trim trailing newlines"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2; and string match -qr collect\$ -- (commandline -opc)[2]' -s a -l allow-empty -d "Always print empty argument"
|
||||
complete -x -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s m -l max -a "(seq 1 10)" -d "Specify maximum number of splits"
|
||||
complete -x -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s f -l fields -a "(seq 1 10)" -d "Specify fields"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s r -l right -d "Split right-to-left"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s n -l no-empty -d "Empty results excluded"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a 'collect'
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -opc)[2]' -s N -l no-trim-newlines -d "Don't trim trailing newlines"
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -opc)[2]' -s a -l allow-empty -d "Always print empty argument"
|
||||
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a join
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a join0
|
||||
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'contains -- (commandline -opc)[2] join' -s n -l no-empty -d "Empty strings excluded"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a trim
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] trim" -s l -l left -d "Trim only leading chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] trim" -s r -l right -d "Trim only trailing chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] trim" -s c -l chars -d "Specify the chars to trim (default: whitespace)" -x
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] trim" -s l -l left -d "Trim only leading chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] trim" -s r -l right -d "Trim only trailing chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] trim" -s c -l chars -d "Specify the chars to trim (default: whitespace)" -x
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a escape
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a unescape
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] escape; or contains -- (commandline -opc)[2] unescape" -s n -l no-quoted -d "Escape with \\ instead of quotes"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] escape; or contains -- (commandline -opc)[2] unescape" -l style -d "Specify escaping style" -xa "
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] escape; or contains -- (commandline -opc)[2] unescape" -s n -l no-quoted -d "Escape with \\ instead of quotes"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] escape; or contains -- (commandline -opc)[2] unescape" -l style -d "Specify escaping style" -xa "
|
||||
(printf '%s\t%s\n' script 'For use in scripts' \
|
||||
var 'For use as a variable name' \
|
||||
regex 'For string match -r, string replace -r' \
|
||||
url 'For use as a URL')"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a match
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match" -s n -l index -d "Report index, length of match"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match" -s v -l invert -d "Report only non-matches"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match" -s e -l entire -d "Show entire matching lines"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match" -s g -l groups-only -d "Only report capturing groups"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s n -l index -d "Report index, length of match"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s v -l invert -d "Report only non-matches"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s e -l entire -d "Show entire matching lines"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s g -l groups-only -d "Only report capturing groups"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a replace
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] replace" -s f -l filter -d "Report only actual replacements"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] replace" -s f -l filter -d "Report only actual replacements"
|
||||
# All replace options are also valid for match
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s a -l all -d "Report every match"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s i -l ignore-case -d "Case insensitive"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] match replace" -s r -l regex -d "Use regex instead of globs"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match replace" -s a -l all -d "Report every match"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match replace" -s i -l ignore-case -d "Case insensitive"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match replace" -s r -l regex -d "Use regex instead of globs"
|
||||
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a repeat
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] repeat" -s n -l count -xa "(seq 1 10)" -d "Repetition count"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] repeat" -s m -l max -xa "(seq 1 10)" -d "Maximum number of printed chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] repeat" -s N -l no-newline -d "Remove newline"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] repeat" -s n -l count -xa "(seq 1 10)" -d "Repetition count"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] repeat" -s m -l max -xa "(seq 1 10)" -d "Maximum number of printed chars"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] repeat" -s N -l no-newline -d "Remove newline"
|
||||
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a pad
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] pad" -s r -l right -d "Pad right instead of left"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] pad" -s c -l char -x -d "Character to use for padding"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] pad" -s w -l width -x -d "Integer width of the result, default is maximum width of inputs"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] pad" -s r -l right -d "Pad right instead of left"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] pad" -s c -l char -x -d "Character to use for padding"
|
||||
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] pad" -s w -l width -x -d "Integer width of the result, default is maximum width of inputs"
|
||||
|
||||
@@ -1,178 +1,212 @@
|
||||
# general options
|
||||
complete -f -c terraform -l version -d 'Print version information'
|
||||
complete -f -c terraform -l help -d 'Show help'
|
||||
# Returns 0 if the command has not had a subcommand yet
|
||||
# Does not currently account for -chdir
|
||||
function __fish_terraform_needs_command
|
||||
set -l cmd (commandline -opc)
|
||||
|
||||
### apply
|
||||
complete -f -c terraform -n __fish_use_subcommand -a apply -d 'Build or change infrastructure'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o backup -d 'Path to backup the existing state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o input -d 'Ask for input for variables if not directly set'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o parallelism -d 'Limit the number of concurrent operations'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o refresh -d 'Update state prior to checking for differences'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o state-out -d 'Path to write state'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o target -d 'Resource to target'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from apply' -o var-file -d 'Set variables from a file'
|
||||
if test (count $cmd) -eq 1
|
||||
return 0
|
||||
end
|
||||
|
||||
return 1
|
||||
end
|
||||
|
||||
function __fish_terraform_workspaces
|
||||
terraform workspace list | string replace -r "^[\s\*]*" ""
|
||||
end
|
||||
|
||||
# general options
|
||||
complete -f -c terraform -n "not __fish_terraform_needs_command" -o version -d "Print version information"
|
||||
complete -f -c terraform -o help -d "Show help"
|
||||
|
||||
### apply/destroy
|
||||
set -l apply apply destroy
|
||||
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a apply -d "Build or change infrastructure"
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a destroy -d "Destroy infrastructure"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o auto-approve -d "Skip interactive approval"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from $apply" -o backup -d "Path to backup the existing state file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o compact-warnings -d "Show only error summaries"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o lock=false -d "Don't hold a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o input=true -d "Ask for input for variables if not directly set"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o parallelism -d "Limit the number of concurrent operations"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from $apply" -o state -d "Path to a Terraform state file"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from $apply" -o state-out -d "Path to write state"
|
||||
|
||||
### console
|
||||
complete -f -c terraform -n __fish_use_subcommand -a console -d 'Interactive console for Terraform interpolations'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from console' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from console' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from console' -o var-file -d 'Set variables from a file'
|
||||
|
||||
### destroy
|
||||
complete -f -c terraform -n __fish_use_subcommand -a destroy -d 'Destroy Terraform-managed infrastructure'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o backup -d 'Path to backup the existing state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o force -d 'Don\'t ask for input for destroy confirmation'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o parallelism -d 'Limit the number of concurrent operations'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o refresh -d 'Update state prior to checking for differences'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o state-out -d 'Path to write state'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o target -d 'Resource to target'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from destroy' -o var-file -d 'Set variables from a file'
|
||||
|
||||
### env
|
||||
complete -f -c terraform -n __fish_use_subcommand -a env -d 'Environment management'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from env' -a list -d 'List environments'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from env' -a select -d 'Select an environment'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from env' -a new -d 'Create a new environment'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from env' -a delete -d 'Delete an existing environment'
|
||||
|
||||
### workspace
|
||||
complete -f -c terraform -n __fish_use_subcommand -a workspace -d 'Workspace management'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from workspace' -a list -d 'List workspaces'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from workspace' -a select -d 'Select an workspace'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from workspace' -a new -d 'Create a new workspace'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from workspace' -a delete -d 'Delete an existing workspace'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a console -d "Interactive console for Terraform interpolations"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from console" -o state -d "Path to a Terraform state file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from console" -o var -d "Set a variable in the Terraform configuration"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from console" -o var-file -d "Set variables from a file"
|
||||
|
||||
### fmt
|
||||
complete -f -c terraform -n __fish_use_subcommand -a fmt -d 'Rewrite config files to canonical format'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from fmt' -o list -d 'List files whose formatting differs'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from fmt' -o write -d 'Write result to source file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from fmt' -o diff -d 'Display diffs of formatting changes'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a fmt -d "Rewrite config files to canonical format"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from fmt" -o list=false -d "Don't list files whose formatting differs"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from fmt" -o write=false -d "Don't write to source files"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from fmt" -o diff -d "Display diffs of formatting changes"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from fmt" -o check -d "Check if the input is formatted"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from fmt" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from fmt" -o recursive -d "Also process files in subdirectories"
|
||||
|
||||
### get
|
||||
complete -f -c terraform -n __fish_use_subcommand -a get -d 'Download and install modules for the configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from get' -o update -d 'Check modules for updates'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from get' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a get -d "Download and install modules for the configuration"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from get" -o update -d "Check modules for updates"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from get" -o no-color -d "If specified, output won't contain any color"
|
||||
|
||||
### graph
|
||||
complete -f -c terraform -n __fish_use_subcommand -a graph -d 'Create a visual graph of Terraform resources'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from graph' -o draw-cycles -d 'Highlight any cycles in the graph'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from graph' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from graph' -o type -d 'Type of graph to output'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a graph -d "Create a visual graph of Terraform resources"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from graph" -o plan -d "Use specified plan file instead of current directory"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from graph" -o draw-cycles -d "Highlight any cycles in the graph"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from graph" -o type=plan -d "Output plan graph"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from graph" -o type=plan-refresh-only -d "Output plan graph assuming refresh only"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from graph" -o type=plan-destroy -d "Output plan graph assuming destroy"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from graph" -o type=apply -d "Output apply graph"
|
||||
|
||||
### import
|
||||
complete -f -c terraform -n __fish_use_subcommand -a import -d 'Import existing infrastructure into Terraform'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o backup -d 'Path to backup the existing state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o config -d 'Path to a directory of configuration files'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o input -d 'Ask for input for variables if not directly set'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o provider -d 'Specific provider to use for import'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o state-out -d 'Path to write state'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from import' -o var-file -d 'Set variables from a file'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a import -d "Import existing infrastructure into Terraform"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from import" -o backup -d "Path to backup the existing state file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o config -d "Path to a directory of configuration files"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o allow-missing-config -d "Allow import without resource block"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o input=false -d "Disable interactive input prompts"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o lock=false -d "Don't hold a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from import" -o state -d "Path to a Terraform state file"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from import" -o state-out -d "Path to write state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from import" -o var -d "Set a variable in the Terraform configuration"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from import" -o var-file -d "Set variables from a file"
|
||||
|
||||
### init
|
||||
complete -f -c terraform -n __fish_use_subcommand -a init -d 'Initialize a new or existing Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o backend -d 'Configure the backend for this environment'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o backend-config -d 'Backend configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o get -d 'Download modules for this configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o input -d 'Ask for input if necessary'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from init' -o force-copy -d 'Suppress prompts about copying state data'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a init -d "Initialize a new or existing Terraform configuration"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o backend=false -d "Disable backend initialization"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o cloud=false -d "Disable backend initialization"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o backend-config -d "Backend configuration"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o force-copy -d "Suppress prompts about copying state data"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o from-module -d "Copy the module into target directory before init"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o get=false -d "Disable downloading modules for this configuration"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o input=false -d "Disable interactive prompts"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o lock=false -d "Don't hold state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o plugin-dir -d "Directory containing plugin binaries"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o reconfigure -d "Ignore any saved configuration"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from init" -o migrate-state -d "Reconfigure backend, migrating existing state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o upgrade -d "Install latest dependencies, ignoring lockfile"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o lockfile=readonly -d "Set dependency lockfile mode to readonly"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from init" -o ignore-remote-version -d "Ignore local and remote backend compatibility check"
|
||||
|
||||
### login
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a login -d "Retrieves auth token for the given hostname"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from login" -a "(__fish_print_hostnames)"
|
||||
|
||||
### logout
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a logout -d "Removes auth token for the given hostname"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from logout" -a "(__fish_print_hostnames)"
|
||||
|
||||
### output
|
||||
complete -f -c terraform -n __fish_use_subcommand -a output -d 'Read an output from a state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from output' -o state -d 'Path to the state file to read'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from output' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from output' -o module -d 'Return the outputs for a specific module'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from output' -o json -d 'Print output in JSON format'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a output -d "Read an output from a state file"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from output" -o state -d "Path to the state file to read"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from output" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from output" -o json -d "Print output in JSON format"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from output" -o raw -d "Print raw strings directly"
|
||||
|
||||
### plan
|
||||
complete -f -c terraform -n __fish_use_subcommand -a plan -d 'Generate and show an execution plan'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o destroy -d 'Generate a plan to destroy all resources'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o detailed-exitcode -d 'Return detailed exit codes'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o input -d 'Ask for input for variables if not directly set'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o module-depth -d 'Depth of modules to show in the output'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o out -d 'Write a plan file to the given path'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o parallelism -d 'Limit the number of concurrent operations'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o refresh -d 'Update state prior to checking for differences'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o target -d 'Resource to target'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from plan' -o var-file -d 'Set variables from a file'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a plan -d "Generate and show an execution plan"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o compact-warnings -d "Show only error summaries"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o detailed-exitcode -d "Return detailed exit codes"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o input=true -d "Ask for input for variables if not directly set"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o lock=false -d "Don't hold a state lock during the operation"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o out -d "Write a plan file to the given path"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from plan" -o parallelism -d "Limit the number of concurrent operations"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from plan" -o state -d "Path to a Terraform state file"
|
||||
|
||||
### push
|
||||
complete -f -c terraform -n __fish_use_subcommand -a push -d 'Upload this Terraform module to Atlas to run'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o atlas-address -d 'An alternate address to an Atlas instance'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o upload-modules -d 'Lock modules and upload completely'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o name -d 'Name of the configuration in Atlas'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o token -d 'Access token to use to upload'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o overwrite -d 'Variable keys that should overwrite values in Atlas'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o var-file -d 'Set variables from a file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o vcs -d 'Upload only files committed to your VCS'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from push' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
### plan customization options are reusable across apply, destroy, and plan
|
||||
set -l plan apply destroy plan
|
||||
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $plan" -o destroy -d "Select \"destroy\" planning mode"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $plan" -o refresh-only -d "Select \"refresh only\" planning mode"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $plan" -o refresh=false -d "Skip checking for external changes"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $plan" -o replace -d "Force replacement of resource using its address"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $plan" -o target -d "Resource to target"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $plan" -o var -d "Set a variable in the Terraform configuration"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from $plan" -o var-file -d "Set variables from a file"
|
||||
|
||||
### providers
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a providers -d "Print tree of modules with their provider requirements"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from providers" -a "lock mirror schema"
|
||||
|
||||
### refresh
|
||||
complete -f -c terraform -n __fish_use_subcommand -a refresh -d 'Update local state file against real resources'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o backup -d 'Path to backup the existing state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o input -d 'Ask for input for variables if not directly set'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o state-out -d 'Path to write state'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o target -d 'Resource to target'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o var -d 'Set a variable in the Terraform configuration'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from refresh' -o var-file -d 'Set variables from a file'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a refresh -d "Update local state file against real resources"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from $apply" -o compact-warnings -d "Show only error summaries"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from refresh" -o backup -d "Path to backup the existing state file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from refresh" -o input=true -d "Ask for input for variables if not directly set"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from refresh" -o lock=false -d "Don't hold a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from refresh" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from refresh" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from refresh" -o state -d "Path to a Terraform state file"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from refresh" -o state-out -d "Path to write state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from refresh" -o target -d "Resource to target"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from refresh" -o var -d "Set a variable in the Terraform configuration"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from refresh" -o var-file -d "Set variables from a file"
|
||||
|
||||
### show
|
||||
complete -f -c terraform -n __fish_use_subcommand -a show -d 'Inspect Terraform state or plan'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from show' -o module-depth -d 'Depth of modules to show in the output'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from show' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a show -d "Inspect Terraform state or plan"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from show" -o no-color -d "If specified, output won't contain any color"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from validate" -o json -d "Produce output in JSON format"
|
||||
|
||||
### state
|
||||
complete -r -c terraform -n __fish_terraform_needs_command -a state -d "Advanced state management"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a list -d "List resources in state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a mv -d "Move an item in the state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a pull -d "Pull current state and output to stdout"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a push -d "Update remote state from local state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a replace-provider -d "Replace provider in the state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a rm -d "Remove instance from the state"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from state" -a show -d "Show a resource in the state"
|
||||
|
||||
### taint
|
||||
complete -f -c terraform -n __fish_use_subcommand -a taint -d 'Manually mark a resource for recreation'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o allow-missing -d 'Succeed even if resource is missing'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o backup -d 'Path to backup the existing state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o module -d 'The module path where the resource lives'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from taint' -o state-out -d 'Path to write state'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a taint -d "Manually mark a resource for recreation"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from taint" -o allow-missing -d "Succeed even if resource is missing"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from taint" -o backup -d "Path to backup the existing state file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from taint" -o lock=false -d "Don't hold a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from taint" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from taint" -o ignore-remote-version -d "Ignore local and remote backend compatibility check"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from taint" -o state -d "Path to a Terraform state file"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from taint" -o state-out -d "Path to write state"
|
||||
|
||||
### test
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a test -d "Runs automated test of shared modules"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from test" -o compact-warnings -d "Show only error summaries"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from test" -o junit-xml -d "Also write test results to provided JUnit XML file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from test" -o no-color -d "If specified, output won't contain any color"
|
||||
|
||||
### untaint
|
||||
complete -f -c terraform -n __fish_use_subcommand -a untaint -d 'Manually unmark a resource as tainted'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o allow-missing -d 'Succeed even if resource is missing'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o backup -d 'Path to backup the existing state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o lock -d 'Lock the state file when locking is supported'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o lock-timeout -d 'Duration to retry a state lock'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o module -d 'The module path where the resource lives'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o state -d 'Path to a Terraform state file'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from untaint' -o state-out -d 'Path to write state'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a untaint -d "Manually unmark a resource as tainted"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from untaint" -o allow-missing -d "Succeed even if resource is missing"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from untaint" -o backup -d "Path to backup the existing state file"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from untaint" -o lock=false -d "Don't hold a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from untaint" -o lock-timeout -d "Duration to retry a state lock"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from untaint" -o ignore-remote-version -d "Ignore local and remote backend compatibility check"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from untaint" -o state -d "Path to a Terraform state file"
|
||||
complete -r -c terraform -n "__fish_seen_subcommand_from untaint" -o state-out -d "Path to write state"
|
||||
|
||||
### validate
|
||||
complete -f -c terraform -n __fish_use_subcommand -a validate -d 'Validate the Terraform files'
|
||||
complete -f -c terraform -n '__fish_seen_subcommand_from validate' -o no-color -d 'If specified, output won\'t contain any color'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a validate -d "Validate the Terraform files"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from validate" -o json -d "Produce output in JSON format"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from validate" -o no-color -d "If specified, output won't contain any color"
|
||||
|
||||
### version
|
||||
complete -f -c terraform -n __fish_use_subcommand -a version -d 'Print the Terraform version'
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a version -d "Print the Terraform version"
|
||||
|
||||
### workspace
|
||||
set -l workspace_commands list select new delete
|
||||
|
||||
complete -f -c terraform -n __fish_terraform_needs_command -a workspace -d "Workspace management"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from workspace && not __fish_seen_subcommand_from $workspace_commands" -a list -d "List workspaces"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from workspace && not __fish_seen_subcommand_from $workspace_commands" -a select -d "Select an workspace"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from workspace && not __fish_seen_subcommand_from $workspace_commands" -a new -d "Create a new workspace"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from workspace && not __fish_seen_subcommand_from $workspace_commands" -a delete -d "Delete an existing workspace"
|
||||
complete -f -c terraform -n "__fish_seen_subcommand_from workspace && __fish_seen_subcommand_from select delete" -a "(__fish_terraform_workspaces)"
|
||||
|
||||
@@ -6,7 +6,7 @@ complete -c timeout -s s -l signal -d 'Specify the signal to be sent' -xa "$__ki
|
||||
complete -c timeout -l preserve-status -d 'Exit with same status as COMMAND'
|
||||
|
||||
# GNU coreutils ver
|
||||
if timeout --version 2>/dev/null
|
||||
if timeout --version &>/dev/null
|
||||
complete -c timeout -l help -d 'Display this help and exit'
|
||||
complete -c timeout -l version -d 'Output version and exit'
|
||||
complete -c timeout -s v -l verbose -d 'Send diagnostic info to stderr'
|
||||
|
||||
@@ -35,7 +35,7 @@ complete -f -c tmutil -n __fish_use_subcommand -a latestbackup -d 'Print the pat
|
||||
complete -c tmutil -n __fish_use_subcommand -a listlocalsnapshotdates -d 'List the creation dates of all local Time Machine snapshots'
|
||||
complete -r -c tmutil -n __fish_use_subcommand -a listlocalsnapshots -d 'List local Time Machine snapshots of the specified volume'
|
||||
complete -f -c tmutil -n __fish_use_subcommand -a listbackups -d 'Print paths for all snapshots'
|
||||
complete -f -c tmutil -n __fish_use_subcommand -a localsnapshot -d 'Create new local Time Machine snapshots of all APFS volumes included in TM backup'
|
||||
complete -f -c tmutil -n __fish_use_subcommand -a localsnapshot -d 'Create new local Time Machine snapshot of APFS volume in TM backup'
|
||||
complete -f -c tmutil -n __fish_use_subcommand -a machinedirectory -d 'Print the path to the current machine directory'
|
||||
complete -f -c tmutil -n __fish_use_subcommand -a removedestination -d 'Removes a backup destination'
|
||||
complete -f -c tmutil -n __fish_use_subcommand -a removeexclusion -d 'Remove an exclusion'
|
||||
|
||||
24
share/completions/tuned-adm.fish
Normal file
24
share/completions/tuned-adm.fish
Normal file
@@ -0,0 +1,24 @@
|
||||
#disable file seletion
|
||||
complete -f tuned-adm
|
||||
|
||||
#get profile list
|
||||
set profiles (tuned-adm list 2>&1 < /dev/null | awk '{print $2}' | tail -n +2 | head -n -1)
|
||||
|
||||
# all tuned-adm actions
|
||||
set -l actions list available profiles active off profile profile_info recommend verify auto_profile profile_mode
|
||||
|
||||
#first argument
|
||||
complete -k -c tuned-adm -n "test (__fish_number_of_cmd_args_wo_opts) = 1" \
|
||||
-xa "$actions"
|
||||
|
||||
# second argument for profile subcommand
|
||||
complete -k -c tuned-adm -n "test (__fish_number_of_cmd_args_wo_opts) = 2; and __fish_seen_subcommand_from profile" \
|
||||
-xa "$profiles"
|
||||
|
||||
#options
|
||||
complete -k -c tuned-adm -s h -l help -d "show this help message and exit"
|
||||
complete -k -c tuned-adm -s v -l version -d "show program's version number and exit"
|
||||
complete -k -c tuned-adm -s d -l debug -d "show debug messages"
|
||||
complete -k -c tuned-adm -s a -l async -d "with dbus do not wait on commands completion and return immediately"
|
||||
complete -k -c tuned-adm -s t -l timeout -d "with sync operation use specific timeout instead of the default 600 second(s)"
|
||||
complete -k -c tuned-adm -s l -l loglevel -d "level of log messages to capture"
|
||||
@@ -3,16 +3,26 @@ complete -c ulimit -s S -l soft -d "Set or get soft limit"
|
||||
complete -c ulimit -s H -l hard -d "Set or get hard limit"
|
||||
|
||||
complete -c ulimit -s a -l all -d "Get all current limits"
|
||||
complete -c ulimit -s b -l socket-buffers -d "Maximum size of socket buffers"
|
||||
complete -c ulimit -s c -l core-size -d "Maximum size of core files created"
|
||||
complete -c ulimit -s d -l data-size -d "Maximum size of a process's data segment"
|
||||
complete -c ulimit -s e -l nice -d "Control of maximum nice priority"
|
||||
complete -c ulimit -s f -l file-size -d "Maximum size of files created by the shell"
|
||||
complete -c ulimit -s i -l pending-signals -d "Maximum number of pending signals"
|
||||
complete -c ulimit -s l -l lock-size -d "Maximum size that may be locked into memory"
|
||||
complete -c ulimit -s m -l resident-set-size -d "Maximum resident set size"
|
||||
complete -c ulimit -s n -l file-descriptor-count -d "Maximum number of open file descriptors"
|
||||
complete -c ulimit -s q -l queue-size -d "Maximum bytes in POSIX message queues"
|
||||
complete -c ulimit -s r -l realtime-priority -d "Maximum realtime scheduling priority"
|
||||
complete -c ulimit -s s -l stack-size -d "Maximum stack size"
|
||||
complete -c ulimit -s t -l cpu-time -d "Maximum amount of cpu time in seconds"
|
||||
complete -c ulimit -s u -l process-count -d "Maximum number of processes available to a single user"
|
||||
complete -c ulimit -s v -l virtual-memory-size -d "Maximum amount of virtual memory available to the shell"
|
||||
complete -c ulimit -s w -l swap-size -d "Maximum swap space"
|
||||
complete -c ulimit -s y -l realtime-maxtime -d "Maximum contiguous realtime CPU time"
|
||||
complete -c ulimit -s K -l kernel-queues -d "Maximum number of kqueues"
|
||||
complete -c ulimit -s P -l ptys -d "Maximum number of pseudo-terminals"
|
||||
complete -c ulimit -s T -l threads -d "Maximum number of simultaneous threads"
|
||||
|
||||
complete -c ulimit -s h -l help -d "Display help and exit"
|
||||
|
||||
|
||||
@@ -7,15 +7,19 @@
|
||||
#
|
||||
complete -c umount -d "Mount point" -x -a '(__fish_print_mounted)'
|
||||
|
||||
complete -c umount -s V -l version -d "Display version and exit"
|
||||
complete -c umount -s h -l help -d "Display help and exit"
|
||||
complete -c umount -s v -l verbose -d "Verbose mode"
|
||||
complete -c umount -s n -l no-mtab -d "Unmount without writing in /etc/mtab"
|
||||
complete -c umount -s V -l version -d "Display version"
|
||||
complete -c umount -s h -l help -d "Display help"
|
||||
complete -c umount -s v -l verbose -d "Say what is being done"
|
||||
complete -c umount -s n -l no-mtab -d "Don't write to /etc/mtab"
|
||||
complete -c umount -s r -l read-only -d "In case unmounting fails, try to remount read-only"
|
||||
complete -c umount -s d -l detach-loop -d "In case the unmounted device was a loop device, also free this loop device"
|
||||
complete -c umount -s i -l internal-only -d "Don't call the /sbin/umount.<filesystem> helper even if it exists"
|
||||
complete -c umount -s i -l internal-only -d "Don't call the umount.<type> helpers"
|
||||
complete -c umount -s a -l all -d "Unmount all of the file systems described in /etc/mtab"
|
||||
complete -c umount -s t -l types -d "Actions should only be taken on file systems of the specified type" -xa "(__fish_print_filesystems)"
|
||||
complete -c umount -s O -l test-opts -d "Actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cut -d " " -f 4 /etc/mtab)\t"Mount option"'
|
||||
complete -c umount -s f -l force -d "Force unmount (in case of an unreachable NFS system)"
|
||||
complete -c umount -s l -l lazy -d "Lazy unmount (unmount a 'busy' filesystem)"
|
||||
complete -c umount -s R -l recursive -d "Recursively unmount a target with all its children"
|
||||
complete -c umount -s A -l all-targets -d "Unmount all mountpoints for the given device in the current namespaces"
|
||||
complete -c umount -s c -l no-canonicalize -d "Don't canonicalize paths"
|
||||
complete -c umount -l fake -d "dry run; skip the umount(2) syscall"
|
||||
|
||||
@@ -19,4 +19,4 @@ complete -c useradd -s b -l base-dir -d 'The initial path prefix for a new user\
|
||||
complete -c useradd -s e -l expiredate -d 'The date on which the user account is disabled' -r
|
||||
complete -c useradd -s f -l inactive -d 'Number of days to disable account after password expiration' -r
|
||||
complete -c useradd -s g -l gid -d 'The group name or ID for a new user\'s initial group' -x -a '(string match -r "^[^#].*" < /etc/group | string split -f1,3 ":" | string join ":" | string replace -a ":" \n)'
|
||||
complete -c useradd -s s -l shell -d 'Name of the new user\'s login shell' -x -a '(string match -r "^[^#].*" < /etc/shells)'
|
||||
complete -c useradd -s s -l shell -d 'Name of the new user\'s login shell' -x -a '(string match -r "^[^#].*" < /etc/shells; type -afp nologin)'
|
||||
|
||||
12
share/completions/wg-quick.fish
Normal file
12
share/completions/wg-quick.fish
Normal file
@@ -0,0 +1,12 @@
|
||||
set -l valid_subcmds up down strip save
|
||||
|
||||
function __fish_wg_complete_interfaces
|
||||
wg show interfaces
|
||||
end
|
||||
|
||||
complete -c wg-quick -f
|
||||
complete -c wg-quick -n "__fish_seen_subcommand_from $valid_subcmds" -a '(__fish_wg_complete_interfaces)'
|
||||
complete -c wg-quick -n "not __fish_seen_subcommand_from $valid_subcmds" -a up -d 'Add and set up an interface'
|
||||
complete -c wg-quick -n "not __fish_seen_subcommand_from $valid_subcmds" -a down -d 'Tear down and remove an interface'
|
||||
complete -c wg-quick -n "not __fish_seen_subcommand_from $valid_subcmds" -a strip -d 'Output config for use with wg'
|
||||
complete -c wg-quick -n "not __fish_seen_subcommand_from $valid_subcmds" -a save -d 'Saves the configuration of an existing interface'
|
||||
@@ -441,7 +441,7 @@ complete -c zfs -x -n '__fish_zfs_using_command list' -d 'Dataset whose properti
|
||||
complete -c zfs -x -n '__fish_zfs_using_command set; and __fish_is_nth_token 2' -d 'Property to set' -a '(__fish_complete_zfs_rw_properties)'
|
||||
complete -c zfs -x -n '__fish_zfs_using_command set; and __fish_is_nth_token 3' -d 'Dataset whose property to set' -a '(__fish_print_zfs_filesystems; __fish_print_zfs_volumes; __fish_print_zfs_snapshots)'
|
||||
# set property value completions
|
||||
complete -c zfs -x -n '__fish_zfs_using_command set; and __fish_is_nth_token 2' -a '(__fish_zfs_complete_property_values (fish_nth_token 2))'
|
||||
complete -c zfs -x -n '__fish_zfs_using_command set; and __fish_is_nth_token 2' -a '(__fish_zfs_complete_property_values (__fish_nth_token 2))'
|
||||
|
||||
# get completions
|
||||
complete -c zfs -f -n '__fish_zfs_using_command get' -s r -d 'Operate recursively on datasets'
|
||||
|
||||
@@ -8,23 +8,14 @@ set -g IFS \n\ \t
|
||||
set -qg __fish_added_user_paths
|
||||
or set -g __fish_added_user_paths
|
||||
|
||||
# For one-off upgrades of the fish version, see __fish_config_interactive.fish
|
||||
if not set -q __fish_initialized
|
||||
set -U __fish_initialized 0
|
||||
if set -q __fish_init_2_39_8
|
||||
set __fish_initialized 2398
|
||||
else if set -q __fish_init_2_3_0
|
||||
set __fish_initialized 2300
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Create the default command_not_found handler
|
||||
#
|
||||
function __fish_default_command_not_found_handler
|
||||
printf "fish: Unknown command: %s\n" (string escape -- $argv[1]) >&2
|
||||
printf (_ "fish: Unknown command: %s\n") (string escape -- $argv[1]) >&2
|
||||
end
|
||||
|
||||
|
||||
if not status --is-interactive
|
||||
# Hook up the default as the command_not_found handler
|
||||
# if we are not interactive to avoid custom handlers.
|
||||
@@ -65,9 +56,9 @@ set -l vendor_functionsdirs
|
||||
set -l vendor_confdirs
|
||||
# Don't load vendor directories when running unit tests
|
||||
if not set -q FISH_UNIT_TESTS_RUNNING
|
||||
set vendor_completionsdirs $xdg_data_dirs/vendor_completions.d
|
||||
set vendor_functionsdirs $xdg_data_dirs/vendor_functions.d
|
||||
set vendor_confdirs $xdg_data_dirs/vendor_conf.d
|
||||
set vendor_completionsdirs $__fish_user_data_dir/vendor_completions.d $xdg_data_dirs/vendor_completions.d
|
||||
set vendor_functionsdirs $__fish_user_data_dir/vendor_functions.d $xdg_data_dirs/vendor_functions.d
|
||||
set vendor_confdirs $__fish_user_data_dir/vendor_conf.d $xdg_data_dirs/vendor_conf.d
|
||||
|
||||
# Ensure that extra directories are always included.
|
||||
if not contains -- $__extra_completionsdir $vendor_completionsdirs
|
||||
@@ -159,19 +150,6 @@ end
|
||||
# in UTF-8 (with non-ASCII characters).
|
||||
__fish_set_locale
|
||||
|
||||
# Upgrade pre-existing abbreviations from the old "key=value" to the new "key value" syntax.
|
||||
# This needs to be in share/config.fish because __fish_config_interactive is called after sourcing
|
||||
# config.fish, which might contain abbr calls.
|
||||
if test $__fish_initialized -lt 2300
|
||||
if set -q fish_user_abbreviations
|
||||
set -l fab
|
||||
for abbr in $fish_user_abbreviations
|
||||
set -a fab (string replace -r '^([^ =]+)=(.*)$' '$1 $2' -- $abbr)
|
||||
end
|
||||
set fish_user_abbreviations $fab
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Some things should only be done for login terminals
|
||||
# This used to be in etc/config.fish - keep it here to keep the semantics
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
function __fish_abbr_old --description "Manage abbreviations using old fish 2.x scheme."
|
||||
# parse arguments
|
||||
set -l mode
|
||||
set -l mode_flag # the flag that was specified, for better errors
|
||||
set -l mode_arg
|
||||
set -l needs_arg no
|
||||
while set -q argv[1]
|
||||
set -l new_mode
|
||||
switch $argv[1]
|
||||
case -h --help
|
||||
__fish_print_help abbr
|
||||
return 0
|
||||
case -a --add
|
||||
set new_mode add
|
||||
set needs_arg multi
|
||||
case -r --rename
|
||||
set new_mode rename
|
||||
set needs_arg double
|
||||
case -e --erase
|
||||
set new_mode erase
|
||||
set needs_arg single
|
||||
case -l --list
|
||||
set new_mode list
|
||||
case -s --show
|
||||
set new_mode show
|
||||
case --
|
||||
set -e argv[1]
|
||||
break
|
||||
case '-*'
|
||||
printf ( _ "%s: invalid option -- %s\n" ) abbr $argv[1] >&2
|
||||
return 1
|
||||
case '*'
|
||||
break
|
||||
end
|
||||
if test -n "$mode" -a -n "$new_mode"
|
||||
# we're trying to set two different modes
|
||||
printf ( _ "%s: %s cannot be specified along with %s\n" ) abbr $argv[1] $mode_flag >&2
|
||||
return 1
|
||||
end
|
||||
set mode $new_mode
|
||||
set mode_flag $argv[1]
|
||||
set -e argv[1]
|
||||
end
|
||||
|
||||
# If run with no options, treat it like --add if we have an argument, or
|
||||
# --show if we do not have an argument
|
||||
if not set -q mode[1]
|
||||
if set -q argv[1]
|
||||
set mode add
|
||||
set needs_arg multi
|
||||
else
|
||||
set mode show
|
||||
end
|
||||
end
|
||||
|
||||
if test $needs_arg = single
|
||||
set mode_arg $argv[1]
|
||||
set needs_arg no
|
||||
set -e argv[1]
|
||||
else if test $needs_arg = double
|
||||
# Pull the two parameters from argv.
|
||||
# * leave argv non-empty, if there are more than two arguments
|
||||
# * leave needs_arg set to double if there is not enough arguments
|
||||
if set -q argv[1]
|
||||
set param1 $argv[1]
|
||||
set -e argv[1]
|
||||
if set -q argv[1]
|
||||
set param2 $argv[1]
|
||||
set needs_arg no
|
||||
set -e argv[1]
|
||||
end
|
||||
end
|
||||
else if test $needs_arg = multi
|
||||
set mode_arg $argv
|
||||
set needs_arg no
|
||||
set -e argv
|
||||
end
|
||||
if test $needs_arg != no
|
||||
printf ( _ "%s: option requires an argument -- %s\n" ) abbr $mode_flag >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
# none of our modes want any excess arguments
|
||||
if set -q argv[1]
|
||||
printf ( _ "%s: Unexpected argument -- %s\n" ) abbr $argv[1] >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
switch $mode
|
||||
case add
|
||||
# Convert from old "key=value" syntax
|
||||
# TODO: This should be removed later
|
||||
if not set -q mode_arg[2]
|
||||
and string match -qr '^[^ ]+=' -- $mode_arg
|
||||
set mode_arg (string split "=" -- $mode_arg)
|
||||
end
|
||||
|
||||
# Bail out early if the exact abbr is already in
|
||||
set -q fish_user_abbreviations
|
||||
and contains -- "$mode_arg" $fish_user_abbreviations
|
||||
and return 0
|
||||
|
||||
set -l key $mode_arg[1]
|
||||
set -e mode_arg[1]
|
||||
set -l value "$mode_arg"
|
||||
# Because we later store "$key $value", there can't be any spaces in the key
|
||||
if string match -q "* *" -- $key
|
||||
printf ( _ "%s: abbreviation cannot have spaces in the key\n" ) abbr >&2
|
||||
return 1
|
||||
end
|
||||
if test -z "$value"
|
||||
printf ( _ "%s: abbreviation must have a value\n" ) abbr >&2
|
||||
return 1
|
||||
end
|
||||
if set -l idx (__fish_abbr_get_by_key $key)
|
||||
# erase the existing abbreviation
|
||||
set -e fish_user_abbreviations[$idx]
|
||||
end
|
||||
if not set -q fish_user_abbreviations
|
||||
# initialize as a universal variable, so we can skip the -U later
|
||||
# and therefore work properly if someone sets this as a global variable
|
||||
set -U fish_user_abbreviations
|
||||
end
|
||||
set fish_user_abbreviations $fish_user_abbreviations "$key $value"
|
||||
return 0
|
||||
|
||||
case rename
|
||||
set -l old_name $param1
|
||||
set -l new_name $param2
|
||||
|
||||
# if the target name already exists, throw an error
|
||||
if set -l idx (__fish_abbr_get_by_key $new_name)
|
||||
printf ( _ "%s: abbreviation '%s' already exists, cannot rename\n" ) abbr $new_name >&2
|
||||
return 2
|
||||
end
|
||||
|
||||
# Because we later store "$key $value", there can't be any spaces in the key
|
||||
if string match -q "* *" -- $new_name
|
||||
printf ( _ "%s: abbreviation cannot have spaces in the key\n" ) abbr >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l idx (__fish_abbr_get_by_key $old_name)
|
||||
or begin
|
||||
printf ( _ "%s: no such abbreviation '%s'\n" ) abbr $old_name >&2
|
||||
return 2
|
||||
end
|
||||
|
||||
set -l value (string split " " -m 1 -- $fish_user_abbreviations[$idx])[2]
|
||||
set fish_user_abbreviations[$idx] "$new_name $value"
|
||||
return 0
|
||||
|
||||
case erase
|
||||
if set -l idx (__fish_abbr_get_by_key $mode_arg)
|
||||
set -e fish_user_abbreviations[$idx]
|
||||
return 0
|
||||
else
|
||||
printf ( _ "%s: no such abbreviation '%s'\n" ) abbr $mode_arg >&2
|
||||
return 2
|
||||
end
|
||||
|
||||
case show
|
||||
for i in $fish_user_abbreviations
|
||||
set -l opt_double_dash
|
||||
set -l kv (string split " " -m 1 -- $i)
|
||||
set -l key $kv[1]
|
||||
set -l value $kv[2]
|
||||
|
||||
# Check to see if either key or value has a leading dash
|
||||
# If so, we need to write --
|
||||
string match -q -- '-*' $key $value
|
||||
and set opt_double_dash --
|
||||
echo abbr $opt_double_dash (string escape -- $key $value)
|
||||
end
|
||||
return 0
|
||||
|
||||
case list
|
||||
for i in $fish_user_abbreviations
|
||||
set -l key (string split " " -m 1 -- $i)[1]
|
||||
printf "%s\n" $key
|
||||
end
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_abbr_get_by_key
|
||||
if not set -q argv[1]
|
||||
echo "__fish_abbr_get_by_key: expected one argument, got none" >&2
|
||||
return 2
|
||||
end
|
||||
|
||||
set -q fish_user_abbreviations
|
||||
or return 1
|
||||
|
||||
# Going through all entries is still quicker than calling `seq`
|
||||
set -l keys
|
||||
for kv in $fish_user_abbreviations
|
||||
# If this does not match, we have screwed up before and the error should be reported
|
||||
set keys $keys (string split " " -m 1 -- $kv)[1]
|
||||
end
|
||||
if set -l idx (contains -i -- $argv[1] $keys)
|
||||
echo $idx
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
end
|
||||
@@ -4,18 +4,16 @@
|
||||
# This function is called by the __fish_on_interactive function, which is defined in config.fish.
|
||||
#
|
||||
function __fish_config_interactive -d "Initializations that should be performed when entering interactive mode"
|
||||
if test $__fish_initialized -lt 3000
|
||||
# Perform transitions relevant to going from fish 2.x to 3.x.
|
||||
|
||||
# Migrate old universal abbreviations to the new scheme.
|
||||
__fish_abbr_old | source
|
||||
end
|
||||
|
||||
# Make sure this function is only run once.
|
||||
if set -q __fish_config_interactive_done
|
||||
return
|
||||
end
|
||||
|
||||
# For one-off upgrades of the fish version
|
||||
if not set -q __fish_initialized
|
||||
set -U __fish_initialized 0
|
||||
end
|
||||
|
||||
set -g __fish_config_interactive_done
|
||||
set -g __fish_active_key_bindings
|
||||
|
||||
@@ -255,10 +253,11 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||
end
|
||||
|
||||
# Notify terminals when $PWD changes (issue #906).
|
||||
# VTE based terminals, Terminal.app, iTerm.app (TODO), and foot support this.
|
||||
# VTE based terminals, Terminal.app, iTerm.app (TODO), foot, and kitty support this.
|
||||
if not set -q FISH_UNIT_TESTS_RUNNING
|
||||
and begin
|
||||
string match -q -- 'foot*' $TERM
|
||||
or string match -q -- 'xterm-kitty*' $TERM
|
||||
or test 0"$VTE_VERSION" -ge 3405
|
||||
or test "$TERM_PROGRAM" = Apple_Terminal && test (string match -r '\d+' 0"$TERM_PROGRAM_VERSION") -ge 309
|
||||
or test "$TERM_PROGRAM" = WezTerm
|
||||
|
||||
@@ -15,12 +15,7 @@ function __fish_list_current_token -d "List contents of token under the cursor i
|
||||
end
|
||||
end
|
||||
|
||||
set -l line_count (count (fish_prompt))
|
||||
if test $line_count -gt 1
|
||||
for x in (seq 2 $line_count)
|
||||
printf "\n"
|
||||
end
|
||||
end
|
||||
string repeat \n --count=(math (count (fish_prompt)) - 1)
|
||||
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user