Compare commits

..

142 Commits

Author SHA1 Message Date
Fabian Boehm
acde38fed3 webconfig: Set a variable before
This fixes things if a theme is entirely empty.

Fixes #9590
2023-02-19 14:57:32 +01:00
bagohart
3dd8db281b Add tab completion for stow (#9571) 2023-02-18 18:37:45 +01:00
Delapouite
a29d760ca0 completions/systemctl: add import-environment command
Man page reference:
https://man.archlinux.org/man/systemctl.1#Environment_Commands
2023-02-18 18:36:30 +01:00
Xiretza
ba0bfb9df7 functions: list caller-exit handlers correctly
`functions --handlers-type caller-exit` did not list any functions, while
`functions --handlers-type process-exit` listed both process-exit and
caller-exit handlers:

$ echo (function foo --on-job-exit caller; end; functions --handlers-type caller-exit | grep foo)

$ echo (function foo --on-job-exit caller; end; functions --handlers-type process-exit | grep foo)
caller-exit foo
2023-02-18 18:35:40 +01:00
Fabian Boehm
4a1a59c5a8 tests/git: Also give the email to stash
WHYYYYYYYY

(anyway this seems to affect old git versions since we only seem to
hit it on old Ubuntu)
2023-02-15 20:11:46 +01:00
Fabian Boehm
d32449fe2e tests/git: Don't silence error, give email
(otherwise git complains about "AUTHOR UNKNOWN HELP HELP HELP I CANNAE
DO ANYTHIN'")

(i also don't know why git is scottish in my imagination)
2023-02-15 19:50:45 +01:00
Sam Bull
ef3516ecdf Test displaying only stash count (#9573) 2023-02-15 19:32:50 +01:00
Fabian Boehm
5aaa1e69bc fish_git_prompt: Allow counting stash without full informative
Fixes #9572
2023-02-15 19:28:18 +01:00
NextAlone
dcc8147147 docs: add apkanalyzer to changelog
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
2023-02-15 19:00:47 +01:00
NextAlone
176097cc49 completions/apkanalyzer: add completion for apkanalyzer
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
2023-02-15 19:00:47 +01:00
rymrg
43b1be0579 Improve fossil prompt execution time (#9528)
* Improve prompt execution time

* Change status to changes

* Remove grep/awk/sort

* Remove calls to grep/awk/sort
* Don't overwrite user defined colors

* Make look more consistent with git
2023-02-15 18:52:05 +01:00
Fabian Boehm
9c8b50cb8f docs: Make some code lines shorter
For code, we need to limit the length because it can't be reflowed automatically
2023-02-15 18:50:28 +01:00
Fabian Boehm
811dbf0f9a docs: More on dereferencing variables
Also that unclosed quote was driving me up the wall
2023-02-15 18:29:14 +01:00
Fabian Boehm
cbc66fe6ea completions: More shortened descriptions 2023-02-14 21:16:22 +01:00
Fabian Boehm
d9a9fb50d0 completions/cargo: Descriptions 2023-02-14 21:04:05 +01:00
Fabian Boehm
902782b1f4 completions/rsync: Remove one thing that isn't an option 2023-02-14 20:47:52 +01:00
Fabian Boehm
38b21fc1c7 completions/gcc: Shorten descriptions
Many of these are just entirely useless and I'm thinking of removing a
bunch of options.
2023-02-14 20:47:52 +01:00
mhmdanas
a67b089c89 completions/xbps-query: complete package name after -X 2023-02-14 20:32:33 +01:00
Fabian Boehm
4a8ebc0744 __fish_complete_path: Also use an empty command
This removes a weird `ls` call (that just decorates directories), and
makes it behave like normal path completion.

(really, this should be a proper option to complete)

Fixes #9285
2023-02-14 17:09:58 +01:00
Fabian Boehm
200095998a __fish_complete_directories: Use an empty command as the dummy
Fixes #9574
2023-02-14 17:09:58 +01:00
Jay
ce268b74dd completions/trash-cli: add completions for trash-cli (#9560)
Add completions for trash-cli commands:
trash, trash-empty, trash-list, trash-put and trash-restore.

``trash --help`` are used to identify the executable in trash cli completion.
2023-02-13 12:10:55 -06:00
esdmr
a607421912 functions --copy: store file and lineno (#9542)
Keeps the location of original function definition, and also stores
where it was copied. `functions` and `type` show both locations,
instead of none. It also retains the line numbers in the stack trace.
2023-02-13 09:59:28 -06:00
matt wartell
904839dcce fix 3 instances of old command substitution $() 2023-02-12 16:49:40 +01:00
Dmitry Gerasimov
c3a72111e9 completions/meson: rewrite meson completions (#9539)
Rewrite completions for meson to expose meson commands with their
options and subcommands. New completions are based on the meson 1.0.

Subcommands were introduced in meson 0.42.0 (August 2017), so new
completions will only work for versions after 0.42.0. At this moment,
even oldstable Debian (buster) has meson 0.49.2 -- which means it is
unlikely someone will be affected.

---------

Co-authored-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
2023-02-11 17:58:45 -06:00
ridiculousfish
b7de768c73 Allow custom completions to have leading dots
By default, fish does not complete files that have leading dots, unless the
wildcard itself has a leading dot. However this also affected completions;
for example `git add` would not offer `.gitlab-ci.yml` because it has a
leading dot.

Relax this for custom completions. Default file expansion still
suppresses leading dots, but now custom completions can create
leading-dot completions and they will be offered.

Fixes #3707.
2023-02-11 11:27:14 -08:00
Fabian Boehm
b1b2294390 Add workaround for Midnight Commander's issue with prompt extraction
When we draw the prompt, we move the cursor to the actual
position *we* think it is by issuing a carriage return (via
`move(0,0)`), and then going forward until we hit the spot.

This helps when the terminal and fish disagree on the width of the
prompt, because we are now definitely in the correct place, so we can
only overwrite a bit of the prompt (if it renders longer than we
expected) or leave space after the prompt. Both of these are benign in
comparison to staircase effects we would otherwise get.

Unfortunately, midnight commander ("mc") tries to extract the last
line of the prompt, and does so in a way that is overly naive - it
resets everything to 0 when it sees a `\r`, and doesn't account for
cursor movement. In effect it's playing a terminal, but not committing
to the bit.

Since this has been an open request in mc for quite a while, we hack
around it, by checking the $MC_SID environment variable.

If we see it, we skip the clearing. We end up most likely doing
relative movement from where we think we are, and in most cases it
should be *fine*.
2023-02-11 14:18:10 +01:00
Fabian Boehm
7ac2fe2bd3 share/config: Erase on_interactive before doing __fish_config_interactive
This removes a possibility of an infinite loop where something in
__fish_config_interactive triggers a fish_prompt or fish_read event,
which calls __fish_on_interactive which calls
__fish_config_interactive again, ...

Fixes #9564
2023-02-11 14:15:44 +01:00
Fabian Boehm
24fb7ff67c completion/scons: Shorten descriptions 2023-02-10 21:10:05 +01:00
Fabian Boehm
4adb34d349 completions/dpkg-reconfigure: Don't run awkward things on source time
This wanted to get the default priority, and it ran a thing *at source
time*.

This can lead to a variety of errors and I don't believe it's all that
useful, so we remove it.
2023-02-10 20:58:58 +01:00
Fabian Boehm
85504ca694 completions/zfs: Check for zpool
This is an additional tool, and this function is executed on source
time so we'd spew errors.

(also remove an ineffective line - it's probably *nicer* with the
read, but that's not what's currently effectively doing anything)
2023-02-10 20:55:37 +01:00
Fabian Boehm
7d7b72f995 Use path basename instead of basename
This is faster and guaranteed to be available
2023-02-10 20:51:22 +01:00
Fabian Boehm
7b8684e469 completions/netcat: Use path 2023-02-10 20:50:14 +01:00
Fabian Boehm
cac483c67a completions: Quote some tests 2023-02-10 20:47:49 +01:00
Fabian Boehm
6fe4b0c24d completions/kb: Fix 2023-02-10 20:46:34 +01:00
NextAlone
c587b2ffcc completions/fastboot: fix flash completion
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
2023-02-09 20:44:12 -08:00
bagohart
ef07e21d40 Add separate completions for neovim (#9543)
Separate the neovim completions from the vim ones, as their supported
options have diverged considerably.

Some documented options are not yet implemented, these are added but
commented out.

Closes #9535.

---------

Co-authored-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
2023-02-08 12:47:08 -06:00
Fabian Boehm
8ff78eddf0 man: Reroute ".",":","[" to the proper names
Fixes #9552
2023-02-07 19:23:26 +01:00
Fabian Boehm
e90f003d2d Silence ENODEV errors for fstatat
Some broken gdrive filesystem can return these.

Fixes #9550
2023-02-06 21:49:07 +01:00
Fabian Boehm
f6b390dc61 completions/git: Remove a for-loop
This is an easy win for `git add ` completion time if we have multiple descriptions.

What happened was we did things once per description string, but the
things included a bunch of computation (including multiple `string`
calls and even a `realpath`!). Because these don't change, we can
simply do them once.

And it turns out we can just use a cartesian product:

for d in $desc
    printf '%s\t%s\n' $file $d
end

becomes

printf '%s\n' $file\t$desc
2023-02-06 21:49:07 +01:00
Mahmoud Al-Qudsi
96deaae7d8 completions/apt: Read from the dpkg cache directly
I have no idea why `apt-cache --no-generate show` is so slow since it basically
dumps the contents of the cache file located at `/var/lib/dpkg/status`. We are
technically bypassing any waits on the cache lock file so this may produce
incorrect results if the cache is being regenerated in the moment, but that's a
small price to pay and the results are likely confined to simply not generating
comprehensive results.

With this change, we no longer need to truncate results to the first n matches
and we no longer only print packages beginning with the commandline argument
enabling fish's partial completions logic to offer less-perfect suggestions when
no better options are available.

Even though we are generating more usable completions, we still trounce the old
performance by leaps and bounds:

```
Benchmark #1: fish -c "complete -C\"apt install ac\""
  Time (mean ± σ):      2.165 s ±  0.033 s    [User: 267.0 ms, System: 1932.2 ms]
  Range (min … max):    2.136 s …  2.256 s    10 runs

Benchmark #2: build/fish -c "complete -C\"apt install ac\""
  Time (mean ± σ):     111.1 ms ±   1.8 ms    [User: 38.9 ms, System: 72.9 ms]
  Range (min … max):   108.2 ms … 114.9 ms    26 runs

Summary
  'build/fish -c "complete -C\"apt install ac\""' ran
   19.49 ± 0.44 times faster than 'fish -c "complete -C\"apt install ac\""'
```
2023-02-05 16:30:34 -06:00
Mahmoud Al-Qudsi
6f3711902b completions/apt: Use is_first_token instead of seen_subcommand_from
I think this should be preferred for all subcommand completions because it
handles typos or subcommands we don't recognize better (`apt foo <TAB>` no
longer suggests subcommands since the subcommand position has been taken).
2023-02-05 16:15:15 -06:00
NextAlone
3604e8854b completion/adb: remove wait-for-device from subcommand detect
wait-for-device should not be used in subcommand detect, cause it is used as seperate command, following with others.
2023-02-05 12:13:45 +01:00
Branch Vincent
d69a290c2f completions: add pre-commit 2023-02-05 12:12:47 +01:00
Wout De Puysseleir
43a7c20ddb completions/mix: Add mix phx
- Added phx completions. These are very common completions for the Elixir Phoenix Framework.
  Documentation can be found here: https://hexdocs.pm/phoenix/1.7.0-rc.2/Mix.Tasks.Local.Phx.html#content
- Added argument completions
- Made all descriptions start with an uppercase for better consistency
- Update CHANGELOG.rst
2023-02-05 12:10:31 +01:00
Mahmoud Al-Qudsi
538518cdf3 CI: Use the cmake-core package on FreeBSD
The `cmake` meta package pulls in `cmake-core`, `cmake-docs`, and `cmake-man` -
we don't need the latter two.

(It seems to be available on all the versions/architectures we target.)
2023-02-02 20:41:57 -06:00
Mahmoud Al-Qudsi
608f2bab31 CI: Use git-lite instead of git under FreeBSD
The git-lite flavor, being significantly smaller and downloading/installing much
faster with fewer dependencies, is much better suited for CI environments (at
the cost of not supporting interactive git commands).
2023-02-02 20:41:57 -06:00
Mahmoud Al-Qudsi
440dcb48c5 CI: Upgrade FreeBSD 13 to 13.1
By default /etc/pkg/FreeBSD.conf uses either the /quarterly or /latest pkg
builds, which are built against the latest minor release of FreeBSD for the
given ${ABI} string at the time they were last updated.

The nature of the shared binary packages means everyone (across all minor
versions of the same major version on the same architecture, all of which share
the same stable ABI) gets the same binary build.

There are however packages which depend on symbols exported by system-provided
libraries (rather than by other packages, which are always going to be in sync)
that *aren't* stable across minor releases, leaving packages like llvm
broken if you install the latest llvm from pkg's binary repos built against,
say, FreeBSD 13.1 while running FreeBSD 13.0.

The other option is to use the "snapshots" of the binary packages available upon
the release of each minor version, by using /release_0, /release_1, etc instead
of /quarterly or /latest, but then you're limited to the ports that were
available at that specific date and those old versions.

tl;dr just make sure we're always using the latest minor release for each major
version of FreeBSD we intend to support.
2023-02-02 20:41:57 -06:00
David Adam
fb3056d7a1 fish.spec: drop long-obsolete BuildRoot directive
Ignored since RPM 4.6.0, released in 2009!
2023-02-01 22:26:30 +08:00
LingMan
0af2a7a9b7 Upgrade GitHub action dessant/lock-threads to v4
In v3 several input parameters where renamed and since v4 it requires Node.js 16.

This resolves warnings about Node.js 12 and `set-output` being deprecated and
slated for removal in the `Lock threads` workflow.
2023-02-01 10:40:46 +08:00
Mahmoud Al-Qudsi
31f63b2f87 Upgrade GitHub CI actions/checkout to v3
This addresses the node v12 deprecation warning in the GitHub CI, caused by the
dependency on actions/checkout@v2.

While actions/checkout@v3 introduces some new features and changes some
defaults, the subset of features that we use should not be affected by this
migration.

The "breaking change" from v2 to v3 can be seen at [0]. Since we are tracking
only v2 without a dot release specified, we are already opting into any breakage
across minor versions, so really the only change of note is the node version
upgrade.

[0]: https://github.com/actions/checkout/compare/v2.4.2...v3.0.0
2023-01-31 11:50:57 -06:00
nat-418
cf67709931 feat: add support for fossil-scm in prompt (#9500)
* feat: add support for fossil-scm in prompt

* fix: change directory testing and string matching
2023-01-29 16:54:39 +01:00
Fabian Boehm
d239e26f6b docs: Add a missing newline
Sphinx is annoyingly specific here
2023-01-29 14:46:35 +01:00
Fabian Boehm
177ce0d40e __fish_make_completion_signals: Check for "kill" 2023-01-29 14:44:59 +01:00
Fabian Boehm
dd7d432cd6 Only define kill wrapper if we have a kill to wrap 2023-01-29 14:44:45 +01:00
David Adam
2a24295e50 debian packaging: add dependency on procps
See https://bugs.debian.org/1029940
2023-01-29 21:21:47 +08:00
Johannes Altmanninger
243ade838b completions/git: also complete filepaths as second argument to git grep
Fixes a regression in f81e8c7de (completions/git: complete refs for "git
grep", 2022-12-08).

Fixes #9513
2023-01-28 21:25:42 +01:00
Fabian Boehm
7f2cb47437 fish_key_reader: Don't translate things to "\v" and friends
This translated ctrl-k to "\v", which is a "vertical tab", and ctrl-l
to "\f" and ctrl-g to "\a".

There is no "vertical tab" or "alarm" or "\f" *key*, so these
shouldn't be translated. Just drop these and call them `\ck` and such.

(vertical tab specifically is utterly useless and I would be okay with
dropping it entirely, I have never seen it used anywhere)
2023-01-27 17:07:18 +01:00
Johannes Altmanninger
befa240756 completions/git: use builtin path for finding subcommands
This is more elegant and efficient. No functional change.

As suggested by 2da1a4ae7 (completions/git: Fix git-foo commands, 2023-01-09).
2023-01-24 20:37:38 +01:00
Johannes Altmanninger
f033b4df7d completions/git: fix typo 2023-01-24 20:37:38 +01:00
Johannes Altmanninger
7c1c3f9f77 completions/git: do not use user input as format string
Suggested by f5711ad5e (git.fish: collapse repeat complete cmds, set -f,
rm unneeded funcs, 2022-10-27).
2023-01-24 20:37:38 +01:00
Johannes Altmanninger
72e9d02650 Revert "git.fish: collapse repeat complete cmds, set -f, rm unneeded funcs"
That commit did way too many things, making it hard to see the 5 regressions
it introduced. Let's revert it and its stragglers. In future, we could redo
some of the changes.

Reverts changes to share/completions/git.fish from

- 3548aae55 (completions/git: Don't leak submodule subcommands, 2023-01-23)
- 905f788b3 (completions/git: Remove awkward newline symbol, 2023-01-10)
- 2da1a4ae7 (completions/git: Fix git-foo commands, 2023-01-09)
- e9bf8b9a4 (Run fish_indent on share/completions/*.fish, 2022-12-08)
- d31847b1d (Fix apparent dyslexia, 2022-11-12)
- 054d0ac0e (git completions: undo mistaken `set -f` usage, 2022-10-28)
- f5711ad5e (git.fish: collapse repeat complete cmds, set -f, rm unneeded funcs, 2022-10-27)
2023-01-24 20:37:38 +01:00
Johannes Altmanninger
04cae2c559 completions/kak: show -debug arguments
Technically this is a |-separated list, we might need to teach __fish_append
to tokenize.
2023-01-24 20:37:38 +01:00
Johannes Altmanninger
29a3344226 Make bracketed paste add only one undo entry
Bracketed paste adds one undo entry unless the pasted text contains a '
or \.  This is because the "paste" bind-mode has bindings for those keys,
so they effectively start a new undo entry.

Let's fix this by adding an explicit undo group (our first use of this
feature!).
2023-01-24 20:32:13 +01:00
Fabian Boehm
21f1eebd01 completions/git: Some rewordings
These are the longest subcommand descriptions, so it gives us more space
2023-01-23 21:18:03 +01:00
Fabian Boehm
3548aae552 completions/git: Don't leak submodule subcommands
Introduced in f5711ad5ed through an unclean edit.
2023-01-23 21:17:53 +01:00
Fabian Boehm
bd871c5372 Fix last PCRE2_UCHAR32
See #9502
2023-01-23 20:03:29 +01:00
Johannes Altmanninger
d055726ed7 CHANGELOG: fuzzy matching in history-pager 2023-01-22 16:14:14 +01:00
Johannes Altmanninger
610d19cec1 CHANGELOG: don't mention the overly-specific terraform fix 2023-01-22 16:14:00 +01:00
Eddie Lebow
00692bcdfe Include subsequence matches in history-pager
If a `contains` search yields no results, try again with `contains_subsequence`.
2023-01-22 16:11:46 +01:00
Fabian Boehm
9043008933 abbr: Clarify universal variable message
And give explicit upgrade instructions.
2023-01-21 16:53:59 +01:00
Fabian Boehm
01d681067c Bind ctrl-g to cancel as well
Classic emacs thing and the chord is so far unused.

Fixes #9484
2023-01-21 13:35:22 +01:00
Fabian Boehm
52d2087dd3 re: Use the variable-width pcre2 type
This was what we always did in string. It makes it match the
annoyingly variable width of wchar_t.

Fixes #9502
2023-01-21 10:49:44 +01:00
Mahmoud Al-Qudsi
9b4c4ee7b6 Don't use sort for fail2ban-client completions
As pointed out by faho, the completions will be deduplicated by the completion
mechanics. We don't use this list directly except to pass it up the chain to the
shell, so there's no benefit to shelling out to eagerly deduplicate the list.

Plus, as of 3.6.0, even manual `complete -C"..."` invocations now deduplicate
results the same as if completions were triggered.
2023-01-19 17:51:22 -06:00
Mahmoud Al-Qudsi
031a6a09a4 Add completions for fail2ban-client
`fail2ban-client` uses nested subcommand syntax and intermixes fixed/enumerable
values with dynamically detected ones. If you know exactly what your overall
command structure looks like, these completions will work great. Unfortunately
their discoverability is a bit lacking, but that's not really fish's fault.

e.g.

* `f2b-c get/set` take certain known values but also accepts a dynamic jail name
* `f2b-c get/set <jail>` take certain fixed options but...
* `f2b-c get/set <jail> action` require enumerating an entirely different set
  of values to generate the list of completions, bringing us to...
* `f2b-c get <jail> action <action>` has a fixed number of options but
* `f2b-c set <jail> action <action> <property>` can be any valid command and its
  arguments

The intermixing of fixed, enumerable, and free-form inputs in a single command
line is enough to make one's head spin!
2023-01-19 12:53:40 -06:00
Kevin F. Konrad
9ee82b143a fix missing required parameter in terraform completions 2023-01-19 17:14:04 +01:00
Fabian Boehm
f9f29f0737 completions/portage: Fix errors with unreadable files
This could occur if a non-readable location was mentioned in one of
the portage config files.

Fixes #9495
2023-01-19 17:13:13 +01:00
mattmc3
cd17c1281d Add argparse validation examples (#9483)
* Add argparse validation examples

* Remove invalid example
2023-01-19 11:06:51 +01:00
Eddie Lebow
1564c3e181 Minor formatting in Job Control documentation 2023-01-18 22:20:16 +01:00
NaLan ZeYu
093c580b5c Add completion for proxychains 2023-01-18 18:27:07 +01:00
Fabian Boehm
fd8291a96f __fish_print_help: Respect $MANPAGER
Fixes #9488
2023-01-18 17:05:39 +01:00
Fabian Boehm
48db9e6a3f tests/signals.py: Increase a sleep 2023-01-18 16:48:49 +01:00
Fabian Boehm
83d95cea35 docs: Reword quotes
Also explain that `$(foo)` is also done in double-quotes.
2023-01-18 16:39:37 +01:00
Fabian Boehm
772a367365 prompts/disco: Use $fish_color_status for the status
That's what it's for.
2023-01-17 21:31:47 +01:00
Fabian Boehm
69b28fc490 themes/coolbeans: Set fish_color_status to something less obtrusive
Similar to when we changed the color to the default mode-prompt.

I didn't notice that because my prompt uses $fish_color_error here, so
I reused the same color.
2023-01-17 21:30:47 +01:00
Fabian Boehm
d952ca1d1e docs: Rename "index range expansion" to "slices"
It's a simpler term.
2023-01-17 17:08:10 +01:00
Fabian Boehm
dda0c8178d docs: Remove "Variable scope for functions" chapter
This didn't need to be separately.

Also rename "More on universal variables" because it's the chapter on
universal variables.
2023-01-17 17:04:56 +01:00
Johannes Altmanninger
e84f588d11 reader: make Escape during history search restore commandline again
Commit 3b30d92b6 (Commit transient edit when closing pager, 2022-08-31)
inadvertently introduced two regressions to history search:

1. It made Escape keeps the selected history entry,
   instead of restoring the commandline before history search.
2. It made history search commands add undo entries.

Fix both of this issues.
2023-01-17 09:31:04 +01:00
Fabian Boehm
00d7b817aa CHAAAAAAAAANNNNGEEEELOOOOOOOGGG 2023-01-16 21:11:45 +01:00
Fabian Boehm
72a7111260 docs: Revise command substitution section 2023-01-16 18:36:59 +01:00
Fabian Boehm
21026421a0 CONTRIBUTING: More on completions 2023-01-16 18:24:42 +01:00
Austin Ziegler
bb6160bae4 Fix open completion for macOS
macOS 11+ (possibly 12+) has an additional place where certain
applications will be installed, `/System/Applications`. This is a sealed
system volume and includes the following applications:

- `App Store.app`
- `Automator.app`
- `Books.app`
- `Calculator.app`
- `Calendar.app`
- `Chess.app`
- `Clock.app`
- `Contacts.app`
- `Dictionary.app`
- `FaceTime.app`
- `FindMy.app`
- `Font Book.app`
- `Freeform.app`
- `Home.app`
- `Image Capture.app`
- `Launchpad.app`
- `Mail.app`
- `Maps.app`
- `Messages.app`
- `Mission Control.app`
- `Music.app`
- `News.app`
- `Notes.app`
- `Photo Booth.app`
- `Photos.app`
- `Podcasts.app`
- `Preview.app`
- `QuickTime Player.app`
- `Reminders.app`
- `Shortcuts.app`
- `Siri.app`
- `Stickies.app`
- `Stocks.app`
- `System Settings.app`
- `TextEdit.app`
- `Time Machine.app`
- `TV.app`
- `Utilities`
- `VoiceMemos.app`
- `Weather.app`

The change here adds `/System/Applications` to the search locations for
`-a` and `-b` options on the macOS completions for `open`. There are
possibly other locations that may be considered (I’m not using `mdls` or
`mdfind` in my functions for "reasons"), but this is partially based on
https://github.com/halostatue/fish-macos/blob/main/functions/__macos_app_find.fish
2023-01-16 18:07:49 +01:00
Fabian Boehm
97bef63af6 docs: Add more on conditionals 2023-01-16 17:53:08 +01:00
Fabian Boehm
78cc872904 Remove dangling footnote reference 2023-01-16 17:42:00 +01:00
Fabian Boehm
dc51a12b4f docs: Mention env
Fixes #9482
2023-01-16 17:09:33 +01:00
Fabian Boehm
6df09b3753 completions: Offer ../ and ./ again (#9477)
Inadvertently broken in a2d816710f,
this made `cd .` no longer offer `cd ../` (same for general file completions
like `ls .`, which only offers dotfiles)
2023-01-16 10:05:01 +01:00
Mahmoud Al-Qudsi
256713b670 Add missing completion for status current-commandline
`status current-commandline` shipped in fish 3.6.0 but we missed adding this
completion.
2023-01-15 18:04:52 -06:00
Fabian Boehm
077118d983 abbr: Fix crash when no name has been given
This crashed for

```fish
abbr --add --regex '{\d+..\d+}' --function foo
```

i.e. a regex and a function but no name - that's 0 additional
arguments.
2023-01-15 10:50:09 +01:00
Fabian Boehm
f6f10353be Ye olde CHANGELOGE 2023-01-14 22:38:21 +01:00
Fabian Boehm
da0c640750 abbr: Warn when -U is given
This prints a warning to stderr and then still does the thing.

Because of the error trailer, it points to the abbr help page.
2023-01-14 22:27:28 +01:00
Fabian Boehm
5c56fa0e6f Remove str2wcs special case for MB_CUR_MAX
This meant we didn't actually do our weird en/decoding scheme for e.g.
a C locale, which meant that, when you then switch to a proper locale
the previous variables were broken.

I don't know how to test this automatically - none of my attempts seem
to ever *fail* with the old code, here's what you'd do manually:

- Run fish with an actual C locale (LC_ALL=C
fish_allow_singlebyte_locale=1 fish)
- `set -gx foo 💩`
- `set -e LC_ALL`
- `echo $foo` outputs "💩" if it works and "ð⏎" if it's broken.

Fixes #2613
2023-01-14 22:27:16 +01:00
ridiculousfish
7fa13e4451 Remove enum_iter_t
This was unused.
2023-01-14 12:58:20 -08:00
Fabian Boehm
8203fdf631 docs/abbr: Just explain right out that uvars don't work anymore 2023-01-14 14:19:46 +01:00
Fabian Boehm
a322e3f180 docs: Fix typo 2023-01-13 22:53:02 +01:00
Fabian Boehm
b9adb8466f CHANGELOG 2023-01-13 18:05:00 +01:00
Fabian Boehm
9ef7fe1a15 Make one error translatable
This is now the same as in `read`
2023-01-13 17:57:04 +01:00
Fabian Boehm
dad8c527e0 read: Error on read-only variables
Fixes #9346
2023-01-13 17:56:28 +01:00
Fabian Boehm
1b1cf73b60 abbr: Stop escaping the name for abbr --list
This is so we can pass it to `abbr --erase`.

Fixes #9470
2023-01-13 16:38:34 +01:00
Fabian Boehm
572a568268 abbr: Erase the old universal variable with abbr --erase
This means cleaning out old universal variables is now just:

```fish
abbr --erase (abbr --list)
```

which makes upgrading much easier.

Note that this erases the currently defined variable and/or any
universal. It doesn't stop at the former because that makes it *easy*
to remove the universals (no running `abbr --erase` twice), and it
doesn't care about globals because, well, they would be gone on
restart anyway.

Fixes #9468.
2023-01-13 16:09:53 +01:00
shenleban tongying
27952db9f7 docs: clearify global vs universal variable 2023-01-13 15:58:37 +01:00
Fabian Boehm
4ceb497bfb webconfig: Remove the abbreviations tab
Since the new expanded abbreviations in 3.6.0, abbr no longer accepts
new universal variables. That means this tab is now
non-functional (except that it could technically remove abbrs that
were set in universal variables).

Because making it work with the expanded abbreviations requires some
awkwardness like a dedicated conf.d snippet (or writing into
config.fish!), we simply remove it.
2023-01-11 08:25:45 +01:00
Fabian Boehm
1d29ae7847 docs: Document more vi-mode bindings
These are quite incomplete and need more work.
2023-01-10 20:36:59 +01:00
Fabian Boehm
905f788b3e completions/git: Remove awkward newline symbol
Konsole draws ⏎  with a width of 2, but widechar_width says it's 1.
That leads to awkward display.

It's also a surprising and distracting symbol in this use.

So just use spaces.
2023-01-10 19:27:16 +01:00
Fabian Boehm
1d455be9fa Cleanup 2023-01-09 22:53:34 +01:00
Fabian Boehm
96c9cb369b CHANGELOG 2023-01-09 21:41:53 +01:00
Fabian Boehm
5792e4a12b Make history pager use more entries (#9458)
Like I mentioned in #9089, 12 entries is a bit few.

So, instead, we do like we do for completions before disclosing and
pick half the screen (but at least X, in this case 12).

This avoids filling the entire screen, and will avoid an unsightly "X
more entries" (which requires scrolling down to fully disclose)
because it matches what the pager does.

Note: For multiline commands we can be pushed further upwards, and in
case of a multi-column layout we could fit more lines. That would
require asking the pager to fit as many as possible and give us back
the index of the last matching entry and rewinding the history search.

That's gonna be left as an exercise for later if it turns out to be necessary.
2023-01-09 21:39:55 +01:00
Fabian Boehm
51bce422fd docs: More about envvars 2023-01-09 20:33:37 +01:00
Fabian Boehm
2da1a4ae77 completions/git: Fix git-foo commands
Broken in f5711ad5ed, this neglected to
remove the `git-` part from the command

Fixes #9457.
2023-01-09 18:40:24 +01:00
Fabian Boehm
f7f052ad40 README: Link to fishshell.com instead of the design docs.
First tell people what it is instead
2023-01-09 17:44:27 +01:00
Fabian Boehm
16369a3abb docs/interactive: More on custom bindings 2023-01-08 20:36:10 +01:00
David Adam
abbb75ea66 CHANGELOG: work on 3.7.0 2023-01-08 20:37:44 +08:00
Fabian Boehm
126647380a docs: More on fish_greeting 2023-01-08 12:44:02 +01:00
Fabian Boehm
f1a150ed43 postfork: Also check if interpreter is a directory
"#!/bin/"
2023-01-08 12:44:02 +01:00
Fabian Boehm
ead0b03108 postfork: Also check shebang/interpreter for EACCESS
This happens e.g. with a shebang of "#!/bin/" - we would complain
about EACCESS, even tho accessing *the file to run* worked.
2023-01-08 12:44:02 +01:00
Fabian Boehm
afd242b14d fish_config: Skip backing up prompt
This would print an ugly but benign error
2023-01-08 12:44:02 +01:00
Fabian Boehm
9e1c8a70bf docs/string: Add a -- example to the match section
This keeps tripping people up. We can't mention it *everywhere*, but
lets see if it works just in "match", since that sees to be where
people hit it most.
2023-01-08 12:44:02 +01:00
David Adam
15939be56c Start CHANGELOG for 3.7.0 2023-01-07 23:51:19 +08:00
David Adam
31093ed9ce Merge branch 'Integration_3.6.0' 2023-01-07 22:39:31 +08:00
Fabian Boehm
9e81d7e166 completions/conda: Fix subcommand parsing
This used the naive `__fish_seen_subcommand_from`, which isn't
powerful enough once you allow for `conda create` and `conda env
create`.

Hattip to jvanheugten for the env completions.

Fixes #9452
2023-01-07 11:23:04 +01:00
Fabian Boehm
d2f5daf8e8 bindings: If handler doesn't exist, set immediately
Fixes #9443
2023-01-02 21:44:02 +01:00
ridiculousfish
5e0f9521a5 fish_git_prompt: only do macOS workarounds for /usr/bin/git
On macOS, fish_git_prompt was failing to correctly handle the case where
another git was installed, e.g. /usr/local/bin/git from Homebrew.
Disable the workarounds in that case.
2023-01-02 12:26:56 -08:00
Johannes Altmanninger
92b1394178 completions/iw: add 160MHz WLAN channel 2023-01-02 18:13:47 +01:00
Dmitry Gerasimov
eb4dc101df completions/git: add "git bundle" support 2023-01-02 18:07:03 +01:00
exploide
08728be319 completions iw: added completions for iw dev set type and set channel 2023-01-02 17:53:56 +01:00
Jannik Vieten
2357c9f577 completions wireshark: removed wrong interface completion for -I option (#9440)
Wireshark completions for -I were wrong, since it doesn't take the network interface directly. It must still be specified with -i.
2023-01-02 17:45:25 +01:00
Aaron Gyes
550857ef65 Remove obsolete lynx bug mitigation
a lynx-internal hash of div.contents collided with em>a which caused
built-in styling to render much of entire pages as emphasized links.

Since switching from doxygen, we haven't had a <div class="contents">
so this workaround is no longer needed.
2023-01-01 19:41:41 -08:00
Johannes Altmanninger
a0840637fa fish_git_prompt: silence xcrun error when XCode is not installed
Our macOS workarounds involve running "xcrun" to check if Git is installed.
On a freshly upgraded Ventura system that does not have XCode or
CommandLineTools installed, "xcrun" will print this error:

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

on every prompt. Let's silence this error.
2023-01-01 14:37:40 +01:00
Aaron Gyes
a40b019752 __fish_use_subcommand does not take arguments.
These four completions all have a strange pattern (that doesn't
work.)

    set -l subcommands cmd1 cmd2 cmd3 ...

    complete -n "__fish_use_subcommand $subcommands" -c foo -a cmd1
    complete -n "__fish_use_subcommand $subcommands" -c foo -a cmd2
    complete -n "__fish_use_subcommand $subcommands" -c foo -a cmd3

Remove the redundant lists of subcommands and the unused argument
passed to __fish_use_subcommand for bosh, cf, mariner, and port.
2023-01-01 04:57:53 -08:00
Aaron Gyes
6ce0b93851 tinyexpr.h: rename __TINYEXPR_H__ include guard
Identifiers that start with _ or include two consecutive underscores
are reserved for the implementation
2023-01-01 03:20:01 -08:00
Aaron Gyes
fc7989cecd otool: Add completion 2022-12-31 14:49:17 -08:00
ridiculousfish
30c708e8a5 builtin_print_help to take its error argument by reference
This fixes a confusing use of pointers.
2022-12-31 10:13:03 -08:00
ridiculousfish
5c216e3d8c Remove unused 'end' variable from SHLVL calculation 2022-12-30 13:38:47 -08:00
ridiculousfish
7ff0e7d0f7 Remove bogus job_chain_is_fully_constructed declaration
This member function no longer exists.
2022-12-30 13:35:33 -08:00
150 changed files with 3097 additions and 1550 deletions

View File

@@ -83,12 +83,12 @@ freebsd_task:
image_family: freebsd-14-0-snap
- name: FreeBSD 13
freebsd_instance:
image: freebsd-13-0-release-amd64
image: freebsd-13-1-release-amd64
- name: FreeBSD 12.3
freebsd_instance:
image: freebsd-12-3-release-amd64
tests_script:
- pkg install -y cmake devel/pcre2 devel/ninja misc/py-pexpect git
- pkg install -y cmake-core devel/pcre2 devel/ninja misc/py-pexpect git-lite
# BSDs have the following behavior: root may open or access files even if
# the mode bits would otherwise disallow it. For example root may open()
# a file with write privileges even if the file has mode 400. This breaks

View File

@@ -17,9 +17,9 @@ jobs:
pull-requests: write # for dessant/lock-threads to lock PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@v4
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '365'
pr-lock-inactive-days: '365'
issue-exclude-labels: 'question, needs more info'
issue-inactive-days: '365'
pr-inactive-days: '365'
exclude-any-issue-labels: 'question, needs more info'

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
@@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt update
@@ -66,7 +66,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
@@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
@@ -126,7 +126,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo pip3 install pexpect

View File

@@ -1,3 +1,71 @@
fish 3.7.0 (released ???)
===================================
.. ignore: 9439 9440 9442 9452 9469 9480 9482
Notable improvements and fixes
------------------------------
- ``abbr --erase`` now also erases the universal variables used by the old abbr function. That means::
abbr --erase (abbr --list)
can now be used to clean out all old abbreviations (:issue:`9468`).
- ``abbr --add --universal`` now warns about --universal being non-functional, to make it easier to detect old-style ``abbr`` calls (:issue:`9475`).
- ``functions --handlers-type caller-exit`` once again lists functions defined as ``function --on-job-exit caller``, rather than them being listed by ``functions --handlers-type process-exit``.
Deprecations and removed features
---------------------------------
Scripting improvements
----------------------
- ``abbr --list`` no longer escapes the abbr name, which is necessary to be able to pass it to ``abbr --erase`` (:issue:`9470`).
- ``read`` will now print an error if told to set a read-only variable instead of silently doing nothing (:issue:`9346`).
- ``functions`` and ``type`` now show where a function was copied and where it originally was instead of saying ``Defined interactively``.
- Stack trace now shows line numbers for copied functions.
Interactive improvements
------------------------
- Using ``fish_vi_key_bindings`` in combination with fish's ``--no-config`` mode works without locking up the shell (:issue:`9443`).
- The history pager now uses more screen space, usually half the screen (:issue:`9458`).
- The history pager now shows fuzzy (subsequence) matches in the absence of exact substring matches (:issue:`9476`).
- Variables that were set while the locale was C (i.e. ASCII) will now properly be encoded if the locale is switched (:issue:`2613`, :issue:`9473`).
- Escape during history search restores the original commandline again (regressed in 3.6.0).
- Using ``--help`` on builtins now respects the $MANPAGER variable in preference to $PAGER (:issue:`9488`).
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
New or improved bindings
^^^^^^^^^^^^^^^^^^^^^^^^
Improved prompts
^^^^^^^^^^^^^^^^
Completions
^^^^^^^^^^^
- Added completions for:
- ``otool``
- ``mix phx``
- ``neovim``
- ``stow``
- ``trash`` and helper utilities ``trash-empty``, ``trash-list``, ``trash-put``, ``trash-restore``
- ``apkanalyzer``
- git's completion for ``git-foo``-style commands was fixed (:issue:`9457`)
- File completion now offers ``../`` and ``./`` again (:issue:`9477`)
Improved terminal support
^^^^^^^^^^^^^^^^^^^^^^^^^
Other improvements
------------------
For distributors
----------------
- *Placeholder to fix Sphinx warning*
--------------
fish 3.6.0 (released January 7, 2023)
=====================================

View File

@@ -18,6 +18,13 @@ Completion scripts are the most common contribution to fish, and they are very w
In general, we'll take all well-written completion scripts for a command that is publically available.
This means no private tools or personal scripts, and we do reserve the right to reject for other reasons.
Before you try to contribute them to fish, consider if the authors of the tool you are completing want to maintain the script instead.
Often that makes more sense, specifically because they can add new options to the script immediately once they add them,
and don't have to maintain one completion script for multiple versions. If the authors no longer wish to maintain the script,
they can of course always contact the fish maintainers to hand it over, preferably by opening a PR.
This isn't a requirement - if the authors don't want to maintain it, or you simply don't want to contact them,
you can contribute your script to fish.
Completion scripts should
1. Use as few dependencies as possible - try to use fish's builtins like ``string`` instead of ``grep`` and ``awk``,
@@ -27,8 +34,11 @@ Completion scripts should
The shorter the description, the more likely it is that fish can use more columns.
4. Function names should start with ``__fish``, and functions should be kept in the completion file unless they're used elsewhere.
5. Run ``fish_indent`` on your script.
6. Try not to use minor convenience features right after they are available in fish - we do try to keep completion scripts backportable.
If something has a real impact on the correctness or performance, feel free to use it,
but if it is just a shortcut, please leave it.
Put your completion script into share/completions/name-of-command.fish.
Put your completion script into share/completions/name-of-command.fish. If you have multiple commands, you need multiple files.
If you want to add tests, you probably want to add a littlecheck test. See below for details.

View File

@@ -10,8 +10,7 @@ and the rest of the family. fish includes features like syntax
highlighting, autosuggest-as-you-type, and fancy tab completions that
just work, with no configuration required.
For more on fishs design philosophy, see the `design
document <https://fishshell.com/docs/current/design.html>`__.
For downloads, screenshots and more, go to https://fishshell.com/.
Quick Start
-----------

View File

@@ -158,8 +158,6 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/user_doc/html/ # Trailing slash is
DESTINATION ${docdir} OPTIONAL)
install(FILES CHANGELOG.rst DESTINATION ${docdir})
install(FILES share/lynx.lss DESTINATION ${rel_datadir}/fish/)
# These files are built by cmake/gettext.cmake, but using GETTEXT_PROCESS_PO_FILES's
# INSTALL_DESTINATION leads to them being installed as ${lang}.gmo, not fish.mo
# The ${languages} array comes from cmake/gettext.cmake

2
debian/control vendored
View File

@@ -15,7 +15,7 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
Package: fish
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, passwd (>= 4.0.3-10), gettext-base, man-db,
python3 (>=3.5)
procps, python3 (>=3.5)
Conflicts: fish-common
Recommends: xsel (>=1.2.0)
Suggests: xdg-utils

View File

@@ -32,9 +32,23 @@ An abbreviation may match a literal word, or it may match a pattern given by a r
Combining these features, it is possible to create custom syntaxes, where a regular expression recognizes matching tokens, and the expansion function interprets them. See the `Examples`_ section.
Abbreviations may be added to :ref:`config.fish <configuration>`.
.. versionchanged:: 3.6.0
Previous versions of this allowed saving abbreviations in universal variables.
That's no longer possible. Existing variables will still be imported and ``abbr --erase`` will also erase the variables.
We recommend adding abbreviations to :ref:`config.fish <configuration>` by just adding the ``abbr --add`` command.
When you run ``abbr``, you will see output like this
::
> abbr
abbr -a -- foo bar # imported from a universal variable, see `help abbr`
In that case you should take the part before the ``#`` comment and save it in :ref:`config.fish <configuration>`,
then you can run ``abbr --erase`` to remove the universal variable::
> abbr >> ~/.config/fish/config.fish
> abbr --erase (abbr --list)
"add" subcommand
--------------------

View File

@@ -163,6 +163,17 @@ The script should write any error messages to stdout, not stderr. It should retu
Fish ships with a ``_validate_int`` function that accepts a ``--min`` and ``--max`` flag. Let's say your command accepts a ``-m`` or ``--max`` flag and the minimum allowable value is zero and the maximum is 5. You would define the option like this: ``m/max=!_validate_int --min 0 --max 5``. The default if you just call ``_validate_int`` without those flags is to simply check that the value is a valid integer with no limits on the min or max value allowed.
Here are some examples of flag validations::
# validate that a path is a directory
argparse 'p/path=!test -d "$_flag_value"' -- --path $__fish_config_dir
# validate that a function does not exist
argparse 'f/func=!not functions -q "$_flag_value"' -- -f alias
# validate that a string matches a regex
argparse 'c/color=!string match -rq \'^#?[0-9a-fA-F]{6}$\' "$_flag_value"' -- -c 'c0ffee'
# validate with a validator function
argparse 'n/num=!_validate_int --min 0 --max 99' -- --num 42
Example OPTION_SPECs
--------------------

View File

@@ -34,10 +34,10 @@ The following options are available:
Causes the specified functions to be erased. This also means that it is prevented from autoloading in the current session. Use :doc:`funcsave <funcsave>` to remove the saved copy.
**-D** or **--details**
Reports the path name where the specified function is defined or could be autoloaded, ``stdin`` if the function was defined interactively or on the command line or by reading standard input, **-** if the function was created via :doc:`source <source>`, and ``n/a`` if the function isn't available. (Functions created via :doc:`alias <alias>` will return **-**, because ``alias`` uses ``source`` internally.) If the **--verbose** option is also specified then five lines are written:
Reports the path name where the specified function is defined or could be autoloaded, ``stdin`` if the function was defined interactively or on the command line or by reading standard input, **-** if the function was created via :doc:`source <source>`, and ``n/a`` if the function isn't available. (Functions created via :doc:`alias <alias>` will return **-**, because ``alias`` uses ``source`` internally. Copied functions will return where the function was copied.) If the **--verbose** option is also specified then five lines are written:
- the pathname as already described,
- ``autoloaded``, ``not-autoloaded`` or ``n/a``,
- the path name as already described,
- if the function was copied, the path name to where the function was originally defined, otherwise ``autoloaded``, ``not-autoloaded`` or ``n/a``,
- the line number within the file or zero if not applicable,
- ``scope-shadowing`` if the function shadows the vars in the calling function (the normal case if it wasn't defined with **--no-scope-shadowing**), else ``no-scope-shadowing``, or ``n/a`` if the function isn't defined,
- the function description minimally escaped so it is a single line, or ``n/a`` if the function isn't defined or has no description.

View File

@@ -21,7 +21,7 @@ The **-h** or **--help** option displays help about using this command.
If the :envvar:`BROWSER` environment variable is set, it will be used to display the documentation.
Otherwise, fish will search for a suitable browser.
To use a different browser than as described above, one can set the :envvar:`fish_help_browser` variable.
To use a different browser than as described above, you can set ``$fish_help_browser``
This variable may be set as a list, where the first element is the browser command and the rest are browser options.
Example

View File

@@ -51,8 +51,8 @@ The following scope control variable scope:
**-g** or **--global**
Sets a globally-scoped variable.
Global variables don't disappear and are available to all functions running in the same shell.
They can even be modified.
Global variables are available to all functions running in the same shell.
They can be modified or erased.
These options modify how variables operate:

View File

@@ -59,6 +59,12 @@ Match Glob Examples
>_ string match -i 'a??B' Axxb
Axxb
>_ string match -- '-*' -h foo --version bar
# To match things that look like options, we need a `--`
# to tell string its options end there.
-h
--version
>_ echo 'ok?' | string match '*\?'
ok?
@@ -91,6 +97,12 @@ Match Regex Examples
cat4
dog4
>_ string match -r -- '-.*' -h foo --version bar
# To match things that look like options, we need a `--`
# to tell string its options end there.
-h
--version
>_ string match -r '(\d\d?):(\d\d):(\d\d)' 2:34:56
2:34:56
2

View File

@@ -27,7 +27,7 @@ Note that command substitutions in a case statement will be evaluated even if it
Example
-------
If the variable :envvar:`animal` contains the name of an animal, the following code would attempt to classify it:
If the variable ``$animal`` contains the name of an animal, the following code would attempt to classify it:
::

View File

@@ -60,7 +60,8 @@ And here is fish::
> set foo "bar baz"
> printf '"%s"\n' $foo
# foo was set as one element, so it will be passed as one element, so this is one line
# foo was set as one element,
# so it will be passed as one element, so this is one line
"bar baz"
All variables are "arrays" (we use the term "lists"), and expanding a variable expands to all its elements, with each element as its own argument (like bash's ``"${var[@]}"``::

View File

@@ -100,10 +100,19 @@ A script written in :command:`bash` would need a first line like this:
When the shell tells the kernel to execute the file, it will use the interpreter ``/bin/bash``.
For a script written in another language, just replace ``/bin/bash`` with the interpreter for that language (for example: ``/usr/bin/python`` for a python script, or ``/usr/local/bin/fish`` for a fish script).
For a script written in another language, just replace ``/bin/bash`` with the interpreter for that language. For example: ``/usr/bin/python`` for a python script, or ``/usr/local/bin/fish`` for a fish script, if that is where you have them installed.
This line is only needed when scripts are executed without specifying the interpreter. For functions inside fish or when executing a script with ``fish /path/to/script``, a shebang is not required (but it doesn't hurt!).
If you want to share your script with others, you might want to use :command:`env` to allow for the interpreter to be installed in other locations. For example::
#!/usr/bin/env fish
echo Hello from fish $version
This will call ``env``, which then goes through :envvar:`PATH` to find a program called "fish". This makes it work, whether fish is installed in /usr/local/bin/fish or /usr/bin/fish or ~/.local/bin/fish, as long as that directory is in :envvar:`PATH`.
The shebang line is only used when scripts are executed without specifying the interpreter. For functions inside fish or when executing a script with ``fish /path/to/script``, a shebang is not required (but it doesn't hurt!).
When executing files without an interpreter, fish, like other shells, tries your system shell, typically /bin/sh. This is needed because some scripts are shipped without a shebang line.
Configuration
=============

View File

@@ -235,7 +235,21 @@ The output of the former is displayed on the left and the latter's output on the
Configurable greeting
---------------------
When it is started interactively, fish tries to run the :doc:`fish_greeting <cmds/fish_greeting>` function. The default fish_greeting prints a simple greeting. You can change its text by changing the ``$fish_greeting`` variable.
When it is started interactively, fish tries to run the :doc:`fish_greeting <cmds/fish_greeting>` function. The default fish_greeting prints a simple greeting. You can change its text by changing the ``$fish_greeting`` variable, for instance using a :ref:`universal variable <variables-universal>`::
set -U fish_greeting
or you can set it :ref:`globally <variables-scope>` in :ref:`config.fish <configuration>`::
set -g fish_greeting 'Hey, stranger!'
or you can script it by changing the function::
function fish_greeting
random choice "Hello!" "Hi" "G'day" "Howdy"
end
save this in config.fish or :ref:`a function file <syntax-function-autoloading>`. You can also use :doc:`funced <cmds/funced>` and :doc:`funcsave <cmds/funcsave>` to edit it easily.
.. _private-mode:
@@ -349,6 +363,8 @@ To enable emacs mode, use ``fish_default_key_bindings``. This is also the defaul
- :kbd:`Control`\ +\ :kbd:`K` deletes from the cursor to the end of line (moving it to the :ref:`killring`).
- :kbd:`Escape` and :kbd:`Control`\ +\ :kbd:`G` cancel the current operation. Immediately after an unambiguous completion this undoes it.
- :kbd:`Alt`\ +\ :kbd:`C` capitalizes the current word.
- :kbd:`Alt`\ +\ :kbd:`U` makes the current word uppercase.
@@ -435,6 +451,10 @@ Command mode is also known as normal mode.
- :kbd:`Shift`\ +\ :kbd:`A` enters :ref:`insert mode <vi-mode-insert>` at the end of the line.
- :kbd:`o` inserts a new line under the current one and enters :ref:`insert mode <vi-mode-insert>`
- :kbd:`O` (capital-"o") inserts a new line above the current one and enters :ref:`insert mode <vi-mode-insert>`
- :kbd:`0` (zero) moves the cursor to beginning of line (remaining in command mode).
- :kbd:`d`\ +\ :kbd:`d` deletes the current line and moves it to the :ref:`killring`.
@@ -444,6 +464,7 @@ Command mode is also known as normal mode.
- :kbd:`p` pastes text from the :ref:`killring`.
- :kbd:`u` undoes the most recent edit of the command line.
- :kbd:`Control`\ +\ :kbd:`R` redoes the most recent edit.
- :kbd:`[` and :kbd:`]` search the command history for the previous/next token containing the token under the cursor before the search was started. See the :ref:`history <history-search>` section for more information on history searching.
@@ -451,6 +472,10 @@ Command mode is also known as normal mode.
- :kbd:`Backspace` moves the cursor left.
- :kbd:`g` / :kbd:`G` moves the cursor to the beginning/end of the commandline, respectively.
- :kbd:`:q` exits fish.
.. _vi-mode-insert:
Insert mode
@@ -503,7 +528,18 @@ In addition to the standard bindings listed here, you can also define your own w
Put ``bind`` statements into :ref:`config.fish <configuration>` or a function called ``fish_user_key_bindings``.
The key sequence (the ``\cc``) here depends on your setup, in particular the terminal. To find out what the terminal sends use :doc:`fish_key_reader <cmds/fish_key_reader>`::
If you change your mind on a binding and want to go back to fish's default, you can simply erase it again::
bind --erase \cc
Fish remembers its preset bindings and so it will take effect again. This saves you from having to remember what it was before and add it again yourself.
Key sequences
"""""""""""""
The terminal tells fish which keys you pressed by sending some sequences of bytes to describe that key. For some keys, this is easy - pressing :kbd:`a` simply means the terminal sends "a". In others it's more complicated and terminals disagree on which they send.
In these cases, :doc:`fish_key_reader <cmds/fish_key_reader>` can tell you how to write the key sequence for your terminal. Just start it and press the keys you are interested in::
> fish_key_reader # pressing control-c
Press a key:

View File

@@ -69,30 +69,32 @@ Here we define some of the terms used on this page and throughout the rest of th
Quotes
------
Sometimes features like :ref:`parameter expansion <expand>` and :ref:`character escapes <escapes>` get in the way. When that happens, you can use quotes, either single (``'``) or double (``"``). Between single quotes, fish performs no expansions. Between double quotes, fish only performs :ref:`variable expansion <expand-variable>`. No other kind of expansion (including :ref:`brace expansion <expand-brace>` or parameter expansion) is performed, and escape sequences (for example, ``\n``) are ignored. Within quotes, whitespace is not used to separate arguments, allowing quoted arguments to contain spaces.
Sometimes you want to give a command an argument that contains characters special to fish, like spaces or ``$`` or ``*``. To do that, you can use quotes::
rm "my file.txt"
to remove a file called ``my file.txt`` instead of trying to remove two files, ``my`` and ``file.txt``.
Fish understands two kinds of quotes: Single (``'``) and double (``"``), and both work slightly differently.
Between single quotes, fish performs no expansions. Between double quotes, fish only performs :ref:`variable expansion <expand-variable>` and :ref:`command substitution <expand-command-substitution>` in the ``$(command)``. No other kind of expansion (including :ref:`brace expansion <expand-brace>` or parameter expansion) is performed, and escape sequences (for example, ``\n``) are ignored. Within quotes, whitespace is not used to separate arguments, allowing quoted arguments to contain spaces.
The only meaningful escape sequences in single quotes are ``\'``, which escapes a single quote and ``\\``, which escapes the backslash symbol. The only meaningful escapes in double quotes are ``\"``, which escapes a double quote, ``\$``, which escapes a dollar character, ``\`` followed by a newline, which deletes the backslash and the newline, and ``\\``, which escapes the backslash symbol.
Single quotes have no special meaning within double quotes and vice versa.
Example::
rm "cumbersome filename.txt"
removes the file ``cumbersome filename.txt``, while
::
rm cumbersome filename.txt
removes two files, ``cumbersome`` and ``filename.txt``.
Another example::
More examples::
grep 'enabled)$' foo.txt
searches for lines ending in ``enabled)`` in ``foo.txt`` (the ``$`` is special to ``grep``: it matches the end of the line).
::
apt install "postgres-*"
installs all packages with a name starting with "postgres-", instead of looking through the current directory for files named "postgres-something".
.. _escapes:
Escaping Characters
@@ -241,7 +243,7 @@ As a convenience, the pipe ``&|`` redirects both stdout and stderr to the same p
Job control
-----------
When you start a job in fish, fish itself will pause, and give control of the terminal to the program just started. Sometimes, you want to continue using the commandline, and have the job run in the background. To create a background job, append an \& (ampersand) to your command. This will tell fish to run the job in the background. Background jobs are very useful when running programs that have a graphical user interface.
When you start a job in fish, fish itself will pause, and give control of the terminal to the program just started. Sometimes, you want to continue using the commandline, and have the job run in the background. To create a background job, append an ``&`` (ampersand) to your command. This will tell fish to run the job in the background. Background jobs are very useful when running programs that have a graphical user interface.
Example::
@@ -377,32 +379,81 @@ Comments can also appear after a line like so::
Conditions
----------
Fish has some builtins that let you execute commands only if a specific criterion is met: :doc:`if <cmds/if>`, :doc:`switch <cmds/switch>`, :doc:`and <cmds/and>` and :doc:`or <cmds/or>`, and also the familiar :ref:`&&/|| <tut-combiners>` syntax.
Fish has some builtins that let you execute commands only if a specific criterion is met: :doc:`if <cmds/if>`, :doc:`switch <cmds/switch>`, :doc:`and <cmds/and>` and :doc:`or <cmds/or>`, and also the familiar :ref:`&&/|| <syntax-combiners>` syntax.
The :doc:`switch <cmds/switch>` command is used to execute one of possibly many blocks of commands depending on the value of a string. See the documentation for :doc:`switch <cmds/switch>` for more information.
.. _syntax-if:
The other conditionals use the :ref:`exit status <variables-status>` of a command to decide if a command or a block of commands should be executed.
The ``if`` statement
^^^^^^^^^^^^^^^^^^^^
Unlike programming languages you might know, :doc:`if <cmds/if>` doesn't take a *condition*, it takes a *command*. If that command returned a successful :ref:`exit status <variables-status>` (that's 0), the ``if`` branch is taken, otherwise the :doc:`else <cmds/else>` branch.
The :doc:`if <cmds/if>` statement runs a block of commands if the condition was true.
To check a condition, there is the :doc:`test <cmds/test>` command::
Like other shells, but unlike typical programming languages you might know, the condition here is a *command*. Fish runs it, and if it returns a true :ref:`exit status <variables-status>` (that's 0), the if-block is run. For example::
if test 5 -gt 2
echo Yes, five is greater than two
if test -e /etc/os-release
cat /etc/os-release
end
Some examples::
This uses the :doc:`test <cmds/test>` command to see if the file /etc/os-release exists. If it does, it runs ``cat``, which prints it on the screen.
Unlike other shells, the condition command just ends after the first job, there is no ``then`` here. Combiners like ``and`` and ``or`` extend the condition.
``if`` is commonly used with the :doc:`test <cmds/test>` command that can check conditions.::
if test 5 -gt 2
echo "Yes, 5 is greater than 2"
end
``if`` can also take ``else if`` clauses with additional conditions and an :doc:`else <cmds/else>` clause that is executed when everything else was false::
if test "$number" -gt 10
echo Your number was greater than 10
else if test "$number" -gt 5
echo Your number was greater than 5
else if test "$number" -gt 1
echo Your number was greater than 1
else
echo Your number was smaller or equal to 1
end
The :doc:`not <cmds/not>` keyword can be used to invert the status::
# Just see if the file contains the string "fish" anywhere.
# This executes the `grep` command, which searches for a string,
# and if it finds it returns a status of 0.
# The `not` then turns 0 into 1 or anything else into 0.
# The `-q` switch stops it from printing any matches.
if grep -q fish myanimals
echo "You have fish!"
else
if not grep -q fish myanimals
echo "You don't have fish!"
else
echo "You have fish!"
end
The ``switch`` statement
^^^^^^^^^^^^^^^^^^^^^^^^
The :doc:`switch <cmds/switch>` command is used to execute one of possibly many blocks of commands depending on the value of a string. It can take multiple :doc:`case <cmds/case>` blocks that are executed when the string matches. They can take :ref:`wildcards <expand-wildcard>`. For example::
switch (uname)
case Linux
echo Hi Tux!
case Darwin
echo Hi Hexley!
case DragonFly '*BSD'
echo Hi Beastie! # this also works for FreeBSD and NetBSD
case '*'
echo Hi, stranger!
end
Unlike other shells or programming languages, there is no fallthrough - the first matching ``case`` block is executed and then control jumps out of the ``switch``.
.. _syntax-combiners:
Combiners (``and`` / ``or`` / ``&&`` / ``||``)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For simple checks, you can use combiners. :doc:`and <cmds/and>` or ``&&`` run the second command if the first succeeded, while :doc:`or <cmds/or>` or ``||`` run it if the first failed. For example::
# $XDG_CONFIG_HOME is a standard place to store configuration.
# If it's not set applications should use ~/.config.
set -q XDG_CONFIG_HOME; and set -l configdir $XDG_CONFIG_HOME
@@ -422,7 +473,7 @@ and::
echo 'How did I get here? This should be impossible'
end
These do essentially the same thing, but the former takes 2 seconds longer because the ``sleep`` always needs to run. So, in cases like these, the ordering is quite important for performance.
These do essentially the same thing, but the former takes 2 seconds longer because the ``sleep`` always needs to run.
Or you can have a case where it is necessary to stop early::
@@ -430,7 +481,20 @@ Or you can have a case where it is necessary to stop early::
If this went on after seeing that the command "foo" doesn't exist, it would try to run ``foo`` and error because it wasn't found!
For more, see the documentation for the builtins or the :ref:`Conditionals <tut-conditionals>` section of the tutorial.
Combiners really just execute step-by-step, so it isn't recommended to build longer chains of them because they might do something you don't want. Consider::
test -e /etc/my.config
or echo "OH NO WE NEED A CONFIG FILE"
and return 1
This will execute ``return 1`` also if the ``test`` succeeded. This is because fish runs ``test -e /etc/my.config``, sets $status to 0, then skips the ``echo``, keeps $status at 0, and then executes the ``return 1`` because $status is still 0.
So if you have more complex conditions or want to run multiple things after something failed, consider using an :ref:`if <syntax-if>`. Here that would be::
if not test -e /etc/my.config
echo "OH NO WE NEED A CONFIG FILE"
return 1
end
.. _syntax-loops-and-blocks:
@@ -629,26 +693,49 @@ The ``$`` symbol can also be used multiple times, as a kind of "dereference" ope
# 20
# 30
``$$foo[$i]`` is "the value of the variable named by ``$foo[$i]``.
``$$foo[$i]`` is "the value of the variable named by ``$foo[$i]``".
When using this feature together with list brackets, the brackets will be used from the inside out. ``$$foo[5]`` will use the fifth element of ``$foo`` as a variable name, instead of giving the fifth element of all the variables $foo refers to. That would instead be expressed as ``$$foo[1..-1][5]`` (take all elements of ``$foo``, use them as variable names, then give the fifth element of those).
Some more examples::
set listone 1 2 3
set listtwo 4 5 6
set var listone listtwo
echo $$var
# Output is 1 2 3 4 5 6
echo $$var[1]
# Output is 1 2 3
echo $$var[2][3]
# $var[1] is listtwo, third element of that is 6, output is 6
echo $$var[..][2]
# The second element of every variable, so output is
# 2 5
.. _expand-command-substitution:
Command substitution
^^^^^^^^^^^^^^^^^^^^
The output of a command (or an entire :ref:`pipeline <pipes>`) can be used as the arguments to another command.
A ``command substitution`` is an expansion that uses the *output* of a command as the arguments to another. For example::
When you write a command in parentheses like ``outercommand (innercommand)``, fish first runs ``innercommand``, and then uses each line of its output as a separate argument to ``outercommand``, which will then be executed. Unlike other shells, the value of ``$IFS`` is not used [#]_, fish splits on newlines.
echo (pwd)
A command substitution can have a dollar sign before the opening parenthesis like ``outercommand $(innercommand)``. This variant is also allowed inside double quotes. When using double quotes, the command output is not split up by lines, but trailing empty lines are still removed.
This executes the :doc:`pwd <cmds/pwd>` command, takes its output (more specifically what it wrote to the standard output "stdout" stream) and uses it as arguments to :doc:`echo <cmds/echo>`. So the inner command (the ``pwd``) is run first and has to complete before the outer command can even be started.
If the inner command prints multiple lines, fish will use each separate line as a separate argument to the outer command. Unlike other shells, the value of ``$IFS`` is not used [#]_, fish splits on newlines.
A command substitution can also be spelled with a dollar sign like ``outercommand $(innercommand)``. This variant is also allowed inside double quotes. When using double quotes, the command output is not split up by lines, but trailing empty lines are still removed.
If the output is piped to :doc:`string split or string split0 <cmds/string-split>` as the last step, those splits are used as they appear instead of splitting lines.
The exit status of the last run command substitution is available in the :ref:`status <variables-status>` variable if the substitution happens in the context of a :doc:`set <cmds/set>` command (so ``if set -l (something)`` checks if ``something`` returned true).
To use only some lines of the output, refer to :ref:`index range expansion <expand-index-range>`.
To use only some lines of the output, refer to :ref:`slices <expand-slices>`.
Examples::
@@ -666,7 +753,6 @@ Examples::
# Set ``$data`` to the contents of data, splitting on NUL-bytes.
set data (cat data | string split0)
Sometimes you want to pass the output of a command to another command that only accepts files. If it's just one file, you can usually just pass it via a pipe, like::
grep fish myanimallist1 | wc -l
@@ -791,10 +877,10 @@ This can be quite useful. For example, if you want to go through all the files i
Because :envvar:`PATH` is a list, this expands to all the files in all the directories in it. And if there are no directories in :envvar:`PATH`, the right answer here is to expand to no files.
.. _expand-index-range:
.. _expand-slices:
Index range expansion
^^^^^^^^^^^^^^^^^^^^^
Slices
^^^^^^
Sometimes it's necessary to access only some of the elements of a :ref:`list <variables-lists>` (all fish variables are lists), or some of the lines a :ref:`command substitution <expand-command-substitution>` outputs. Both are possible in fish by writing a set of indices in brackets, like::
@@ -814,7 +900,7 @@ If a list has 5 elements the indices go from 1 to 5, so a range of ``2..16`` wil
If the end is negative the range always goes up, so ``2..-2`` will go from element 2 to 4, and ``2..-16`` won't go anywhere because there is no way to go from the second element to one that doesn't exist, while going up.
If the start is negative the range always goes down, so ``-2..1`` will go from element 4 to 1, and ``-16..2`` won't go anywhere because there is no way to go from an element that doesn't exist to the second element, while going down.
A missing starting index in a range defaults to 1. This is allowed if the range is the first index expression of the sequence. Similarly, a missing ending index, defaulting to -1 is allowed for the last index range in the sequence.
A missing starting index in a range defaults to 1. This is allowed if the range is the first index expression of the sequence. Similarly, a missing ending index, defaulting to -1 is allowed for the last index in the sequence.
Multiple ranges are also possible, separated with a space.
@@ -944,8 +1030,8 @@ Variable Scope
There are four kinds of variables in fish: universal, global, function and local variables.
- Universal variables are shared between all fish sessions a user is running on one computer.
- Global variables are specific to the current fish session, and will never be erased unless explicitly requested by using ``set -e``.
- Universal variables are shared between all fish sessions a user is running on one computer. They are stored on disk and persist even after reboot.
- Global variables are specific to the current fish session. They can be erased by explicitly requesting ``set -e``.
- Function variables are specific to the currently executing function. They are erased ("go out of scope") when the current function ends. Outside of a function, they don't go out of scope.
- Local variables are specific to the current block of commands, and automatically erased when a specific block goes out of scope. A block of commands is a series of commands that begins with one of the commands ``for``, ``while`` , ``if``, ``function``, ``begin`` or ``switch``, and ends with the command ``end``. Outside of a block, this is the same as the function scope.
@@ -1013,14 +1099,33 @@ Here is an example of local vs function-scoped variables::
set gnu "In the beginning there was nothing, which exploded"
end
echo $pirate
# This will not output anything, since the pirate was local
echo $pirate
# This will output the good Captain's speech
# since $captain had function-scope.
echo $captain
# This will output the good Captain's speech since $captain had function-scope.
# This will output Sir Terry's wisdom.
echo $gnu
# Will output Sir Terry's wisdom.
end
When a function calls another, local variables aren't visible::
function shiver
set phrase 'Shiver me timbers'
end
function avast
set --local phrase 'Avast, mateys'
# Calling the shiver function here can not
# change any variables in the local scope
# so phrase remains as we set it here.
shiver
echo $phrase
end
avast
# Outputs "Avast, mateys"
When in doubt, use function-scoped variables. When you need to make a variable accessible everywhere, make it global. When you need to persistently store configuration, make it universal. When you want to use a variable only in a short block, make it local.
.. _variables-override:
@@ -1037,7 +1142,8 @@ If you want to override a variable for a single command, you can use "var=val" s
Unlike other shells, fish will first set the variable and then perform other expansions on the line, so::
set foo banana
foo=gagaga echo $foo # prints gagaga, while in other shells it might print "banana"
foo=gagaga echo $foo
# prints gagaga, while in other shells it might print "banana"
Multiple elements can be given in a :ref:`brace expansion<expand-brace>`::
@@ -1056,8 +1162,8 @@ This syntax is supported since fish 3.1.
.. _variables-universal:
More on universal variables
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Universal Variables
^^^^^^^^^^^^^^^^^^^
Universal variables are variables that are shared between all the user's fish sessions on the computer. Fish stores many of its configuration options as universal variables. This means that in order to change fish settings, all you have to do is change the variable value once, and it will be automatically updated for all sessions, and preserved across computer reboots and login/logout.
@@ -1067,30 +1173,6 @@ To see universal variables in action, start two fish sessions side by side, and
Do not append to universal variables in :ref:`config.fish <configuration>`, because these variables will then get longer with each new shell instance. Instead, simply set them once at the command line.
.. _variables-functions:
Variable scope for functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When calling a function, all current local variables temporarily disappear. This shadowing of the local scope is needed since the variable namespace would become cluttered, making it very easy to accidentally overwrite variables from another function.
For example::
function shiver
set phrase 'Shiver me timbers'
end
function avast
set --local phrase 'Avast, mateys'
# Calling the shiver function here can not
# change any variables in the local scope
shiver
echo $phrase
end
avast
# Outputs "Avast, mateys"
.. _variables-export:
Exporting variables
@@ -1175,7 +1257,7 @@ If you specify a negative index when expanding or assigning to a list variable,
orange
apple
As you see, you can use a range of indices, see :ref:`index range expansion <expand-index-range>` for details.
As you see, you can use a range of indices, see :ref:`slices <expand-slices>` for details.
All lists are one-dimensional and can't contain other lists, although it is possible to fake nested lists using dereferencing - see :ref:`variable expansion <expand-variable>`.
@@ -1238,10 +1320,14 @@ That covers the positional arguments, but commandline tools often get various op
A more robust approach to option handling is :doc:`argparse <cmds/argparse>`, which checks the defined options and puts them into various variables, leaving only the positional arguments in $argv. Here's a simple example::
function mybetterfunction
# We tell argparse about -h/--help and -s/--second - these are short and long forms of the same option.
# The "--" here is mandatory, it tells it from where to read the arguments.
# We tell argparse about -h/--help and -s/--second
# - these are short and long forms of the same option.
# The "--" here is mandatory,
# it tells it from where to read the arguments.
argparse h/help s/second -- $argv
# exit if argparse failed because it found an option it didn't recognize - it will print an error
# exit if argparse failed because
# it found an option it didn't recognize
# - it will print an error
or return
# If -h or --help is given, we print a little help text and return
@@ -1323,6 +1409,16 @@ You can change the settings of fish by changing the values of certain variables.
A number of variable starting with the prefixes ``fish_color`` and ``fish_pager_color``. See :ref:`Variables for changing highlighting colors <variables-color>` for more information.
.. envvar:: fish_term24bit
If this is set to 1, fish will assume the terminal understands 24-bit RGB color sequences, and won't translate them to the 256 or 16 color palette.
This is often detected automatically.
.. envvar:: fish_term256
If this is set to 1, fish will assume the terminal understands 256 colors, and won't translate matching colors down to the 16 color palette.
This is usually autodetected.
.. envvar:: fish_ambiguous_width
controls the computed width of ambiguous-width characters. This should be set to 1 if your terminal renders these characters as single-width (typical), or 2 if double-width.
@@ -1670,7 +1766,8 @@ Let's make up an example. This function will :ref:`glob <expand-wildcard>` the f
# If there are more than 5 files
if test (count $files) -gt 5
# and both stdin (for reading input) and stdout (for writing the prompt)
# and both stdin (for reading input)
# and stdout (for writing the prompt)
# are terminals
and isatty stdin
and isatty stdout

View File

@@ -169,7 +169,7 @@ div.warning {
border: 1px solid #f66;
}
div.admonition {
div.admonition, div.versionchanged {
padding: 7px;
}
@@ -177,7 +177,7 @@ p.admonition-title::after {
content: ":";
}
p.admonition-title {
p.admonition-title, span.versionmodified {
display: inline;
font-weight: bold;
}

View File

@@ -28,8 +28,6 @@ BuildRequires: glibc-langpack-en
%endif
BuildRequires: python3 procps
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?rhel} && 0%{?rhel} < 8
Requires: python
%else

View File

@@ -2,7 +2,7 @@
function __fish_adb_no_subcommand -d 'Test if adb has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i connect disconnect devices push pull sync shell emu logcat install uninstall jdwp forward bugreport backup restore version help wait-for-device start-server kill-server remount reboot get-state get-serialno get-devpath status-window root usb tcpip ppp sideload reconnect
if contains -- $i connect disconnect devices push pull sync shell emu logcat install uninstall jdwp forward bugreport backup restore version help start-server kill-server remount reboot get-state get-serialno get-devpath status-window root usb tcpip ppp sideload reconnect
return 1
end
end

View File

@@ -0,0 +1,91 @@
set -l subcommands apk files manifest dex resources
set -l apk_subcommands summary file-size download-size features compare
set -l files_subcommands list cat
set -l manifest_subcommands print application-id version-name version-code min-sdk target-sdk permissions debuggable
set -l dex_subcommands list references packages code
set -l resources_subcommands package configs value name xml
complete -f -n "not __fish_seen_subcommand_from $subcommands" -c apkanalyzer -a apk -d 'Analyze APK file attributes'
complete -f -n "not __fish_seen_subcommand_from $subcommands" -c apkanalyzer -a files -d 'Analyze the files inside the APK file'
complete -f -n "not __fish_seen_subcommand_from $subcommands" -c apkanalyzer -a manifest -d 'Analyze the contents of the manifest file'
complete -f -n "not __fish_seen_subcommand_from $subcommands" -c apkanalyzer -a dex -d 'Analyze the DEX files inside the APK file'
complete -f -n "not __fish_seen_subcommand_from $subcommands" -c apkanalyzer -a resources -d 'View text, image and string resources'
# global-option
complete -n "not __fish_seen_subcommand_from $apk_subcommands $files_subcommands $manifest_subcommands $dex_subcommands $resources_subcommands" -c apkanalyzer -s h -l human-readable -d 'Human-readable output'
# apk
complete -f -n "__fish_seen_subcommand_from apk; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a summary -d 'Prints the application ID, version code, and version name'
complete -f -n "__fish_seen_subcommand_from apk; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a file-size -d 'Prints the total file size of the APK'
complete -f -n "__fish_seen_subcommand_from apk; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a download-size -d 'Prints an estimate of the download size of the APK'
complete -f -n "__fish_seen_subcommand_from apk; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a features -d 'Prints features used by the APK that trigger Play Store filtering'
complete -f -n "__fish_seen_subcommand_from apk; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a compare -d 'Compares the sizes of apk-file and apk-file'
# apk options
complete -n '__fish_seen_subcommand_from apk; and __fish_seen_subcommand_from features' -c apkanalyzer -l not-required -d 'Include features marked as not required in the output'
complete -n '__fish_seen_subcommand_from apk; and __fish_seen_subcommand_from compare' -c apkanalyzer -l different-only -d 'Prints directories and files with differences'
complete -n '__fish_seen_subcommand_from apk; and __fish_seen_subcommand_from compare' -c apkanalyzer -l files-only -d 'Does not print directory entries'
complete -n '__fish_seen_subcommand_from apk; and __fish_seen_subcommand_from compare' -c apkanalyzer -l patch-size -d 'Shows an estimate of the file-by-file patch instead of a raw difference'
complete -n "__fish_seen_subcommand_from apk; and __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -ka '(__fish_complete_suffix .apk)'
# files
complete -f -n "__fish_seen_subcommand_from files; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a list -d 'Lists all files in the APK'
complete -f -n "__fish_seen_subcommand_from files; and not __fish_seen_subcommand_from $apk_subcommands" -c apkanalyzer -a cat -d 'Prints out the file contents'
# files options
complete -n '__fish_seen_subcommand_from files; and __fish_seen_subcommand_from list' -c apkanalyzer -l file -d 'Specify a path inside the APK' -r
complete -n "__fish_seen_subcommand_from files; and __fish_seen_subcommand_from $files_subcommands" -c apkanalyzer -ka '(__fish_complete_suffix .apk)'
# manifest
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a print -d 'Prints the APK manifest in XML format'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a application-id -d 'Prints the application ID value'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a version-name -d 'Prints the version name value'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a version-code -d 'Prints the version code value'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a min-sdk -d 'Prints the minimum SDK version'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a target-sdk -d 'Prints the target SDK version'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a permissions -d 'Prints the list of permissions'
complete -f -n "__fish_seen_subcommand_from manifest; and not __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -a debuggable -d 'Prints whether the APK is debuggable'
complete -n "__fish_seen_subcommand_from manifest; and __fish_seen_subcommand_from $manifest_subcommands" -c apkanalyzer -ka '(__fish_complete_suffix .apk)'
# dex
complete -f -n "__fish_seen_subcommand_from dex; and not __fish_seen_subcommand_from $dex_subcommands" -c apkanalyzer -a list -d 'Prints a list of the DEX files in the APK'
complete -f -n "__fish_seen_subcommand_from dex; and not __fish_seen_subcommand_from $dex_subcommands" -c apkanalyzer -a references -d 'Prints the number of method references in the specified DEX files'
complete -f -n "__fish_seen_subcommand_from dex; and not __fish_seen_subcommand_from $dex_subcommands" -c apkanalyzer -a packages -d 'Prints the class tree from DEX'
complete -f -n "__fish_seen_subcommand_from dex; and not __fish_seen_subcommand_from $dex_subcommands" -c apkanalyzer -a code -d 'Prints the bytecode of a class or method in smali format'
# dex options
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from references' -c apkanalyzer -l files -d 'Indicate specific files that you want to include' -r
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l defined-only -d 'Includes only classes defined in the APK in the output'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l files -d 'Specifies the DEX file names to include'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l proguard-folder -d 'Specifies the Proguard output folder to search for mappings'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l proguard-mapping -d 'Specifies the Proguard mapping file'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l proguard-seeds -d 'Specifies the Proguard seeds file'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l proguard-usage -d 'Specifies the Proguard usage file'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from packages' -c apkanalyzer -l show-removed -d 'Shows classes and members that were removed by Proguard'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from code' -c apkanalyzer -l class -d 'Specifies the class name to print'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from code' -c apkanalyzer -l method -d 'Specifies the method name to print'
complete -n "__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from $dex_subcommands" -c apkanalyzer -ka '(__fish_complete_suffix .apk)'
complete -n '__fish_seen_subcommand_from dex; and __fish_seen_subcommand_from code' -c apkanalyzer -ka '(__fish_complete_suffix .class)'
# resources
complete -f -n "__fish_seen_subcommand_from resources; and not __fish_seen_subcommand_from $resources_subcommands" -c apkanalyzer -a packages -d 'Prints a list of the packages that are defined in the resources table'
complete -f -n "__fish_seen_subcommand_from resources; and not __fish_seen_subcommand_from $resources_subcommands" -c apkanalyzer -a configs -d 'Prints a list of configurations for the specified type'
complete -f -n "__fish_seen_subcommand_from resources; and not __fish_seen_subcommand_from $resources_subcommands" -c apkanalyzer -a value -d 'Prints the value of the resource specified by config, name, and type'
complete -f -n "__fish_seen_subcommand_from resources; and not __fish_seen_subcommand_from $resources_subcommands" -c apkanalyzer -a names -d 'Prints a list of resource names for a configuration and type'
complete -f -n "__fish_seen_subcommand_from resources; and not __fish_seen_subcommand_from $resources_subcommands" -c apkanalyzer -a xml -d 'Prints the human-readable form of a binary XML file'
# resources options
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from configs' -c apkanalyzer -l type -d 'Specifies the resource type to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from configs' -c apkanalyzer -l packages -d 'Specifies the packages to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from value' -c apkanalyzer -l config -d 'Specifies the configuration to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from value' -c apkanalyzer -l name -d 'Specifies the resource name to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from value' -c apkanalyzer -l type -d 'Specifies the resource type to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from value' -c apkanalyzer -l packages -d 'Specifies the packages to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from names' -c apkanalyzer -l config -d 'Specifies the configuration to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from names' -c apkanalyzer -l type -d 'Specifies the resource type to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from names' -c apkanalyzer -l packages -d 'Specifies the packages to print' -r
complete -n '__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from xml' -c apkanalyzer -l file -d 'Specifies the file to print' -r
complete -n "__fish_seen_subcommand_from resources; and __fish_seen_subcommand_from $resources_subcommands" -c apkanalyzer -ka '(__fish_complete_suffix .apk)'

View File

@@ -1,6 +1,6 @@
# Completions for the `apt` command
# macOS has a /usr/bin/apt that is something else entirely:
# macOS has a /usr/bin/apt that is something else entirely:
# (apt - Returns the path to a Java home directory from the current user's settings)
if [ "$(uname -s)" = Darwin -a "$(command -s apt)" = /usr/bin/apt ]
exit 1
@@ -14,7 +14,7 @@ set -l handle_file_pkg_subcmds install
function __fish_apt_subcommand -V all_subcmds
set -l subcommand $argv[1]
set -e argv[1]
complete -f -c apt -n "not __fish_seen_subcommand_from $all_subcmds" -a $subcommand $argv
complete -f -c apt -n "__fish_is_first_token" -a $subcommand $argv
end
function __fish_apt_option
@@ -33,9 +33,10 @@ end
complete -c apt -f
complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -a '(__fish_print_apt_packages | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250 | sort)'
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -a '(__fish_print_apt_packages --installed | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250)'
complete -k -c apt -n "__fish_seen_subcommand_from $handle_file_pkg_subcmds" -a '(__fish_complete_suffix .deb)'
# We use -k to keep PWD directories (from the .deb completion) after packages, so we need to sort the packages
complete -k -c apt -n "__fish_seen_subcommand_from $handle_file_pkg_subcmds" -kxa '(__fish_complete_suffix .deb)'
complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -kxa '(__fish_print_apt_packages | sort)'
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -kxa '(__fish_print_apt_packages --installed | sort)'
complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-recommends
# This advanced flag is the safest way to upgrade packages that otherwise would have been kept back

View File

@@ -1,92 +1,78 @@
set -l subcommands add-blob alias-env attach-disk blobs cancel-task clean-up \
cloud-check cloud-config config configs cpi-config create-env create-release \
delete-config delete-deployment delete-disk delete-env delete-release \
delete-snapshot delete-snapshots delete-stemcell delete-vm deploy deployment \
deployments diff-config disks environment environments errands event events \
export-release finalize-release generate-job generate-package help ignore \
init-release inspect-release instances interpolate locks log-in log-out logs \
manifest orphan-disk recreate releases remove-blob repack-stemcell \
reset-release restart run-errand runtime-config scp snapshots ssh start \
stemcells stop sync-blobs take-snapshot task tasks unignore \
update-cloud-config update-config update-cpi-config update-resurrection \
update-runtime-config upload-blobs upload-release upload-stemcell variables \
vendor-package vms
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a add-blob -d "Add blob"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a alias-env -d "Alias environment to save URL and CA certificate"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a attach-disk -d "Attaches disk to an instance"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a blobs -d "List blobs"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a cancel-task -d "Cancel task at its next checkpoint"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a clean-up -d "Clean up releases, stemcells, disks, etc."
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a cloud-check -d "Cloud consistency check and interactive repair"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a cloud-config -d "Show current cloud config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a config -d "Show current config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a configs -d "List configs"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a cpi-config -d "Show current CPI config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a create-env -d "Create or update BOSH environment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a create-release -d "Create release"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-config -d "Delete config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-deployment -d "Delete deployment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-disk -d "Delete disk"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-env -d "Delete BOSH environment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-release -d "Delete release"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-snapshot -d "Delete snapshot"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-snapshots -d "Delete all snapshots in a deployment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-stemcell -d "Delete stemcell"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a delete-vm -d "Delete VM"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a deploy -d "Update deployment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a deployment -d "Show deployment information"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a deployments -d "List deployments"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a diff-config -d "Diff two configs by ID"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a disks -d "List disks"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a environment -d "Show environment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a environments -d "List environments"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a errands -d "List errands"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a event -d "Show event details"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a events -d "List events"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a export-release -d "Export the compiled release to a tarball"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a finalize-release -d "Create final release from dev release tarball"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a generate-job -d "Generate job"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a generate-package -d "Generate package"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a help -d "Show this help message"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a ignore -d "Ignore an instance"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a init-release -d "Initialize release"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a inspect-release -d "List release contents such as jobs"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a instances -d "List all instances in a deployment"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a interpolate -d "Interpolates variables into a manifest"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a locks -d "List current locks"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a log-in -d "Log in"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a log-out -d "Log out"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a logs -d "Fetch logs from instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a manifest -d "Show deployment manifest"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a orphan-disk -d "Orphan disk"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a recreate -d "Recreate instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a releases -d "List releases"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a remove-blob -d "Remove blob"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a repack-stemcell -d "Repack stemcell"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a reset-release -d "Reset release"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a restart -d "Restart instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a run-errand -d "Run errand"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a runtime-config -d "Show current runtime config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a scp -d "SCP to/from instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a snapshots -d "List snapshots"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a ssh -d "SSH into instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a start -d "Start instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a stemcells -d "List stemcells"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a stop -d "Stop instance(s)"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a sync-blobs -d "Sync blobs"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a take-snapshot -d "Take snapshot"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a task -d "Show task status and start tracking its output"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a tasks -d "List running or recent tasks"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a unignore -d "Unignore an instance"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a update-cloud-config -d "Update current cloud config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a update-config -d "Update config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a update-cpi-config -d "Update current CPI config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a update-resurrection -d "Enable/disable resurrection"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a update-runtime-config -d "Update current runtime config"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a upload-blobs -d "Upload blobs"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a upload-release -d "Upload release"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a upload-stemcell -d "Upload stemcell"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a variables -d "List variables"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a vendor-package -d "Vendor package"
complete -f -n "__fish_use_subcommand $subcommands" -c bosh -a vms -d "List all VMs in all deployments"
complete -f -n __fish_use_subcommand -c bosh -a add-blob -d "Add blob"
complete -f -n __fish_use_subcommand -c bosh -a alias-env -d "Alias environment to save URL and CA certificate"
complete -f -n __fish_use_subcommand -c bosh -a attach-disk -d "Attaches disk to an instance"
complete -f -n __fish_use_subcommand -c bosh -a blobs -d "List blobs"
complete -f -n __fish_use_subcommand -c bosh -a cancel-task -d "Cancel task at its next checkpoint"
complete -f -n __fish_use_subcommand -c bosh -a clean-up -d "Clean up releases, stemcells, disks, etc."
complete -f -n __fish_use_subcommand -c bosh -a cloud-check -d "Cloud consistency check and interactive repair"
complete -f -n __fish_use_subcommand -c bosh -a cloud-config -d "Show current cloud config"
complete -f -n __fish_use_subcommand -c bosh -a config -d "Show current config"
complete -f -n __fish_use_subcommand -c bosh -a configs -d "List configs"
complete -f -n __fish_use_subcommand -c bosh -a cpi-config -d "Show current CPI config"
complete -f -n __fish_use_subcommand -c bosh -a create-env -d "Create or update BOSH environment"
complete -f -n __fish_use_subcommand -c bosh -a create-release -d "Create release"
complete -f -n __fish_use_subcommand -c bosh -a delete-config -d "Delete config"
complete -f -n __fish_use_subcommand -c bosh -a delete-deployment -d "Delete deployment"
complete -f -n __fish_use_subcommand -c bosh -a delete-disk -d "Delete disk"
complete -f -n __fish_use_subcommand -c bosh -a delete-env -d "Delete BOSH environment"
complete -f -n __fish_use_subcommand -c bosh -a delete-release -d "Delete release"
complete -f -n __fish_use_subcommand -c bosh -a delete-snapshot -d "Delete snapshot"
complete -f -n __fish_use_subcommand -c bosh -a delete-snapshots -d "Delete all snapshots in a deployment"
complete -f -n __fish_use_subcommand -c bosh -a delete-stemcell -d "Delete stemcell"
complete -f -n __fish_use_subcommand -c bosh -a delete-vm -d "Delete VM"
complete -f -n __fish_use_subcommand -c bosh -a deploy -d "Update deployment"
complete -f -n __fish_use_subcommand -c bosh -a deployment -d "Show deployment information"
complete -f -n __fish_use_subcommand -c bosh -a deployments -d "List deployments"
complete -f -n __fish_use_subcommand -c bosh -a diff-config -d "Diff two configs by ID"
complete -f -n __fish_use_subcommand -c bosh -a disks -d "List disks"
complete -f -n __fish_use_subcommand -c bosh -a environment -d "Show environment"
complete -f -n __fish_use_subcommand -c bosh -a environments -d "List environments"
complete -f -n __fish_use_subcommand -c bosh -a errands -d "List errands"
complete -f -n __fish_use_subcommand -c bosh -a event -d "Show event details"
complete -f -n __fish_use_subcommand -c bosh -a events -d "List events"
complete -f -n __fish_use_subcommand -c bosh -a export-release -d "Export the compiled release to a tarball"
complete -f -n __fish_use_subcommand -c bosh -a finalize-release -d "Create final release from dev release tarball"
complete -f -n __fish_use_subcommand -c bosh -a generate-job -d "Generate job"
complete -f -n __fish_use_subcommand -c bosh -a generate-package -d "Generate package"
complete -f -n __fish_use_subcommand -c bosh -a help -d "Show this help message"
complete -f -n __fish_use_subcommand -c bosh -a ignore -d "Ignore an instance"
complete -f -n __fish_use_subcommand -c bosh -a init-release -d "Initialize release"
complete -f -n __fish_use_subcommand -c bosh -a inspect-release -d "List release contents such as jobs"
complete -f -n __fish_use_subcommand -c bosh -a instances -d "List all instances in a deployment"
complete -f -n __fish_use_subcommand -c bosh -a interpolate -d "Interpolates variables into a manifest"
complete -f -n __fish_use_subcommand -c bosh -a locks -d "List current locks"
complete -f -n __fish_use_subcommand -c bosh -a log-in -d "Log in"
complete -f -n __fish_use_subcommand -c bosh -a log-out -d "Log out"
complete -f -n __fish_use_subcommand -c bosh -a logs -d "Fetch logs from instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a manifest -d "Show deployment manifest"
complete -f -n __fish_use_subcommand -c bosh -a orphan-disk -d "Orphan disk"
complete -f -n __fish_use_subcommand -c bosh -a recreate -d "Recreate instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a releases -d "List releases"
complete -f -n __fish_use_subcommand -c bosh -a remove-blob -d "Remove blob"
complete -f -n __fish_use_subcommand -c bosh -a repack-stemcell -d "Repack stemcell"
complete -f -n __fish_use_subcommand -c bosh -a reset-release -d "Reset release"
complete -f -n __fish_use_subcommand -c bosh -a restart -d "Restart instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a run-errand -d "Run errand"
complete -f -n __fish_use_subcommand -c bosh -a runtime-config -d "Show current runtime config"
complete -f -n __fish_use_subcommand -c bosh -a scp -d "SCP to/from instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a snapshots -d "List snapshots"
complete -f -n __fish_use_subcommand -c bosh -a ssh -d "SSH into instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a start -d "Start instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a stemcells -d "List stemcells"
complete -f -n __fish_use_subcommand -c bosh -a stop -d "Stop instance(s)"
complete -f -n __fish_use_subcommand -c bosh -a sync-blobs -d "Sync blobs"
complete -f -n __fish_use_subcommand -c bosh -a take-snapshot -d "Take snapshot"
complete -f -n __fish_use_subcommand -c bosh -a task -d "Show task status and start tracking its output"
complete -f -n __fish_use_subcommand -c bosh -a tasks -d "List running or recent tasks"
complete -f -n __fish_use_subcommand -c bosh -a unignore -d "Unignore an instance"
complete -f -n __fish_use_subcommand -c bosh -a update-cloud-config -d "Update current cloud config"
complete -f -n __fish_use_subcommand -c bosh -a update-config -d "Update config"
complete -f -n __fish_use_subcommand -c bosh -a update-cpi-config -d "Update current CPI config"
complete -f -n __fish_use_subcommand -c bosh -a update-resurrection -d "Enable/disable resurrection"
complete -f -n __fish_use_subcommand -c bosh -a update-runtime-config -d "Update current runtime config"
complete -f -n __fish_use_subcommand -c bosh -a upload-blobs -d "Upload blobs"
complete -f -n __fish_use_subcommand -c bosh -a upload-release -d "Upload release"
complete -f -n __fish_use_subcommand -c bosh -a upload-stemcell -d "Upload stemcell"
complete -f -n __fish_use_subcommand -c bosh -a variables -d "List variables"
complete -f -n __fish_use_subcommand -c bosh -a vendor-package -d "Vendor package"
complete -f -n __fish_use_subcommand -c bosh -a vms -d "List all VMs in all deployments"

View File

@@ -49,6 +49,7 @@ complete -c cargo -n '__fish_seen_subcommand_from add install' -n '__fish_is_nth
## --- AUTO-GENERATED WITH `cargo complete fish` ---
# Manually massaged to improve some descriptions
complete -c cargo -n __fish_use_subcommand -l explain -d 'Run `rustc --explain CODE`'
complete -c cargo -n __fish_use_subcommand -l color -d 'Coloring: auto, always, never'
complete -c cargo -n __fish_use_subcommand -l config -d 'Override a configuration value (unstable)'
@@ -76,7 +77,7 @@ complete -c cargo -n __fish_use_subcommand -f -a install -d 'Install a Rust bina
complete -c cargo -n __fish_use_subcommand -f -a locate-project -d 'Print a JSON representation of a Cargo.toml file\'s location'
complete -c cargo -n __fish_use_subcommand -f -a login -d 'Save an api token from the registry locally. If token is not specified, it will be read from stdin.'
complete -c cargo -n __fish_use_subcommand -f -a logout -d 'Remove an API token from the registry locally'
complete -c cargo -n __fish_use_subcommand -f -a metadata -d 'Output the resolved dependencies of a package, the concrete used versions including overrides, in machine-readable format'
complete -c cargo -n __fish_use_subcommand -f -a metadata -d 'Output the resolved dependencies of a package in machine-readable format'
complete -c cargo -n __fish_use_subcommand -f -a new -d 'Create a new cargo package at <path>'
complete -c cargo -n __fish_use_subcommand -f -a owner -d 'Manage the owners of a crate on the registry'
complete -c cargo -n __fish_use_subcommand -f -a package -d 'Assemble the local package into a distributable tarball'
@@ -166,7 +167,7 @@ complete -c cargo -n "__fish_seen_subcommand_from build" -l no-default-features
complete -c cargo -n "__fish_seen_subcommand_from build" -l ignore-rust-version -d 'Ignore `rust-version` specification in packages (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from build" -l build-plan -d 'Output the build plan in JSON (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from build" -l unit-graph -d 'Output build graph in JSON (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from build" -l future-incompat-report -d 'Ouputs a future incompatibility report at the end of the build (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from build" -l future-incompat-report -d 'Output a future incompatibility report after build (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from build" -s h -l help -d 'Prints help information'
complete -c cargo -n "__fish_seen_subcommand_from build" -s V -l version -d 'Prints version information'
complete -c cargo -n "__fish_seen_subcommand_from build" -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
@@ -203,7 +204,7 @@ complete -c cargo -n "__fish_seen_subcommand_from check" -l all-features -d 'Act
complete -c cargo -n "__fish_seen_subcommand_from check" -l no-default-features -d 'Do not activate the `default` feature'
complete -c cargo -n "__fish_seen_subcommand_from check" -l ignore-rust-version -d 'Ignore `rust-version` specification in packages (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from check" -l unit-graph -d 'Output build graph in JSON (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from check" -l future-incompat-report -d 'Ouputs a future incompatibility report at the end of the build (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from check" -l future-incompat-report -d 'Output a future incompatibility report after build (unstable)'
complete -c cargo -n "__fish_seen_subcommand_from check" -s h -l help -d 'Prints help information'
complete -c cargo -n "__fish_seen_subcommand_from check" -s V -l version -d 'Prints version information'
complete -c cargo -n "__fish_seen_subcommand_from check" -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
@@ -342,7 +343,7 @@ complete -c cargo -n "__fish_seen_subcommand_from git-checkout" -l frozen -d 'Re
complete -c cargo -n "__fish_seen_subcommand_from git-checkout" -l locked -d 'Require Cargo.lock is up to date'
complete -c cargo -n "__fish_seen_subcommand_from git-checkout" -l offline -d 'Run without accessing the network'
complete -c cargo -n "__fish_seen_subcommand_from init" -l registry -d 'Registry to use'
complete -c cargo -n "__fish_seen_subcommand_from init" -l vcs -d 'Initialize a new repository for the given version control system (git, hg, pijul, or fossil) or do not initialize any version control at all (none), overriding a global configuration.' -r -f -a "git hg pijul fossil none"
complete -c cargo -n "__fish_seen_subcommand_from init" -l vcs -d 'Initialize a new repository for the given version control system' -r -f -a "git hg pijul fossil none"
complete -c cargo -n "__fish_seen_subcommand_from init" -l edition -d 'Edition to set for the crate generated' -r -f -a "2015 2018 2021"
complete -c cargo -n "__fish_seen_subcommand_from init" -l name -d 'Set the resulting package name, defaults to the directory name'
complete -c cargo -n "__fish_seen_subcommand_from init" -l color -d 'Coloring: auto, always, never'
@@ -444,7 +445,7 @@ complete -c cargo -n "__fish_seen_subcommand_from metadata" -l frozen -d 'Requir
complete -c cargo -n "__fish_seen_subcommand_from metadata" -l locked -d 'Require Cargo.lock is up to date'
complete -c cargo -n "__fish_seen_subcommand_from metadata" -l offline -d 'Run without accessing the network'
complete -c cargo -n "__fish_seen_subcommand_from new" -l registry -d 'Registry to use'
complete -c cargo -n "__fish_seen_subcommand_from new" -l vcs -d 'Initialize a new repository for the given version control system (git, hg, pijul, or fossil) or do not initialize any version control at all (none), overriding a global configuration.' -r -f -a "git hg pijul fossil none"
complete -c cargo -n "__fish_seen_subcommand_from new" -l vcs -d 'Initialize a new repository for the given version control system' -r -f -a "git hg pijul fossil none"
complete -c cargo -n "__fish_seen_subcommand_from new" -l edition -d 'Edition to set for the crate generated' -r -f -a "2015 2018 2021"
complete -c cargo -n "__fish_seen_subcommand_from new" -l name -d 'Set the resulting package name, defaults to the directory name'
complete -c cargo -n "__fish_seen_subcommand_from new" -l color -d 'Coloring: auto, always, never'
@@ -695,8 +696,8 @@ complete -c cargo -n "__fish_seen_subcommand_from tree" -l manifest-path -d 'Pat
complete -c cargo -n "__fish_seen_subcommand_from tree" -s p -l package -d 'Package to be used as the root of the tree'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l exclude -d 'Exclude specific workspace members'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l features -d 'Space or comma separated list of features to activate'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l target -d 'Filter dependencies matching the given target-triple (default host platform). Pass `all` to include all targets.'
complete -c cargo -n "__fish_seen_subcommand_from tree" -s e -l edges -d 'The kinds of dependencies to display (features, normal, build, dev, all, no-dev, no-build, no-normal)'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l target -d 'Filter dependencies matching the given target-triple (or `all` for all targets)'
complete -c cargo -n "__fish_seen_subcommand_from tree" -s e -l edges -d 'The kinds of dependencies to display' -xa "features normal build dev all no-dev no-build no-normal"
complete -c cargo -n "__fish_seen_subcommand_from tree" -s i -l invert -d 'Invert the tree direction and focus on the given package'
complete -c cargo -n "__fish_seen_subcommand_from tree" -l prefix -d 'Change the prefix (indentation) of how each entry is displayed' -r -f -a "depth indent none"
complete -c cargo -n "__fish_seen_subcommand_from tree" -l charset -d 'Character set to use in output: utf8, ascii' -r -f -a "utf8 ascii"

View File

@@ -1,208 +1,168 @@
set -l subcommands help version login logout passwd target api auth apps app \
push scale delete rename start stop restart restage restart-app-instance \
run-task tasks terminate-task events files logs env set-env unset-env stacks \
stack copy-source create-app-manifest get-health-check set-health-check \
enable-ssh disable-ssh ssh-enabled ssh marketplace services service \
create-service update-service delete-service rename-service \
create-service-key service-keys service-key delete-service-key bind-service \
unbind-service bind-route-service unbind-route-service \
create-user-provided-service update-user-provided-service orgs org \
create-org delete-org rename-org spaces space create-space delete-space \
rename-space allow-space-ssh disallow-space-ssh space-ssh-allowed domains \
create-domain delete-domain create-shared-domain delete-shared-domain \
router-groups routes create-route check-route map-route unmap-route \
delete-route delete-orphaned-routes network-policies add-network-policy \
remove-network-policy buildpacks create-buildpack update-buildpack \
rename-buildpack delete-buildpack create-user delete-user org-users \
set-org-role unset-org-role space-users set-space-role unset-space-role \
quotas quota set-quota create-quota delete-quota update-quota \
share-private-domain unshare-private-domain space-quotas space-quota \
create-space-quota update-space-quota delete-space-quota set-space-quota \
unset-space-quota service-auth-tokens create-service-auth-token \
update-service-auth-token delete-service-auth-token service-brokers \
create-service-broker update-service-broker delete-service-broker \
rename-service-broker migrate-service-instances purge-service-offering \
purge-service-instance service-access enable-service-access \
disable-service-access security-group security-groups create-security-group \
update-security-group delete-security-group bind-security-group \
unbind-security-group bind-staging-security-group staging-security-groups \
unbind-staging-security-group bind-running-security-group \
running-security-groups unbind-running-security-group \
running-environment-variable-group staging-environment-variable-group \
set-staging-environment-variable-group set-running-environment-variable-group \
isolation-segments create-isolation-segment delete-isolation-segment \
enable-org-isolation disable-org-isolation set-org-default-isolation-segment \
reset-org-default-isolation-segment set-space-isolation-segment \
reset-space-isolation-segment feature-flags feature-flag enable-feature-flag \
disable-feature-flag curl config oauth-token ssh-code add-plugin-repo \
remove-plugin-repo list-plugin-repos repo-plugins plugins install-plugin \
uninstall-plugin
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a help -d "Show help"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a version -d "Print the version"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a login -d "Log user in"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a logout -d "Log user out"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a passwd -d "Change user password"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a target -d "Set or view the targeted org or space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a api -d "Set or view target api url"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a auth -d "Authenticate user non-interactively"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a apps -d "List all apps in the target space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a app -d "Display health and status for an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a push -d "Push a new app or sync changes to an existing app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a scale -d "Change or view the instance count, disk space limit, and memory limit for an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete -d "Delete an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a rename -d "Rename an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a start -d "Start an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a stop -d "Stop an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a restart -d "Stop all instances of the app, then start them again. This causes downtime."
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a restage -d "Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.)"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a restart-app-instance -d "Terminate, then restart an app instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a run-task -d "Run a one-off task on an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a tasks -d "List tasks of an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a terminate-task -d "Terminate a running task of an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a events -d "Show recent app events"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a files -d "Print out a list of files in a directory or the contents of a specific file of an app running on the DEA backend"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a logs -d "Tail or show recent logs for an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a env -d "Show all env variables for an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-env -d "Set an env variable for an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unset-env -d "Remove an env variable"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a stacks -d "List all stacks (a stack is a pre-built file system, including an operating system, that can run apps)"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a stack -d "Show information for a stack (a stack is a pre-built file system, including an operating system, that can run apps)"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a copy-source -d "Copies the source code of an application to another existing application (and restarts that application)"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-app-manifest -d "Create an app manifest for an app that has been pushed successfully"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a get-health-check -d "Show the type of health check performed on an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-health-check -d "Change type of health check performed on an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a enable-ssh -d "Enable ssh for the application"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a disable-ssh -d "Disable ssh for the application"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a ssh-enabled -d "Reports whether SSH is enabled on an application container instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a ssh -d "SSH to an application container instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a marketplace -d "List available offerings in the marketplace"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a services -d "List all service instances in the target space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a service -d "Show service instance info"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-service -d "Create a service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-service -d "Update a service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-service -d "Delete a service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a rename-service -d "Rename a service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-service-key -d "Create key for a service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a service-keys -d "List keys for a service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a service-key -d "Show service key info"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-service-key -d "Delete a service key"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a bind-service -d "Bind a service instance to an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unbind-service -d "Unbind a service instance from an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a bind-route-service -d "Bind a service instance to an HTTP route"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unbind-route-service -d "Unbind a service instance from an HTTP route"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-user-provided-service -d "Make a user-provided service instance available to CF apps"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-user-provided-service -d "Update user-provided service instance"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a orgs -d "List all orgs"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a org -d "Show org info"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-org -d "Create an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-org -d "Delete an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a rename-org -d "Rename an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a spaces -d "List all spaces in an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a space -d "Show space info"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-space -d "Create a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-space -d "Delete a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a rename-space -d "Rename a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a allow-space-ssh -d "Allow SSH access for the space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a disallow-space-ssh -d "Disallow SSH access for the space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a space-ssh-allowed -d "Reports whether SSH is allowed in a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a domains -d "List domains in the target org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-domain -d "Create a domain in an org for later use"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-domain -d "Delete a domain"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-shared-domain -d "Create a domain that can be used by all orgs (admin-only)"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-shared-domain -d "Delete a shared domain"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a router-groups -d "List router groups"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a routes -d "List all routes in the current space or the current organization"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-route -d "Create a url route in a space for later use"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a check-route -d "Perform a simple check to determine whether a route currently exists or not"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a map-route -d "Add a url route to an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unmap-route -d "Remove a url route from an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-route -d "Delete a route"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-orphaned-routes -d "Delete all orphaned routes (i.e. those that are not mapped to an app)"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a network-policies -d "List direct network traffic policies"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a add-network-policy -d "Create policy to allow direct network traffic from one app to another"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a remove-network-policy -d "Remove network traffic policy of an app"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a buildpacks -d "List all buildpacks"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-buildpack -d "Create a buildpack"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-buildpack -d "Update a buildpack"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a rename-buildpack -d "Rename a buildpack"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-buildpack -d "Delete a buildpack"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-user -d "Create a new user"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-user -d "Delete a user"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a org-users -d "Show org users by role"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-org-role -d "Assign an org role to a user"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unset-org-role -d "Remove an org role from a user"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a space-users -d "Show space users by role"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-space-role -d "Assign a space role to a user"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unset-space-role -d "Remove a space role from a user"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a quotas -d "List available usage quotas"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a quota -d "Show quota info"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-quota -d "Assign a quota to an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-quota -d "Define a new resource quota"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-quota -d "Delete a quota"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-quota -d "Update an existing resource quota"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a share-private-domain -d "Share a private domain with an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unshare-private-domain -d "Unshare a private domain with an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a space-quotas -d "List available space resource quotas"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a space-quota -d "Show space quota info"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-space-quota -d "Define a new space resource quota"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-space-quota -d "Update an existing space quota"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-space-quota -d "Delete a space quota definition and unassign the space quota from all spaces"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-space-quota -d "Assign a space quota definition to a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unset-space-quota -d "Unassign a quota from a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a service-auth-tokens -d "List service auth tokens"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-service-auth-token -d "Create a service auth token"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-service-auth-token -d "Update a service auth token"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-service-auth-token -d "Delete a service auth token"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a service-brokers -d "List service brokers"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-service-broker -d "Create a service broker"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-service-broker -d "Update a service broker"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-service-broker -d "Delete a service broker"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a rename-service-broker -d "Rename a service broker"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a migrate-service-instances -d "Migrate service instances from one service plan to another"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a purge-service-offering -d "Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a purge-service-instance -d "Recursively remove a service instance and child objects from Cloud Foundry database without making requests to a service broker"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a service-access -d "List service access settings"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a enable-service-access -d "Enable access to a service or service plan for one or all orgs"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a disable-service-access -d "Disable access to a service or service plan for one or all orgs"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a security-group -d "Show a single security group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a security-groups -d "List all security groups"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-security-group -d "Create a security group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a update-security-group -d "Update a security group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-security-group -d "Deletes a security group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a bind-security-group -d "Bind a security group to a particular space, or all existing spaces of an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unbind-security-group -d "Unbind a security group from a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a bind-staging-security-group -d "Bind a security group to the list of security groups to be used for staging applications"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a staging-security-groups -d "List security groups in the staging set for applications"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unbind-staging-security-group -d "Unbind a security group from the set of security groups for staging applications"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a bind-running-security-group -d "Bind a security group to the list of security groups to be used for running applications"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a running-security-groups -d "List security groups in the set of security groups for running applications"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a unbind-running-security-group -d "Unbind a security group from the set of security groups for running applications"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a running-environment-variable-group -d "Retrieve the contents of the running environment variable group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a staging-environment-variable-group -d "Retrieve the contents of the staging environment variable group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-staging-environment-variable-group -d "Pass parameters as JSON to create a staging environment variable group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-running-environment-variable-group -d "Pass parameters as JSON to create a running environment variable group"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a isolation-segments -d "List all isolation segments"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a create-isolation-segment -d "Create an isolation segment"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a delete-isolation-segment -d "Delete an isolation segment"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a enable-org-isolation -d "Entitle an organization to an isolation segment"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a disable-org-isolation -d "Revoke an organization's entitlement to an isolation segment"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-org-default-isolation-segment -d "Set the default isolation segment used for apps in spaces in an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a reset-org-default-isolation-segment -d "Reset the default isolation segment used for apps in spaces of an org"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a set-space-isolation-segment -d "Assign the isolation segment for a space"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a reset-space-isolation-segment -d "Reset the space's isolation segment to the org default"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a feature-flags -d "Retrieve list of feature flags with status"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a feature-flag -d "Retrieve an individual feature flag with status"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a enable-feature-flag -d "Allow use of a feature"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a disable-feature-flag -d "Prevent use of a feature"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a curl -d "Executes a request to the targeted API endpoint"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a config -d "Write default values to the config"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a oauth-token -d "Retrieve and display the OAuth token for the current session"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a ssh-code -d "Get a one time password for ssh clients"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a add-plugin-repo -d "Add a new plugin repository"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a remove-plugin-repo -d "Remove a plugin repository"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a list-plugin-repos -d "List all the added plugin repositories"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a repo-plugins -d "List all available plugins in specified repository or in all added repositories"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a plugins -d "List commands of installed plugins"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a install-plugin -d "Install CLI plugin"
complete -f -n "__fish_use_subcommand $subcommands" -c cf -a uninstall-plugin -d "Uninstall CLI plugin"
complete -f -n __fish_use_subcommand -c cf -a help -d "Show help"
complete -f -n __fish_use_subcommand -c cf -a version -d "Print the version"
complete -f -n __fish_use_subcommand -c cf -a login -d "Log user in"
complete -f -n __fish_use_subcommand -c cf -a logout -d "Log user out"
complete -f -n __fish_use_subcommand -c cf -a passwd -d "Change user password"
complete -f -n __fish_use_subcommand -c cf -a target -d "Set or view the targeted org or space"
complete -f -n __fish_use_subcommand -c cf -a api -d "Set or view target api url"
complete -f -n __fish_use_subcommand -c cf -a auth -d "Authenticate user non-interactively"
complete -f -n __fish_use_subcommand -c cf -a apps -d "List all apps in the target space"
complete -f -n __fish_use_subcommand -c cf -a app -d "Display health and status for an app"
complete -f -n __fish_use_subcommand -c cf -a push -d "Push a new app or sync changes to an existing app"
complete -f -n __fish_use_subcommand -c cf -a scale -d "Change or view the instance count, disk space limit, and memory limit for an app"
complete -f -n __fish_use_subcommand -c cf -a delete -d "Delete an app"
complete -f -n __fish_use_subcommand -c cf -a rename -d "Rename an app"
complete -f -n __fish_use_subcommand -c cf -a start -d "Start an app"
complete -f -n __fish_use_subcommand -c cf -a stop -d "Stop an app"
complete -f -n __fish_use_subcommand -c cf -a restart -d "Stop all instances of the app, then start them again. This causes downtime."
complete -f -n __fish_use_subcommand -c cf -a restage -d "Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.)"
complete -f -n __fish_use_subcommand -c cf -a restart-app-instance -d "Terminate, then restart an app instance"
complete -f -n __fish_use_subcommand -c cf -a run-task -d "Run a one-off task on an app"
complete -f -n __fish_use_subcommand -c cf -a tasks -d "List tasks of an app"
complete -f -n __fish_use_subcommand -c cf -a terminate-task -d "Terminate a running task of an app"
complete -f -n __fish_use_subcommand -c cf -a events -d "Show recent app events"
complete -f -n __fish_use_subcommand -c cf -a files -d "Print out a list of files in a directory or the contents of a specific file of an app running on the DEA backend"
complete -f -n __fish_use_subcommand -c cf -a logs -d "Tail or show recent logs for an app"
complete -f -n __fish_use_subcommand -c cf -a env -d "Show all env variables for an app"
complete -f -n __fish_use_subcommand -c cf -a set-env -d "Set an env variable for an app"
complete -f -n __fish_use_subcommand -c cf -a unset-env -d "Remove an env variable"
complete -f -n __fish_use_subcommand -c cf -a stacks -d "List all stacks (a stack is a pre-built file system, including an operating system, that can run apps)"
complete -f -n __fish_use_subcommand -c cf -a stack -d "Show information for a stack (a stack is a pre-built file system, including an operating system, that can run apps)"
complete -f -n __fish_use_subcommand -c cf -a copy-source -d "Copies the source code of an application to another existing application (and restarts that application)"
complete -f -n __fish_use_subcommand -c cf -a create-app-manifest -d "Create an app manifest for an app that has been pushed successfully"
complete -f -n __fish_use_subcommand -c cf -a get-health-check -d "Show the type of health check performed on an app"
complete -f -n __fish_use_subcommand -c cf -a set-health-check -d "Change type of health check performed on an app"
complete -f -n __fish_use_subcommand -c cf -a enable-ssh -d "Enable ssh for the application"
complete -f -n __fish_use_subcommand -c cf -a disable-ssh -d "Disable ssh for the application"
complete -f -n __fish_use_subcommand -c cf -a ssh-enabled -d "Reports whether SSH is enabled on an application container instance"
complete -f -n __fish_use_subcommand -c cf -a ssh -d "SSH to an application container instance"
complete -f -n __fish_use_subcommand -c cf -a marketplace -d "List available offerings in the marketplace"
complete -f -n __fish_use_subcommand -c cf -a services -d "List all service instances in the target space"
complete -f -n __fish_use_subcommand -c cf -a service -d "Show service instance info"
complete -f -n __fish_use_subcommand -c cf -a create-service -d "Create a service instance"
complete -f -n __fish_use_subcommand -c cf -a update-service -d "Update a service instance"
complete -f -n __fish_use_subcommand -c cf -a delete-service -d "Delete a service instance"
complete -f -n __fish_use_subcommand -c cf -a rename-service -d "Rename a service instance"
complete -f -n __fish_use_subcommand -c cf -a create-service-key -d "Create key for a service instance"
complete -f -n __fish_use_subcommand -c cf -a service-keys -d "List keys for a service instance"
complete -f -n __fish_use_subcommand -c cf -a service-key -d "Show service key info"
complete -f -n __fish_use_subcommand -c cf -a delete-service-key -d "Delete a service key"
complete -f -n __fish_use_subcommand -c cf -a bind-service -d "Bind a service instance to an app"
complete -f -n __fish_use_subcommand -c cf -a unbind-service -d "Unbind a service instance from an app"
complete -f -n __fish_use_subcommand -c cf -a bind-route-service -d "Bind a service instance to an HTTP route"
complete -f -n __fish_use_subcommand -c cf -a unbind-route-service -d "Unbind a service instance from an HTTP route"
complete -f -n __fish_use_subcommand -c cf -a create-user-provided-service -d "Make a user-provided service instance available to CF apps"
complete -f -n __fish_use_subcommand -c cf -a update-user-provided-service -d "Update user-provided service instance"
complete -f -n __fish_use_subcommand -c cf -a orgs -d "List all orgs"
complete -f -n __fish_use_subcommand -c cf -a org -d "Show org info"
complete -f -n __fish_use_subcommand -c cf -a create-org -d "Create an org"
complete -f -n __fish_use_subcommand -c cf -a delete-org -d "Delete an org"
complete -f -n __fish_use_subcommand -c cf -a rename-org -d "Rename an org"
complete -f -n __fish_use_subcommand -c cf -a spaces -d "List all spaces in an org"
complete -f -n __fish_use_subcommand -c cf -a space -d "Show space info"
complete -f -n __fish_use_subcommand -c cf -a create-space -d "Create a space"
complete -f -n __fish_use_subcommand -c cf -a delete-space -d "Delete a space"
complete -f -n __fish_use_subcommand -c cf -a rename-space -d "Rename a space"
complete -f -n __fish_use_subcommand -c cf -a allow-space-ssh -d "Allow SSH access for the space"
complete -f -n __fish_use_subcommand -c cf -a disallow-space-ssh -d "Disallow SSH access for the space"
complete -f -n __fish_use_subcommand -c cf -a space-ssh-allowed -d "Reports whether SSH is allowed in a space"
complete -f -n __fish_use_subcommand -c cf -a domains -d "List domains in the target org"
complete -f -n __fish_use_subcommand -c cf -a create-domain -d "Create a domain in an org for later use"
complete -f -n __fish_use_subcommand -c cf -a delete-domain -d "Delete a domain"
complete -f -n __fish_use_subcommand -c cf -a create-shared-domain -d "Create a domain that can be used by all orgs (admin-only)"
complete -f -n __fish_use_subcommand -c cf -a delete-shared-domain -d "Delete a shared domain"
complete -f -n __fish_use_subcommand -c cf -a router-groups -d "List router groups"
complete -f -n __fish_use_subcommand -c cf -a routes -d "List all routes in the current space or the current organization"
complete -f -n __fish_use_subcommand -c cf -a create-route -d "Create a url route in a space for later use"
complete -f -n __fish_use_subcommand -c cf -a check-route -d "Perform a simple check to determine whether a route currently exists or not"
complete -f -n __fish_use_subcommand -c cf -a map-route -d "Add a url route to an app"
complete -f -n __fish_use_subcommand -c cf -a unmap-route -d "Remove a url route from an app"
complete -f -n __fish_use_subcommand -c cf -a delete-route -d "Delete a route"
complete -f -n __fish_use_subcommand -c cf -a delete-orphaned-routes -d "Delete all orphaned routes (i.e. those that are not mapped to an app)"
complete -f -n __fish_use_subcommand -c cf -a network-policies -d "List direct network traffic policies"
complete -f -n __fish_use_subcommand -c cf -a add-network-policy -d "Create policy to allow direct network traffic from one app to another"
complete -f -n __fish_use_subcommand -c cf -a remove-network-policy -d "Remove network traffic policy of an app"
complete -f -n __fish_use_subcommand -c cf -a buildpacks -d "List all buildpacks"
complete -f -n __fish_use_subcommand -c cf -a create-buildpack -d "Create a buildpack"
complete -f -n __fish_use_subcommand -c cf -a update-buildpack -d "Update a buildpack"
complete -f -n __fish_use_subcommand -c cf -a rename-buildpack -d "Rename a buildpack"
complete -f -n __fish_use_subcommand -c cf -a delete-buildpack -d "Delete a buildpack"
complete -f -n __fish_use_subcommand -c cf -a create-user -d "Create a new user"
complete -f -n __fish_use_subcommand -c cf -a delete-user -d "Delete a user"
complete -f -n __fish_use_subcommand -c cf -a org-users -d "Show org users by role"
complete -f -n __fish_use_subcommand -c cf -a set-org-role -d "Assign an org role to a user"
complete -f -n __fish_use_subcommand -c cf -a unset-org-role -d "Remove an org role from a user"
complete -f -n __fish_use_subcommand -c cf -a space-users -d "Show space users by role"
complete -f -n __fish_use_subcommand -c cf -a set-space-role -d "Assign a space role to a user"
complete -f -n __fish_use_subcommand -c cf -a unset-space-role -d "Remove a space role from a user"
complete -f -n __fish_use_subcommand -c cf -a quotas -d "List available usage quotas"
complete -f -n __fish_use_subcommand -c cf -a quota -d "Show quota info"
complete -f -n __fish_use_subcommand -c cf -a set-quota -d "Assign a quota to an org"
complete -f -n __fish_use_subcommand -c cf -a create-quota -d "Define a new resource quota"
complete -f -n __fish_use_subcommand -c cf -a delete-quota -d "Delete a quota"
complete -f -n __fish_use_subcommand -c cf -a update-quota -d "Update an existing resource quota"
complete -f -n __fish_use_subcommand -c cf -a share-private-domain -d "Share a private domain with an org"
complete -f -n __fish_use_subcommand -c cf -a unshare-private-domain -d "Unshare a private domain with an org"
complete -f -n __fish_use_subcommand -c cf -a space-quotas -d "List available space resource quotas"
complete -f -n __fish_use_subcommand -c cf -a space-quota -d "Show space quota info"
complete -f -n __fish_use_subcommand -c cf -a create-space-quota -d "Define a new space resource quota"
complete -f -n __fish_use_subcommand -c cf -a update-space-quota -d "Update an existing space quota"
complete -f -n __fish_use_subcommand -c cf -a delete-space-quota -d "Delete a space quota definition and unassign the space quota from all spaces"
complete -f -n __fish_use_subcommand -c cf -a set-space-quota -d "Assign a space quota definition to a space"
complete -f -n __fish_use_subcommand -c cf -a unset-space-quota -d "Unassign a quota from a space"
complete -f -n __fish_use_subcommand -c cf -a service-auth-tokens -d "List service auth tokens"
complete -f -n __fish_use_subcommand -c cf -a create-service-auth-token -d "Create a service auth token"
complete -f -n __fish_use_subcommand -c cf -a update-service-auth-token -d "Update a service auth token"
complete -f -n __fish_use_subcommand -c cf -a delete-service-auth-token -d "Delete a service auth token"
complete -f -n __fish_use_subcommand -c cf -a service-brokers -d "List service brokers"
complete -f -n __fish_use_subcommand -c cf -a create-service-broker -d "Create a service broker"
complete -f -n __fish_use_subcommand -c cf -a update-service-broker -d "Update a service broker"
complete -f -n __fish_use_subcommand -c cf -a delete-service-broker -d "Delete a service broker"
complete -f -n __fish_use_subcommand -c cf -a rename-service-broker -d "Rename a service broker"
complete -f -n __fish_use_subcommand -c cf -a migrate-service-instances -d "Migrate service instances from one service plan to another"
complete -f -n __fish_use_subcommand -c cf -a purge-service-offering -d "Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker"
complete -f -n __fish_use_subcommand -c cf -a purge-service-instance -d "Recursively remove a service instance and child objects from Cloud Foundry database without making requests to a service broker"
complete -f -n __fish_use_subcommand -c cf -a service-access -d "List service access settings"
complete -f -n __fish_use_subcommand -c cf -a enable-service-access -d "Enable access to a service or service plan for one or all orgs"
complete -f -n __fish_use_subcommand -c cf -a disable-service-access -d "Disable access to a service or service plan for one or all orgs"
complete -f -n __fish_use_subcommand -c cf -a security-group -d "Show a single security group"
complete -f -n __fish_use_subcommand -c cf -a security-groups -d "List all security groups"
complete -f -n __fish_use_subcommand -c cf -a create-security-group -d "Create a security group"
complete -f -n __fish_use_subcommand -c cf -a update-security-group -d "Update a security group"
complete -f -n __fish_use_subcommand -c cf -a delete-security-group -d "Deletes a security group"
complete -f -n __fish_use_subcommand -c cf -a bind-security-group -d "Bind a security group to a particular space, or all existing spaces of an org"
complete -f -n __fish_use_subcommand -c cf -a unbind-security-group -d "Unbind a security group from a space"
complete -f -n __fish_use_subcommand -c cf -a bind-staging-security-group -d "Bind a security group to the list of security groups to be used for staging applications"
complete -f -n __fish_use_subcommand -c cf -a staging-security-groups -d "List security groups in the staging set for applications"
complete -f -n __fish_use_subcommand -c cf -a unbind-staging-security-group -d "Unbind a security group from the set of security groups for staging applications"
complete -f -n __fish_use_subcommand -c cf -a bind-running-security-group -d "Bind a security group to the list of security groups to be used for running applications"
complete -f -n __fish_use_subcommand -c cf -a running-security-groups -d "List security groups in the set of security groups for running applications"
complete -f -n __fish_use_subcommand -c cf -a unbind-running-security-group -d "Unbind a security group from the set of security groups for running applications"
complete -f -n __fish_use_subcommand -c cf -a running-environment-variable-group -d "Retrieve the contents of the running environment variable group"
complete -f -n __fish_use_subcommand -c cf -a staging-environment-variable-group -d "Retrieve the contents of the staging environment variable group"
complete -f -n __fish_use_subcommand -c cf -a set-staging-environment-variable-group -d "Pass parameters as JSON to create a staging environment variable group"
complete -f -n __fish_use_subcommand -c cf -a set-running-environment-variable-group -d "Pass parameters as JSON to create a running environment variable group"
complete -f -n __fish_use_subcommand -c cf -a isolation-segments -d "List all isolation segments"
complete -f -n __fish_use_subcommand -c cf -a create-isolation-segment -d "Create an isolation segment"
complete -f -n __fish_use_subcommand -c cf -a delete-isolation-segment -d "Delete an isolation segment"
complete -f -n __fish_use_subcommand -c cf -a enable-org-isolation -d "Entitle an organization to an isolation segment"
complete -f -n __fish_use_subcommand -c cf -a disable-org-isolation -d "Revoke an organization's entitlement to an isolation segment"
complete -f -n __fish_use_subcommand -c cf -a set-org-default-isolation-segment -d "Set the default isolation segment used for apps in spaces in an org"
complete -f -n __fish_use_subcommand -c cf -a reset-org-default-isolation-segment -d "Reset the default isolation segment used for apps in spaces of an org"
complete -f -n __fish_use_subcommand -c cf -a set-space-isolation-segment -d "Assign the isolation segment for a space"
complete -f -n __fish_use_subcommand -c cf -a reset-space-isolation-segment -d "Reset the space's isolation segment to the org default"
complete -f -n __fish_use_subcommand -c cf -a feature-flags -d "Retrieve list of feature flags with status"
complete -f -n __fish_use_subcommand -c cf -a feature-flag -d "Retrieve an individual feature flag with status"
complete -f -n __fish_use_subcommand -c cf -a enable-feature-flag -d "Allow use of a feature"
complete -f -n __fish_use_subcommand -c cf -a disable-feature-flag -d "Prevent use of a feature"
complete -f -n __fish_use_subcommand -c cf -a curl -d "Executes a request to the targeted API endpoint"
complete -f -n __fish_use_subcommand -c cf -a config -d "Write default values to the config"
complete -f -n __fish_use_subcommand -c cf -a oauth-token -d "Retrieve and display the OAuth token for the current session"
complete -f -n __fish_use_subcommand -c cf -a ssh-code -d "Get a one time password for ssh clients"
complete -f -n __fish_use_subcommand -c cf -a add-plugin-repo -d "Add a new plugin repository"
complete -f -n __fish_use_subcommand -c cf -a remove-plugin-repo -d "Remove a plugin repository"
complete -f -n __fish_use_subcommand -c cf -a list-plugin-repos -d "List all the added plugin repositories"
complete -f -n __fish_use_subcommand -c cf -a repo-plugins -d "List all available plugins in specified repository or in all added repositories"
complete -f -n __fish_use_subcommand -c cf -a plugins -d "List commands of installed plugins"
complete -f -n __fish_use_subcommand -c cf -a install-plugin -d "Install CLI plugin"
complete -f -n __fish_use_subcommand -c cf -a uninstall-plugin -d "Uninstall CLI plugin"

View File

@@ -14,16 +14,68 @@
# Let's erase them, so that we start from a blank state
complete -c conda -e
# Complete using -n to select the given conda subcommand
# and passing the rest of the arguments to `complete`
# The goal here is to reduce clutter in the definitions below
function __fish_conda_subcommand
# This function does triple-duty:
# If called without arguments, it will print the first subcommand.
# If one exists, it returns false.
# If it doesn't, it returns true.
#
# If called with arguments, it will check that those match the given subcommands,
# and that there are no additional subcommands.
set -l subcmds $argv
set -q subcmds[1]
set -l have_sub $status
# get the commandline args without the "conda"
set -l toks (commandline -opc)[2..-1]
# Remove any important options - if we had options with arguments,
# they'd need to be listed here to be removed.
argparse -i h/help v/version -- $toks 2>/dev/null
# Return false if it fails - this shouldn't really happen,
# so all bets are off
or return 2
# Remove all matching subcommands
while set -q subcmds[1]
# If the subcommand matches, or we have an option, go on.
# (if the option took an argument we wouldn't know,
# so it needs to be argparse'd out above!)
if test "$subcmds[1]" = "$argv[1]"
set -e argv[1]
set -e subcmds[1]
else if string match -q -- '-*' $argv[1]
set -e argv[1]
else
return 1
end
end
# Skip any remaining options.
while string match -q -- '-*' $argv[1]
set -e argv[1]
end
# If we have no subcommand left,
# we either matched all given subcommands or we need one.
if not set -q argv[1]
return $have_sub
end
echo -- $argv[1]
# If we didn't have subcommands to check, return true
# If we did, this is an additional command and so we return false.
not test $have_sub -eq 0
end
function __fish_conda -a cmd
complete -c conda -n "__fish_seen_subcommand_from $cmd" $argv[2..-1]
complete -c conda -n "contains -- (__fish_conda_subcommand) $cmd" $argv[2..-1]
end
# Complete for the first argument only
function __fish_conda_top
complete -c conda -n __fish_is_first_token $argv
complete -c conda -n 'not __fish_conda_subcommand' $argv
end
function __fish_conda_config_keys
@@ -294,3 +346,8 @@ __fish_conda search -l platform -x -a "$__fish_conda_platforms" -d "Search the g
# Option reverse-dependency
__fish_conda search -l reverse-dependency -d "Perform a reverse dependency search"
__fish_conda_top -a env -d "Conda options for environments"
complete -c conda -n "__fish_conda_subcommand env" -a create -d "Create a new environment"
complete -c conda -n "__fish_conda_subcommand env" -a list -d "List all conda environments"
complete -c conda -n "__fish_conda_subcommand env create" -s f -l file -r -d "Create environment from yaml file"

View File

@@ -49,11 +49,10 @@ complete -c dart -n '__fish_seen_subcommand_from format' -s l -l line-length -d
complete -c dart -n '__fish_seen_subcommand_from migrate' -l apply-changes -d 'Apply the proposed null safety changes to the files on disk.'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l ignore-errors -d 'Attempt to perform null safety analysis even if the project has analysis errors.'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l skip-import-check -d 'Go ahead with migration even if some imported files have not yet been migrated.'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l web-preview -d 'Show an interactive preview of the proposed null safety changes in a browser window. Use --no-web-preview to print proposed changes to the console. (defaults to on)'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l no-web-preview -d 'Show an interactive preview of the proposed null safety changes in a browser window. Use --no-web-preview to print proposed changes to the console. (defaults to on)'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l preview-hostname -d 'Run the preview server on the specified hostname. If not specified, "localhost" is used. Use "any" to specify IPv6.any or IPv4.any.(defaults to "localhost")'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l preview-port -d 'Run the preview server on the specified port. If not specified, dynamically allocate a port.'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l preview-port -d 'Output a machine-readable summary of migration changes.'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l web-preview -d 'Show preview of the proposed null safety changes in a browser window'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l no-web-preview -d 'Show preview of the proposed null safety changes in the console'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l preview-hostname -d 'Run the preview server on the specified hostname'
complete -c dart -n '__fish_seen_subcommand_from migrate' -l preview-port -d 'Run the preview server on the specified port'
# pub
complete -c dart -n '__fish_seen_subcommand_from pub' -s C -l directory -d 'Run the subcommand in the directory<dir>.(defaults to ".")'
@@ -73,7 +72,7 @@ complete -c dart -n '__fish_seen_subcommand_from pub' -xa ploader -d 'Manage upl
# run
complete -c dart -n '__fish_seen_subcommand_from run' -l observe -d 'The observe flag is a convenience flag used to run a program with a set of common options useful for debugging.'
complete -c dart -n '__fish_seen_subcommand_from run' -l enable-vm-service -d 'Enables the VM service and listens on the specified port for connections (default port number is 8181, default bind address is localhost).'
complete -c dart -n '__fish_seen_subcommand_from run' -l enable-vm-service -d 'Enables VM service and listen on the specified port (default localhost:8181)'
complete -c dart -n '__fish_seen_subcommand_from run' -l serve-devtools -d 'Serves an instance of the Dart DevTools debugger and profiler via the VM service at <vm-service-uri>/devtools.'
complete -c dart -n '__fish_seen_subcommand_from run' -l no-serve-devtools -d 'Serves an instance of the Dart DevTools debugger and profiler via the VM service at <vm-service-uri>/devtools.'
complete -c dart -n '__fish_seen_subcommand_from run' -l pause-isolates-on-exit -d 'Pause isolates on exit when running with --enable-vm-service.'

View File

@@ -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 2>/dev/null | string match -r '\w+$')") priority threshold"
complete -f -c dpkg-reconfigure -l default-priority -d "Use current default 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'

View File

@@ -0,0 +1,112 @@
function __fail2ban_jails
# No need to deduplicate because fish will take care of that for us
path basename {,/usr/local}/etc/fail2ban/filter.d/*.{conf,local} | path change-extension ""
end
function __fail2ban_actions
# No need to deduplicate because fish will take care of that for us
path basename {,/usr/local}/etc/fail2ban/action.d/*.{conf,local} | path change-extension ""
end
# basic options
complete -c fail2ban-client -s c -l conf -d "Configuration dir"
complete -c fail2ban-client -s s -l socket -d "Socket path"
complete -c fail2ban-client -s p -l pidfile -d "Pidfile path"
complete -c fail2ban-client -l pname -d "Name of the process"
complete -c fail2ban-client -l loglevel -d "loglevel of client" -xa "CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG"
complete -c fail2ban-client -l logtarget -d "Logging target" -a "stdout stderr syslog sysout" # or path
complete -c fail2ban-client -l logtarget -d "Syslogsocket" -a "auto" # or path
complete -c fail2ban-client -s d -d "Dump configuration"
complete -c fail2ban-client -l dp -l dump-pretty -d "Dump configuration (pretty)"
complete -c fail2ban-client -s t -l test -d "Test configuration"
complete -c fail2ban-client -s i -d "Run in interactive mode"
complete -c fail2ban-client -s v -d "Increase verbosity"
complete -c fail2ban-client -s q -d "Decrease verbosity"
complete -c fail2ban-client -s x -d "Force execution of server"
complete -c fail2ban-client -s b -d "Start server in background (default)"
complete -c fail2ban-client -s f -d "Start server in foreground"
complete -c fail2ban-client -l str2sec -d "Convert time abbr format to secs"
complete -c fail2ban-client -s h -l help -d "Display help message"
complete -c fail2ban-client -s V -l version -d "Display client version"
# subcommands
complete -c fail2ban-client -n __fish_is_first_token -xa "start" -d "Start fail2ban server or jail"
complete -c fail2ban-client -n __fish_is_first_token -xa "restart" -d "Restart server or jail"
complete -c fail2ban-client -n __fish_is_first_token -xa "reload" -d "Reload server configuration"
complete -c fail2ban-client -n __fish_is_first_token -xa "stop" -d "Stop fail2ban server or jail"
complete -c fail2ban-client -n __fish_is_first_token -xa "unban" -d "Unban ip address(es)"
complete -c fail2ban-client -n __fish_is_first_token -xa "banned" -d "List jails w/ their banned IPs"
complete -c fail2ban-client -n __fish_is_first_token -xa "status" -d "Get server or jail status"
complete -c fail2ban-client -n __fish_is_first_token -xa "ping" -d "Check if server is alive"
complete -c fail2ban-client -n __fish_is_first_token -xa "help" -d "Prints usage synopsis"
complete -c fail2ban-client -n __fish_is_first_token -xa "version" -d "Prints server version"
complete -c fail2ban-client -n __fish_is_first_token -xa "set"
complete -c fail2ban-client -n __fish_is_first_token -xa "get"
complete -c fail2ban-client -n __fish_is_first_token -xa "flushlogs" -d "Flushes log files and reopens"
complete -c fail2ban-client -n __fish_is_first_token -xa "add"
complete -c fail2ban-client -n "__fish_seen_subcommand_from start" -xa "(__fail2ban_jails)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from stop" -xa "(__fail2ban_jails)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from status" -xa "(__fail2ban_jails)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from restart" -xa "(__fail2ban_jails)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from reload" -xa "(__fail2ban_jails)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from add" -xa "(__fail2ban_jails)"
# restart options
complete -c fail2ban-client -n "__fish_seen_subcommand_from restart" -l unban
complete -c fail2ban-client -n "__fish_seen_subcommand_from reload" -l if-exists
# reload options
complete -c fail2ban-client -n "__fish_seen_subcommand_from restart" -l restart
complete -c fail2ban-client -n "__fish_seen_subcommand_from reload" -l unban
complete -c fail2ban-client -n "__fish_seen_subcommand_from reload" -l all
complete -c fail2ban-client -n "__fish_seen_subcommand_from reload" -l if-exists
# unban options
complete -c fail2ban-client -n "__fish_seen_subcommand_from unban" -l all
# get/set loglevel
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_prev_arg_in get" -xa loglevel -d "Get server log level"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in set" -xa loglevel -d "Change server log level"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in loglevel" -xa "CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG"
# get/set logtarget
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_prev_arg_in get" -xa logtarget -d "Get server log output"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in set" -xa logtarget -d "Change server log output"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in logtarget" -a "STDOUT STDERR SYSLOG SYSTEMD-JOURNAL" # or path
# get/set syslogsocket
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_prev_arg_in get" -xa syslogsocket -d "Get server syslog socket"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in set" -xa syslogsocket -d "Change server syslog socket"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in syslogsocket" -a "auto" # or path
# get/set dbfile
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_prev_arg_in get" -xa dbfile -d "Get server db path"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in set" -xa dbfile -d "Change server db path"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in dbfile" -a "None" # or path
# get/set dbmaxmatches
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_prev_arg_in get" -xa dbmaxmatches -d "Get max matches stored per ticket"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in set" -xa dbmaxmatches -d "Set max matches stored per ticket"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in dbmaxmatches" -xa "(seq 0 100)"
# get/set dbpurgeage
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_prev_arg_in get" -xa dbpurgeage -d "Get secs ban history will be kept"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in set" -xa dbpurgeage -d "Set secs ban history will be kept"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in dbpurgeage" -xa "(seq 0 30 3600)"
# get/set <jail> options
complete -c fail2ban-client -n "__fish_seen_subcommand_from set get" -n "__fish_prev_arg_in set get" -xa "(__fail2ban_jails)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_is_nth_token 3" -xa "idle ignoreself addignoreip delignoreip ignorecommand ignorecache addlogpath dellogpath logencoding addjournalmatch deljournalmatch addfailregex delfailregex bantime datepattern usedns attempt banip unbanip maxretry maxmatches maxlines addaction delaction action"
complete -c fail2ban-client -n "__fish_seen_subcommand_from get" -n "__fish_is_nth_token 3" -xa "banned logpath logencoding journalmatch ignoreself ignoreip ignorecommand failregex ignoreregex findtime bantime datepattern usedns banip maxretry maxmatches maxlines actions action actionproperties actionmethods action"
# complete actions for `get/set jail action/actionproperties/actionmethods` and `set jail addaction/delaction`
complete -c fail2ban-client -n "__fish_seen_subcommand_from get set" -n "__fish_prev_arg_in action{,properties,methods}" -n "__fish_is_nth_token 4" -xa "(__fail2ban_actions)"
complete -c fail2ban-client -n "__fish_seen_subcommand_from set" -n "__fish_prev_arg_in {add,del}action" -n "__fish_is_nth_token 4" -xa "(__fail2ban_actions)"
# complete action commands for `get/set jail action <action>`
complete -c fail2ban-client -n "__fish_seen_subcommand_from get set" -n "__fish_seen_subcommand_from action" -n "__fish_is_nth_token 5" -xa "actionstart actionstop actioncheck actionban actionunban timeout"
# specific enumerable jail properties
complete -c fail2ban-client -n "__fish_seen_subcommand_from get set" -n "__fish_prev_arg_in idle" -xa "on off"
complete -c fail2ban-client -n "__fish_seen_subcommand_from get set" -n "__fish_prev_arg_in ignoreself" -xa "true false"

View File

@@ -1,15 +1,19 @@
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
set -l tokens (commandline -opc)
# if last 2 token is flash, then list file
if test (count $tokens) -gt 2
if test $tokens[-2] = flash
__fish_complete_path
return
end
end
__fish_fastboot_list_partition
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
set -l partitions boot bootloader cache cust dtbo metadata misc modem odm odm_dlkm oem product pvmfw radio recovery system system_ext userdata vbmeta vendor vendor_dlkm vmbeta_system
for i in $partitions
echo $i
end
@@ -73,4 +77,3 @@ complete -n '__fish_seen_subcommand_from reboot' -c fastboot -xa 'bootloader fas
# oem
complete -n '__fish_seen_subcommand_from oem' -c fastboot -xa 'device-info lock unlock edl'

View File

@@ -28,7 +28,7 @@ end
complete -c gcc -s o -d 'Place output in file' -r
complete -c gcc -o aux-info -d 'Output to given file prototyped declarations for all functions from a translation unit' -r
complete -c gcc -o fabi-version -d 'Use specified version of the C++ ABI' -xa "0 1"
complete -c gcc -l sysroot -x -a '(__fish_complete_directories)' -d 'Use dir as the logical root directory for headers and libraries'
complete -c gcc -l sysroot -x -a '(__fish_complete_directories)' -d 'Use dir as the root directory for headers and libraries'
#
@@ -39,8 +39,8 @@ complete -c gcc -o pass-exit-codes -d 'Return the highest error returned by any
complete -c gcc -s c -d 'Compile or assemble the source files, but do not link'
complete -c gcc -s S -d 'Do not assemble'
complete -c gcc -s E -d 'Stop after preprocessing'
complete -c gcc -s v -d 'Print to stderr the commands executed to run compilation'
complete -c gcc -o \#\#\# -d 'Like -v except commands are not executed and all command arguments are quoted'
complete -c gcc -s v -d 'Print the executed commands to stderr'
complete -c gcc -o \#\#\# -d 'Like -v except commands are not executed'
complete -c gcc -o pipe -d 'Use pipes not temp files for communication'
complete -c gcc -o combine -d 'Pass all the source files to the compiler at once'
complete -c gcc -l help -d 'Print help'
@@ -64,28 +64,28 @@ complete -c gcc -o funsigned-bitfields -d 'Treat bitfields as unsigned by defaul
complete -c gcc -o fno-signed-bitfields -d 'Remove fsigned-bitfields'
complete -c gcc -o fno-unsigned-bitfields -d 'Remove funsinged-bitfields'
complete -c gcc -o fno-access-control -d 'Turn off all access checking'
complete -c gcc -o fcheck-new -d 'Check pointer returned by "operator new" is non-null before attempting to modify allocated storage'
complete -c gcc -o fconserve-space -d 'Put uninitialized or runtime-initialized global variables into the common segment, as C does'
complete -c gcc -o fcheck-new -d 'Check "operator new" returns non-null before modifying allocated storage'
complete -c gcc -o fconserve-space -d 'Put uninitialized global variables into the common segment, as C does'
complete -c gcc -o ffriend-injection -d 'Inject friend functions into enclosing namespace'
complete -c gcc -o fno-const-strings -d 'Give string constants type "char *" without const'
complete -c gcc -o fno-elide-constructors -d "Don't elide temporaries used to construct objects"
complete -c gcc -o fno-enforce-eh-specs -d 'Dont generate code to check for violation of exception specifications at runtime'
complete -c gcc -o ffor-scope -d 'Limit scope of variables declared in a for-init-statement to the for loop itself, as specified by the C++ standard'
complete -c gcc -o ffor-scope -d 'Limit scope of variables in for-init-statement to the loop itself, like the C++ standard says'
complete -c gcc -o fno-for-scope -d "Don't limit scope of vars declared in for loop to the for loop"
complete -c gcc -o fno-gnu-keywords -d 'Do not recognize "typeof" as a keyword, so code can use it as an identifier'
complete -c gcc -o fno-implicit-templates -d 'Never emit code for non-inline templates which are instantiated implicitly'
complete -c gcc -o fno-implicit-inline-templates -d 'Dont emit code for implicit instantiations of inline templates, either'
complete -c gcc -o fno-implement-inlines -d 'Do not emit out-of-line copies of inline functions controlled by #pragma implementation'
complete -c gcc -o fms-extensions -d 'Disable pedantic warnings about constructs used in MFC'
complete -c gcc -o fno-nonansi-builtins -d 'Disable built-in declarations of functions that are not mandated by ANSI/ISO C'
complete -c gcc -o fno-operator-names -d 'Do not treat the operator name keywords "and", "bitand", "bitor", "compl", "not", "or" and "xor" as synonyms as keywords'
complete -c gcc -o fno-nonansi-builtins -d 'Disable built-ins that are not mandated by ANSI/ISO C'
complete -c gcc -o fno-operator-names -d 'Do not treat and/bitand/bitor/compl/not/or/xor as keywords'
complete -c gcc -o fno-optional-diags -d 'Disable diagnostics that the standard says a compiler does not need to issue'
complete -c gcc -o fpermissive -d 'Downgrade some diagnostics about nonconformant code from errors to warnings'
complete -c gcc -o frepo -d 'Enable automatic template instantiation at link time'
complete -c gcc -o fno-rtti -d 'Disable generation of information about classes with virtual functions for use by dynamic_cast and typeid'
complete -c gcc -o fstats -d 'Emit statistics about front-end processing at the end of the compilation'
complete -c gcc -o fno-threadsafe-statics -d 'Do not emit the extra code to use the routines specified in the C++ ABI for thread-safe initialization of local statics'
complete -c gcc -o fuse-cxa-atexit -d 'Register destructors for objects with static storage duration with the "__cxa_atexit" function rather than the "atexit" function'
complete -c gcc -o fno-threadsafe-statics -d 'Do not emit code to use the routines specified in the C++ ABI for thread-safe initialization of local statics'
complete -c gcc -o fuse-cxa-atexit -d 'Use "__cxa_atexit" function for static object destructors'
complete -c gcc -o fvisibility-inlines-hidden -d 'Mark inlined methods with "__attribute__ ((visibility ("hidden")))"'
complete -c gcc -o fno-weak -d 'Do not use weak symbol support'
complete -c gcc -o nostdinc++ -d 'Do not search for header files in the standard directories specific to C++'
@@ -107,26 +107,25 @@ complete -c gcc -o name -d 'Use class-name as the name of the class to instantia
complete -c gcc -o fgnu-runtime -d 'Generate object code compatible with the standard GNU Objective-C runtime'
complete -c gcc -o fnext-runtime -d 'Generate output compatible with the NeXT runtime'
complete -c gcc -o fno-nil-receivers -d 'Assume that all Objective-C message dispatches (e'
complete -c gcc -o fobjc-call-cxx-cdtors -d 'For each Objective-C class, check if any of its instance variables is a C++ object with a non-trivial default constructor'
complete -c gcc -o fobjc-call-cxx-cdtors -d '(Obj-C), check if instance variables are a C++ object with non-trivial default constructor'
complete -c gcc -o fobjc-direct-dispatch -d 'Allow fast jumps to the message dispatcher'
complete -c gcc -o fobjc-exceptions -d 'Enable syntactic support for structured exception handling in Objective-C, similar to what is offered by C++ and Java'
complete -c gcc -o fobjc-exceptions -d '(Obj-C) Enable syntactic support for structured exception handling'
complete -c gcc -o fobjc-gc -d 'Enable garbage collection (GC) in Objective-C and Objective-C++ programs'
complete -c gcc -o freplace-objc-classes -d 'Emit a special marker instructing ld(1) not to statically link in the resulting object file, and allow dyld(1) to load it in at run time instead'
complete -c gcc -o fzero-link -d 'When compiling for the NeXT runtime, the compiler ordinarily replaces calls to "objc_getClass("'
complete -c gcc -o freplace-objc-classes -d 'Tell ld(1) not to statically link the object file, and allow dyld(1) to load it at run time instead'
complete -c gcc -o fzero-link
complete -c gcc -o gen-decls -d 'Dump interface declarations for all classes seen in the source file to a file named sourcename'
complete -c gcc -o Wassign-intercept -d 'Warn whenever an Objective-C assignment is being intercepted by the garbage collector'
complete -c gcc -o Wno-protocol -d 'If a class is declared to implement a protocol, a warning is issued for every method in the protocol that is not implemented by the class'
complete -c gcc -o Wno-protocol -d 'Warn about unimplemented protocol methods'
complete -c gcc -o Wselector -d 'Warn if multiple methods of different types for the same selector are found during compilation'
complete -c gcc -o Wstrict-selector-match -d 'Warn if multiple methods with differing argument and/or return types are found for a given selector when attempting to send a message using this selector to a receiver of type "id" or "Class"'
complete -c gcc -o Wundeclared-selector -d 'Warn if a "@selector('
complete -c gcc -o print-objc-runtime-info -d 'Generate C header describing the largest structure that is passed by value, if any'
complete -c gcc -o fmessage-length -d 'Try to format error messages so that they fit on lines of the specified number of characters' -x -a 80
complete -c gcc -o Wstrict-selector-match -d 'Warn if methods with differing argument/return types are found for a selector with a receiver of type "id"/"Class"'
complete -c gcc -o Wundeclared-selector -d 'Warn for a "@selector" referring to undeclared selector'
complete -c gcc -o print-objc-runtime-info -d 'Generate C header describing the largest structure that is passed by value'
complete -c gcc -o fmessage-length -d 'Try to format error messages so that they fit on lines of this number of characters' -x -a 80
complete -c gcc -o fdiagnostics-show-location -d 'Only meaningful in line-wrapping mode' -a once
complete -c gcc -o line -d 'Only meaningful in line-wrapping mode'
complete -c gcc -o fdiagnostics-show-options -d 'This option instructs the diagnostic machinery to add text to each diagnostic emitted, which indicates which command line option directly controls that diagnostic, when such an option is known to the diagnostic machinery'
complete -c gcc -o Wno- -d 'to turn off warnings; for example, -Wno-implicit'
complete -c gcc -o fdiagnostics-show-options -d 'Show which option controls a diagnostic'
complete -c gcc -o fsyntax-only -d 'Check the code for syntax errors, but dont do anything beyond that'
complete -c gcc -o pedantic -d 'Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions'
complete -c gcc -o pedantic -d 'Issue all warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions'
complete -c gcc -o pedantic-errors -d 'Like -pedantic, except that errors are produced rather than warnings'
complete -c gcc -s w -d 'Inhibit all warning messages'
complete -c gcc -o Wno-import -d 'Inhibit warning messages about the use of #import'
@@ -134,9 +133,9 @@ complete -c gcc -o Wchar-subscripts -d 'Warn if an array subscript has type "cha
complete -c gcc -o Wcomment -d 'Warn whenever a comment-start sequence appears in a comment'
complete -c gcc -o Wfatal-errors -d 'Abort compilation on the first error'
complete -c gcc -o Wformat -d 'Check calls to "printf" and "scanf", etc'
complete -c gcc -o Wformat-y2k -d 'With -Wformat, also warn about "strftime" formats which may yield only a two-digit year'
complete -c gcc -o Wno-format-extra-args -d 'With -Wformat, do not warn about excess arguments to "printf" or "scanf"'
complete -c gcc -o Wno-format-zero-length -d 'With -Wformat, do not warn about zero-length formats'
complete -c gcc -o Wformat-y2k -d 'Warn about "strftime" formats which may yield only a two-digit year'
complete -c gcc -o Wno-format-extra-args -d 'Do not warn about excess arguments to "printf" or "scanf"'
complete -c gcc -o Wno-format-zero-length -d 'Do not warn about zero-length formats'
complete -c gcc -o Wformat-nonliteral -d 'With -Wformat, also warn if the format string is not a string literal'
complete -c gcc -o Wformat-security -d 'With -Wformat, also warn about uses of potentially insecure format functions'
complete -c gcc -o Wnonnull -d 'Warn about passing a null pointer for arguments marked as requiring non-null'
@@ -147,13 +146,13 @@ complete -c gcc -o Werror-implicit-function-declaration -d 'Give a warning (or e
complete -c gcc -o Wimplicit -d 'Same as -Wimplicit-int and -Wimplicit-function-declaration'
complete -c gcc -o Wmain -d 'Warn if the type of main is suspicious'
complete -c gcc -o Wmissing-braces -d 'Warn if an aggregate or union initializer is not fully bracketed'
complete -c gcc -o Wmissing-include-dirs -d '(C, C++, Objective-C and Objective-C++ only) Warn if a user-supplied include directory does not exist'
complete -c gcc -o Wmissing-include-dirs -d '(C, C++, Obj-C, Obj-C++) Warn if a user-supplied include directory does not exist'
complete -c gcc -o Wparentheses -d 'Warn if parentheses are omitted where confusing'
complete -c gcc -o Wsequence-point -d 'Warn about undefined semantics because of violations of sequence point rules in the C standard'
complete -c gcc -o Wreturn-type -d 'Warn whenever a function is defined with a return-type that defaults to "int"'
complete -c gcc -o Wswitch -o Wswitch-enum -d 'Warn whenever a "switch" statement lacks a "case" for a member of an enum'
complete -c gcc -o Wswitch-default -d 'Warn whenever a "switch" statement does not have a "default" case'
complete -c gcc -o Wtrigraphs -d 'Warn if any trigraphs are encountered that might change the meaning of the program (trigraphs within comments are not warned about)'
complete -c gcc -o Wtrigraphs -d 'Warn about used trigraphs'
complete -c gcc -o Wunused-function -d 'Warn about unused functions'
complete -c gcc -o Wunused-label -d 'Warn about unused labels'
complete -c gcc -o Wunused-parameter -d 'Warn about unused function parameters'
@@ -175,14 +174,14 @@ complete -c gcc -o Wundef -d 'Warn if an undefined identifier is evaluated in an
complete -c gcc -o Wno-endif-labels -d 'Do not warn whenever an #else or an #endif are followed by text'
complete -c gcc -o Wshadow -d 'Warn if a local variable shadows another variable or if a built-in function is shadowed'
complete -c gcc -o Wlarger-than-len -d 'Warn whenever an object of larger than len bytes is defined'
complete -c gcc -o Wunsafe-loop-optimizations -d 'Warn if the loop cannot be optimized because the compiler could not assume anything on the bounds of the loop indices'
complete -c gcc -o Wunsafe-loop-optimizations -d 'Warn if a loop cannot be safely optimized'
complete -c gcc -o Wpointer-arith -d 'Warn about anything that depends on the "size of" a function type or of "void"'
complete -c gcc -o Wbad-function-cast -d '(C only) Warn whenever a function call is cast to a non-matching type'
complete -c gcc -o Wc++-compat -d 'Warn about ISO C constructs that are outside of the common subset of ISO C and ISO C++, e'
complete -c gcc -o Wcast-qual -d 'Warn whenever a pointer is cast so as to remove a type qualifier from the target type'
complete -c gcc -o Wcast-align -d 'Warn whenever a pointer is cast such that the required alignment of the target is increased'
complete -c gcc -o Wwrite-strings -d 'When compiling C, give string constants the type "const char[length]" so that copying the address of one into a non-"const" "char *" pointer will get a warning; when compiling C++, warn about the deprecated conversion from string constants to "char *"'
complete -c gcc -o Wconversion -d 'Warn if a prototype causes a type conversion that is different from what would happen to the same argument in the absence of a prototype'
complete -c gcc -o Wwrite-strings -d 'For C, give string constants the type "const char[length]"; For C++, warn about conversion from string constants to "char *"'
complete -c gcc -o Wconversion -d 'Warn if presence of a prototype changes type conversion'
complete -c gcc -o Wsign-compare -d 'Warn when a comparison between signed and unsigned values could produce an incorrect result when the signed value is converted to unsigned'
complete -c gcc -o Waggregate-return -d 'Warn if any functions that return structures or unions are defined or called'
complete -c gcc -o Wno-attributes -d 'Do not warn if an unexpected "__attribute__" is used, such as unrecognized attributes, function attributes applied to variables, etc'
@@ -195,10 +194,10 @@ complete -c gcc -o Wmissing-noreturn -d 'Warn about functions which might be can
complete -c gcc -o Wmissing-format-attribute -d 'Warn about function pointers which might be candidates for "format" attributes'
complete -c gcc -o Wno-multichar -d 'Do not warn if a multicharacter constant (FOOF) is used'
complete -c gcc -o Wnormalized -d 'In ISO C and ISO C++, two identifiers are different if they are different sequences of characters' -x -a "none id nfc nfkc"
complete -c gcc -o Wno-deprecated-declarations -d 'Do not warn about uses of functions, variables, and types marked as deprecated by using the "deprecated" attribute'
complete -c gcc -o Wpacked -d 'Warn if a structure is given the packed attribute, but the packed attribute has no effect on the layout or size of the structure'
complete -c gcc -o Wpadded -d 'Warn if padding is included in a structure, either to align an element of the structure or to align the whole structure'
complete -c gcc -o Wredundant-decls -d 'Warn if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing'
complete -c gcc -o Wno-deprecated-declarations -d 'Do not warn about uses of functions, variables, and types marked as deprecated'
complete -c gcc -o Wpacked -d 'Warn if a structure is given the packed attribute without effect'
complete -c gcc -o Wpadded -d 'Warn if padding is included in a structure'
complete -c gcc -o Wredundant-decls -d 'Warn if anything is declared more than once in the same scope'
complete -c gcc -o Wnested-externs -d '(C only) Warn if an "extern" declaration is encountered within a function'
complete -c gcc -o Wunreachable-code -d 'Warn if the compiler detects that code will never be executed'
complete -c gcc -o Winline -d 'Warn if a function can not be inlined and it was declared as inline'
@@ -207,7 +206,7 @@ complete -c gcc -o Wno-int-to-pointer-cast -d '(C only) Suppress warnings from c
complete -c gcc -o Wno-pointer-to-int-cast -d '(C only) Suppress warnings from casts from a pointer to an integer type of a different size'
complete -c gcc -o Winvalid-pch -d 'Warn if a precompiled header is found in the search path but cant be used'
complete -c gcc -o Wlong-long -d 'Warn if long long type is used'
complete -c gcc -o Wvariadic-macros -d 'Warn if variadic macros are used in pedantic ISO C90 mode, or the GNU alternate syntax when in pedantic ISO C99 mode'
complete -c gcc -o Wvariadic-macros -d 'Warn if variadic macros are used in pedantic mode'
complete -c gcc -o Wvolatile-register-var -d 'Warn if a register variable is declared volatile'
complete -c gcc -o Wdisabled-optimization -d 'Warn if a requested optimization pass is disabled'
complete -c gcc -o Wpointer-sign -d 'Warn for pointer argument passing or assignment with different signedness'
@@ -216,20 +215,20 @@ complete -c gcc -o Wstack-protector -d 'This option is only active when -fstack-
complete -c gcc -s g -d 'Produce debugging information in the operating systems native format (stabs, COFF, XCOFF, or DWARF 2)'
complete -c gcc -o ggdb -d 'Produce debugging information for use by GDB'
complete -c gcc -o gstabs -d 'Produce debugging information in stabs format (if that is supported), without GDB extensions'
complete -c gcc -o feliminate-unused-debug-symbols -d 'Produce debugging information in stabs format (if that is supported), for only symbols that are actually used'
complete -c gcc -o gstabs+ -d 'Produce debugging information in stabs format (if that is supported), using GNU extensions understood only by the GNU debugger (GDB)'
complete -c gcc -o gcoff -d 'Produce debugging information in COFF format (if that is supported)'
complete -c gcc -o gxcoff -d 'Produce debugging information in XCOFF format (if that is supported)'
complete -c gcc -o gxcoff+ -d 'Produce debugging information in XCOFF format (if that is supported), using GNU extensions understood only by the GNU debugger (GDB)'
complete -c gcc -o gdwarf-2 -d 'Produce debugging information in DWARF version 2 format (if that is supported)'
complete -c gcc -o gvms -d 'Produce debugging information in VMS debug format (if that is supported)'
complete -c gcc -o glevel -d 'Request debugging information and also use level to specify how much information'
complete -c gcc -o ggdblevel -d 'Request debugging information and also use level to specify how much information'
complete -c gcc -o gstabslevel -d 'Request debugging information and also use level to specify how much information'
complete -c gcc -o gcofflevel -d 'Request debugging information and also use level to specify how much information'
complete -c gcc -o gxcofflevel -d 'Request debugging information and also use level to specify how much information'
complete -c gcc -o gvmslevel -d 'Request debugging information and also use level to specify how much information'
complete -c gcc -o feliminate-dwarf2-dups -d 'Compress DWARF2 debugging information by eliminating duplicated information about each symbol'
complete -c gcc -o feliminate-unused-debug-symbols -d 'Produce debugging information in stabs format, for only symbols that are actually used'
complete -c gcc -o gstabs+ -d 'Produce debug info in stabs format, using GNU extensions for GDB'
complete -c gcc -o gcoff -d 'Produce debug info in COFF format'
complete -c gcc -o gxcoff -d 'Produce debug info in XCOFF format'
complete -c gcc -o gxcoff+ -d 'Produce debug info in XCOFF format, using GNU extensions for GDB'
complete -c gcc -o gdwarf-2 -d 'Produce debug info in DWARF version 2 format'
complete -c gcc -o gvms -d 'Produce debug info in VMS debug format'
complete -c gcc -o glevel -d 'Request debug info and also use level to specify how much information'
complete -c gcc -o ggdblevel -d 'Request debug info and also use level to specify how much information'
complete -c gcc -o gstabslevel -d 'Request debug info and also use level to specify how much information'
complete -c gcc -o gcofflevel -d 'Request debug info and also use level to specify how much information'
complete -c gcc -o gxcofflevel -d 'Request debug info and also use level to specify how much information'
complete -c gcc -o gvmslevel -d 'Request debug info and also use level to specify how much information'
complete -c gcc -o feliminate-dwarf2-dups -d 'Compress DWARF2 debug info by eliminating duplicated information about each symbol'
complete -c gcc -s p -d 'Generate extra code to write profile information suitable for the analysis program prof'
complete -c gcc -o pg -d 'Generate extra code to write profile information suitable for the analysis program gprof'
complete -c gcc -s Q -d 'Makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes'
@@ -277,7 +276,7 @@ complete -c gcc -o foptimize-sibling-calls -d 'Optimize sibling and tail recursi
complete -c gcc -o fno-inline -d 'Dont pay attention to the "inline" keyword'
complete -c gcc -o finline-functions -d 'Integrate all simple functions into their callers'
complete -c gcc -o finline-functions-called-once -d 'Consider all "static" functions called once for inlining into their caller even if they are not marked "inline"'
complete -c gcc -o fearly-inlining -d 'Inline functions marked by "always_inline" and functions whose body seems smaller than the function call overhead early before doing -fprofile-generate instrumentation and real inlining pass'
complete -c gcc -o fearly-inlining -d 'Inline functions marked by "always_inline" and small functions early'
complete -c gcc -o finline-limit -d 'By default, GCC limits the size of functions that can be inlined' -x -a "1 2 3 4 5"
complete -c gcc -o fkeep-inline-functions -d 'In C, emit "static" functions that are declared "inline" into the object file, even if the function has been inlined into all of its callers'
complete -c gcc -o fkeep-static-consts -d 'Emit variables declared "static const" when optimization isnt turned on, even if the variables arent referenced'
@@ -288,9 +287,6 @@ complete -c gcc -o fno-branch-count-reg -d 'Do not use "decrement and branch" in
complete -c gcc -o fno-function-cse -d 'Do not put function addresses in registers; make each instruction that calls a constant function contain the functions address explicitly'
complete -c gcc -o fno-zero-initialized-in-bss -d 'If the target supports a BSS section, GCC by default puts variables that are initialized to zero into BSS'
complete -c gcc -o fbounds-check -d 'For front-ends that support it, generate additional code to check that indices used to access arrays are within the declared range'
complete -c gcc -o fmudflap -d 'For front-ends that support it (C and C++), instrument all risky pointer/array dereferencing operations, some standard library string/heap functions, and some other associated constructs with range/validity tests'
complete -c gcc -o fmudflapth -d 'For front-ends that support it (C and C++), instrument all risky pointer/array dereferencing operations, some standard library string/heap functions, and some other associated constructs with range/validity tests'
complete -c gcc -o fmudflapir -d 'For front-ends that support it (C and C++), instrument all risky pointer/array dereferencing operations, some standard library string/heap functions, and some other associated constructs with range/validity tests'
complete -c gcc -o fstrength-reduce -d 'Perform the optimizations of loop strength reduction and elimination of iteration variables'
complete -c gcc -o fthread-jumps -d 'Perform optimizations where we check to see if a jump branches to a location where another comparison subsumed by the first is found'
complete -c gcc -o fcse-follow-jumps -d 'In common subexpression elimination, scan through jump instructions when the target of the jump is not reached by any other path'
@@ -312,19 +308,19 @@ complete -c gcc -o fdelete-null-pointer-checks -d 'Use global dataflow analysis
complete -c gcc -o fexpensive-optimizations -d 'Perform a number of minor optimizations that are relatively expensive'
complete -c gcc -o foptimize-register-move -d 'Attempt to reassign register numbers in move instructions and as operands of other simple instructions in order to maximize the amount of register tying'
complete -c gcc -o fregmove -d 'Attempt to reassign register numbers in move instructions and as operands of other simple instructions in order to maximize the amount of register tying'
complete -c gcc -o fdelayed-branch -d 'If supported for the target machine, attempt to reorder instructions to exploit instruction slots available after delayed branch instructions'
complete -c gcc -o fschedule-insns -d 'If supported for the target machine, attempt to reorder instructions to eliminate execution stalls due to required data being unavailable'
complete -c gcc -o fschedule-insns2 -d 'Similar to -fschedule-insns, but requests an additional pass of instruction scheduling after register allocation has been done'
complete -c gcc -o fdelayed-branch -d 'Try to reorder instructions to exploit instruction slots available after delayed branch instructions'
complete -c gcc -o fschedule-insns -d 'Try to reorder instructions to eliminate execution stalls due to required data being unavailable'
complete -c gcc -o fschedule-insns2 -d '-fschedule-insns, but request an additional pass of instruction scheduling after register allocation'
complete -c gcc -o fno-sched-interblock -d 'Dont schedule instructions across basic blocks'
complete -c gcc -o fno-sched-spec -d 'Dont allow speculative motion of non-load instructions'
complete -c gcc -o fsched-spec-load -d 'Allow speculative motion of some load instructions'
complete -c gcc -o fsched-spec-load-dangerous -d 'Allow speculative motion of more load instructions'
complete -c gcc -o fsched-stalled-insns -d 'Define how many insns (if any) can be moved prematurely from the queue of stalled insns into the ready list, during the second scheduling pass'
complete -c gcc -o fsched-stalled-insns-dep -d 'Define how many insn groups (cycles) will be examined for a dependency on a stalled insn that is candidate for premature removal from the queue of stalled insns'
complete -c gcc -o fsched-stalled-insns -d 'Define how many insns can be moved from the queue of stalled insns into the ready list, during the second scheduling pass'
complete -c gcc -o fsched-stalled-insns-dep -d 'Define how many insn groups will be examined for a dependency on a stalled insn that is candidate for premature removal from the queue of stalled insns'
complete -c gcc -o fsched2-use-superblocks -d 'When scheduling after register allocation, do use superblock scheduling algorithm'
complete -c gcc -o fsched2-use-traces -d 'Use -fsched2-use-superblocks algorithm when scheduling after register allocation and additionally perform code duplication in order to increase the size of superblocks using tracer pass'
complete -c gcc -o freschedule-modulo-scheduled-loops -d 'The modulo scheduling comes before the traditional scheduling, if a loop was modulo scheduled we may want to prevent the later scheduling passes from changing its schedule, we use this option to control that'
complete -c gcc -o fcaller-saves -d 'Enable values to be allocated in registers that will be clobbered by function calls, by emitting extra instructions to save and restore the registers around such calls'
complete -c gcc -o fcaller-saves -d 'Allocate in registers that will be clobbered by function calls, by saving and restoring'
complete -c gcc -o ftree-pre -d 'Perform Partial Redundancy Elimination (PRE) on trees'
complete -c gcc -o ftree-fre -d 'Perform Full Redundancy Elimination (FRE) on trees'
complete -c gcc -o ftree-copy-prop -d 'Perform copy propagation on trees'
@@ -353,22 +349,18 @@ complete -c gcc -o funroll-loops -d 'Unroll loops whose number of iterations can
complete -c gcc -o funroll-all-loops -d 'Unroll all loops, even if their number of iterations is uncertain when the loop is entered'
complete -c gcc -o fsplit-ivs-in-unroller -d 'Enables expressing of values of induction variables in later iterations of the unrolled loop using the value in the first iteration'
complete -c gcc -o fvariable-expansion-in-unroller -d 'With this option, the compiler will create multiple copies of some local variables when unrolling a loop which can result in superior code'
complete -c gcc -o fprefetch-loop-arrays -d 'If supported by the target machine, generate instructions to prefetch memory to improve the performance of loops that access large arrays'
complete -c gcc -o fprefetch-loop-arrays -d 'Generate instructions to prefetch memory to improve the performance of loops that access large arrays'
complete -c gcc -o fno-peephole -d 'Disable any machine-specific peephole optimizations'
complete -c gcc -o fno-peephole2 -d 'Disable any machine-specific peephole optimizations'
complete -c gcc -o fno-guess-branch-probability -d 'Do not guess branch probabilities using heuristics'
complete -c gcc -o freorder-blocks -d 'Reorder basic blocks in the compiled function in order to reduce number of taken branches and improve code locality'
complete -c gcc -o freorder-blocks-and-partition -d 'In addition to reordering basic blocks in the compiled function, in order to reduce number of taken branches, partitions hot and cold basic blocks into separate sections of the assembly and '
complete -c gcc -o freorder-blocks -d 'Reorder basic blocks in the compiled function to reduce number of taken branches and improve code locality'
complete -c gcc -o freorder-blocks-and-partition -d 'Reorder basic blocks in the compiled function and partition hot and cold blocks'
complete -c gcc -o freorder-functions -d 'Reorder functions in the object file in order to improve code locality'
complete -c gcc -o fstrict-aliasing -d 'Allows the compiler to assume the strictest aliasing rules applicable to the language being compiled'
complete -c gcc -o falign-functions -d 'Align the start of functions to the next power-of-two greater than n, skipping up to n bytes'
complete -c gcc -o falign-functions -d 'Align the start of functions to the next power-of-two greater than n, skipping up to n bytes'
complete -c gcc -o falign-labels -d 'Align all branch targets to a power-of-two boundary, skipping up to n bytes like -falign-functions'
complete -c gcc -o falign-labels -d 'Align all branch targets to a power-of-two boundary, skipping up to n bytes like -falign-functions'
complete -c gcc -o falign-loops -d 'Align loops to a power-of-two boundary, skipping up to n bytes like -falign-functions'
complete -c gcc -o falign-loops -d 'Align loops to a power-of-two boundary, skipping up to n bytes like -falign-functions'
complete -c gcc -o falign-jumps -d 'Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like -falign-functions'
complete -c gcc -o falign-jumps -d 'Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like -falign-functions'
complete -c gcc -o falign-jumps -d 'Align branch targets to a power-of-two, skipping bytes'
complete -c gcc -o funit-at-a-time -d 'Parse the whole compilation unit before starting to produce code'
complete -c gcc -o fweb -d 'Constructs webs as commonly used for register allocation purposes and assign each web individual pseudo register'
complete -c gcc -o fwhole-program -d 'Assume that the current compilation unit represents whole program being compiled'
@@ -376,7 +368,7 @@ complete -c gcc -o fno-cprop-registers -d 'After register allocation and post-re
complete -c gcc -o fprofile-generate -d 'Enable options usually used for instrumenting application to produce profile useful for later recompilation with profile feedback based optimization'
complete -c gcc -o fprofile-use -d 'Enable profile feedback directed optimizations, and optimizations generally profitable only with profile feedback available'
complete -c gcc -o ffloat-store -d 'Do not store floating point variables in registers, and inhibit other options that might change whether a floating point value is taken from a register or memory'
complete -c gcc -o ffast-math -d 'Sets -fno-math-errno, -funsafe-math-optimizations, -fno-trapping-math, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans and fcx-limited-range'
complete -c gcc -o ffast-math -d 'Set a bunch of inadvisable math options to make it faster'
complete -c gcc -o fno-math-errno -d 'Do not set ERRNO after calling math functions that are executed with a single instruction, e'
complete -c gcc -o funsafe-math-optimizations -d 'Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid and (b) may violate IEEE or ANSI standards'
complete -c gcc -o ffinite-math-only -d 'Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs'
@@ -396,7 +388,7 @@ complete -c gcc -o funroll-all-loops -d 'Unroll all loops, even if their number
complete -c gcc -o fpeel-loops -d 'Peels the loops for that there is enough information that they do not roll much (from profile feedback)'
complete -c gcc -o fmove-loop-invariants -d 'Enables the loop invariant motion pass in the new loop optimizer'
complete -c gcc -o funswitch-loops -d 'Move branches with loop invariant conditions out of the loop, with duplicates of the loop on both branches (modified according to result of the condition)'
complete -c gcc -o fprefetch-loop-arrays -d 'If supported by the target machine, generate instructions to prefetch memory to improve the performance of loops that access large arrays'
complete -c gcc -o fprefetch-loop-arrays -d 'Generate instructions to prefetch memory to improve the performance of loops that access large arrays'
complete -c gcc -o ffunction-sections -d 'Place each function or data item into its own section in the output file if the target supports arbitrary sections'
complete -c gcc -o fdata-sections -d 'Place each function or data item into its own section in the output file if the target supports arbitrary sections'
complete -c gcc -o fbranch-target-load-optimize -d 'Perform branch target register load optimization before prologue / epilogue threading'
@@ -615,64 +607,65 @@ complete -c gcc -o bundle -d 'Produce a Mach-o bundle format file'
complete -c gcc -o bundle_loader -d 'This option specifies the executable that will be loading the build output file being linked'
complete -c gcc -o dynamiclib -d 'When passed this option, GCC will produce a dynamic library instead of an executable when linking, using the Darwin libtool command'
complete -c gcc -o force_cpusubtype_ALL -d 'This causes GCCs output file to have the ALL subtype, instead of one controlled by the -mcpu or -march option'
complete -c gcc -o allowable_client -d 'These options are passed to the Darwin linker'
complete -c gcc -o client_name -d 'These options are passed to the Darwin linker'
complete -c gcc -o compatibility_version -d 'These options are passed to the Darwin linker'
complete -c gcc -o current_version -d 'These options are passed to the Darwin linker'
complete -c gcc -o dead_strip -d 'These options are passed to the Darwin linker'
complete -c gcc -o dependency-file -d 'These options are passed to the Darwin linker'
complete -c gcc -o dylib_file -d 'These options are passed to the Darwin linker'
complete -c gcc -o dylinker_install_name -d 'These options are passed to the Darwin linker'
complete -c gcc -o dynamic -d 'These options are passed to the Darwin linker'
complete -c gcc -o exported_symbols_list -d 'These options are passed to the Darwin linker'
complete -c gcc -o filelist -d 'These options are passed to the Darwin linker'
complete -c gcc -o flat_namespace -d 'These options are passed to the Darwin linker'
complete -c gcc -o force_flat_namespace -d 'These options are passed to the Darwin linker'
complete -c gcc -o headerpad_max_install_names -d 'These options are passed to the Darwin linker'
complete -c gcc -o image_base -d 'These options are passed to the Darwin linker'
complete -c gcc -o init -d 'These options are passed to the Darwin linker'
complete -c gcc -o install_name -d 'These options are passed to the Darwin linker'
complete -c gcc -o keep_private_externs -d 'These options are passed to the Darwin linker'
complete -c gcc -o multi_module -d 'These options are passed to the Darwin linker'
complete -c gcc -o multiply_defined -d 'These options are passed to the Darwin linker'
complete -c gcc -o multiply_defined_unused -d 'These options are passed to the Darwin linker'
complete -c gcc -o noall_load -d 'These options are passed to the Darwin linker'
complete -c gcc -o no_dead_strip_inits_and_terms -d 'These options are passed to the Darwin linker'
complete -c gcc -o nofixprebinding -d 'These options are passed to the Darwin linker'
complete -c gcc -o nomultidefs -d 'These options are passed to the Darwin linker'
complete -c gcc -o noprebind -d 'These options are passed to the Darwin linker'
complete -c gcc -o noseglinkedit -d 'These options are passed to the Darwin linker'
complete -c gcc -o pagezero_size -d 'These options are passed to the Darwin linker'
complete -c gcc -o prebind -d 'These options are passed to the Darwin linker'
complete -c gcc -o prebind_all_twolevel_modules -d 'These options are passed to the Darwin linker'
complete -c gcc -o private_bundle -d 'These options are passed to the Darwin linker'
complete -c gcc -o read_only_relocs -d 'These options are passed to the Darwin linker'
complete -c gcc -o sectalign -d 'These options are passed to the Darwin linker'
complete -c gcc -o sectobjectsymbols -d 'These options are passed to the Darwin linker'
complete -c gcc -o whyload -d 'These options are passed to the Darwin linker'
complete -c gcc -o seg1addr -d 'These options are passed to the Darwin linker'
complete -c gcc -o sectcreate -d 'These options are passed to the Darwin linker'
complete -c gcc -o sectobjectsymbols -d 'These options are passed to the Darwin linker'
complete -c gcc -o sectorder -d 'These options are passed to the Darwin linker'
complete -c gcc -o segaddr -d 'These options are passed to the Darwin linker'
complete -c gcc -o segs_read_only_addr -d 'These options are passed to the Darwin linker'
complete -c gcc -o segs_read_write_addr -d 'These options are passed to the Darwin linker'
complete -c gcc -o seg_addr_table -d 'These options are passed to the Darwin linker'
complete -c gcc -o seg_addr_table_filename -d 'These options are passed to the Darwin linker'
complete -c gcc -o seglinkedit -d 'These options are passed to the Darwin linker'
complete -c gcc -o segprot -d 'These options are passed to the Darwin linker'
complete -c gcc -o segs_read_only_addr -d 'These options are passed to the Darwin linker'
complete -c gcc -o segs_read_write_addr -d 'These options are passed to the Darwin linker'
complete -c gcc -o single_module -d 'These options are passed to the Darwin linker'
complete -c gcc -o static -d 'These options are passed to the Darwin linker'
complete -c gcc -o sub_library -d 'These options are passed to the Darwin linker'
complete -c gcc -o sub_umbrella -d 'These options are passed to the Darwin linker'
complete -c gcc -o twolevel_namespace -d 'These options are passed to the Darwin linker'
complete -c gcc -o umbrella -d 'These options are passed to the Darwin linker'
complete -c gcc -o undefined -d 'These options are passed to the Darwin linker'
complete -c gcc -o unexported_symbols_list -d 'These options are passed to the Darwin linker'
complete -c gcc -o weak_reference_mismatches -d 'These options are passed to the Darwin linker'
complete -c gcc -o whatsloaded -d 'These options are passed to the Darwin linker'
# TODO: These options would be taken as one, so they're useless
# complete -c gcc -o allowable_client -d 'These options are passed to the Darwin linker'
# complete -c gcc -o client_name -d 'These options are passed to the Darwin linker'
# complete -c gcc -o compatibility_version -d 'These options are passed to the Darwin linker'
# complete -c gcc -o current_version -d 'These options are passed to the Darwin linker'
# complete -c gcc -o dead_strip -d 'These options are passed to the Darwin linker'
# complete -c gcc -o dependency-file -d 'These options are passed to the Darwin linker'
# complete -c gcc -o dylib_file -d 'These options are passed to the Darwin linker'
# complete -c gcc -o dylinker_install_name -d 'These options are passed to the Darwin linker'
# complete -c gcc -o dynamic -d 'These options are passed to the Darwin linker'
# complete -c gcc -o exported_symbols_list -d 'These options are passed to the Darwin linker'
# complete -c gcc -o filelist -d 'These options are passed to the Darwin linker'
# complete -c gcc -o flat_namespace -d 'These options are passed to the Darwin linker'
# complete -c gcc -o force_flat_namespace -d 'These options are passed to the Darwin linker'
# complete -c gcc -o headerpad_max_install_names -d 'These options are passed to the Darwin linker'
# complete -c gcc -o image_base -d 'These options are passed to the Darwin linker'
# complete -c gcc -o init -d 'These options are passed to the Darwin linker'
# complete -c gcc -o install_name -d 'These options are passed to the Darwin linker'
# complete -c gcc -o keep_private_externs -d 'These options are passed to the Darwin linker'
# complete -c gcc -o multi_module -d 'These options are passed to the Darwin linker'
# complete -c gcc -o multiply_defined -d 'These options are passed to the Darwin linker'
# complete -c gcc -o multiply_defined_unused -d 'These options are passed to the Darwin linker'
# complete -c gcc -o noall_load -d 'These options are passed to the Darwin linker'
# complete -c gcc -o no_dead_strip_inits_and_terms -d 'These options are passed to the Darwin linker'
# complete -c gcc -o nofixprebinding -d 'These options are passed to the Darwin linker'
# complete -c gcc -o nomultidefs -d 'These options are passed to the Darwin linker'
# complete -c gcc -o noprebind -d 'These options are passed to the Darwin linker'
# complete -c gcc -o noseglinkedit -d 'These options are passed to the Darwin linker'
# complete -c gcc -o pagezero_size -d 'These options are passed to the Darwin linker'
# complete -c gcc -o prebind -d 'These options are passed to the Darwin linker'
# complete -c gcc -o prebind_all_twolevel_modules -d 'These options are passed to the Darwin linker'
# complete -c gcc -o private_bundle -d 'These options are passed to the Darwin linker'
# complete -c gcc -o read_only_relocs -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sectalign -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sectobjectsymbols -d 'These options are passed to the Darwin linker'
# complete -c gcc -o whyload -d 'These options are passed to the Darwin linker'
# complete -c gcc -o seg1addr -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sectcreate -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sectobjectsymbols -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sectorder -d 'These options are passed to the Darwin linker'
# complete -c gcc -o segaddr -d 'These options are passed to the Darwin linker'
# complete -c gcc -o segs_read_only_addr -d 'These options are passed to the Darwin linker'
# complete -c gcc -o segs_read_write_addr -d 'These options are passed to the Darwin linker'
# complete -c gcc -o seg_addr_table -d 'These options are passed to the Darwin linker'
# complete -c gcc -o seg_addr_table_filename -d 'These options are passed to the Darwin linker'
# complete -c gcc -o seglinkedit -d 'These options are passed to the Darwin linker'
# complete -c gcc -o segprot -d 'These options are passed to the Darwin linker'
# complete -c gcc -o segs_read_only_addr -d 'These options are passed to the Darwin linker'
# complete -c gcc -o segs_read_write_addr -d 'These options are passed to the Darwin linker'
# complete -c gcc -o single_module -d 'These options are passed to the Darwin linker'
# complete -c gcc -o static -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sub_library -d 'These options are passed to the Darwin linker'
# complete -c gcc -o sub_umbrella -d 'These options are passed to the Darwin linker'
# complete -c gcc -o twolevel_namespace -d 'These options are passed to the Darwin linker'
# complete -c gcc -o umbrella -d 'These options are passed to the Darwin linker'
# complete -c gcc -o undefined -d 'These options are passed to the Darwin linker'
# complete -c gcc -o unexported_symbols_list -d 'These options are passed to the Darwin linker'
# complete -c gcc -o weak_reference_mismatches -d 'These options are passed to the Darwin linker'
# complete -c gcc -o whatsloaded -d 'These options are passed to the Darwin linker'
complete -c gcc -o mno-soft-float -d 'Use (do not use) the hardware floating-point instructions for floating-point operations'
complete -c gcc -o msoft-float -d 'Use (do not use) the hardware floating-point instructions for floating-point operations'
complete -c gcc -o mfp-reg -d 'Generate code that uses (does not use) the floating-point register set'
@@ -889,13 +882,11 @@ complete -c gcc -o memregs -d '=number Specifies the number of memory-based pseu
complete -c gcc -o m32r2 -d 'Generate code for the M32R/2'
complete -c gcc -o m32rx -d 'Generate code for the M32R/X'
complete -c gcc -o m32r -d 'Generate code for the M32R'
complete -c gcc -o mmodel -d '=small Assume all objects live in the lower 16MB of memory (so that their addresses can be loaded with the "ld24" instruction), and assume all subroutines are reachable with the "bl" instruction'
complete -c gcc -o mmodel -d '=medium Assume objects may be anywhere in the 32-bit address space (the compiler will generate "seth/add3" instructions to load their addresses), and assume all subroutines are reachable with the "bl" instruction'
complete -c gcc -o mmodel -d '=large Assume objects may be anywhere in the 32-bit address space (the compiler will generate "seth/add3" instructions to load their addresses), and assume subroutines may not be reachable with the "bl" instruction (the compiler will generate the much slower "seth/add3/jl" instruction sequence)'
complete -c gcc -o msdata -d '=none Disable use of the small data area'
complete -c gcc -o msdata -d '=sdata Put small global and static data in the small data area, but do not generate special code to reference them'
complete -c gcc -o msdata -d '=use Put small global and static data in the small data area, and generate special instructions to reference them'
complete -c gcc -s G -d 'Put global and static objects less than or equal to num bytes into the small data or bss sections instead of the normal data or bss sections'
complete -c gcc -o mmodel -xa "small\t'Assume all objects live in the lower 16MB of memory' medium\t'Assume objects may be anywhere in the 32-bit address space' large\t'assume subroutines may not be reachable with the bl instruction'"
complete -c gcc -o msdata -xa 'none\t"Disable use of the small data area"
sdata\t"Put small global and static data in the small data area, but do not generate special code to reference them"
use\t"Put small global and static data in the small data area, and generate special instructions to reference them"'
complete -c gcc -s G -d 'Put global and static objects less than or equal to num bytes into the small data or bss sections'
complete -c gcc -o mdebug -d 'Makes the M32R specific code in the compiler display some statistics that might help in debugging programs'
complete -c gcc -o malign-loops -d 'Align all loops to a 32-byte boundary'
complete -c gcc -o mno-align-loops -d 'Do not enforce a 32-byte alignment for loops'
@@ -1150,8 +1141,8 @@ complete -c gcc -o maix32 -d 'Enable 64-bit AIX ABI and calling convention: 64-b
complete -c gcc -o mxl-compat -d 'Produce code that conforms more closely to IBM XL compiler semantics when using AIX-compatible ABI'
complete -c gcc -o mno-xl-compat -d 'Produce code that conforms more closely to IBM XL compiler semantics when using AIX-compatible ABI'
complete -c gcc -o mpe -d 'Support IBM RS/6000 SP Parallel Environment (PE)'
complete -c gcc -o malign-natural -d 'On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option -malign-natural overrides the ABI-defined alignment of larger types, such as floating-point doubles, on their natural size-based boundary'
complete -c gcc -o malign-power -d 'On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option -malign-natural overrides the ABI-defined alignment of larger types, such as floating-point doubles, on their natural size-based boundary'
complete -c gcc -o malign-natural -d 'Override ABI-defined alignment of larger types on their natural size-based boundary'
complete -c gcc -o malign-power -d 'Follow ABI-specified alignment rules'
complete -c gcc -o msoft-float -d 'Generate code that does not use (uses) the floating-point register set'
complete -c gcc -o mhard-float -d 'Generate code that does not use (uses) the floating-point register set'
complete -c gcc -o mmultiple -d 'Generate code that uses (does not use) the load multiple word instructions and the store multiple word instructions'
@@ -1311,10 +1302,10 @@ complete -c gcc -o mno-vis -d 'With -mvis, GCC generates code that takes advanta
complete -c gcc -o mlittle-endian -d 'Generate code for a processor running in little-endian mode'
complete -c gcc -o m32 -d 'Generate code for a 32-bit or 64-bit environment'
complete -c gcc -o m64 -d 'Generate code for a 32-bit or 64-bit environment'
complete -c gcc -o mcmodel -d '=medlow Generate code for the Medium/Low code model: 64-bit addresses, programs must be linked in the low 32 bits of memory'
complete -c gcc -o mcmodel -d '=medmid Generate code for the Medium/Middle code model: 64-bit addresses, programs must be linked in the low 44 bits of memory, the text and data segments must be less than 2GB in size and the data segment must be located within 2GB of the text segment'
complete -c gcc -o mcmodel -d '=medany Generate code for the Medium/Anywhere code model: 64-bit addresses, programs may be linked anywhere in memory, the text and data segments must be less than 2GB in size and the data segment must be located within 2GB of the text segment'
complete -c gcc -o mcmodel -d '=embmedany Generate code for the Medium/Anywhere code model for embedded systems: 64-bit addresses, the text and data segments must be less than 2GB in size, both starting anywhere in memory (determined at link time)'
complete -c gcc -o mcmodel -a 'medlow\t"Medium/Low code model: 64-bit addresses, programs must be linked in the low 32 bits of memory"
medmid\t"Medium/Middle code model: 64-bit addresses, programs must be linked in the low 44 bits of memory, the text/data segments must be less than 2GB in size and the data segment must be located within 2GB of the text segment"
medany\t"Medium/Anywhere code model: 64-bit addresses, programs may be linked anywhere in memory, the text and data segments must be less than 2GB in size and the data segment must be located within 2GB of the text segment"
embmedany\t"Medium/Anywhere code model for embedded systems: 64-bit addresses, the text and data segments must be less than 2GB in size, both starting anywhere in memory (determined at link time)"'
complete -c gcc -o mstack-bias -d 'With -mstack-bias, GCC assumes that the stack pointer, and frame pointer if present, are offset by -2047 which must be added back when making stack frame references'
complete -c gcc -o mno-stack-bias -d 'With -mstack-bias, GCC assumes that the stack pointer, and frame pointer if present, are offset by -2047 which must be added back when making stack frame references'
complete -c gcc -o threads -d 'Add support for multithreading using the Solaris threads library'
@@ -1380,15 +1371,15 @@ complete -c gcc -o mtext-section-literals -d 'Control the treatment of literal p
complete -c gcc -o mno-text-section-literals -d 'Control the treatment of literal pools'
complete -c gcc -o mtarget-align -d 'When this option is enabled, GCC instructs the assembler to automatically align instructions to reduce branch penalties at the expense of some code density'
complete -c gcc -o mno-target-align -d 'When this option is enabled, GCC instructs the assembler to automatically align instructions to reduce branch penalties at the expense of some code density'
complete -c gcc -o mlongcalls -d 'When this option is enabled, GCC instructs the assembler to translate direct calls to indirect calls unless it can determine that the target of a direct call is in the range allowed by the call instruction'
complete -c gcc -o mno-longcalls -d 'When this option is enabled, GCC instructs the assembler to translate direct calls to indirect calls unless it can determine that the target of a direct call is in the range allowed by the call instruction'
complete -c gcc -o mlongcalls -d 'Tell assembler to translate direct calls to indirect calls'
complete -c gcc -o mno-longcalls -d 'Tell assembler to not translate direct calls to indirect calls'
complete -c gcc -o fbounds-check -d 'For front-ends that support it, generate additional code to check that indices used to access arrays are within the declared range'
complete -c gcc -o ftrapv -d 'This option generates traps for signed overflow on addition, subtraction, multiplication operations'
complete -c gcc -o fwrapv -d 'This option instructs the compiler to assume that signed arithmetic overflow of addition, subtraction and multiplication wraps around using twos-complement representation'
complete -c gcc -o fexceptions -d 'Enable exception handling'
complete -c gcc -o fnon-call-exceptions -d 'Generate code that allows trapping instructions to throw exceptions'
complete -c gcc -o funwind-tables -d 'Similar to -fexceptions, except that it will just generate any needed static data, but will not affect the generated code in any other way'
complete -c gcc -o fasynchronous-unwind-tables -d 'Generate unwind table in dwarf2 format, if supported by target machine'
complete -c gcc -o fasynchronous-unwind-tables -d 'Generate unwind table in dwarf2 format'
complete -c gcc -o fpcc-struct-return -d 'Return "short" "struct" and "union" values in memory like longer ones, rather than in registers'
complete -c gcc -o freg-struct-return -d 'Return "struct" and "union" values in registers when possible'
complete -c gcc -o fshort-enums -d 'Allocate to an "enum" type only as many bytes as it needs for the declared range of possible values'
@@ -1399,8 +1390,8 @@ complete -c gcc -o fno-common -d 'In C, allocate even uninitialized global varia
complete -c gcc -o fno-ident -d 'Ignore the #ident directive'
complete -c gcc -o finhibit-size-directive -d 'Dont output a "'
complete -c gcc -o fverbose-asm -d 'Put extra commentary information in the generated assembly code to make it more readable'
complete -c gcc -o fpic -d 'Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine'
complete -c gcc -o fPIC -d 'If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table'
complete -c gcc -o fpic -d 'Generate position-independent code (PIC) suitable for use in a shared library'
complete -c gcc -o fPIC -d 'Emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table'
complete -c gcc -o fpie -d 'These options are similar to -fpic and -fPIC, but generated position independent code can be only linked into executables'
complete -c gcc -o fPIE -d 'These options are similar to -fpic and -fPIC, but generated position independent code can be only linked into executables'
complete -c gcc -o fno-jump-tables -d 'Do not use jump tables for switch statements even where it would be more efficient than other code generation strategies'

View File

@@ -4,7 +4,7 @@
# already present on the commandline to git. This is relevant for --work-tree etc, see issue #6219.
function __fish_git
set -l saved_args $argv
set -f global_args
set -l global_args
set -l cmd (commandline -opc)
# We assume that git is the first command until we have a better awareness of subcommands, see #2705.
set -e cmd[1]
@@ -58,7 +58,8 @@ function __fish_git_branches
end
function __fish_git_submodules
__fish_git submodule 2>/dev/null | string replace -r '^.[^ ]+ ([^ ]+).*$' '$1'
__fish_git submodule 2>/dev/null \
| string replace -r '^.[^ ]+ ([^ ]+).*$' '$1'
end
function __fish_git_local_branches
@@ -127,28 +128,28 @@ function __fish_git_files
# Cache the translated descriptions so we don't have to get it
# once per file.
contains -- all-staged $argv && set -l all_staged
contains -- unmerged $argv && set -l unmerged
contains -- all-staged $argv; and set -l all_staged
contains -- unmerged $argv; and set -l unmerged
and set -l unmerged_desc "Unmerged File"
contains -- added $argv || set -ql all_staged && set -l added
contains -- added $argv; or set -ql all_staged; and set -l added
and set -l added_desc "Added file"
contains -- modified $argv && set -l modified
contains -- modified $argv; and set -l modified
and set -l modified_desc "Modified file"
contains -- untracked $argv && set -l untracked
contains -- untracked $argv; and set -l untracked
and set -l untracked_desc "Untracked file"
contains -- modified-staged $argv || set -ql all_staged && set -l modified_staged
contains -- modified-staged $argv; or set -ql all_staged; and set -l modified_staged
and set -l staged_modified_desc "Staged modified file"
contains -- modified-staged-deleted $argv || set -ql modified_staged && set -l modified_staged_deleted
contains -- modified-staged-deleted $argv; or set -ql modified_staged; and set -l modified_staged_deleted
and set -l modified_staged_deleted_desc "Staged modified and deleted file"
contains -- deleted $argv && set -l deleted
contains -- deleted $argv; and set -l deleted
and set -l deleted_desc "Deleted file"
contains -- deleted-staged $argv || set -ql all_staged && set -l deleted_staged
contains -- deleted-staged $argv; or set -ql all_staged; and set -l deleted_staged
and set -l staged_deleted_desc "Staged deleted file"
contains -- ignored $argv && set -l ignored
contains -- ignored $argv; and set -l ignored
and set -l ignored_desc "Ignored file"
contains -- renamed $argv && set -l renamed
contains -- renamed $argv; and set -l renamed
and set -l renamed_desc "Renamed file"
contains -- copied $argv && set -l copied
contains -- copied $argv; and set -l copied
and set -l copied_desc "Copied file"
# A literal "?" for use in `case`.
@@ -186,7 +187,7 @@ function __fish_git_files
# We fall back on the v1 format by reading git's _version_, because trying v2 first is too slow.
set -l ver (__fish_git --version | string replace -rf 'git version (\d+)\.(\d+)\.?.*' '$1\n$2')
# Version >= 2.11.* has the v2 format.
if test "$ver[1]" -gt 2 2>/dev/null || test "$ver[1]" -eq 2 -a "$ver[2]" -ge 11 2>/dev/null
if test "$ver[1]" -gt 2 2>/dev/null; or test "$ver[1]" -eq 2 -a "$ver[2]" -ge 11 2>/dev/null
__fish_git $git_opt status --porcelain=2 $status_opt \
| while read -la -d ' ' line
set -l file
@@ -323,33 +324,31 @@ function __fish_git_files
end
# Only try printing if the file was selected.
if set -q file[1]
for d in $desc
# Without "-z", git sometimes _quotes_ filenames.
# It adds quotes around it _and_ escapes the character.
# e.g. `"a\\b"`.
# We just remove the quotes and hope it works out.
# If this contains newlines or tabs,
# there is nothing we can do, but that's a general issue with scripted completions.
set file (string trim -c \" -- $file)
# The relative filename.
if string match -q './*' -- (commandline -ct)
printf './%s\t%s\n' $file $d
else
printf '%s\t%s\n' "$file" $d
end
# Now from repo root.
# Only do this if the filename isn't a simple child,
# or the current token starts with ":"
if string match -q '../*' -- $file
or string match -q ':*' -- (commandline -ct)
set -l fromroot (builtin realpath -- $file 2>/dev/null)
# `:` 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
# Without "-z", git sometimes _quotes_ filenames.
# It adds quotes around it _and_ escapes the character.
# e.g. `"a\\b"`.
# We just remove the quotes and hope it works out.
# If this contains newlines or tabs,
# there is nothing we can do, but that's a general issue with scripted completions.
set file (string trim -c \" -- $file)
# The relative filename.
if string match -q './*' -- (commandline -ct)
printf './%s\n' $file\t$desc
else
printf '%s\n' "$file"\t$desc
end
# Now from repo root.
# Only do this if the filename isn't a simple child,
# or the current token starts with ":"
if string match -q '../*' -- $file
or string match -q ':*' -- (commandline -ct)
set -l fromroot (builtin realpath -- $file 2>/dev/null)
# `:` 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\n' "$fromroot"\t$desc
end
end
end
@@ -358,12 +357,15 @@ function __fish_git_files
# We need to compute relative paths on our own, which is slow.
# Pre-remove the root at least, so we have fewer components to deal with.
set -l _pwd_list (string replace "$root/" "" -- $PWD/ | string split /)
test -z "$_pwd_list[-1]" && set -e _pwd_list[-1]
test -z "$_pwd_list[-1]"; and set -e _pwd_list[-1]
# Cache the previous relative path because these are sorted, so we can reuse it
# often for files in the same directory.
set -l previous
# Note that we can't use space as a delimiter between status and filename, because
# the status can contain spaces - " M" is different from "M ".
__fish_git $git_opt status --porcelain -z $status_opt \
| while read -lz -d' ' line
set -l desc
# The entire line is the "from" from a rename.
if set -q use_next[1]
if contains -- $use_next $argv
@@ -453,8 +455,8 @@ function __fish_git_files
if set -q desc[1]
# Again: "XY filename", so the filename starts on character 4.
set -l relfile (string sub -s 4 -- $line)
set -f previous
set -l file
# Computing relative path by hand.
set -l abs (string split / -- $relfile)
# If it's in the same directory, we just need to change the filename.
@@ -496,13 +498,16 @@ function __fish_git_files
end
# Lists files included in the index of a commit, branch, or tag (not necessarily HEAD)
function __fish_git_rev_files -a rev path
function __fish_git_rev_files
set -l rev $argv[1]
set -l path $argv[2]
# Strip any partial files from the path before handing it to `git show`
set -f path (string replace -r -- '(.*/|).*' '$1' $path)
set -l path (string replace -r -- '(.*/|).*' '$1' $path)
# 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 "%s%s\n" $path (__fish_git show $rev:$path | sed '1,2d')
string join \n -- $path(__fish_git show $rev:$path | sed '1,2d')
end
# Provides __fish_git_rev_files completions for the current token
@@ -522,13 +527,13 @@ function __fish_git_needs_rev_files
# This definitely works with `git show` to retrieve a copy of a file as it exists
# in the index of revision $rev, it should be updated to include others as they
# are identified.
__fish_git_using_command show && string match -r "^[^-].*:" -- (commandline -ot)
__fish_git_using_command show; and string match -r "^[^-].*:" -- (commandline -ot)
end
function __fish_git_ranges
set -f both (commandline -ot | string replace -r '\.{2,3}' \n\$0\n)
set -f from $both[1]
set -f dots $both[2]
set -l both (commandline -ot | string replace -r '\.{2,3}' \n\$0\n)
set -l from $both[1]
set -l dots $both[2]
# If we didn't need to split (or there's nothing _to_ split), complete only the first part
# Note that status here is from `string replace` because `set` doesn't alter it
if test -z "$from" -o $status -gt 0
@@ -541,7 +546,7 @@ function __fish_git_ranges
return 0
end
set -f from_refs
set -l from_refs
if commandline -ct | string match -q '*..*'
# If the cursor is right of a .. range operator, only complete the right part.
set from_refs $from
@@ -578,10 +583,10 @@ function __fish_git_needs_command
argparse -s (__fish_git_global_optspecs) -- $cmd 2>/dev/null
or return 0
# These flags function as commands, effectively.
set -q _flag_version && return 1
set -q _flag_html_path && return 1
set -q _flag_man_path && return 1
set -q _flag_info_path && return 1
set -q _flag_version; and return 1
set -q _flag_html_path; and return 1
set -q _flag_man_path; and return 1
set -q _flag_info_path; and return 1
if set -q argv[1]
# Also print the command, so this can be used to figure out what it is.
set -g __fish_git_cmd $argv[1]
@@ -687,7 +692,7 @@ function __fish_git_contains_opt
return 1
end
function __fish_git_stash_using_command
set -f cmd (commandline -opc)
set -l cmd (commandline -opc)
__fish_git_using_command stash
or return 2
# The word after the stash command _must_ be the subcommand
@@ -701,7 +706,7 @@ function __fish_git_stash_using_command
end
function __fish_git_stash_not_using_subcommand
set -f cmd (commandline -opc)
set -l cmd (commandline -opc)
__fish_git_using_command stash
or return 2
set cmd $cmd[(contains -i -- "stash" $cmd)..-1]
@@ -728,8 +733,6 @@ function __fish_git_aliases
end
end
set -l PATHgitdash $PATH/git-*
function __fish_git_custom_commands
# complete all commands starting with git-
# however, a few builtin commands are placed into $PATH by git because
@@ -737,7 +740,7 @@ function __fish_git_custom_commands
# if any of these completion results match the name of the builtin git commands,
# but it's simpler just to blacklist these names. They're unlikely to change,
# and the failure mode is we accidentally complete a plumbing command.
for name in (string replace -r "^.*/git-([^/]*)" '$1' $PATHgitdash)
for name in (string replace -r "^.*/git-([^/]*)" '$1' $PATH/git-*)
switch $name
case cvsserver receive-pack shell upload-archive upload-pack
# skip these
@@ -749,15 +752,16 @@ end
# Suggest branches for the specified remote - returns 1 if no known remote is specified
function __fish_git_branch_for_remote
set -f cmd (commandline -opc)
set -f remote
for r in (__fish_git_remotes)
set -l remotes (__fish_git_remotes)
set -l remote
set -l cmd (commandline -opc)
for r in $remotes
if contains -- $r $cmd
set -f remote $r
set remote $r
break
end
end
set -qf remote[1]
set -q remote[1]
or return 1
__fish_git_branches | string replace -f -- "$remote/" ''
end
@@ -783,6 +787,69 @@ function __fish_git_help_all_concepts
end
end
function __fish_git_diff_opt -a option
switch $option
case diff-algorithm
printf "%b" "
default\tBasic greedy diff algorithm
myers\tBasic greedy diff algorithm
minimal\tMake smallest diff possible
patience\tPatience diff algorithm
histogram\tPatience algorithm with low-occurrence common elements"
case diff-filter
printf "%b" "
A\tAdded files
C\tCopied files
D\tDeleted files
M\tModified files
R\tRenamed files
T\tType changed files
U\tUnmerged files
X\tUnknown files
B\tBroken pairing files"
case dirstat
printf "%b" "
changes\tCount lines that have been removed from the source / added to the destination
lines\tRegular line-based diff analysis
files\tCount the number of files changed
cumulative\tCount changes in a child directory for the parent directory as well"
case ignore-submodules
printf "%b" "
none\tUntracked/modified files
untracked\tNot considered dirty when they only contain untracked content
dirty\tIgnore all changes to the work tree of submodules
all\tHide all changes to submodules (default)"
case submodule
printf "%b" "
short\tShow the name of the commits at the beginning and end of the range
log\tList the commits in the range
diff\tShow an inline diff of the changes"
case ws-error-highlight
printf "%b" "
context\tcontext lines of the diff
old\told lines of the diff
new\tnew lines of the diff
none\treset previous values
default\treset the list to 'new'
all\tShorthand for 'old,new,context'"
end
end
function __fish_git_show_opt -a option
switch $option
case format pretty
printf "%b" "
oneline\t<sha1> <title line>
short\t<sha1> / <author> / <title line>
medium\t<sha1> / <author> / <author date> / <title> / <commit msg>
full\t<sha1> / <author> / <committer> / <title> / <commit msg>
fuller\t<sha1> / <author> / <author date> / <committer> / <committer date> / <title> / <commit msg>
email\t<sha1> <date> / <author> / <author date> / <title> / <commit msg>
raw\tShow the entire commit exactly as stored in the commit object
format:\tSpecify which information to show"
end
end
function __fish_git_is_rebasing
test -e (__fish_git rev-parse --absolute-git-dir)/rebase-merge
end
@@ -816,9 +883,7 @@ nohelpers\t'exclude helper commands'
config\t'list completion.commands'"
# Options shared between multiple commands
set -l format_pretty_args "oneline\t'hash⏎ titleline' short\t'hash⏎ author⏎ titleline' medium\t'hash⏎ author⏎ authordate⏎ title⏎ message' full\t'hash⏎ author⏎ committer⏎ title⏎ message'
fuller\t'hash⏎ author⏎ authordate⏎ committer⏎ committerdate⏎ title⏎ message' email\t'hash⏎ date⏎ author⏎ authordate⏎ title⏎ message' raw\t'Show raw commit as stored in commit object' format:\t'Specify format string'"
complete -f -c git -n '__fish_git_using_command log show diff-tree rev-list' -l pretty -a $format_pretty_args
complete -f -c git -n '__fish_git_using_command log show diff-tree rev-list' -l pretty -a '(__fish_git_show_opt pretty)'
complete -c git -n '__fish_git_using_command diff show range-diff' -l abbrev -d 'Show only a partial prefix instead of the full 40-byte hexadecimal object name'
complete -c git -n '__fish_git_using_command diff show range-diff' -l binary -d 'Output a binary diff that can be applied with "git-apply"'
@@ -879,19 +944,14 @@ complete -c git -n '__fish_git_using_command diff show range-diff' -s z -d 'Use
complete -r -c git -n '__fish_git_using_command diff log show range-diff' -s O -d 'Control the order in which files appear in the output'
complete -f -c git -n '__fish_git_using_command diff show range-diff' -l anchored -d 'Generate a diff using the "anchored diff" algorithm'
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -s l -d 'Prevents rename/copy detection when rename/copy targets exceed the given number'
complete -x -c git -n '__fish_git_using_command diff show range-diff' -l diff-filter -d 'Choose diff filters' -a "A\t'Added files' C\t'Copied files' D\t'Deleted files'
M\t'Modified files' R\t'Renamed files' T\t'Type changed files' U\t'Unmerged files' X\t'Unknown files' B\t'Broken pairing files'"
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l diff-algorithm -d 'Choose a diff algorithm' -a "default\t'Basic greedy diff algorithm'
myers\t'Basic greedy diff algorithm' minimal\t'Make smallest diff possible' patience\t'Patience diff algorithm' histogram\t'Patience algorithm with low-occurrence common elements'"
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l dirstat -d 'Show +/- changes for each subdir' -a "changes\t'Count lines that have been removed from the source / added to the destination'
lines\t'Regular line-based diff analysis' files\t'Count the number of files changed' cumulative\t'Count changes in a child directory for the parent directory as well'"
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l ignore-submodules -d 'Ignore changes to submodules' -a "none\t'un[tracked,modified] files'
untracked\t'untracked files don\'t count as dirty' dirty\t'ignore all changes to submodules worktree' all\t'hide all changes to submodules (default)'"
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l submodule -d 'Specify how submodule diffs are shown' -a "short\t'print commit msg at start & end of the range'
log\t'list the commits in the range' diff\t'show inline diff of the changes'"
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l ws-error-highlight -d 'Highlight whitespace errors' -a "context\t'context lines of the diff' old\t'old lines of the diff'
new\t'new lines of the diff' none\t'reset previous values' default\t'reset the list to "new"' all\t'Shorthand for old,new,context'"
complete -f -c git -n '__fish_git_using_command fetch pull' -l unshallow -d 'Convert shallow repository to a complete one'
complete -x -c git -n '__fish_git_using_command diff show range-diff' -l diff-filter -a '(__fish_git_diff_opt diff-filter)' -d 'Choose diff filters'
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l diff-algorithm -a '(__fish_git_diff_opt diff-algorithm)' -d 'Choose a diff algorithm'
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l dirstat -a '(__fish_git_diff_opt dirstat)' -d 'Output the distribution of relative amount of changes for each sub-directory'
complete -x -c git -n '__fish_git_using_command diff log show range-diff' -l ignore-submodules -a '(__fish_git_diff_opt ignore-submodules)' -d 'Ignore changes to submodules in the diff generation'
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
@@ -950,17 +1010,17 @@ set -l remotecommands add rm remove show prune update rename set-head set-url se
complete -f -c git -n __fish_git_needs_command -a remote -d 'Manage tracked repositories'
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\t'Adds a new remote'
rm\t'Removes a remote'
remove\t'Removes a remote'
show\t'Shows a remote'
prune\t'Deletes all stale tracking branches'
update\t'Fetches updates'
rename\t'Renames a remote'
set-head\t'Sets the default branch for a remote'
set-url\t'Changes URLs for a remote'
get-url\t'Retrieves URLs for a remote'
set-branches\t'Changes the list of branches tracked by a remote'"
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>"
@@ -982,10 +1042,10 @@ complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (co
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 $format_pretty_args
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'
complete -f -c git -n '__fish_git_using_command show' -l oneline -d 'Shorthand for "--format=oneline --abbrev-commit"'
complete -f -c git -n '__fish_git_using_command show' -l oneline -d 'Shorthand for "--pretty=oneline --abbrev-commit"'
complete -f -c git -n '__fish_git_using_command show' -l encoding -d 'Re-code the commit log message in the encoding'
complete -f -c git -n '__fish_git_using_command show' -l expand-tabs -d 'Perform a tab expansion in the log message'
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'
@@ -1127,8 +1187,9 @@ complete -f -c git -n '__fish_git_using_command archive' -l worktree-attributes
# 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' -n '__fish_prev_arg_in bisect' -xa "start\t'Start a new bisect session'
complete -f -c git -n __fish_git_needs_command -a bisect -d 'Use binary search to find what introduced a bug'
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'
good\t'Mark a commit as good'
@@ -1140,7 +1201,8 @@ visualize\t'See remaining commits in gitk'
replay\t'Replay a bisect log file'
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'"
help\t'Print a synopsis of all commands'
"
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'
@@ -1174,6 +1236,22 @@ complete -f -c git -n '__fish_git_using_command branch' -l merged -d 'List branc
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'
### bundle
set -l bundlecommands create verify list-heads unbundle
complete -f -c git -n __fish_git_needs_command -a bundle -d 'Create, unpack, and manipulate "bundle" files'
complete -f -c git -n "__fish_git_using_command bundle" -n "not __fish_seen_subcommand_from $bundlecommands" -a "create\t'Create a bundle'
verify\t'Check that the bundle is valid and will apply cleanly'
list-heads\t'List the references defined in the bundle'
unbundle\t'Build a pack index file and print all defined references'"
complete -f -c git -n "__fish_git_using_command bundle" -n "__fish_seen_subcommand_from create verify" -s q -l quiet -d 'Do not show progress meter'
complete -f -c git -n "__fish_git_using_command bundle" -n "__fish_seen_subcommand_from create unbundle" -l progress -d 'Show progress meter'
complete -f -c git -n "__fish_git_using_command bundle" -n "__fish_seen_subcommand_from create" -l all-progress -d 'Show progress meter during object writing phase'
complete -f -c git -n "__fish_git_using_command bundle" -n "__fish_seen_subcommand_from create" -l all-progress-implied -d 'Similar to --all-progress when progress meter is shown'
complete -x -c git -n "__fish_git_using_command bundle" -n "__fish_seen_subcommand_from create" -l version -d 'Specify bundle format version'
# FIXME: <file> should be suggested first and <git-rev-list args> second (also, '--all' is only valid in rev-list)
complete -c git -n '__fish_git_using_command bundle' -n "__fish_seen_subcommand_from create" -ka '--all\t"All refs"'
complete -c git -n '__fish_git_using_command bundle' -n "__fish_seen_subcommand_from create" -ka '(__fish_git_ranges)'
### cherry
complete -f -c git -n __fish_git_needs_command -a cherry -d 'Find commits yet to be applied to upstream'
complete -f -c git -n '__fish_git_using_command cherry' -s v -d 'Show the commit subjects next to the SHA1s'
@@ -1217,10 +1295,10 @@ complete -f -c git -n '__fish_git_using_command commit' -l squash -d 'Squash com
complete -c git -n '__fish_git_using_command commit' -l reset-author -d 'When amending, reset author of commit to the committer'
complete -x -c git -n '__fish_git_using_command commit' -l author -d 'Override the commit author'
complete -x -c git -n '__fish_git_using_command commit' -l cleanup -a "strip\t'Leading/trailing whitespace/empty lines, #commentary'
whitespace\t'Like strip but keep #commentary'
verbatim\t'Do not change the message'
scissors\t'Like whitespace but also remove after scissor lines'
default\t'Like strip if the message is to be edited, whitespace otherwise'" -d 'How to clean up the commit message'
whitespace\t'Like strip but keep #commentary'
verbatim\t'Do not change the message'
scissors\t'Like whitespace but also remove after scissor lines'
default\t'Like strip if the message is to be edited, whitespace otherwise'" -d 'How to clean up the commit message'
complete -x -c git -n '__fish_git_using_command commit' -l date -d 'Override the author date'
complete -x -c git -n '__fish_git_using_command commit' -s m -l message -d 'Use the given message as the commit message'
complete -f -c git -n '__fish_git_using_command commit' -l no-edit -d 'Use the selected commit message without launching an editor'
@@ -1289,7 +1367,7 @@ complete -f -c git -n '__fish_git_using_command describe' -l always -d 'Show uni
complete -f -c git -n '__fish_git_using_command describe' -l first-parent -d 'Follow only the first parent of a merge commit'
### diff
complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits or commit and working tree'
complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits and working tree'
complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -opc)' -ka '(__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'
@@ -1388,7 +1466,7 @@ complete -f -c git -n '__fish_git_using_command grep' -l or -d 'Combine patterns
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'
complete -f -c git -n '__fish_git_using_command grep' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_refs)'
complete -c git -n '__fish_git_using_command grep' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_refs)'
# TODO options, including max-depth, h, open-files-in-pager, contexts, threads, file
### init
@@ -1404,11 +1482,12 @@ 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)' -ka '(__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 -d 'Print out ref names' -a "short\t'Hide prefixes'
full\t'Show full ref names'
auto\t'Hide prefixes if printed to terminal'
no\t'Do not display ref'"
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'
complete -c git -n '__fish_git_using_command log' -l source -d 'Print ref name by which each commit was reached'
complete -c git -n '__fish_git_using_command log' -l use-mailmap
complete -c git -n '__fish_git_using_command log' -l full-diff
complete -c git -n '__fish_git_using_command log' -l log-size
complete -x -c git -n '__fish_git_using_command log' -s L
complete -x -c git -n '__fish_git_using_command log' -s n -l max-count -d 'Limit the number of commits before starting to show the commit output'
complete -x -c git -n '__fish_git_using_command log' -l skip -d 'Skip given number of commits'
complete -x -c git -n '__fish_git_using_command log' -l since -d 'Show commits more recent than specified date'
@@ -1443,49 +1522,117 @@ complete -x -c git -n '__fish_git_using_command log' -l glob -d 'Show log for al
complete -x -c git -n '__fish_git_using_command log' -l exclude -d 'Do not include refs matching given glob pattern'
complete -c git -n '__fish_git_using_command log' -l reflog -d 'Show log for all reflogs entries'
complete -c git -n '__fish_git_using_command log' -l ingnore-missing -d 'Ignore invalid object names'
complete -c git -n '__fish_git_using_command log' -l bisect
complete -c git -n '__fish_git_using_command log' -l stdin -d 'Read commits from stdin'
complete -c git -n '__fish_git_using_command log' -l cherry-mark -d 'Mark equivalent commits with = and inequivalent with +'
complete -c git -n '__fish_git_using_command log' -l cherry-pick -d 'Omit equivalent commits'
complete -c git -n '__fish_git_using_command log' -l walk-reflogs -s g -d 'Traverse the reflog'
complete -c git -n '__fish_git_using_command log' -l no-walk -a "sorted unsorted" -f
complete -c git -n '__fish_git_using_command log' -f -l bisect -l color-words -l abbrev -l notes -l expand-tabs -l show-notes -l show-linear-break
complete -c git -n '__fish_git_using_command log' -l use-mailmap -l full-diff -l log-size -l left-only -l right-only -l cherry -l merge -l boundary -l simplify-by-decoration -l full-history -l dense -l sparse -l simplify-merges -l ancestry-path -l date-order \
-l do-walk -l format -l abbrev-commit -l no-abbrev-commit -l oneline -l no-expand-tabs -l no-notes -l standard-notes -l no-standard-notes -l show-signature -l relative-date -l parents -l children -l left-right -l cc -l graph -l numstat -l shortstat -l summary \
-l patch-with-stat -l name-only -l name-status -l raw -l patch-with-raw -l indent-heuristic -l no-indent-heuristic -l compaction-heuristic -l no-compaction-heuristic -l minimal -l patience -l histogram -l no-color -l no-renames -l check -l full-index -l binary \
-l author-date-order -l topo-order -l reverse
complete -c git -n '__fish_git_using_command log' -l date -a "relative local iso iso-local iso8601 iso8601-local iso-strict iso-strict-local iso8601-strict iso8601-strict-local rfc-local rfc2822-local short short-local raw human unix format: default default-local" -x
complete -c git -n '__fish_git_using_command log' -l encoding -a '(__fish_print_encodings)' -x
complete -c git -n '__fish_git_using_command log' -s c -s m -s r -s t -s u -s z
complete -c git -n '__fish_git_using_command log' -s L -x
complete -c git -n '__fish_git_using_command log' -l patch -s p -d 'Output patches'
complete -c git -n '__fish_git_using_command log' -l no-patch -s s -d 'Suppress patch output'
complete -c git -n '__fish_git_using_command log' -l left-only
complete -c git -n '__fish_git_using_command log' -l right-only
complete -c git -n '__fish_git_using_command log' -l cherry
complete -c git -n '__fish_git_using_command log' -l walk-reflogs -s g
complete -c git -n '__fish_git_using_command log' -l merge
complete -c git -n '__fish_git_using_command log' -l boundary
complete -c git -n '__fish_git_using_command log' -l simplify-by-decoration
complete -c git -n '__fish_git_using_command log' -l full-history
complete -c git -n '__fish_git_using_command log' -l dense
complete -c git -n '__fish_git_using_command log' -l sparse
complete -c git -n '__fish_git_using_command log' -l simplify-merges
complete -c git -n '__fish_git_using_command log' -l ancestry-path
complete -c git -n '__fish_git_using_command log' -l date-order
complete -c git -n '__fish_git_using_command log' -l author-date-order
complete -c git -n '__fish_git_using_command log' -l topo-order
complete -c git -n '__fish_git_using_command log' -l reverse
complete -f -c git -n '__fish_git_using_command log' -l no-walk -a "sorted unsorted"
complete -c git -n '__fish_git_using_command log' -l do-walk
complete -c git -n '__fish_git_using_command log' -l format
complete -c git -n '__fish_git_using_command log' -l abbrev-commit
complete -c git -n '__fish_git_using_command log' -l no-abbrev-commit
complete -c git -n '__fish_git_using_command log' -l oneline
complete -x -c git -n '__fish_git_using_command log' -l encoding -a '(__fish_print_encodings)'
complete -f -c git -n '__fish_git_using_command log' -l expand-tabs
complete -c git -n '__fish_git_using_command log' -l no-expand-tabs
complete -f -c git -n '__fish_git_using_command log' -l notes
complete -c git -n '__fish_git_using_command log' -l no-notes
complete -f -c git -n '__fish_git_using_command log' -l show-notes
complete -c git -n '__fish_git_using_command log' -l standard-notes
complete -c git -n '__fish_git_using_command log' -l no-standard-notes
complete -c git -n '__fish_git_using_command log' -l show-signature
complete -c git -n '__fish_git_using_command log' -l relative-date
complete -x -c git -n '__fish_git_using_command log' -l date -a '
relative
local
iso
iso-local
iso8601
iso8601-local
iso-strict
iso-strict-local
iso8601-strict
iso8601-strict-local
rfc-local
rfc2822-local
short
short-local
raw
human
unix
format:
default
default-local
'
complete -c git -n '__fish_git_using_command log' -l parents
complete -c git -n '__fish_git_using_command log' -l children
complete -c git -n '__fish_git_using_command log' -l left-right
complete -c git -n '__fish_git_using_command log' -l graph
complete -f -c git -n '__fish_git_using_command log' -l show-linear-break
complete -c git -n '__fish_git_using_command log' -s c
complete -c git -n '__fish_git_using_command log' -l cc
complete -c git -n '__fish_git_using_command log' -s m
complete -c git -n '__fish_git_using_command log' -s r
complete -c git -n '__fish_git_using_command log' -s t
complete -c git -n '__fish_git_using_command log' -l patch -s p
complete -c git -n '__fish_git_using_command log' -s u
complete -c git -n '__fish_git_using_command log' -l no-patch -s s
complete -x -c git -n '__fish_git_using_command log' -l unified -s U
complete -c git -n '__fish_git_using_command log' -l raw
complete -c git -n '__fish_git_using_command log' -l patch-with-raw
complete -c git -n '__fish_git_using_command log' -l indent-heuristic
complete -c git -n '__fish_git_using_command log' -l no-indent-heuristic
complete -c git -n '__fish_git_using_command log' -l compaction-heuristic
complete -c git -n '__fish_git_using_command log' -l no-compaction-heuristic
complete -c git -n '__fish_git_using_command log' -l minimal
complete -c git -n '__fish_git_using_command log' -l patience
complete -c git -n '__fish_git_using_command log' -l histogram
complete -f -x -c git -n '__fish_git_using_command log' -l stat
complete -c git -n '__fish_git_using_command log' -l numstat
complete -c git -n '__fish_git_using_command log' -l shortstat
complete -c git -n '__fish_git_using_command log' -l summary
complete -c git -n '__fish_git_using_command log' -l patch-with-stat
complete -c git -n '__fish_git_using_command log' -s z
complete -c git -n '__fish_git_using_command log' -l name-only
complete -c git -n '__fish_git_using_command log' -l name-status
complete -f -c git -n '__fish_git_using_command log' -l color -a 'always never auto'
complete -c git -n '__fish_git_using_command log' -l no-color
complete -f -c git -n '__fish_git_using_command log' -l word-diff -a '
color
plain
porcelain
none
'
complete -f -c git -n '__fish_git_using_command log' -l color-words
complete -c git -n '__fish_git_using_command log' -l no-renames
complete -c git -n '__fish_git_using_command log' -l check
complete -c git -n '__fish_git_using_command log' -l full-index
complete -c git -n '__fish_git_using_command log' -l binary
complete -f -c git -n '__fish_git_using_command log' -l abbrev
complete -f -c git -n '__fish_git_using_command log' -s l
complete -c git -n '__fish_git_using_command log' -l stat -f -x
complete -c git -n '__fish_git_using_command log' -l color -a 'always never auto' -f
complete -c git -n '__fish_git_using_command log' -l word-diff -a color\nplain\nporcelain\nnone -f
function __fish__git_append_letters_nosep
set -l token (commandline -tc)
printf "%s\n" $token$argv
end
complete -c git -n '__fish_git_using_command log' -s l -f
complete -x -c git -n '__fish_git_using_command log' -l diff-filter -a "(printf '%s\n' (commandline -tc)a\t'Exclude added' \
c\t'Exclude copied' \
d\t'Exclude deleted' \
m\t'Exclude modified' \
r\t'Exclude renamed' \
t\t'Exclude type changed' \
u\t'Exclude unmerged' \
x\t'Exclude unknown' \
b\t'Exclude broken' \
A\t'Added' \
C\t'Copied' \
D\t'Deleted' \
M\t'Modified' \
R\t'Renamed' \
T\t'Type Changed' \
U\t'Unmerged' \
X\t'Unknown' \
B\t'Broken')"
complete -x -c git -n '__fish_git_using_command log' -l diff-filter -a '(__fish__git_append_letters_nosep a\tExclude\ added c\tExclude\ copied d\tExclude\ deleted m\tExclude\ modified r\tExclude\ renamed t\tExclude\ type\ changed u\tExclude\ unmerged x\tExclude\ unknown b\tExclude\ broken A\tAdded C\tCopied D\tDeleted M\tModified R\tRenamed T\tType\ Changed U\tUnmerged X\tUnknown B\tBroken)'
### ls-files
complete -c git -n __fish_git_needs_command -a ls-files -d 'Show information about files'
@@ -1538,12 +1685,12 @@ complete -f -c git -n '__fish_git_using_command mailsplit am' -l keep-cr -d 'Do
complete -f -c git -n '__fish_git_using_command mailsplit' -l mboxrd -d 'Input is of mboxrd form'
### maintenance
complete -f -c git -n __fish_git_needs_command -a "maintenance\t'Run tasks to optimize Git repository data'
register\t'Initialize Git config vars for maintenance'
run\t'Run one or more maintenance tasks'
start\t'Start maintenance'
stop\t'Halt background maintenance'
unregister\t'Remove repository from background maintenance'"
complete -f -c git -n __fish_git_needs_command -a maintenance -d 'Run tasks to optimize Git repository data'
complete -f -c git -n '__fish_git_using_command maintenance' -a register -d 'Initialize Git config vars for maintenance'
complete -f -c git -n '__fish_git_using_command maintenance' -a run -d 'Run one or more maintenance tasks'
complete -f -c git -n '__fish_git_using_command maintenance' -a start -d 'Start maintenance'
complete -f -c git -n '__fish_git_using_command maintenance' -a stop -d 'Halt background maintenance'
complete -f -c git -n '__fish_git_using_command maintenance' -a unregister -d 'Remove repository from background maintenance'
complete -f -c git -n '__fish_git_using_command maintenance' -l quiet -d 'Supress logs'
complete -x -c git -n '__fish_git_using_command maintenance' -l task -a 'commit-graph prefetch gc loose-objects incremental-repack pack-refs' -d 'Tasks to run'
complete -f -c git -n '__fish_git_using_command maintenance' -l auto -d 'Run maintenance only when necessary'
@@ -1613,16 +1760,16 @@ 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" -n "not __fish_seen_subcommand_from $notescommands" -a "list\t'List notes for given object'
add\t'Add notes for a given object'
copy\t'Copy notes from object1 to object2'
append\t'Append to the notes of existing object'
edit\t'Edit notes for a given object'
show\t'Show notes for given object'
merge\t'Merge the given notes ref to current notes ref'
remove\t'Remove notes for given object'
prune\t'Remove notes for non-existing/unreachable objects'
get-ref\t'Print current notes ref'"
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'
@@ -1633,11 +1780,13 @@ complete -f -c git -n "__fish_git_using_command notes" -n "__fish_seen_subcomman
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 -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" -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'
@@ -1770,6 +1919,7 @@ set -l reflogcommands show expire delete exists
complete -f -c git -n __fish_git_needs_command -a reflog -d 'Manage reflog information'
complete -f -c git -n '__fish_git_using_command reflog' -ka '(__fish_git_branches)'
complete -f -c git -n '__fish_git_using_command reflog' -ka '(__fish_git_heads)' -d Head
complete -f -c git -n "__fish_git_using_command reflog" -n "not __fish_seen_subcommand_from $reflogcommands" -a "$reflogcommands"
### reset
@@ -1895,13 +2045,13 @@ complete -f -c git -n '__fish_git_using_command tag' -n '__fish_git_contains_opt
### 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" -n "not __fish_seen_subcommand_from $git_worktree_commands" -a "add\t'Create a working tree'
list\t'List details of each worktree'
lock\t'Lock a working tree'
move\t'Move a working tree to a new location'
prune\t'Prune working tree information in $GIT_DIR/worktrees'
remove\t'Remove a working tree'
unlock\t'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' -n '__fish_seen_subcommand_from add move remove' -s f -l force -d 'Override safeguards'
@@ -1935,22 +2085,23 @@ complete -f -c git -n '__fish_git_using_command worktree' -n '__fish_seen_subcom
### 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' -n __fish_git_stash_not_using_subcommand -a "list\t'List stashes'
show\t'Show the changes recorded in the stash'
pop\t'Apply and remove a single stashed state'
apply\t'Apply a single stashed state'
clear\t'Remove all stashed states'
drop\t'Remove a single stashed state from the stash list'
create\t'Create a stash'
save\t'Save a new stash'
branch\t'Create a new branch from a stash'
push\t'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_using_command stash' -n '__fish_git_stash_using_command apply' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command branch' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command drop' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command pop' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command show' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -a '(__fish_git_files modified deleted modified-staged-deleted)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s p -l patch -d 'Interactively select hunks'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s m -l message -d 'Add a description'
@@ -1993,17 +2144,18 @@ 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\t'Initialize, update or inspect submodules'
status\t'Show submodule status'
init\t'Initialize all submodules'
deinit\t'Unregister the given submodules'
update\t'Update all submodules'
set-branch\t'Sets the default remote tracking branch for the submodule'
set-url\t'Sets the URL of the specified submodule'
summary\t'Show commit summary'
foreach\t'Run command on each submodule'
sync\t'Sync submodules\' URL with .gitmodules'
absorbgitdirs\t'Move submodule\'s git directory to current .git/module directory'"
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" -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 'Set the default remote tracking branch'
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"
@@ -2069,62 +2221,62 @@ complete -f -c git -n '__fish_git_using_command blame' -s w -d 'Ignore whitespac
### help
complete -f -c git -n __fish_git_needs_command -a help -d 'Display help information about Git'
complete -f -c git -n '__fish_git_using_command help' -a '(__fish_git_help_all_concepts)'
complete -f -c git -n '__fish_git_using_command help' -a "add\t'Add file contents to the index'
am\t'Apply a series of patches from a mailbox'
apply\t'Apply a patch on a git index file and a working tree'
archive\t'Create an archive of files from a named tree'
bisect\t'Find the change that introduced a bug by binary search'
blame\t'Show what revision and author last modified each line of a file'
branch\t'List, create, or delete branches'
checkout\t'Checkout and switch to a branch'
cherry-pick\t'Apply the change introduced by an existing commit'
clean\t'Remove untracked files from the working tree'
clone\t'Clone a repository into a new directory'
commit\t'Record changes to the repository'
config\t'Set and read git configuration variables'
count-objects\t'Count unpacked number of objects and their disk consumption'
describe\t'Give an object a human-readable name'
diff\t'Show changes between commits, commit and working tree, etc'
daemon\t'A really simple server for Git repositories'
difftool\t'Open diffs in a visual tool'
fetch\t'Download objects and refs from another repository'
filter-branch\t'Rewrite branches'
format-patch\t'Generate patch series to send upstream'
gc\t'Cleanup unnecessary files and optimize the local repository'
grep\t'Print lines matching a pattern'
init\t'Create an empty git repository or reinitialize an existing one'
log\t'Show commit logs'
ls-files\t'Show information about files in the index and the working tree'
mailinfo\t'Extracts patch and authorship from a single e-mail message'
mailsplit\t'Simple UNIX mbox splitter program'
maintenance\t'Run tasks to optimize Git repository data'
merge\t'Join two or more development histories together'
merge-base\t'Find as good common ancestors as possible for a merge'
mergetool\t'Run merge conflict resolution tools to resolve merge conflicts'
mv\t'Move or rename a file, a directory, or a symlink'
notes\t'Add or inspect object notes'
prune\t'Prune all unreachable objects from the object database'
pull\t'Fetch from and merge with another repository or a local branch'
push\t'Update remote refs along with associated objects'
range-diff\t'Compare two commit ranges (e.g. two versions of a branch)'
rebase\t'Forward-port local commits to the updated upstream head'
reflog\t'Manage reflog information'
remote\t'Manage set of tracked repositories'
reset\t'Reset current HEAD to the specified state'
restore\t'Restore working tree files'
revert\t'Revert an existing commit'
rev-parse\t'Pick out and massage parameters'
rm\t'Remove files from the working tree and from the index'
show\t'Shows the last commit of a branch'
show-branch\t'Shows the commits on branches'
stash\t'Stash away changes'
status\t'Show the working tree status'
submodule\t'Initialize, update or inspect submodules'
stripspace\t'Remove unnecessary whitespace'
switch\t'Switch to a branch'
tag\t'Create, list, delete or verify a tag object signed with GPG'
whatchanged\t'Show logs with difference each commit introduces'
worktree\t'Manage multiple working trees'"
complete -f -c git -n '__fish_git_using_command help' -a add -d 'Add file contents to the index'
complete -f -c git -n '__fish_git_using_command help' -a am -d 'Apply a series of patches from a mailbox'
complete -f -c git -n '__fish_git_using_command help' -a apply -d 'Apply a patch on a git index file and a working tree'
complete -f -c git -n '__fish_git_using_command help' -a archive -d 'Create an archive of files from a named tree'
complete -f -c git -n '__fish_git_using_command help' -a bisect -d 'Find the change that introduced a bug by binary search'
complete -f -c git -n '__fish_git_using_command help' -a blame -d 'Show what revision and author last modified each line of a file'
complete -f -c git -n '__fish_git_using_command help' -a branch -d 'List, create, or delete branches'
complete -f -c git -n '__fish_git_using_command help' -a checkout -d 'Checkout and switch to a branch'
complete -f -c git -n '__fish_git_using_command help' -a cherry-pick -d 'Apply the change introduced by an existing commit'
complete -f -c git -n '__fish_git_using_command help' -a clean -d 'Remove untracked files from the working tree'
complete -f -c git -n '__fish_git_using_command help' -a clone -d 'Clone a repository into a new directory'
complete -f -c git -n '__fish_git_using_command help' -a commit -d 'Record changes to the repository'
complete -f -c git -n '__fish_git_using_command help' -a config -d 'Set and read git configuration variables'
complete -f -c git -n '__fish_git_using_command help' -a count-objects -d 'Count unpacked number of objects and their disk consumption'
complete -f -c git -n '__fish_git_using_command help' -a describe -d 'Give an object a human-readable name'
complete -f -c git -n '__fish_git_using_command help' -a diff -d 'Show changes between commits, commit and working tree, etc'
complete -f -c git -n '__fish_git_using_command help' -a daemon -d 'A really simple server for Git repositories'
complete -f -c git -n '__fish_git_using_command help' -a difftool -d 'Open diffs in a visual tool'
complete -f -c git -n '__fish_git_using_command help' -a fetch -d 'Download objects and refs from another repository'
complete -f -c git -n '__fish_git_using_command help' -a filter-branch -d 'Rewrite branches'
complete -f -c git -n '__fish_git_using_command help' -a format-patch -d 'Generate patch series to send upstream'
complete -f -c git -n '__fish_git_using_command help' -a gc -d 'Cleanup unnecessary files and optimize the local repository'
complete -f -c git -n '__fish_git_using_command help' -a grep -d 'Print lines matching a pattern'
complete -f -c git -n '__fish_git_using_command help' -a init -d 'Create an empty git repository or reinitialize an existing one'
complete -f -c git -n '__fish_git_using_command help' -a log -d 'Show commit logs'
complete -f -c git -n '__fish_git_using_command help' -a ls-files -d 'Show information about files in the index and the working tree'
complete -f -c git -n '__fish_git_using_command help' -a mailinfo -d 'Extracts patch and authorship from a single e-mail message'
complete -f -c git -n '__fish_git_using_command help' -a mailsplit -d 'Simple UNIX mbox splitter program'
complete -f -c git -n '__fish_git_using_command help' -a maintenance -d 'Run tasks to optimize Git repository data'
complete -f -c git -n '__fish_git_using_command help' -a merge -d 'Join two or more development histories together'
complete -f -c git -n '__fish_git_using_command help' -a merge-base -d 'Find as good common ancestors as possible for a merge'
complete -f -c git -n '__fish_git_using_command help' -a mergetool -d 'Run merge conflict resolution tools to resolve merge conflicts'
complete -f -c git -n '__fish_git_using_command help' -a mv -d 'Move or rename a file, a directory, or a symlink'
complete -f -c git -n '__fish_git_using_command help' -a notes -d 'Add or inspect object notes'
complete -f -c git -n '__fish_git_using_command help' -a prune -d 'Prune all unreachable objects from the object database'
complete -f -c git -n '__fish_git_using_command help' -a pull -d 'Fetch from and merge with another repository or a local branch'
complete -f -c git -n '__fish_git_using_command help' -a push -d 'Update remote refs along with associated objects'
complete -f -c git -n '__fish_git_using_command help' -a range-diff -d 'Compare two commit ranges (e.g. two versions of a branch)'
complete -f -c git -n '__fish_git_using_command help' -a rebase -d 'Forward-port local commits to the updated upstream head'
complete -f -c git -n '__fish_git_using_command help' -a reflog -d 'Manage reflog information'
complete -f -c git -n '__fish_git_using_command help' -a remote -d 'Manage set of tracked repositories'
complete -f -c git -n '__fish_git_using_command help' -a reset -d 'Reset current HEAD to the specified state'
complete -f -c git -n '__fish_git_using_command help' -a restore -d 'Restore working tree files'
complete -f -c git -n '__fish_git_using_command help' -a revert -d 'Revert an existing commit'
complete -f -c git -n '__fish_git_using_command help' -a rev-parse -d 'Pick out and massage parameters'
complete -f -c git -n '__fish_git_using_command help' -a rm -d 'Remove files from the working tree and from the index'
complete -f -c git -n '__fish_git_using_command help' -a show -d 'Shows the last commit of a branch'
complete -f -c git -n '__fish_git_using_command help' -a show-branch -d 'Shows the commits on branches'
complete -f -c git -n '__fish_git_using_command help' -a stash -d 'Stash away changes'
complete -f -c git -n '__fish_git_using_command help' -a status -d 'Show the working tree status'
complete -f -c git -n '__fish_git_using_command help' -a submodule -d 'Initialize, update or inspect submodules'
complete -f -c git -n '__fish_git_using_command help' -a stripspace -d 'Remove unnecessary whitespace'
complete -f -c git -n '__fish_git_using_command help' -a switch -d 'Switch to a branch'
complete -f -c git -n '__fish_git_using_command help' -a tag -d 'Create, list, delete or verify a tag object signed with GPG'
complete -f -c git -n '__fish_git_using_command help' -a whatchanged -d 'Show logs with difference each commit introduces'
complete -f -c git -n '__fish_git_using_command help' -a worktree -d 'Manage multiple working trees'
# Complete both options and possible parameters to `git config`
complete -f -c git -n '__fish_git_using_command config' -l global -d 'Get/set global configuration'
@@ -2181,7 +2333,9 @@ complete -f -c git -n '__fish_git_using_command for-each-ref' -l count -d "Limit
# Any one of --shell, --perl, --python, or --tcl
set -l for_each_ref_interpreters shell perl python tcl
for intr in $for_each_ref_interpreters
complete -f -c git -n '__fish_git_using_command for-each-ref' -n "not __fish_seen_argument --$for_each_ref_interpreters" -l $intr -d "%(fieldname) placeholders are $intr scripts"
complete -f -c git -n '__fish_git_using_command for-each-ref' \
-n "not __fish_seen_argument --$for_each_ref_interpreters" \
-l $intr -d "%(fieldname) placeholders are $intr scripts"
end
complete -f -c git -n '__fish_git_using_command for-each-ref' -x -l format -d "Format string with %(fieldname) placeholders"
complete -f -c git -n '__fish_git_using_command for-each-ref' -f -l color -d "When to color" -a "always never auto"
@@ -2193,23 +2347,27 @@ complete -f -c git -n '__fish_git_using_command for-each-ref' -x -l no-contains
complete -f -c git -n '__fish_git_using_command for-each-ref' -x -l ignore-case -d "Sorting and filtering refs are case insensitive"
### subcommands supporting --sort (XXX: list may not be complete!)
set -l sortcommands branch for-each-ref tag
# A list of keys one could reasonably sort refs by. This isn't the list of all keys that
# can be used as any git internal key for a ref may be used here, sorted by binary value.
complete -c git -f -n "__fish_seen_subcommand_from branch for-each-ref tag" -l sort -d 'Sort results by' -a "-objectsize\t'Size of branch or commit'
-authordate\t'When the latest commit was actually made'
-committerdate\t'When the branch was last committed or rebased'
-creatordate\t'When the latest commit or tag was created'
creator\t'The name of the commit author'
objectname\t'The complete SHA1'
objectname:short\t'The shortest non-ambiguous SHA1'
refname\t'The complete, unambiguous git ref name'
refname:short\t'The shortest non-ambiguous ref name'
author\t'The name of the author of the latest commit'
committer\t'The name of the person who committed latest'
tagger\t'The name of the person who created the tag'
authoremail\t'The email of the author of the latest commit'
committeremail\t'The email of the person who committed last'
taggeremail\t'The email of the person who created the tag'"
function __fish_git_sort_keys
echo -objectsize\tSize of branch or commit
echo -authordate\tWhen the latest commit was actually made
echo -committerdate\tWhen the branch was last committed or rebased
echo -creatordate\tWhen the latest commit or tag was created
echo creator\tThe name of the commit author
echo objectname\tThe complete SHA1
echo objectname:short\tThe shortest non-ambiguous SHA1
echo refname\tThe complete, unambiguous git ref name
echo refname:short\tThe shortest non-ambiguous ref name
echo author\tThe name of the author of the latest commit
echo committer\tThe name of the person who committed latest
echo tagger\tThe name of the person who created the tag
echo authoremail\tThe email of the author of the latest commit
echo committeremail\tThe email of the person who committed last
echo taggeremail\tThe email of the person who created the tag
end
complete -f -c git -n "__fish_seen_subcommand_from $sortcommands" -l sort -d 'Sort results by' -a "(__fish_git_sort_keys)"
## Custom commands (git-* commands installed in the PATH)
complete -c git -n __fish_git_needs_command -a '(__fish_git_custom_commands)' -d 'Custom command'
@@ -2225,16 +2383,14 @@ function __fish_git_complete_custom_command -a subcommand
end
# source git-* commands' autocompletion file if exists
set -f __fish_git_custom_commands_completion
for file in $PATHgitdash
test ! -x $file
and continue
set -l subcommand (path basename $file)
set -l __fish_git_custom_commands_completion
for file in (path filter -xZ $PATH/git-* | path basename)
# Already seen this command earlier in $PATH.
contains -- $subcommand $__fish_git_custom_commands_completion
contains -- $file $__fish_git_custom_commands_completion
and continue
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
# Running `git foo` ends up running `git-foo`, so we need to ignore the `git-` here.
set -l cmd (string replace -r '^git-' '' -- $file)
complete -c git -f -n "__fish_git_using_command $cmd" -a "(__fish_git_complete_custom_command $cmd)"
set -a __fish_git_custom_commands_completion $file
end

View File

@@ -1,9 +1,5 @@
function __fish_print_debian_services --description 'Prints services installed'
for service in /etc/init.d/*
if test -x $service
basename $service
end
end
path filter -fxZ /etc/init.d/* | path basename
end
function __fish_invoke_rcd_has_service

View File

@@ -149,6 +149,19 @@ function __fish_complete_iw
channel "" \
freq "" \
power_save "Power save state"
else
switch "$cmd[5]"
case type
if not set -q cmd[6]
printf '%s\n' managed ibss monitor mesh wds
end
case channel
if not set -q cmd[6]
# cmd[6] is just the simple channel number
else if not set -q cmd[7]
printf '%s\n' NOHT HT20 HT40+ HT40- 5MHz 10MHz 80MHz 160MHz
end
end
end
case get
if not set -q cmd[5]

View File

@@ -12,7 +12,7 @@ complete -c kak -o q -d 'in filter mode be quiet about errors applying keys'
complete -c kak -o ui -x -a 'ncurses dummy json' -d 'set the type of user interface to use'
complete -c kak -o l -d 'list existing sessions'
complete -c kak -o clear -d 'clear dead sessions'
complete -c kak -o debug -x -d 'initial debug option value'
complete -c kak -o debug -x -d 'initial debug option value' -a 'hooks shell profile keys commands'
complete -c kak -o version -d 'display kakoune version and exit'
complete -c kak -o ro -d 'readonly mode'
complete -c kak -o help -d 'display a help message and quit'

View File

@@ -5,4 +5,4 @@ set -l commands add edit list view grep update delete template import export era
complete -c kb -s h -l help -d 'Show help and exit'
complete -c kb -l version -d 'Show version and exit'
complete -c kb -n "not __fish_seen_subcommand_from $commands" -a $commands
complete -c kb -n "not __fish_seen_subcommand_from $commands" -a "$commands"

View File

@@ -25,7 +25,7 @@ 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'
complete -c killall -s I -l ignore-case -d 'Do case insensitive process name match'
complete -c killall -s g -l process-group -d 'Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belonging to the same process group were found'
complete -c killall -s g -l process-group -d 'Kill the process group to which the process belongs with one signal'
complete -c killall -s i -l interactive -d 'Interactively ask for confirmation before killing'
complete -c killall -s u -l user -x -a "(__fish_complete_users)" -d 'Kill only processes the specified user owns. Command names are optional'
complete -c killall -s w -l wait -d 'Wait for all killed processes to die'

View File

@@ -6,6 +6,6 @@
# kmutil <clear-staging|trigger-panic-medic>
# kmutil -h
if test (command -v kmutil) = /usr/bin/kmutil
if test "$(command -s kmutil)" = /usr/bin/kmutil
command kmutil --generate-completion-script=fish | source
end

View File

@@ -1,23 +1,21 @@
set -l subcommands complete config details download help magnet open search
# Subcommands
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a complete -d "Print bash completion command"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a config -d "Show or update configuration"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a details -d "Show details about torrent with given ID"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a download -d "Download torrent with given ID"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a help -d "Print detailed help for another command"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a magnet -d "Copy magnet link with given ID to clipboard"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a open -d "Open torrent in the default torrent application"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -a search -d "Search for torrents"
complete -f -n __fish_use_subcommand -c mariner -a complete -d "Print bash completion command"
complete -f -n __fish_use_subcommand -c mariner -a config -d "Show or update configuration"
complete -f -n __fish_use_subcommand -c mariner -a details -d "Show details about torrent with given ID"
complete -f -n __fish_use_subcommand -c mariner -a download -d "Download torrent with given ID"
complete -f -n __fish_use_subcommand -c mariner -a help -d "Print detailed help for another command"
complete -f -n __fish_use_subcommand -c mariner -a magnet -d "Copy magnet link with given ID to clipboard"
complete -f -n __fish_use_subcommand -c mariner -a open -d "Open torrent in the default torrent application"
complete -f -n __fish_use_subcommand -c mariner -a search -d "Search for torrents"
# Global options
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -l version -d "Show program's version number and exit"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -s v -l verbose -d "Increase verbosity of output. Can be repeated"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -s q -l quiet -d "Suppress output except warnings and errors"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -s h -l help -d "Show help message and exit"
complete -f -n "__fish_use_subcommand $subcommands" -c mariner -l debug -d "Show tracebacks on errors"
complete -r -n "__fish_use_subcommand $subcommands" -c mariner -l log-file -d "Specify a file to log output. Default ~/.local/share/mariner/mariner.log"
complete -r -n "__fish_use_subcommand $subcommands" -c mariner -l config-file -d "Path to config file. Default ~/.config/mariner/config.yaml"
complete -f -n __fish_use_subcommand -c mariner -l version -d "Show program's version number and exit"
complete -f -n __fish_use_subcommand -c mariner -s v -l verbose -d "Increase verbosity of output. Can be repeated"
complete -f -n __fish_use_subcommand -c mariner -s q -l quiet -d "Suppress output except warnings and errors"
complete -f -n __fish_use_subcommand -c mariner -s h -l help -d "Show help message and exit"
complete -f -n __fish_use_subcommand -c mariner -l debug -d "Show tracebacks on errors"
complete -r -n __fish_use_subcommand -c mariner -l log-file -d "Specify a file to log output. Default ~/.local/share/mariner/mariner.log"
complete -r -n __fish_use_subcommand -c mariner -l config-file -d "Path to config file. Default ~/.config/mariner/config.yaml"
# Config options
complete -f -n "__fish_seen_subcommand_from config" -c mariner -s s -l show -d "Show the configuration"

View File

@@ -1,52 +1,315 @@
# Completions for the meson build system (http://mesonbuild.com/)
set -l basic_arguments \
"h,help,show help message and exit" \
",stdsplit,Split stdout and stderr in test logs" \
",errorlogs,Print logs from failing test(s)" \
",werror,Treat warnings as errors" \
",strip,Strip targets on install" \
"v,version,Show version number and exit"
function __fish_meson_needs_command
set -l cmd (commandline -opc)
set -e cmd[1]
argparse -s 'v/version' -- $cmd 2>/dev/null
or return 0
not set -q argv[1]
end
set -l dir_arguments \
",localedir,Locale data directory [share/locale]" \
",sbindir,System executable directory [sbin]" \
",infodir,Info page directory [share/info]" \
",prefix,Installation prefix [/usr/local]" \
",mandir,Manual page directory [share/man]" \
",datadir,Data file directory [share]" \
",bindir,Executable directory [bin]" \
",sharedstatedir,Arch-agnostic data directory [com]" \
",libdir,Library directory [system default]" \
",localstatedir,Localstate data directory [var]" \
",libexecdir,Library executable directory [libexec]" \
",includedir,Header file directory [include]" \
",sysconfdir,Sysconf data directory [etc]"
function __fish_meson_using_command
set -l cmd (commandline -opc)
set -e cmd[1]
test (count $cmd) -eq 0
and return 1
contains -- $cmd[1] $argv
and return 0
end
for arg in $basic_arguments
set -l parts (string split , -- $arg)
if not string match -q "" -- $parts[1]
complete -c meson -s "$parts[1]" -l "$parts[2]" -d "$parts[3]"
function __fish_meson_builddir
# Consider the value of -C option to detect the build directory
set -l cmd (commandline -opc)
argparse -i 'C=' -- $cmd
if set -q _flag_C
echo $_flag_C
else
complete -c meson -l "$parts[2]" -d "$parts[3]"
echo .
end
end
for arg in $dir_arguments
set -l parts (string split , -- $arg)
complete -c meson -l "$parts[2]" -d "$parts[3]" -xa '(__fish_complete_directories)'
function __fish_meson_targets
set -l python (__fish_anypython); or return
meson introspect --targets (__fish_meson_builddir) | $python -S -c 'import json, sys
data = json.load(sys.stdin)
targets = set()
for target in data:
targets.add(target["name"])
for name in targets:
print(name)' 2>/dev/null
end
complete -c meson -s D -d "Set value of an option (-D foo=bar)"
function __fish_meson_subprojects
set -l python (__fish_anypython); or return
meson introspect --projectinfo (__fish_meson_builddir) | $python -S -c 'import json, sys
data = json.load(sys.stdin)
for subproject in data["subprojects"]:
print(subproject["name"])' 2>/dev/null
end
complete -c meson -l buildtype -xa 'plain debug debugoptimized release minsize' -d "Set build type [debug]"
complete -c meson -l layout -xa 'mirror flat' -d "Build directory layout [mirror]"
complete -c meson -l backend -xa 'ninja vs vs2010 vs2015 vs2017 xcode' -d "Compilation backend [ninja]"
complete -c meson -l default-library -xa 'shared static both' -d "Default library type [shared]"
complete -c meson -l warning-level -xa '1 2 3' -d "Warning level [1]"
complete -c meson -l unity -xa 'on off subprojects' -d "Unity build [off]"
complete -c meson -l cross-file -r -d "File describing cross-compilation environment"
complete -c meson -l wrap-mode -xa 'WrapMode.{default,nofallback,nodownload,forcefallback}' -d "Special wrap mode to use"
function __fish_meson_tests
# --list option shows suites in a short form, e.g. if a test "gvariant"
# is present both in "glib:glib" and "glib:slow" suites, it will be shown
# in a list as "glib:glib+slow / gvariant". So, just filter out the first
# part and list all of the test names.
meson test -C (__fish_meson_builddir) --no-rebuild --list | string split -r -f1 ' / '
end
# final parameter
complete -c meson -n "__fish_is_nth_token 1" -xa '(__fish_complete_directories)'
function __fish_meson_test_suites
set -l python (__fish_anypython); or return
meson introspect --tests (__fish_meson_builddir) | $python -S -c 'import json, sys
data = json.load(sys.stdin)
suites = set()
for test in data:
suites.update(test["suite"])
for name in suites:
print(name)' 2>/dev/null
end
function __fish_meson_help_commands
meson help --help | string match -g -r '^ *{(.*)}' | string split ,
end
# Each meson command and subcommand has -h/--help option
complete -c meson -s h -l help -d 'Show help'
# In order to prevent directory completions from being mixed in with subcommand completions,
# we need to use -kxa instead of -xa and make sure we do the directory completions first.
# In order for subcommands to be sorted alphabetically, we need to make sure that we compose
# them in the reverse alphabetical order and use -kxa there as well.
# This is to support the implicit setup/configure mode, deprecated upstream but not yet removed.
complete -c meson -n '__fish_meson_needs_command' -kxa '(__fish_complete_directories)'
### wrap
set -l wrap_cmds list search install update info status promote update-db
complete -c meson -n __fish_meson_needs_command -kxa wrap -d 'Manage WrapDB dependencies'
complete -c meson -n "__fish_meson_using_command wrap; and not __fish_seen_subcommand_from $wrap_cmds" -xa '
list\t"Show all available projects"
search\t"Search the db by name"
install\t"Install the specified project"
update\t"Update wrap files from WrapDB"
info\t"Show available versions of a project"
status\t"Show installed and available versions of your projects"
promote\t"Bring a subsubproject up to the master project"
update-db\t"Update list of projects available in WrapDB"
'
complete -c meson -n "__fish_meson_using_command wrap; and __fish_seen_subcommand_from $wrap_cmds" -l allow-insecure -d 'Allow insecure server connections'
complete -c meson -n '__fish_meson_using_command wrap; and __fish_seen_subcommand_from update' -l force -d 'Update wraps that does not seems to come from WrapDB'
complete -c meson -n '__fish_meson_using_command wrap; and __fish_seen_subcommand_from update' -l sourcedir -xa '(__fish_complete_directories)' -d 'Source directory'
complete -c meson -n '__fish_meson_using_command wrap; and __fish_seen_subcommand_from update' -l types -x -d 'Comma-separated list of subproject types'
complete -c meson -n '__fish_meson_using_command wrap; and __fish_seen_subcommand_from update' -l num-processes -x -d 'How many parallel processes to use'
complete -c meson -n '__fish_meson_using_command wrap; and __fish_seen_subcommand_from update' -l allow-insecure -x -d 'Allow insecure server connections'
complete -c meson -n '__fish_meson_using_command wrap; and __fish_seen_subcommand_from promote' -xa '(__fish_complete_directories)' -d 'Project path'
### test
complete -c meson -n __fish_meson_needs_command -kxa test -d 'Run tests for the project'
# TODO: meson allows to pass just "testname" to run all tests with that name,
# or "subprojname:testname" to run "testname" from "subprojname",
# or "subprojname:" to run all tests defined by "subprojname",
# but completion is only handled for the "testname".
complete -c meson -n '__fish_meson_using_command test' -xa '(__fish_meson_tests)'
complete -c meson -n '__fish_meson_using_command test' -s h -l help -d 'Show help'
complete -c meson -n '__fish_meson_using_command test' -s C -xa '(__fish_complete_directories)' -d 'Directory to cd into before running'
complete -c meson -n '__fish_meson_using_command test' -l maxfail -x -d 'Number of failing tests before aborting the test run'
complete -c meson -n '__fish_meson_using_command test' -l repeat -x -d 'Number of times to run the tests'
complete -c meson -n '__fish_meson_using_command test' -l no-rebuild -d 'Do not rebuild before running tests'
complete -c meson -n '__fish_meson_using_command test' -l gdb -d 'Run test under gdb'
complete -c meson -n '__fish_meson_using_command test' -l gdb-path -r -d 'Run test under gdb'
complete -c meson -n '__fish_meson_using_command test' -l list -d 'List available tests'
complete -c meson -n '__fish_meson_using_command test' -l wrapper -r -d 'Wrapper to run tests with (e.g. valgrind)'
complete -c meson -n '__fish_meson_using_command test' -l suite -xa '(__fish_meson_test_suites)' -d 'Only run tests belonging to the given suite'
complete -c meson -n '__fish_meson_using_command test' -l no-suite -xa '(__fish_meson_test_suites)' -d 'Do not run tests belonging to the given suite'
complete -c meson -n '__fish_meson_using_command test' -l no-stdsplit -d 'Do not split stderr and stdout in test logs'
complete -c meson -n '__fish_meson_using_command test' -l print-errorlogs -d 'Print logs of failing tests'
complete -c meson -n '__fish_meson_using_command test' -l benchmark -d 'Run benchmarks instead of tests'
complete -c meson -n '__fish_meson_using_command test' -l logbase -x -d 'Base name for log file'
complete -c meson -n '__fish_meson_using_command test' -l num-processes -x -d 'How many parallel processes to use'
complete -c meson -n '__fish_meson_using_command test' -s v -l verbose -d 'Do not redirect stdout and stderr'
complete -c meson -n '__fish_meson_using_command test' -s q -l quiet -d 'Produce less output to the terminal'
complete -c meson -n '__fish_meson_using_command test' -s t -l timeout-multiplier -x -d 'Multiplier for test timeout'
complete -c meson -n '__fish_meson_using_command test' -l setup -x -d 'Which test setup to use'
complete -c meson -n '__fish_meson_using_command test' -l test-args -x -d 'Arguments to pass to the test(s)'
### subprojects
set -l subprojects_cmds update checkout download foreach purge packagefiles
complete -c meson -n __fish_meson_needs_command -kxa subprojects -d 'Manage subprojects'
complete -c meson -n "__fish_meson_using_command subprojects; and not __fish_seen_subcommand_from $subprojects_cmds" -xa '
update\t"Update all subprojects"
checkout\t"Checkout a branch (git only)"
download\t"Ensure subprojects are fetched"
foreach\t"Execute a command in each subproject"
purge\t"Remove all wrap-based subproject artifacts"
packagefiles\t"Manage the packagefiles overlay"
'
complete -c meson -n "__fish_meson_using_command subprojects; and __fish_seen_subcommand_from $subprojects_cmds" -l sourcedir -xa '(__fish_complete_directories)' -d 'Path to source directory'
complete -c meson -n "__fish_meson_using_command subprojects; and __fish_seen_subcommand_from $subprojects_cmds" -l types -xa 'file git hg svn' -d 'Comma-separated list of subproject types'
complete -c meson -n "__fish_meson_using_command subprojects; and __fish_seen_subcommand_from $subprojects_cmds" -l num-processes -x -d 'How many parallel processes to use'
complete -c meson -n "__fish_meson_using_command subprojects; and __fish_seen_subcommand_from $subprojects_cmds" -l allow-insecure -x -d 'Allow insecure server connections'
complete -c meson -n '__fish_meson_using_command subprojects; and __fish_seen_subcommand_from update' -l reset -d 'Checkout wrap\'s revision and hard reset to that commit'
complete -c meson -n '__fish_meson_using_command subprojects; and __fish_seen_subcommand_from checkout' -s b -d 'Create a new branch'
complete -c meson -n '__fish_meson_using_command subprojects; and __fish_seen_subcommand_from purge' -l include-cache -d 'Remove the package cache as well'
complete -c meson -n '__fish_meson_using_command subprojects; and __fish_seen_subcommand_from purge' -l confirm -d 'Confirm the removal of subproject artifacts'
complete -c meson -n '__fish_meson_using_command subprojects; and __fish_seen_subcommand_from packagefiles' -l apply -d 'Apply packagefiles to the subproject'
complete -c meson -n '__fish_meson_using_command subprojects; and __fish_seen_subcommand_from packagefiles' -l save -d 'Save packagefiles from the subproject'
### setup
complete -c meson -n __fish_meson_needs_command -kxa setup -d 'Configure a build directory'
# All of the setup options are also exposed to the global scope
# Use -k here for one of the cases to make sure directories come after any other top-level completions
complete -c meson -n '__fish_meson_using_command setup' -xa '(__fish_complete_directories)'
# A lot of options are shared for "setup" and "configure" commands
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l prefix -xa '(__fish_complete_directories)' -d 'Installation prefix'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l bindir -xa '(__fish_complete_directories)' -d 'Executable directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l datadir -xa '(__fish_complete_directories)' -d 'Data file directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l includedir -xa '(__fish_complete_directories)' -d 'Header file directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l infodir -xa '(__fish_complete_directories)' -d 'Info page directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l libdir -xa '(__fish_complete_directories)' -d 'Library directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l licensedir -xa '(__fish_complete_directories)' -d 'Licenses directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l libexecdir -xa '(__fish_complete_directories)' -d 'Library executable directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l localedir -xa '(__fish_complete_directories)' -d 'Locale data directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l localstatedir -xa '(__fish_complete_directories)' -d 'Localstate data directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l mandir -xa '(__fish_complete_directories)' -d 'Manual page directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l sbindir -xa '(__fish_complete_directories)' -d 'System executable directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l sharedstatedir -xa '(__fish_complete_directories)' -d 'Architecture-independent data directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l sysconfdir -xa '(__fish_complete_directories)' -d 'Sysconf data directory'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l auto-features -xa 'enabled disabled auto' -d 'Override value of all "auto" features'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l backend -xa 'ninja vs vs2010 vs2012 vs2013 vs2015 vs2017 vs2019 vs2022 xcode' -d 'Backend to use'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l buildtype -xa 'plain debug debugoptimized release minsize custom' -d 'Build type to use'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l debug -d 'Enable debug symbols and other info'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l default-library -xa 'shared static both' -d 'Default library type'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l errorlogs -d 'Print the logs from failing tests'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l install-umask -x -d 'Default umask to apply on permissions of installed files'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l layout -xa 'mirror flat' -d 'Build directory layout'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l optimization -xa 'plain 0 g 1 2 3 s' -d 'Optimization level'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l prefer-static -d 'Try static linking before shared linking'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l stdsplit -d 'Split stdout and stderr in test logs'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l strip -d 'Strip targets on install'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l unity -xa 'on off subprojects' -d 'Unity build'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l unity-size -x -d 'Unity block size'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l warnlevel -xa '0 1 2 3 everything' -d 'Compiler warning level to use'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l werror -d 'Treat warnings as errors'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l wrap-mode -xa 'default nofallback nodownload forcefallback nopromote' -d 'Wrap mode'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l force-fallback-for -x -d 'Force fallback for those subprojects'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l pkgconfig.relocatable -d 'Generate pkgconfig files as relocatable'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l python.install-env -xa 'auto prefix system venv' -d 'Which python environment to install to'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l python.platlibdir -x -d 'Directory for site-specific, platform-specific files'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l python.purelibdir -x -d 'Directory for site-specific, non-platform-specific files'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l pkg-config-path -x -d 'Additional paths for pkg-config (for host machine)'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l build.pkg-config-path -x -d 'Additional paths for pkg-config (for build machine)'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l cmake-prefix-path -x -d 'Additional prefixes for cmake (for host machine)'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -l build.cmake-prefix-path -x -d 'Additional prefixes for cmake (for build machine)'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup configure' -s D -x -d 'Set the value of an option'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -l native-file -r -d 'File with overrides for native compilation environment'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -l cross-file -r -d 'File describing cross compilation environment'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -l vsenv -d 'Force setup of Visual Studio environment'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -s v -l version -d 'Show version number and exit'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -l fatal-meson-warnings -d 'Make all Meson warnings fatal'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -l reconfigure -d 'Set options and reconfigure the project'
complete -c meson -n '__fish_meson_needs_command || __fish_meson_using_command setup' -l wipe -d 'Wipe build directory and reconfigure'
### rewrite
set -l rewrite_cmds target kwargs default-options command
complete -c meson -n __fish_meson_needs_command -kxa rewrite -d 'Modify the project'
complete -c meson -n "__fish_meson_using_command rewrite; and not __fish_seen_subcommand_from $rewrite_cmds" -s s -l sourcedir -xa '(__fish_complete_directories)' -d 'Path to source directory'
complete -c meson -n "__fish_meson_using_command rewrite; and not __fish_seen_subcommand_from $rewrite_cmds" -s V -l verbose -d 'Enable verbose output'
complete -c meson -n "__fish_meson_using_command rewrite; and not __fish_seen_subcommand_from $rewrite_cmds" -s S -l skip-errors -d 'Skip errors instead of aborting'
complete -c meson -n "__fish_meson_using_command rewrite; and not __fish_seen_subcommand_from $rewrite_cmds" -xa '
target\t"Modify a target"
kwargs\t"Modify keyword arguments"
default-options\t"Modify the project default options"
command\t"Execute a JSON array of commands"
'
# TODO: "meson rewrite target" completions are incomplete and hard to implement properly
complete -c meson -n '__fish_meson_using_command rewrite; and __fish_seen_subcommand_from target' -s s -l subdir -xa '(__fish_complete_directories)' -d 'Subdirectory of the new target'
complete -c meson -n '__fish_meson_using_command rewrite; and __fish_seen_subcommand_from target' -l type -d 'Type of the target to add' \
-xa 'both_libraries executable jar library shared_library shared_module static_library'
complete -c meson -n '__fish_meson_using_command rewrite; and __fish_seen_subcommand_from kwargs; and __fish_is_nth_token 3' -xa 'set delete add remove remove_regex info' -d 'Action to execute'
complete -c meson -n '__fish_meson_using_command rewrite; and __fish_seen_subcommand_from kwargs; and __fish_is_nth_token 4' -xa 'dependency target project' -d 'Function type to modify'
complete -c meson -n '__fish_meson_using_command rewrite; and __fish_seen_subcommand_from default-options; and __fish_is_nth_token 3' -xa 'set delete' -d 'Action to execute'
### introspect
complete -c meson -n __fish_meson_needs_command -kxa introspect -d 'Display info about a project'
complete -c meson -n '__fish_meson_using_command introspect' -xa '(__fish_complete_directories)'
complete -c meson -n '__fish_meson_using_command introspect' -l ast -d 'Dump the AST of the meson file'
complete -c meson -n '__fish_meson_using_command introspect' -l benchmarks -d 'List all benchmarks'
complete -c meson -n '__fish_meson_using_command introspect' -l buildoptions -d 'List all build options'
complete -c meson -n '__fish_meson_using_command introspect' -l buildsystem-files -d 'List files that make up the build system'
complete -c meson -n '__fish_meson_using_command introspect' -l dependencies -d 'List external dependencies'
complete -c meson -n '__fish_meson_using_command introspect' -l scan-dependencies -d 'Scan for dependencies used in the meson.build file'
complete -c meson -n '__fish_meson_using_command introspect' -l installed -d 'List all installed files and directories'
complete -c meson -n '__fish_meson_using_command introspect' -l install-plan -d 'List all installed files and directories with their details'
complete -c meson -n '__fish_meson_using_command introspect' -l projectinfo -d 'Information about projects'
complete -c meson -n '__fish_meson_using_command introspect' -l targets -d 'List top level targets'
complete -c meson -n '__fish_meson_using_command introspect' -l tests -d 'List all unit tests'
complete -c meson -n '__fish_meson_using_command introspect' -l backend -xa 'ninja vs vs2010 vs2012 vs2013 vs2015 vs2017 vs2019 vs2022 xcode' -d 'The backend to use for the --buildoptions introspection'
complete -c meson -n '__fish_meson_using_command introspect' -s a -l all -d 'Print all available information'
complete -c meson -n '__fish_meson_using_command introspect' -s i -l indent -d 'Enable pretty printed JSON'
complete -c meson -n '__fish_meson_using_command introspect' -s f -l force-object-output -d 'Always use the new JSON format for multiple entries'
### install
complete -c meson -n __fish_meson_needs_command -kxa install -d 'Install the project'
complete -c meson -n '__fish_meson_using_command install' -f
complete -c meson -n '__fish_meson_using_command install' -s C -xa '(__fish_complete_directories)' -d 'Directory to cd into before running'
complete -c meson -n '__fish_meson_using_command install' -l no-rebuild -d 'Do not rebuild before installing'
complete -c meson -n '__fish_meson_using_command install' -l only-changed -d 'Only overwrite files that are older than the copied file'
complete -c meson -n '__fish_meson_using_command install' -l quiet -d 'Do not print every file that was installed'
complete -c meson -n '__fish_meson_using_command install' -l destdir -r -d 'Sets or overrides DESTDIR environment'
complete -c meson -n '__fish_meson_using_command install' -s n -l dry-run -d 'Do not actually install, but print logs'
complete -c meson -n '__fish_meson_using_command install' -l skip-subprojects -xa '(__fish_meson_subprojects)' -d 'Do not install files from given subprojects'
complete -c meson -n '__fish_meson_using_command install' -l tags -x -d 'Install only targets having one of the given tags'
complete -c meson -n '__fish_meson_using_command install' -l strip -d 'Strip targets even if strip option was not set during configure'
### init
complete -c meson -n __fish_meson_needs_command -kxa init -d 'Create a project from template'
complete -c meson -n '__fish_meson_using_command init' -s C -xa '(__fish_complete_directories)' -d 'Directory to cd into before running'
complete -c meson -n '__fish_meson_using_command init' -s n -l name -x -d 'Project name'
complete -c meson -n '__fish_meson_using_command init' -s e -l executable -x -d 'Executable name'
complete -c meson -n '__fish_meson_using_command init' -s d -l deps -x -d 'Dependencies, comma-separated'
complete -c meson -n '__fish_meson_using_command init' -s l -l language -xa 'c cpp cs cuda d fortran java objc objcpp rust vala' -d 'Project language'
complete -c meson -n '__fish_meson_using_command init' -s b -l build -d 'Build after generation'
complete -c meson -n '__fish_meson_using_command init' -l builddir -r -d 'Directory for build'
complete -c meson -n '__fish_meson_using_command init' -s f -l force -d 'Force overwrite of existing files and directories'
complete -c meson -n '__fish_meson_using_command init' -l type -xa 'executable library' -d 'Project type'
complete -c meson -n '__fish_meson_using_command init' -l version -x -d 'Project version'
### help
complete -c meson -n __fish_meson_needs_command -kxa help -d 'Show help for a command'
complete -c meson -n '__fish_meson_using_command help' -xa "(__fish_meson_help_commands)"
### dist
complete -c meson -n __fish_meson_needs_command -kxa dist -d 'Generate a release archive'
complete -c meson -n '__fish_meson_using_command dist' -f
complete -c meson -n '__fish_meson_using_command dist' -s C -xa '(__fish_complete_directories)' -d 'Directory to cd into before running'
complete -c meson -n '__fish_meson_using_command dist' -l allow-dirty -d 'Allow even when repository contains uncommitted changes'
complete -c meson -n '__fish_meson_using_command dist' -l formats -xa 'xztar gztar zip' -d 'Comma separated list of archive types to create'
complete -c meson -n '__fish_meson_using_command dist' -l include-subprojects -d 'Include source code of subprojects'
complete -c meson -n '__fish_meson_using_command dist' -l no-tests -d 'Do not build and test generated packages'
### devenv
complete -c meson -n __fish_meson_needs_command -kxa devenv -d 'Run a command from the build directory'
complete -c meson -n '__fish_meson_using_command devenv' -s h -l help -d 'Show help'
complete -c meson -n '__fish_meson_using_command devenv' -s C -xa '(__fish_complete_directories)' -d 'Path to build directory'
complete -c meson -n '__fish_meson_using_command devenv' -s w -l workdir -xa '(__fish_complete_directories)' -d 'Directory to cd into before running'
complete -c meson -n '__fish_meson_using_command devenv' -l dump -d 'Only print required environment'
complete -c meson -n '__fish_meson_using_command devenv' -l dump-format -xa 'sh export vscode' -d 'Format used with --dump'
### configure
complete -c meson -n __fish_meson_needs_command -kxa configure -d 'Change project options'
complete -c meson -n '__fish_meson_using_command configure' -xa '(__fish_complete_directories)'
complete -c meson -n '__fish_meson_using_command configure' -l clearcache -d 'Clear cached state'
complete -c meson -n '__fish_meson_using_command configure' -l no-pager -d 'Do not redirect output to a pager'
### compile
complete -c meson -n __fish_meson_needs_command -kxa compile -d 'Build the configured project'
complete -c meson -n '__fish_meson_using_command compile' -xa '(__fish_meson_targets)'
complete -c meson -n '__fish_meson_using_command compile' -l clean -d 'Clean the build directory'
complete -c meson -n '__fish_meson_using_command compile' -s C -r -d 'Directory to cd into before running'
complete -c meson -n '__fish_meson_using_command compile' -s j -l jobs -x -d 'The number of worker jobs to run'
complete -c meson -n '__fish_meson_using_command compile' -s l -l load-average -x -d 'The system load average to try to maintain'
complete -c meson -n '__fish_meson_using_command compile' -s v -l verbose -d 'Show more verbose output'
complete -c meson -n '__fish_meson_using_command compile' -l ninja-args -x -d 'Arguments to pass to `ninja`'
complete -c meson -n '__fish_meson_using_command compile' -l vs-args -x -d 'Arguments to pass to `msbuild`'
complete -c meson -n '__fish_meson_using_command compile' -l xcode-args -x -d 'Arguments to pass to `xcodebuild`'
# tag: k_reverse_order

View File

@@ -26,7 +26,8 @@ complete -c mix -n __fish_mix_needs_command -a archive.install -d "Installs an a
complete -c mix -n __fish_mix_needs_command -a archive.uninstall -d "Uninstalls archives"
complete -f -c mix -n __fish_mix_needs_command -a clean -d "Deletes generated application files"
complete -f -c mix -n __fish_mix_needs_command -a cmd -d "Executes the given command"
complete -c mix -n __fish_mix_needs_command -a compile -d "Compiles source files"
complete -f -c mix -n __fish_mix_needs_command -a compile -d "Compiles source files"
complete -f -c mix -n __fish_mix_needs_command -a compile.phoenix -d "Compiles Phoenix source files that support code reloading"
complete -f -c mix -n __fish_mix_needs_command -a deps -d "Lists dependencies and their status"
complete -f -c mix -n __fish_mix_needs_command -a deps.clean -d "Deletes the given dependencies' files"
complete -f -c mix -n __fish_mix_needs_command -a deps.compile -d "Compiles dependencies"
@@ -41,53 +42,157 @@ complete -f -c mix -n __fish_mix_needs_command -a local -d "Lists local tasks"
complete -f -c mix -n __fish_mix_needs_command -a local.hex -d "Installs Hex locally"
complete -f -c mix -n __fish_mix_needs_command -a local.public_keys -d "Manages public keys"
complete -f -c mix -n __fish_mix_needs_command -a local.rebar -d "Installs rebar locally"
complete -f -c mix -n __fish_mix_needs_command -a local.phx -d "Updates the Phoenix project generator locally"
complete -c mix -n __fish_mix_needs_command -a new -d "Creates a new Elixir project"
complete -c mix -n __fish_mix_needs_command -a profile.fprof -d "Profiles the given file or expression with fprof"
complete -f -c mix -n __fish_mix_needs_command -a phx -d "Prints Phoenix tasks and their information."
complete -f -c mix -n __fish_mix_needs_command -a phx.digest -d "Digests and compresses static files"
complete -f -c mix -n __fish_mix_needs_command -a phx.digest.clean -d "Removes old versions of static assets."
complete -f -c mix -n __fish_mix_needs_command -a phx.gen -d "Lists all available Phoenix generators"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.auth -d "Generates authentication logic for a resource"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.cert -d "Generates a self-signed certificate for HTTPS testing"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.channel -d "Generates a Phoenix channel"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.context -d "Generates a context with functions around an Ecto schema"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.embedded -d "Generates an embedded Ecto schema file"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.html -d "Generates context and controller for an HTML resource"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.json -d "Generates context and controller for a JSON resource"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.live -d "Generates LiveView, templates, and context for a resource"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.notifier -d "Generates a notifier that delivers emails by default"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.presence -d "Generates a Presence tracker"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.release -d "Generates release files and optional Dockerfile for release-based deployments"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.schema -d "Generates an Ecto schema and migration file"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.secret -d "Generates a secret"
complete -f -c mix -n __fish_mix_needs_command -a phx.gen.socket -d "Generates a Phoenix socket handler"
complete -f -c mix -n __fish_mix_needs_command -a phx.new -d "Creates a new Phoenix application"
complete -f -c mix -n __fish_mix_needs_command -a phx.new.ecto -d "Creates a new Ecto project within an umbrella project"
complete -f -c mix -n __fish_mix_needs_command -a phx.new.web -d "Creates a new Phoenix web project within an umbrella project"
complete -f -c mix -n __fish_mix_needs_command -a phx.routes -d "Prints all routes"
complete -f -c mix -n __fish_mix_needs_command -a phx.server -d "Starts applications and their servers"
complete -f -c mix -n __fish_mix_needs_command -a run -d "Runs the given file or expression"
complete -f -c mix -n __fish_mix_needs_command -a test -d "Runs a project's tests"
# archive.build subcommand
complete -c mix -n '__fish_mix_using_command archive.build' -s i -d "specify input directory"
complete -f -c mix -n '__fish_mix_using_command archive.build' -s o -d "specify output file name"
complete -f -c mix -n '__fish_mix_using_command archive.build' -l no-compile -d "skip compilation"
complete -c mix -n '__fish_mix_using_command archive.build' -s i -d "Specify input directory"
complete -f -c mix -n '__fish_mix_using_command archive.build' -s o -d "Specify output file name"
complete -f -c mix -n '__fish_mix_using_command archive.build' -l no-compile -d "Skip compilation"
# clean subcommand
complete -f -c mix -n '__fish_mix_using_command clean' -l all -d "Clean everything, including dependencies"
# escript.build subcommand
complete -f -c mix -n '__fish_mix_using_command escript.build' -l force -d "forces compilation regardless of modification times"
complete -f -c mix -n '__fish_mix_using_command escript.build' -l no-compile -d "skips compilation to .beam files"
complete -f -c mix -n '__fish_mix_using_command escript.build' -l force -d "Forces compilation regardless of modification times"
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 "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"
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"
# run subcommand
complete -c mix -n '__fish_mix_using_command run' -l config -s c -d "loads the given configuration file"
complete -c mix -n '__fish_mix_using_command run' -l eval -s e -d "evaluates the given code"
complete -c mix -n '__fish_mix_using_command run' -l require -s r -d "requires pattern before running the command"
complete -c mix -n '__fish_mix_using_command run' -l parallel-require -s pr -d "requires pattern in parallel"
complete -c mix -n '__fish_mix_using_command run' -l no-compile -d "does not compile even if files require compilation"
complete -c mix -n '__fish_mix_using_command run' -l no-deps-check -d "does not check dependencies"
complete -c mix -n '__fish_mix_using_command run' -l no-halt -d "does not halt the system after running the command"
complete -c mix -n '__fish_mix_using_command run' -l no-start -d "does not start applications after compilation"
complete -c mix -n '__fish_mix_using_command run' -l config -s c -d "Loads the given configuration file"
complete -c mix -n '__fish_mix_using_command run' -l eval -s e -d "Evaluates the given code"
complete -c mix -n '__fish_mix_using_command run' -l require -s r -d "Requires pattern before running the command"
complete -c mix -n '__fish_mix_using_command run' -l parallel-require -s pr -d "Requires pattern in parallel"
complete -c mix -n '__fish_mix_using_command run' -l no-compile -d "Does not compile even if files require compilation"
complete -c mix -n '__fish_mix_using_command run' -l no-deps-check -d "Does not check dependencies"
complete -c mix -n '__fish_mix_using_command run' -l no-halt -d "Does not halt the system after running the command"
complete -c mix -n '__fish_mix_using_command run' -l no-start -d "Does not start applications after compilation"
# test subcommand
complete -c mix -n '__fish_mix_using_command test' -l trace -d "run tests with detailed reporting; automatically sets `--max-cases` to 1"
complete -c mix -n '__fish_mix_using_command test' -l max-cases -d "set the maximum number of cases running async"
complete -c mix -n '__fish_mix_using_command test' -l cover -d "the directory to include coverage results"
complete -c mix -n '__fish_mix_using_command test' -l force -d "forces compilation regardless of modification times"
complete -c mix -n '__fish_mix_using_command test' -l no-compile -d "do not compile, even if files require compilation"
complete -c mix -n '__fish_mix_using_command test' -l no-start -d "do not start applications after compilation"
complete -c mix -n '__fish_mix_using_command test' -l no-color -d "disable color in the output"
complete -c mix -n '__fish_mix_using_command test' -l color -d "enable color in the output"
complete -c mix -n '__fish_mix_using_command test' -l include -d "include tests that match the filter"
complete -c mix -n '__fish_mix_using_command test' -l exclude -d "exclude tests that match the filter"
complete -c mix -n '__fish_mix_using_command test' -l only -d "run only tests that match the filter"
complete -c mix -n '__fish_mix_using_command test' -l seed -d "seeds the random number generator used to randomize test order"
complete -c mix -n '__fish_mix_using_command test' -l timeout -d "set the timeout for the tests"
complete -c mix -n '__fish_mix_using_command test' -l trace -d "Run tests with detailed reporting; automatically sets `--max-cases` to 1"
complete -c mix -n '__fish_mix_using_command test' -l max-cases -d "Set the maximum number of cases running async"
complete -c mix -n '__fish_mix_using_command test' -l cover -d "The directory to include coverage results"
complete -c mix -n '__fish_mix_using_command test' -l force -d "Forces compilation regardless of modification times"
complete -c mix -n '__fish_mix_using_command test' -l no-compile -d "Do not compile, even if files require compilation"
complete -c mix -n '__fish_mix_using_command test' -l no-start -d "Do not start applications after compilation"
complete -c mix -n '__fish_mix_using_command test' -l no-color -d "Disable color in the output"
complete -c mix -n '__fish_mix_using_command test' -l color -d "Enable color in the output"
complete -c mix -n '__fish_mix_using_command test' -l include -d "Include tests that match the filter"
complete -c mix -n '__fish_mix_using_command test' -l exclude -d "Exclude tests that match the filter"
complete -c mix -n '__fish_mix_using_command test' -l only -d "Run only tests that match the filter"
complete -c mix -n '__fish_mix_using_command test' -l seed -d "Seeds the random number generator used to randomize test order"
complete -c mix -n '__fish_mix_using_command test' -l timeout -d "Set the timeout for the tests"
# phx subcommand
complete -f -c mix -n '__fish_mix_using_command phx' -l version -d "Prints the Phoenix version"
complete -c mix -n '__fish_mix_using_command phx.digest' -s o -d "Specify output file name"
complete -f -c mix -n '__fish_mix_using_command phx.digest' -l no-vsn -d "digest the stylesheet asset references without the query string `?vsn=d`"
complete -c mix -n '__fish_mix_using_command phx.digest.clean' -s o -l output -d "The path to your compiled assets directory. Defaults to priv/static"
complete -f -c mix -n '__fish_mix_using_command phx.digest.clean' -l age -d "Maximum age (in seconds) for assets"
complete -f -c mix -n '__fish_mix_using_command phx.digest.clean' -l keep -d "How many previous versions of assets to keep"
complete -f -c mix -n '__fish_mix_using_command phx.digest.clean' -l all -d "Specifies that all compiled assets (including the manifest) will be removed"
complete -f -c mix -n '__fish_mix_using_command phx.gen.auth' -l web -d "Customize the web module namespace"
complete -f -c mix -n '__fish_mix_using_command phx.gen.auth' -l binary-id -d "Uses `binary_id` for schema's primary key and its references"
complete -f -c mix -n '__fish_mix_using_command phx.gen.auth' -l table -d "Specify the the table name for the migration and schema"
complete -f -c mix -n '__fish_mix_using_command phx.gen.cert' -s o -l output -d "The path and base filename for the certificate and key"
complete -f -c mix -n '__fish_mix_using_command phx.gen.cert' -s n -l name -d "The Common Name value in certificate's subject"
complete -f -c mix -n '__fish_mix_using_command phx.gen.context' -l binary-id -d "Uses `binary_id` for schema's primary key and its references"
complete -f -c mix -n '__fish_mix_using_command phx.gen.context' -l table -d "Specify the the table name for the migration and schema"
complete -f -c mix -n '__fish_mix_using_command phx.gen.context' -l merge-with-existing-context -d "Skips prompt and automatically merge the new schema access functions and tests"
complete -f -c mix -n '__fish_mix_using_command phx.gen.context' -l no-merge-with-existing-context -d "Skips prompt and prevents changes to an existing context"
complete -f -c mix -n '__fish_mix_using_command phx.gen.html' -l context-app -d "Specifies the context app"
complete -f -c mix -n '__fish_mix_using_command phx.gen.html' -l web -d "Customize the web module namespace"
complete -f -c mix -n '__fish_mix_using_command phx.gen.html' -l no-context -d "Omits context internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.html' -l no-schema -d "Omits schema internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.html' -l binary-id -d "Uses `binary_id` for schema's primary key and its references"
complete -f -c mix -n '__fish_mix_using_command phx.gen.html' -l table -d "Specify the the table name for the migration and schema"
complete -f -c mix -n '__fish_mix_using_command phx.gen.json' -l context-app -d "Specifies the context app"
complete -f -c mix -n '__fish_mix_using_command phx.gen.json' -l web -d "Customize the web module namespace"
complete -f -c mix -n '__fish_mix_using_command phx.gen.json' -l no-context -d "Omits context internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.json' -l no-schema -d "Omits schema internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.json' -l binary-id -d "Uses `binary_id` for schema's primary key and its references"
complete -f -c mix -n '__fish_mix_using_command phx.gen.json' -l table -d "Specify the the table name for the migration and schema"
complete -f -c mix -n '__fish_mix_using_command phx.gen.live' -l context-app -d "Specifies the context app"
complete -f -c mix -n '__fish_mix_using_command phx.gen.live' -l web -d "Customize the web module namespace"
complete -f -c mix -n '__fish_mix_using_command phx.gen.live' -l no-context -d "Omits context internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.live' -l no-schema -d "Omits schema internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.live' -l binary-id -d "Uses `binary_id` for schema's primary key and its references"
complete -f -c mix -n '__fish_mix_using_command phx.gen.live' -l table -d "Specify the the table name for the migration and schema"
complete -f -c mix -n '__fish_mix_using_command phx.gen.notifier' -l context-app -d "Specifies the context app"
complete -f -c mix -n '__fish_mix_using_command phx.gen.release' -l docker -d "Generates a Docker and .dockerignore file"
complete -f -c mix -n '__fish_mix_using_command phx.gen.release' -l no-ecto -d "Skip migration-related file generation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.release' -l ecto -d "Force migration-related file generation"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l no-migration -d "Omits migration file"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l context-app -d "Specifies the context app"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l table -d "Specify the the table name for the migration and schema"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l binary-id -d "Uses `binary_id` for schema's primary key and its references"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l no-binary-id -d "Use normal ids despite the default configuration"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l prefix -d "Specifies a prefix"
complete -f -c mix -n '__fish_mix_using_command phx.gen.schema' -l migration -d "Force generation of the migration"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l umbrella -d "Generate an umbrella project, with one application for your domain, and a second application for the web interface."
complete -f -c mix -n '__fish_mix_using_command phx.new' -l app -d "The name of the OTP application"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l module -d "The name of the base module in the generated skeleton"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l database -d "Specify the database adapter for Ecto"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-assets -d "Do not generate the assets folder"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-ecto -d "Do not generate Ecto files"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-html -d "Do not generate HTML views"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-gettext -d "Do not generate gettext files"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-dashboard -d "Do not include Phoenix.LiveDashboard"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-live -d "Comment out LiveView socket setup in assets/js/app.js"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-mailer -d "Do not generate Swoosh mailer files"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l binary-id -d "Use binary_id as primary key type in Ecto schemas"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l verbose -d "Use verbose output"
complete -f -c mix -n '__fish_mix_using_command phx.new' -s v -l version -d "Prints the Phoenix installer version"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-context -d "Omits context internal implementation"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l no-install -d "Disable prompt to install dependencies"
complete -f -c mix -n '__fish_mix_using_command phx.new' -l install -d "Force prompt to install dependencies"
complete -f -c mix -n '__fish_mix_using_command phx.new.ecto' -l app -d "The name of the OTP application"
complete -f -c mix -n '__fish_mix_using_command phx.new.ecto' -l module -d "The name of the base module in the generated skeleton"
complete -f -c mix -n '__fish_mix_using_command phx.new.ecto' -l database -d "Specify the database adapter for Ecto"
complete -f -c mix -n '__fish_mix_using_command phx.new.ecto' -l binary-id -d "Use binary_id as primary key type in Ecto schemas"
complete -f -c mix -n '__fish_mix_using_command phx.new.web' -l app -d "The name of the OTP application"
complete -f -c mix -n '__fish_mix_using_command phx.new.web' -l module -d "The name of the base module in the generated skeleton"
complete -f -c mix -n '__fish_mix_using_command phx.routes' -l info -d "Locate the controller function definition called by the given url"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l open -d "Open browser window for each started endpoint"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l config -s c -d "Loads the given configuration file"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l eval -s e -d "Evaluates the given code"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l require -s r -d "Requires pattern before running the command"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l parallel-require -s pr -d "Requires pattern in parallel"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l no-compile -d "Does not compile even if files require compilation"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l no-deps-check -d "Does not check dependencies"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l no-halt -d "Does not halt the system after running the command"
complete -f -c mix -n '__fish_mix_using_command phx.server' -l no-start -d "Does not start applications after compilation"
# help subcommand
complete -f -c mix -n '__fish_mix_using_command help' -a app.start -d "Starts all registered apps"
@@ -98,6 +203,7 @@ complete -f -c mix -n '__fish_mix_using_command help' -a archive.uninstall -d "U
complete -f -c mix -n '__fish_mix_using_command help' -a clean -d "Deletes generated application files"
complete -f -c mix -n '__fish_mix_using_command help' -a cmd -d "Executes the given command"
complete -f -c mix -n '__fish_mix_using_command help' -a compile -d "Compiles source files"
complete -f -c mix -n '__fish_mix_using_command help' -a compile.phoenix -d "Compiles Phoenix source files that support code reloading"
complete -f -c mix -n '__fish_mix_using_command help' -a deps -d "Lists dependencies and their status"
complete -f -c mix -n '__fish_mix_using_command help' -a deps.clean -d "Deletes the given dependencies' files"
complete -f -c mix -n '__fish_mix_using_command help' -a deps.compile -d "Compiles dependencies"
@@ -114,5 +220,28 @@ complete -f -c mix -n '__fish_mix_using_command help' -a local.public_keys -d "M
complete -f -c mix -n '__fish_mix_using_command help' -a local.rebar -d "Installs rebar locally"
complete -f -c mix -n '__fish_mix_using_command help' -a new -d "Creates a new Elixir project"
complete -f -c mix -n '__fish_mix_using_command help' -a profile.fprof -d "Profiles the given file or expression with fprof"
complete -f -c mix -n '__fish_mix_using_command help' -a phx -d "Prints Phoenix tasks and their information."
complete -f -c mix -n '__fish_mix_using_command help' -a phx.digest -d "Digests and compresses static files"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.digest.clean -d "Removes old versions of static assets."
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen -d "Lists all available Phoenix generators"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.auth -d "Generates authentication logic for a resource"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.cert -d "Generates a self-signed certificate for HTTPS testing"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.channel -d "Generates a Phoenix channel"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.context -d "Generates a context with functions around an Ecto schema"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.embedded -d "Generates an embedded Ecto schema file"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.html -d "Generates context and controller for an HTML resource"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.json -d "Generates context and controller for a JSON resource"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.live -d "Generates LiveView, templates, and context for a resource"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.notifier -d "Generates a notifier that delivers emails by default"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.presence -d "Generates a Presence tracker"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.release -d "Generates release files and optional Dockerfile for release-based deployments"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.schema -d "Generates an Ecto schema and migration file"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.secret -d "Generates a secret"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.gen.socket -d "Generates a Phoenix socket handler"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.new -d "Creates a new Phoenix application"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.new.ecto -d "Creates a new Ecto project within an umbrella project"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.new.web -d "Creates a new Phoenix web project within an umbrella project"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.routes -d "Prints all routes"
complete -f -c mix -n '__fish_mix_using_command help' -a phx.server -d "Starts applications and their servers"
complete -f -c mix -n '__fish_mix_using_command help' -a run -d "Runs the given file or expression"
complete -f -c mix -n '__fish_mix_using_command help' -a test -d "Runs a project's tests"

View File

@@ -6,7 +6,7 @@ set -l flavor
if string match -rq -- '^OpenBSD netcat' (nc -h 2>&1)[1]
set flavor nc.openbsd
else
set flavor (basename (realpath (command -v nc)))
set flavor (command -s netcat | path resolve | path basename)
end
__fish_complete_netcat nc $flavor

View File

@@ -6,7 +6,7 @@ set -l flavor
if string match -rq -- '^OpenBSD netcat' (netcat -h 2>&1)[1]
set flavor nc.openbsd
else
set flavor (basename (realpath (command -v netcat)))
set flavor (command -s netcat | path resolve | path basename)
end
__fish_complete_netcat netcat $flavor

View File

@@ -1 +1,68 @@
complete -c nvim -w vim
type --quiet __fish_vim_tags || source (status dirname)/vim.fish
# Options shared with vim, copied from vim.fish
complete -c nvim -s c -r -d 'Execute Ex command after the first file has been read'
complete -c nvim -s S -r -d 'Source file after the first file has been read'
complete -c nvim -l cmd -r -d 'Execute Ex command before loading any vimrc'
complete -c nvim -s i -r -d 'Set the shada file location'
complete -c nvim -s o -d 'Open horizontally split windows for each file'
complete -c nvim -o o2 -d 'Open two horizontally split windows' # actually -o[N]
complete -c nvim -s O -d 'Open vertically split windows for each file'
complete -c nvim -o O2 -d 'Open two vertically split windows' # actually -O[N]
complete -c nvim -s p -d 'Open tab pages for each file'
complete -c nvim -o p2 -d 'Open two tab pages' # actually -p[N]
complete -c nvim -s q -r -d 'Start in quickFix mode'
complete -c nvim -s r -r -d 'Use swap files for recovery'
complete -c nvim -s t -xa '(__fish_vim_tags)' -d 'Set the cursor to tag'
complete -c nvim -s u -r -d 'Use alternative vimrc'
complete -c nvim -s w -r -d 'Record all typed characters'
complete -c nvim -s W -r -d 'Record all typed characters (overwrite file)'
complete -c nvim -s A -d 'Start in Arabic mode'
complete -c nvim -s b -d 'Start in binary mode'
complete -c nvim -s d -d 'Start in diff mode'
complete -c nvim -s D -d 'Debugging mode'
complete -c nvim -s e -d 'Start in Ex mode, execute stdin as Ex commands'
complete -c nvim -s E -d 'Start in Ex mode, read stdin as text into buffer 1'
complete -c nvim -s h -d 'Print help message and exit'
complete -c nvim -s H -d 'Start in Hebrew mode'
complete -c nvim -s L -d 'List swap files'
complete -c nvim -s m -d 'Disable file modification'
complete -c nvim -s M -d 'Disable buffer modification'
complete -c nvim -s n -d 'Don\'t use swap files'
complete -c nvim -s R -d 'Read-only mode'
complete -c nvim -s r -d 'List swap files'
complete -c nvim -s V -d 'Start in verbose mode'
complete -c nvim -s h -l help -d 'Print help message and exit'
complete -c nvim -l noplugin -d 'Skip loading plugins'
complete -c nvim -s v -l version -d 'Print version information and exit'
complete -c nvim -l clean -d 'Factory defaults: skip vimrc, plugins, shada'
complete -c nvim -l startuptime -r -d 'Write startup timing messages to <file>'
# Options exclusive to nvim, see https://neovim.io/doc/user/starting.html
complete -c nvim -s l -r -d 'Execute Lua script'
complete -c nvim -s ll -r -d 'Execute Lua script in uninitialized editor'
complete -c nvim -s es -d 'Start in Ex script mode, execute stdin as Ex commands'
complete -c nvim -s Es -d 'Start in Ex script mode, read stdin as text into buffer 1'
complete -c nvim -s s -r -d 'Execute script file as normal-mode input'
# Server and API options
complete -c nvim -l api-info -d 'Write msgpack-encoded API metadata to stdout'
complete -c nvim -l embed -d 'Use stdin/stdout as a msgpack-rpc channel'
complete -c nvim -l headless -d "Don't start a user interface"
complete -c nvim -l listen -r -d 'Serve RPC API from this address (e.g. 127.0.0.1:6000)'
complete -c nvim -l server -r -d 'Specify RPC server to send commands to'
# Client options
complete -c nvim -l remote -d 'Edit files on nvim server specified with --server'
complete -c nvim -l remote-expr -d 'Evaluate expr on nvim server specified with --server'
complete -c nvim -l remote-send -d 'Send keys to nvim server specified with --server'
complete -c nvim -l remote-silent -d 'Edit files on nvim server specified with --server'
# Unimplemented client/server options
# Support for these options is planned, but they are not implemented yet (February 2023).
# nvim currently prints either a helpful error message or a confusing one ("Garbage after option argument: ...")
# Once they are supported, we can add them back in - see https://neovim.io/doc/user/remote.html for their status.
# complete -c nvim -l remote-wait -d 'Edit files on nvim server'
# complete -c nvim -l remote-wait-silent -d 'Edit files on nvim server'
# complete -c nvim -l serverlist -d 'List all nvim servers that can be found'
# complete -c nvim -l servername -d 'Set server name'

View File

@@ -1,6 +1,6 @@
if test (uname) = Darwin # OS X
complete -c open -s a -d 'specify app name' -r -a "(mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /Developer/Applications 'kMDItemContentType==com.apple.application-*' | string replace -r '.+/(.+).app' '\$1')"
complete -c open -s b -d 'specify app bundle id' -x -a "(mdls (mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /Developer/Applications 'kMDItemContentType==com.apple.application-*') -name kMDItemCFBundleIdentifier | string replace -rf 'kMDItemCFBundleIdentifier = \"(.+)\"' '\$1')"
complete -c open -s a -d 'specify app name' -r -a "(mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /System/Applications -onlyin /Developer/Applications 'kMDItemContentType==com.apple.application-*' | string replace -r '.+/(.+).app' '\$1')"
complete -c open -s b -d 'specify app bundle id' -x -a "(mdls (mdfind -onlyin /Applications -onlyin ~/Applications -onlyin /System/Applications -onlyin /Developer/Applications 'kMDItemContentType==com.apple.application-*') -name kMDItemCFBundleIdentifier | string replace -rf 'kMDItemCFBundleIdentifier = \"(.+)\"' '\$1')"
complete -c open -s e -d 'open in TextEdit'
complete -c open -s t -d 'open in default editor'
complete -c open -s f -d 'open stdin with editor'

View File

@@ -0,0 +1,28 @@
complete otool -d 'object file displaying tool' -r
complete otool -s f -d 'print the fat headers' -F
complete otool -s a -d 'print the archive header' -F
complete otool -s h -d 'print the mach header' -F
complete otool -s l -d 'print the load commands' -F
complete otool -s L -d 'print shared libraries used' -F
complete otool -s d -d 'print the data section' -F
complete otool -s D -d 'print shared library id name' -F
complete otool -s o -d 'print the Obj-C segment' -F
complete otool -s r -d 'print the relocation entries' -F
complete otool -s I -d 'print the indirect symbol table' -F
complete otool -s C -d 'print linker optimization hints' -F
complete otool -s G -d 'print the data in code table' -F
complete otool -s c -d 'print arg of a core file' -F
complete otool -s s -d 'print contents of <seg> <sect>' -x
complete otool -s P -d 'print Info.plist section' -F
complete otool -s x -d 'print all text sections' -F
complete otool -s p -d 'specify routine to dissassemble' -x
complete otool -s v -d 'print verbosely'
complete otool -s V -d 'symbolicate disassembled operands'
complete otool -s X -d 'omit leading addresses, headers'
complete otool -s m -d "disable archive(member) syntax"
complete otool -s B -d 'ARM only: force Thumb disassembly'
complete otool -s q -d "(default) use llvm's disassembler"
complete otool -s Q -d "use otool's disassembler"
complete otool -o mcpu -d 'specify cpu for disassembly'
complete otool -s j -d 'print opcode bytes'
complete otool -l version -f -d "print the version"

View File

@@ -1,77 +1,68 @@
#completion for port
complete port -n "__fish_seen_subcommand_from $subcommands" -a '(__fish_print_port_packages)' -d Package
set -l subcommands activate archive build cat cd checksum clean configure \
contents deactivate dependents deps destroot dir distcheck dmg echo \
edit extract fetch file gohome info install installed lint list \
livecheck location load log logfile mirror mdmg mpkg notes outdated \
patch pkg provides rdependents rdeps reload rev search select \
selfupdate setrequested setunrequested sync test unarchive uninstall \
unload unsetrequested upgrade url usage variants version work
complete -c port -n "__fish_seen_subcommand_from $subcommands" -a '(__fish_print_port_packages)' -d Package
complete -f -n "__fish_use_subcommand $subcommands" -c port -a activate -d 'Set version of a port to active'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a archive -d "Create image for port without installing"
complete -f -n "__fish_use_subcommand $subcommands" -c port -a build -d 'Run build phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a cat -d 'Print the Portfile of the given port(s)'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a cd -d 'Change directory to that containing portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a checksum -d 'Compute checksums of distribution files'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a clean -d 'Remove temporary files used to build a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a configure -d 'Run configure phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a contents -d 'List the files installed by a given port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a deactivate -d 'Set the status of a port to inactive'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a dependents -d 'List ports that depend on a given port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a deps -d 'Display a dependency listing for given port(s)'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a destroot -d 'Run destroot phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a dir -d 'print directory with Portfile for port expression'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a distcheck -d 'Check if port can be fetched from all mirrors'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a dmg -d 'Create binary archives of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a echo -d 'Print the list of ports the argument expands to'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a edit -d 'Open the Portfile in an editor'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a extract -d 'Run extract phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a fetch -d 'Run fetch phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a file -d 'Display the path to the Portfile for portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a help -d 'Get help on MacPorts commands'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a gohome -d 'Load home page for given portname in web browser'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a info -d 'Return information about the given ports'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a install -d 'Install a new port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a installed -d 'List installed versions (of port)'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a lint -d 'Verifies Portfile for portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a list -d 'List latest available version for given ports'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a livecheck -d 'Check if new version of software is available'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a location -d 'Print location of archive used for (de)activation'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a load -d "load a port's daemon"
complete -f -n "__fish_use_subcommand $subcommands" -c port -a log -d 'Parse and show log files for portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a logfile -d 'Display the path to the log file for portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a mirror -d 'Create/update local mirror of distfiles'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a mdmg -d 'Create disk image of portname and dependencies'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a mpkg -d 'Create binary archives of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a notes -d 'Displays notes for portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a outdated -d 'List outdated ports'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a patch -d 'Run patch phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a pkg -d 'Create binary archives of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a provides -d 'Find the port that installed a file'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a rdependents -d 'Recursively list ports depending on given port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a rdeps -d 'Display a recursive dependency listing of port(s)'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a reload -d "reload a port's daemon"
complete -f -n "__fish_use_subcommand $subcommands" -c port -a rev-upgrade -d 'Rebuild ports containing broken binaries'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a search -d 'Search for a port using keywords'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a select -d 'Selects a version to be the default'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a selfupdate -d 'Upgrade MacPorts and update list of ports'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a setrequested -d 'Mark portname as requested'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a setunrequested -d 'Mark portname as unrequested'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a sync -d 'Update the port definition files'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a test -d 'Run test phase of a port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a unarchive -d 'Extract destroot of given ports from archive'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a uninstall -d 'Remove a previously installed port'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a unload -d "Unload a port's daemon"
complete -f -n "__fish_use_subcommand $subcommands" -c port -a unsetrequested -d 'Mark portname as unrequested'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a upgrade -d 'Upgrade a port to the latest version'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a url -d 'Display URL for path of given portname'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a usage -d 'Displays a condensed usage summary'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a variants -d 'Print list of variants with descriptions'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a version -d 'Print the MacPorts version'
complete -f -n "__fish_use_subcommand $subcommands" -c port -a work -d 'Displays path to work directory for portname'
complete port -f -n __fish_use_subcommand -a activate -d 'Set version of a port to active'
complete port -f -n __fish_use_subcommand -a archive -d "Create image for port without installing"
complete port -f -n __fish_use_subcommand -a build -d 'Run build phase of a port'
complete port -f -n __fish_use_subcommand -a cat -d 'Print the Portfile of the given port(s)'
complete port -f -n __fish_use_subcommand -a cd -d 'Change directory to that containing portname'
complete port -f -n __fish_use_subcommand -a checksum -d 'Compute checksums of distribution files'
complete port -f -n __fish_use_subcommand -a clean -d 'Remove temporary files used to build a port'
complete port -f -n __fish_use_subcommand -a configure -d 'Run configure phase of a port'
complete port -f -n __fish_use_subcommand -a contents -d 'List the files installed by a given port'
complete port -f -n __fish_use_subcommand -a deactivate -d 'Set the status of a port to inactive'
complete port -f -n __fish_use_subcommand -a dependents -d 'List ports that depend on a given port'
complete port -f -n __fish_use_subcommand -a deps -d 'Display a dependency listing for given port(s)'
complete port -f -n __fish_use_subcommand -a destroot -d 'Run destroot phase of a port'
complete port -f -n __fish_use_subcommand -a dir -d 'print directory with Portfile for port expression'
complete port -f -n __fish_use_subcommand -a distcheck -d 'Check if port can be fetched from all mirrors'
complete port -f -n __fish_use_subcommand -a dmg -d 'Create binary archives of a port'
complete port -f -n __fish_use_subcommand -a echo -d 'Print the list of ports the argument expands to'
complete port -f -n __fish_use_subcommand -a edit -d 'Open the Portfile in an editor'
complete port -f -n __fish_use_subcommand -a extract -d 'Run extract phase of a port'
complete port -f -n __fish_use_subcommand -a fetch -d 'Run fetch phase of a port'
complete port -f -n __fish_use_subcommand -a file -d 'Display the path to the Portfile for portname'
complete port -f -n __fish_use_subcommand -a help -d 'Get help on MacPorts commands'
complete port -f -n __fish_use_subcommand -a gohome -d 'Load home page for given portname in web browser'
complete port -f -n __fish_use_subcommand -a info -d 'Return information about the given ports'
complete port -f -n __fish_use_subcommand -a install -d 'Install a new port'
complete port -f -n __fish_use_subcommand -a installed -d 'List installed versions (of port)'
complete port -f -n __fish_use_subcommand -a lint -d 'Verifies Portfile for portname'
complete port -f -n __fish_use_subcommand -a list -d 'List latest available version for given ports'
complete port -f -n __fish_use_subcommand -a livecheck -d 'Check if new version of software is available'
complete port -f -n __fish_use_subcommand -a location -d 'Print location of archive used for (de)activation'
complete port -f -n __fish_use_subcommand -a load -d "load a port's daemon"
complete port -f -n __fish_use_subcommand -a log -d 'Parse and show log files for portname'
complete port -f -n __fish_use_subcommand -a logfile -d 'Display the path to the log file for portname'
complete port -f -n __fish_use_subcommand -a mirror -d 'Create/update local mirror of distfiles'
complete port -f -n __fish_use_subcommand -a mdmg -d 'Create disk image of portname and dependencies'
complete port -f -n __fish_use_subcommand -a mpkg -d 'Create binary archives of a port'
complete port -f -n __fish_use_subcommand -a notes -d 'Displays notes for portname'
complete port -f -n __fish_use_subcommand -a outdated -d 'List outdated ports'
complete port -f -n __fish_use_subcommand -a patch -d 'Run patch phase of a port'
complete port -f -n __fish_use_subcommand -a pkg -d 'Create binary archives of a port'
complete port -f -n __fish_use_subcommand -a provides -d 'Find the port that installed a file'
complete port -f -n __fish_use_subcommand -a rdependents -d 'Recursively list ports depending on given port'
complete port -f -n __fish_use_subcommand -a rdeps -d 'Display a recursive dependency listing of port(s)'
complete port -f -n __fish_use_subcommand -a reload -d "reload a port's daemon"
complete port -f -n __fish_use_subcommand -a rev-upgrade -d 'Rebuild ports containing broken binaries'
complete port -f -n __fish_use_subcommand -a search -d 'Search for a port using keywords'
complete port -f -n __fish_use_subcommand -a select -d 'Selects a version to be the default'
complete port -f -n __fish_use_subcommand -a selfupdate -d 'Upgrade MacPorts and update list of ports'
complete port -f -n __fish_use_subcommand -a setrequested -d 'Mark portname as requested'
complete port -f -n __fish_use_subcommand -a setunrequested -d 'Mark portname as unrequested'
complete port -f -n __fish_use_subcommand -a sync -d 'Update the port definition files'
complete port -f -n __fish_use_subcommand -a test -d 'Run test phase of a port'
complete port -f -n __fish_use_subcommand -a unarchive -d 'Extract destroot of given ports from archive'
complete port -f -n __fish_use_subcommand -a uninstall -d 'Remove a previously installed port'
complete port -f -n __fish_use_subcommand -a unload -d "Unload a port's daemon"
complete port -f -n __fish_use_subcommand -a unsetrequested -d 'Mark portname as unrequested'
complete port -f -n __fish_use_subcommand -a upgrade -d 'Upgrade a port to the latest version'
complete port -f -n __fish_use_subcommand -a url -d 'Display URL for path of given portname'
complete port -f -n __fish_use_subcommand -a usage -d 'Displays a condensed usage summary'
complete port -f -n __fish_use_subcommand -a variants -d 'Print list of variants with descriptions'
complete port -f -n __fish_use_subcommand -a version -d 'Print the MacPorts version'
complete port -f -n __fish_use_subcommand -a work -d 'Displays path to work directory for portname'
complete -c port -s v -d 'Verbose mode, generates verbose messages'
complete -c port -s d -d 'Debug mode, implies -v'

View File

@@ -0,0 +1,91 @@
set -l commands autoupdate clean gc init-templatedir install install-hooks migrate-config run sample-config try-repo uninstall validate-config validate-manifest
set -l hook_stages commit merge-commit prepare-commit-msg commit-msg post-commit manual post-checkout push post-merge post-rewrite
set -l hook_types pre-commit pre-merge-commit pre-push prepare-commit-msg commit-msg post-commit post-checkout post-merge post-rewrite
functions -q __fish_git || source $__fish_data_dir/completions/git.fish
function __fish_pre_commit_config_print -a key
set -l config (__fish_git rev-parse --show-toplevel 2>/dev/null)/.pre-commit-config.yaml
test -r "$config" && string match -rg "\s+$key:\s+(\S+)" <$config | string unescape
end
# Global options
complete pre-commit -f
complete pre-commit -n __fish_use_subcommand -s h -l help -d "Show help message and exit"
complete pre-commit -n __fish_use_subcommand -s V -l version -d "Show version number and exit"
complete pre-commit -n "__fish_seen_subcommand_from $commands" -l color -xa "auto always never" -d "Whether to use color in output"
complete pre-commit -n "__fish_seen_subcommand_from $commands" -s c -l config -r -d "Path to alternate config file"
complete pre-commit -n "__fish_seen_subcommand_from $commands" -s h -l help -d "Show help message and exit"
# autoupdate
complete pre-commit -n __fish_use_subcommand -a autoupdate -d "Auto-update config"
complete pre-commit -n "__fish_seen_subcommand_from autoupdate" -l bleeding-edge -d "Update to the bleeding edge of `HEAD`"
complete pre-commit -n "__fish_seen_subcommand_from autoupdate" -l freeze -d "Store frozen hashes in `rev`"
complete pre-commit -n "__fish_seen_subcommand_from autoupdate" -l repo -xa "(__fish_pre_commit_config_print repo)" -d "Only update this repository"
# clean
complete pre-commit -n __fish_use_subcommand -a clean -d "Clean out files"
# gc
complete pre-commit -n __fish_use_subcommand -a gc -d "Clean unused cached repos"
# help
complete pre-commit -n __fish_use_subcommand -a help -d "Show help for a specific command"
complete pre-commit -n "__fish_seen_subcommand_from help" -a "$commands" -d Command
# init-templatedir
complete pre-commit -n __fish_use_subcommand -a init-templatedir -d "Install hook script in a directory"
complete pre-commit -n "__fish_seen_subcommand_from init-templatedir" -l no-allow-missing-config -d "Assume cloned repos should have a config"
complete pre-commit -n "__fish_seen_subcommand_from init-templatedir" -s t -l hook-type -xa "$hook_types" -d "Type of hook to install"
complete pre-commit -n "__fish_seen_subcommand_from init-templatedir" -a "(__fish_complete_directories)" -d "Directory to write scripts"
# install
complete pre-commit -n __fish_use_subcommand -a install -d "Install the pre-commit script"
complete pre-commit -n "__fish_seen_subcommand_from install" -l allow-missing-config -d "Allow missing config file"
complete pre-commit -n "__fish_seen_subcommand_from install" -l install-hooks -d "Install hook environments"
complete pre-commit -n "__fish_seen_subcommand_from install" -s t -l hook-type -xa "$hook_types" -d "Type of hook to install"
complete pre-commit -n "__fish_seen_subcommand_from install" -s f -l overwrite -d "Overwrite existing hooks"
# install-hooks
complete pre-commit -n __fish_use_subcommand -a install-hooks -d "Install all hook environments"
# migrate-config
complete pre-commit -n __fish_use_subcommand -a migrate-config -d "Migrate to newer config"
# run / try-repo
complete pre-commit -n __fish_use_subcommand -a run -d "Run hooks"
complete pre-commit -n __fish_use_subcommand -a try-repo -d "Try the hooks in a repository"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l checkout-type -xa "0 1" -d "Indicate either branch or file checkout"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l commit-msg-filename -r -d "Filename to check when running during `commit-msg`"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l commit-object-name -d "Commit object name"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l files -r -d "Filenames to run hooks on"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l hook-stage -xa "$hook_stages" -d "The stage during which the hook is fired"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l is-squash-merge -d "Whether the merge was a squash merge"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l local-branch -d "Local branch ref used by `git push`"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l prepare-commit-message-source -d "Source of the commit message"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l remote-branch -d "Remote branch ref used by `git push`"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l remote-name -d "Remote name used by `git push`"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l remote-url -d "Remote url used by `git push`"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l rewrite-command -d "The command that invoked the rewrite"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -l show-diff-on-failure -d "Show `git diff` on hook failure"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -s a -l all-files -d "Run on all the files in the repo"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -s s -l source -l from-ref -xa '(__fish_git_refs)' -d "Original ref"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -s o -l origin -l to-ref -xa '(__fish_git_refs)' -d "Destination ref"
complete pre-commit -n "__fish_seen_subcommand_from run try-repo" -s v -l verbose -d Verbose
complete pre-commit -n "__fish_seen_subcommand_from run" -a "(__fish_pre_commit_config_print id)" -d "Hook id"
complete pre-commit -n "__fish_seen_subcommand_from try-repo" -l ref -l rev -xa '(__fish_git_refs)' -d "Ref to run against"
# sample-config
complete pre-commit -n __fish_use_subcommand -a sample-config -d "Produce sample config file"
# uninstall
complete pre-commit -n __fish_use_subcommand -a uninstall -d "Uninstall the pre-commit script"
complete pre-commit -n "__fish_seen_subcommand_from uninstall" -s t -l hook-type -xa "$hook_types" -d "Type of hook to uninstall"
# validate-config
complete pre-commit -n __fish_use_subcommand -a validate-config -d "Validate .pre-commit-config.yaml files"
complete pre-commit -n "__fish_seen_subcommand_from validate-config" --force-files
# validate-manifest
complete pre-commit -n __fish_use_subcommand -a validate-manifest -d "Validate .pre-commit-hooks.yaml files"
complete pre-commit -n "__fish_seen_subcommand_from validate-manifest" --force-files

View File

@@ -0,0 +1,3 @@
complete -c proxychains -n __fish_is_first_token -s q -d "Makes proxychains quiet"
complete -c proxychains -n __fish_is_first_token -s f -r -F -d "Specify a config file"
complete -c proxychains -xa "(__fish_complete_subcommand)"

View File

@@ -22,7 +22,6 @@ complete -c rsync -s q -l quiet -d "Suppress non-error messages"
complete -c rsync -l no-motd -d "Suppress daemon-mode MOTD"
complete -c rsync -s c -l checksum -d "Skip based on checksum, not mod-time & size"
complete -c rsync -s a -l archive -d "Archive mode; same as -rlptgoD (no -H)"
complete -c rsync -l no-OPTION -d "Turn off an implied OPTION (e.g. --no-D)"
complete -c rsync -s r -l recursive -d "Recurse into directories"
complete -c rsync -s R -l relative -d "Use relative path names"
complete -c rsync -l no-implied-dirs -d "Dont send implied dirs with --relative"

View File

@@ -1,30 +1,23 @@
#
# Command specific completions for the scons command.
# These completions where generated from the commands
# man page by the make_completions.py script, but may
# have been hand edited since.
#
complete -c scons -s c -l clean -l remove -d 'Clean up by removing all target files for which a construction command is specified'
complete -c scons -s c -l clean -l remove -d 'Clean up all target files'
complete -c scons -l cache-debug -d 'Print debug information about the CacheDir() derived-file caching to the specified file'
complete -c scons -l cache-disable -l no-cache -d 'Disable the derived-file caching specified by CacheDir()'
complete -c scons -l cache-force -l cache-populate -d 'When using CacheDir(), populate a cache by copying any already- existing, up-to-date derived files to the cache, in addition to files built by this invocation'
complete -c scons -l cache-show -d 'When using CacheDir() and retrieving a derived file from the cache, show the command that would have been executed to build the file, instead of the usual report, "Retrieved file from cache'
complete -c scons -l cache-force -l cache-populate -d 'Populate cache with already existing files'
complete -c scons -l cache-show -d 'Show how a cached file would be built'
complete -c scons -l config -d 'This specifies how the Configure call should use or generate the results of configuration tests' -a '
complete -c scons -l config -d 'How the Configure call should run the config tests' -a '
auto\t"Use normal dependency mechanism"
force\t"Rerun all tests"
cache\t"Take all results from cache"' -x
complete -c scons -s C -d 'Directory, --directory=directory Change to the specified directory before searching for the SCon struct, Sconstruct, or sconstruct file, or doing anything else'
complete -c scons -s D -d 'Works exactly the same way as the -u option except for the way default targets are handled'
complete -c scons -s C -l directory -d 'Change to this directory before searching for the sconstruct file'
complete -c scons -s D -d 'Like -u except for the way default targets are handled'
complete -c scons -l debug -d 'Debug the build process' -a "count dtree explain findlibs includes memoizer memory nomemoizer objects pdb presub stacktrace stree time tree" -x
complete -c scons -l diskcheck -d 'Enable specific checks for whether or not there is a file on disk where the SCons configuration expects a directory (or vice versa), and whether or not RCS or SCCS sources exist when searching for source and include files' -a "all none match rcs " -x
complete -c scons -l diskcheck -d 'Check if files and directories are where they should be' -a "all none match rcs " -x
complete -c scons -s f -l file -l makefile -l sconstruct -d 'Use file as the initial SConscript file'
complete -c scons -s h -l help -d 'Print a local help message for this build, if one is defined in the SConscript file(s), plus a line that describes the -H option for command-line option help'
complete -c scons -s h -l help -d 'Print a help message for this build'
complete -c scons -s H -l help-options -d 'Print the standard help message about command-line options and exit'
complete -c scons -s i -l ignore-errors -d 'Ignore all errors from commands executed to rebuild files'
complete -c scons -s I -l include-dir -d 'Specifies a directory to search for imported Python modules'
@@ -41,13 +34,13 @@ complete -c scons -s q -l question -d 'Do not run any commands, or print anythin
complete -c scons -s Q -d 'Quiets SCons status messages about reading SConscript files, building targets and entering directories'
complete -c scons -l random -d 'Build dependencies in a random order'
complete -c scons -s s -l silent -l quiet -d Silent
complete -c scons -l taskmastertrace -d 'Prints trace information to the specified file about how the internal Taskmaster object evaluates and controls the order in which Nodes are built'
complete -c scons -s u -l up -l search-up -d 'Walks up the directory structure until an SConstruct , Scon struct or sconstruct file is found, and uses that as the top of the directory tree'
complete -c scons -s U -d 'Works exactly the same way as the -u option except for the way default targets are handled'
complete -c scons -s v -l version -d 'Print the scons version, copyright information, list of authors, and any other relevant information'
complete -c scons -s w -l print-directory -d 'Print a message containing the working directory before and after other processing'
complete -c scons -l taskmastertrace -d 'Prints Taskmaster trace information to the specified file'
complete -c scons -s u -l up -l search-up -d 'Walks up directories for an SConstruct file, and uses that as the top of the directory tree'
complete -c scons -s U -d 'Like -u option except for how default targets are handled'
complete -c scons -s v -l version -d 'Print the scons version information'
complete -c scons -s w -l print-directory -d 'Print the working directory'
complete -c scons -l warn -d 'Enable or disable warnings' -a 'all no-all dependency no-dependency deprecated no-deprecated missing-sconscript no-missing-sconscript' -x
complete -c scons -l no-print-directory -d 'Turn off -w, even if it was turned on implicitly'
complete -c scons -s Y -l repository -d 'Search the specified repository for any input and target files not found in the local directory hierarchy'
complete -c scons -s Y -l repository -d 'Search this repo for input and target files not in the local directory tree'

View File

@@ -624,7 +624,7 @@ complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s b -l pub
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s k -l installationkey -d 'installation key for key-protected package (default: null)'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s p -l package -d 'ID (starts with 04t) or alias of the package version to install'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s r -l noprompt -d 'do not prompt for confirmation'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s s -l securitytype -d '[default: AllUsers] security access type for the installed package (deprecation notice: The default --securitytype value will change from AllUsers to AdminsOnly in v47.0 or later.)' -xa 'AllUsers AdminsOnly'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s s -l securitytype -d '[default: AllUsers] security access type for the installed package' -xa 'AllUsers AdminsOnly'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s t -l upgradetype -d '[default: Mixed] the upgrade type for the package installation' -xa 'DeprecateOnly Mixed Delete'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s u -l targetusername -d 'username or alias for the target org; overrides default target org'
complete -c sfdx -n '__fish_sfdx_using_command force:package:create' -s w -l wait -d 'number of minutes to wait for installation status'
@@ -688,7 +688,7 @@ complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s b -l pu
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s k -l installationkey -d 'installation key for key-protected package (default: null)'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s p -l package -d 'ID (starts with 04t) or alias of the package version to install'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s r -l noprompt -d 'do not prompt for confirmation'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s s -l securitytype -d '[default: AllUsers] security access type for the installed package (deprecation notice: The default --securitytype value will change from AllUsers to AdminsOnly in v47.0 or later.)' -xa 'AllUsers AdminsOnly'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s s -l securitytype -d '[default: AllUsers] security access type for the installed package' -xa 'AllUsers AdminsOnly'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s t -l upgradetype -d '[default: Mixed] the upgrade type for the package installation' -xa 'DeprecateOnly Mixed Delete'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s u -l targetusername -d 'username or alias for the target org; overrides default target org'
complete -c sfdx -n '__fish_sfdx_using_command force:package:install' -s w -l wait -d 'number of minutes to wait for installation status'

View File

@@ -5,7 +5,7 @@
# imagine my surprise when I found fish function stirngs in binaries in /usr/bin!
# checking the path is as expected is about as far as we're going with validation
if test (command -v shortcuts) = /usr/bin/shortcuts
if test "$(command -s shortcuts)" = /usr/bin/shortcuts
command shortcuts --generate-completion-script=fish | source
end

View File

@@ -1,5 +1,5 @@
# Note that when a completion file is sourced a new block scope is created so `set -l` works.
set -l __fish_status_all_commands current-command current-filename current-function current-line-number features filename fish-path function is-block is-breakpoint is-command-substitution is-full-job-control is-interactive is-interactive-job-control is-login is-no-job-control job-control line-number print-stack-trace stack-trace test-feature
set -l __fish_status_all_commands current-command current-commandline current-filename current-function current-line-number features filename fish-path function is-block is-breakpoint is-command-substitution is-full-job-control is-interactive is-interactive-job-control is-login is-no-job-control job-control line-number print-stack-trace stack-trace test-feature
# These are the recognized flags.
complete -c status -s h -l help -d "Display help and exit"
@@ -16,6 +16,7 @@ complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_com
# The subcommands that are not "is-something" which don't change the fish state.
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-command -d "Print the name of the currently running command or function"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-commandline -d "Print the currently running command with its arguments"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-filename -d "Print the filename of the currently running script"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a filename -d "Print the filename of the currently running script"
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-function -d "Print the name of the current function"

View File

@@ -0,0 +1,25 @@
# Sources:
# stow --help
# https://www.gnu.org/software/stow/manual/stow.html
# https://git.savannah.gnu.org/cgit/stow.git/tree/NEWS
# options
complete -c stow -s d -l dir -r -d 'Set stow dir, default $STOW_DIR or current dir'
complete -c stow -s t -l target -r -d 'Set target dir, default parent of stow dir'
complete -c stow -l ignore -x -d 'Ignore files ending in this Perl regex'
complete -c stow -l defer -x -d "Don't stow files beginning with this Perl regex if already stowed"
complete -c stow -l override -x -d "Force stowing files beginning with this Perl regex if already stowed"
complete -c stow -l no-folding -d "Create dirs instead of symlinks to whole dirs"
complete -c stow -l adopt -d "Move existing files into stow dir if target exists (AND OVERWRITE!)"
complete -c stow -s n -l no -l simulate -d "Don't modify the file system"
complete -c stow -s v -l verbose -d "Increase verbosity by 1 (levels are from 0 to 5)"
complete -c stow -l verbose -a "0 1 2 3 4 5" -d "Increase verbosity by 1 or set it with verbose=N [0..5]"
complete -c stow -s p -l compat -d "Use legacy algorithm for unstowing"
complete -c stow -s V -l version -d "Show stow version number"
complete -c stow -s h -l help -d "Show help"
complete -c stow -l dotfiles -d "Stow dot-file_or_dir_name as .file_or_dir_name" # not yet in the manual (February 2023)
# action flags
complete -c stow -s D -l delete -r -d "Unstow the package names that follow this option"
complete -c stow -s S -l stow -r -d "Stow the package names that follow this option"
complete -c stow -s R -l restow -r -d "Restow: delete and then stow again"

View File

@@ -4,7 +4,7 @@ set -l commands list-units list-sockets start stop reload restart try-restart re
reset-failed list-unit-files enable disable is-enabled reenable preset mask unmask link load list-jobs cancel dump \
list-dependencies snapshot delete daemon-reload daemon-reexec show-environment set-environment unset-environment \
default rescue emergency halt poweroff reboot kexec exit suspend hibernate hybrid-sleep switch-root list-timers \
set-property
set-property import-environment
if test $systemd_version -gt 208 2>/dev/null
set commands $commands cat
if test $systemd_version -gt 217 2>/dev/null

View File

@@ -81,7 +81,7 @@ complete -r -c terraform -n "__fish_seen_subcommand_from import" -o var-file -d
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 -r -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"

View File

@@ -7,7 +7,7 @@ if command tr --version >/dev/null 2>/dev/null
complete -c tr -x
complete -c tr -s c -s C -l complement -d 'use the complement of SET1'
complete -c tr -s d -l delete -d 'delete characters in SET1, do not translate'
complete -c tr -s s -l squeeze-repeats -d 'replace each input sequence of a repeated character that is listed in SET1 with a single occurrence of that character'
complete -c tr -s s -l squeeze-repeats -d 'replace each run of a character listed in SET1 with a single occurrence of that character'
complete -c tr -s t -l truncate-set1 -d 'first truncate SET1 to length of SET2'
complete -c tr -l help -d 'display this help and exit'
complete -c tr -l version -d 'output version information and exit'
@@ -27,10 +27,10 @@ if command tr --version >/dev/null 2>/dev/null
else
# If not a GNU system, assume we have standard BSD tr features instead
complete -c tr -x
complete -c tr -s C -d 'Complement the set of characters in string1.'
complete -c tr -s c -d 'Same as -C but complement the set of values in string1.'
complete -c tr -s d -d 'Delete characters in string1 from the input.'
complete -c tr -s s -d 'Squeeze multiple occurrences of the characters listed in the last operand (either string1 or string2) in the input into a single instance of the character.'
complete -c tr -s C -d 'Complement the set of characters in string1'
complete -c tr -s c -d 'Same as -C but complement the set of values in string1'
complete -c tr -s d -d 'Delete characters in string1 from the input'
complete -c tr -s s -d 'Squeeze runs of characters listed in the last operand into one'
complete -c tr -l u -d 'Guarantee that any output is unbuffered.'
complete -c tr -a '[:alnum:]' -d 'alphanumeric characters'

View File

@@ -0,0 +1,13 @@
# Completions for trash-cli
# There are many implementations of trash cli tools, but the name ``trash-empty`` is unique.
# https://github.com/andreafrancia/trash-cli
complete -f -c trash-empty -s h -l help -d 'show help message'
complete -f -c trash-empty -l print-completion -xa 'bash zsh tcsh' -d 'print shell completion script'
complete -f -c trash-empty -l version -d 'show version number'
complete -f -c trash-empty -s v -l verbose -d 'list files that will be deleted'
complete -F -c trash-empty -l trash-dir -d 'specify trash directory'
complete -f -c trash-empty -l all-users -d 'empty trashcan of all users'
complete -f -c trash-empty -s i -l interactive -d 'prompt before emptying'
complete -f -c trash-empty -s f -d 'don\'t ask before emptying'
complete -f -c trash-empty -l dry-run -d 'show which files would have been removed'

View File

@@ -0,0 +1,10 @@
# Completions for trash-cli
# There are many implementations of trash cli tools, but the name ``trash-list`` is unique.
# https://github.com/andreafrancia/trash-cli
complete -f -c trash-list -s h -l help -d 'show help message'
complete -f -c trash-list -l print-completion -xa 'bash zsh tcsh' -d 'print completion script'
complete -f -c trash-list -l version -d 'show version number'
complete -f -c trash-list -l trash-dirs -d 'list trash dirs'
complete -f -c trash-list -l trash-dir -d 'specify trash directory'
complete -f -c trash-list -l all-users -d 'list trashcans of all users'

View File

@@ -0,0 +1,13 @@
# Completions for trash-cli
# There are many implementations of trash cli tools, but the name ``trash-put`` is unique.
# https://github.com/andreafrancia/trash-cli
complete -f -c trash-put -s h -l help -d 'show help message'
complete -f -c trash-put -l print-completion -xa 'bash zsh tcsh' -d 'print shell completion script'
complete -f -c trash-put -s d -l directory -d 'ignored (for GNU rm compatibility)'
complete -f -c trash-put -s f -l force -d 'silently ignore nonexistent files'
complete -f -c trash-put -s i -l interactive -d 'prompt before every removal'
complete -f -c trash-put -s r -s R -l recursive -d 'ignored (for GNU rm compatibility)'
complete -F -c trash-put -l trash-dir -d 'specify trash folder'
complete -f -c trash-put -s v -l verbose -d 'be verbose'
complete -f -c trash-put -l version -d 'show version number'

View File

@@ -0,0 +1,8 @@
# Completions for trash-cli
# There are many implementations of trash cli tools, but the name ``trash-restore`` is unique.
# https://github.com/andreafrancia/trash-cli
complete -f -c trash-restore -s h -l help -d 'show help message'
complete -f -c trash-restore -l print-completion -xa 'bash zsh tcsh' -d 'print shell completion script(default: None)'
complete -f -c trash-restore -l sort -a 'date path none' -d 'sort candidates(default: date)'
complete -f -c trash-restore -l version -d 'show version number'

View File

@@ -0,0 +1,19 @@
# Completions for trash-cli
# There are many implementations of trash cli tools, identify different version of ``trash`` excutable by its help message.
# https://github.com/andreafrancia/trash-cli
function __trash_by_andreafrancia
complete -f -c trash -s h -l help -d 'show help message'
complete -f -c trash -l print-completion -xa 'bash zsh tcsh' -d 'print shell completion script'
complete -f -c trash -s d -l directory -d 'ignored (for GNU rm compatibility)'
complete -f -c trash -s f -l force -d 'silently ignore nonexistent files'
complete -f -c trash -s i -l interactive -d 'prompt before every removal'
complete -f -c trash -s r -s R -l recursive -d 'ignored (for GNU rm compatibility)'
complete -F -c trash -l trash-dir -d 'specify trash folder'
complete -f -c trash -s v -l verbose -d 'be verbose'
complete -f -c trash -l version -d 'show version number'
end
if string match -qr "https://github.com/andreafrancia/trash-cli" (trash --help 2>/dev/null)
__trash_by_andreafrancia
end

View File

@@ -17,6 +17,7 @@ function __fish_vim_find_tags_path
return 1
end
# NB: This function is also used by the nvim completions
function __fish_vim_tags
set -l token (commandline -ct)
set -l tags_path (__fish_vim_find_tags_path)
@@ -40,9 +41,12 @@ complete -c vim -s S -r -d 'Source file after the first file has been read'
complete -c vim -l cmd -r -d 'Execute Ex command before loading any vimrc'
complete -c vim -s d -r -d 'Use device as terminal (Amiga only)'
complete -c vim -s i -r -d 'Set the viminfo file location'
complete -c vim -s o -r -d 'Open stacked windows for each file'
complete -c vim -s O -r -d 'Open side by side windows for each file'
complete -c vim -s p -r -d 'Open tab pages for each file'
complete -c vim -s o -d 'Open horizontally split windows for each file'
complete -c vim -o o2 -d 'Open two horizontally split windows' # actually -o[N]
complete -c vim -s O -d 'Open vertically split windows for each file'
complete -c nvim -o O2 -d 'Open two vertically split windows' # actually -O[N]
complete -c vim -s p -d 'Open tab pages for each file'
complete -c nvim -o p2 -d 'Open two tab pages' # actually -p[N]
complete -c vim -s q -r -d 'Start in quickFix mode'
complete -c vim -s r -r -d 'Use swap files for recovery'
complete -c vim -s s -r -d 'Source and execute script file'
@@ -95,3 +99,5 @@ complete -c vim -l serverlist -d 'List all Vim servers that can be found'
complete -c vim -l servername -d 'Set server name'
complete -c vim -l version -d 'Print version information and exit'
complete -c vim -l socketid -r -d 'Run gvim in another window (GTK GUI only)'
complete -c vim -l clean -d 'Factory defaults: skip vimrc, plugins, viminfo'
complete -c vim -l startuptime -r -d 'Write startup timing messages to <file>'

View File

@@ -68,5 +68,6 @@ complete -c $progname -s S -d 'Shows information of an installed package' -x
complete -c $progname -s s -d 'Search for packages by matching PATTERN on pkgver or short_desc'
complete -c $progname -s f -d 'Show the package files for PKG' -x
complete -c $progname -s x -d 'Show the required dependencies for PKG. Only direct dependencies are shown' -x
complete -c $progname -s X -d 'Show the reverse dependencies for PKG' -x
complete -c $progname -s X -d 'Show the reverse dependencies for PKG' -xa "$listinstalled"
complete -c $progname -s X -d 'Show the reverse dependencies for PKG' -x -n "__fish_contains_opt -s R" -a "$listall"
complete -c $progname -l cat -d 'Prints the file FILE stored in binary package PKG to stdout' -F

View File

@@ -141,8 +141,10 @@ end
# This handler removes itself after it is first called.
#
function __fish_on_interactive --on-event fish_prompt --on-event fish_read
__fish_config_interactive
# We erase this *first* so it can't be called again,
# e.g. if fish_greeting calls "read".
functions -e __fish_on_interactive
__fish_config_interactive
end
# Set the locale if it isn't explicitly set. Allowing the lack of locale env vars to imply the
@@ -228,8 +230,12 @@ function fg
builtin fg (__fish_expand_pid_args $argv)[-1]
end
function kill
command kill (__fish_expand_pid_args $argv)
if command -q kill
# Only define this if something to wrap exists
# this allows a nice "commad not found" error to be triggered.
function kill
command kill (__fish_expand_pid_args $argv)
end
end
# As last part of initialization, source the conf directories.

View File

@@ -12,12 +12,13 @@ function __fish_complete_directories -d "Complete directory prefixes" --argument
set comp (commandline -ct)
end
# HACK: We call into the file completions by using a non-existent command.
# HACK: We call into the file completions by using an empty command
# If we used e.g. `ls`, we'd run the risk of completing its options or another kind of argument.
# But since we default to file completions, if something doesn't have another completion...
set -l dirs (complete -C"nonexistentcommandooheehoohaahaahdingdongwallawallabingbang $comp" | string match -r '.*/$')
# (really this should have an actual complete option)
set -l dirs (complete -C"'' $comp" | string match -r '.*/$')
if set -q dirs[1]
printf "%s\t$desc\n" $dirs
printf "%s\n" $dirs\t"$desc"
end
end

View File

@@ -10,8 +10,8 @@ function __fish_complete_path --description "Complete using path"
set target "$argv[1]"
set description "$argv[2]"
end
set -l targets "$target"*
set -l targets (complete -C"'' $target")
if set -q targets[1]
printf "%s\t$description\n" (command ls -dp $targets)
printf "%s\n" $targets\t"$description"
end
end

View File

@@ -62,7 +62,7 @@ packets:\t"Switch to the next file after it contains N packets"'
complete -c $shark -s i -ra '(__fish_wireshark_interface)'
complete -c $shark -s i -ra '-\t"Capture from standard input"' \
-d 'Network interface or pipe to use for live packet capture'
complete -c $shark -s I -l monitor-mode -d 'Put the interface in "monitor mode"' -xa '(__fish_wireshark_interface)'
complete -c $shark -s I -l monitor-mode -d 'Put the interface in "monitor mode"'
complete -c $shark -s L -l list-data-link-types -d 'List the data link types supported by the interface and exit'
complete -c $shark -l list-time-stamp-types -d 'List time stamp types supported for the interface'
complete -c $shark -s p -l no-promiscuous-mode -d "Don't put the interface into promiscuous mode"

View File

@@ -1,4 +1,6 @@
function __fish_is_zfs_feature_enabled -a feature target -d "Returns 0 if the given ZFS feature is available or enabled for the given full-path target (zpool or dataset), or any target if none given"
type -q zpool
or return
set -l pool (string replace -r '/.*' '' -- $target)
set -l feature_name ""
if test -z "$pool"
@@ -9,7 +11,6 @@ function __fish_is_zfs_feature_enabled -a feature target -d "Returns 0 if the gi
if test $status -ne 0 # No such feature
return 1
end
echo $feature_name | read -l _ _ state _
set -l state (echo $feature_name | cut -f3)
string match -qr '(active|enabled)' -- $state
return $status

View File

@@ -19,6 +19,12 @@ function __fish_make_completion_signals --description 'Make list of kill signals
return
end
# If we don't have a kill, we don't try to run it.
# We require a kill *command* because we used to unconditionally define
# a wrapper (to allow %foo expansion)
command -q kill
or return
# Some systems use the GNU coreutils kill command where `kill -L` produces an extended table
# format that looks like this:
#

View File

@@ -16,7 +16,7 @@ function __fish_man_page
# If there are at least two tokens not starting with "-", the second one might be a subcommand.
# Try "man first-second" and fall back to "man first" if that doesn't work out.
set -l maincmd (basename $args[1])
set -l maincmd (path basename $args[1])
# HACK: If stderr is not attached to a terminal `less` (the default pager)
# wouldn't use the alternate screen.
# But since we don't know what pager it is, and because `man` is totally underspecified,

View File

@@ -7,32 +7,53 @@ function __fish_print_apt_packages
return
end
type -q -f apt-cache || return 1
set -l search_term (commandline -ct | string replace -ar '[\'"\\\\]' '' | string lower)
if ! test -f /var/lib/dpkg/status
return 1
end
# Do not not use `apt-cache` as it is sometimes inexplicably slow (by multiple orders of magnitude).
if not set -q _flag_installed
# Do not generate the cache as apparently sometimes this is slow.
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547550
# (It is safe to use `sed -r` here as we are guaranteed to be on a GNU platform
# if apt-cache was found.)
# Uses the UTF-8/ASCII record separator (0x1A) character.
#
# Note: This can include "Description:" fields which we need to include,
# "Description-en_GB" (or another locale code) fields which we need to include
# as well as "Description-md5" fields which we absolutely do *not* want to include
# The regex doesn't allow numbers, so unless someone makes a hash algorithm without a number
# in the name, we're safe. (yes, this should absolutely have a better format).
#
# aptitude has options that control the output formatting, but is orders of magnitude slower
#
# sed could probably do all of the heavy lifting here, but would be even less readable
#
# The `head -n 500` causes us to stop once we have 500 lines. We do it after the `sed` because
# Debian package descriptions can be extremely long and are hard-wrapped: texlive-latex-extra
# has about 2700 lines on Debian 11.
apt-cache --no-generate show '.*'(commandline -ct)'.*' 2>/dev/null | sed -r '/^(Package|Description-?[a-zA-Z_]*):/!d;s/Package: (.*)/\1\t/g;s/Description-?[^:]*: (.*)/\1\x1a\n/g' | head -n 500 | string join "" | string replace --all --regex \x1a+ \n | uniq
return 0
awk -e '
BEGIN {
FS=": "
}
/^Package/ {
pkg=$2
}
/^Description(-[a-zA-Z]+)?:/ {
desc=$2
if (index(pkg, "'$search_term'") > 0) {
print pkg "\t" desc
}
pkg="" # Prevent multiple description translations from being printed
}' < /var/lib/dpkg/status
else
set -l packages (dpkg --get-selections | string replace -fr '(\S+)\s+install' "\$1" | string match -e (commandline -ct))
apt-cache --no-generate show $packages 2>/dev/null | sed -r '/^(Package|Description-?[a-zA-Z_]*):/!d;s/Package: (.*)/\1\t/g;s/Description-?[^:]*: (.*)/\1\x1a\n/g' | head -n 500 | string join "" | string replace --all --regex \x1a+ \n | uniq
return 0
awk -e '
BEGIN {
FS=": "
}
/^Package/ {
pkg=$2
}
/^Status/ {
installed=0
if ($2 ~ /(^|\s)installed/) {
installed=1
}
}
/^Description(-[a-zA-Z]+)?:/ {
desc=$2
if (installed == 1 && index(pkg, "'$search_term'") > 0) {
print pkg "\t" desc
installed=0 # Prevent multiple description translations from being printed
}
}' < /var/lib/dpkg/status
end
end

View File

@@ -126,8 +126,12 @@ function __fish_print_help --description "Print help message for the specified f
end | string replace -ra '^ ' '' |
begin
set -l pager less
# Try both PAGER and MANPAGER, last one wins
set -q PAGER
and echo $PAGER | read -at pager
and echo -- $PAGER | read -at pager
set -q MANPAGER
and echo -- $MANPAGER | read -at pager
not isatty stdout
and set pager cat # cannot use a builtin here
# similar to man, but add -F to quit paging when the help output is brief (#6227)

View File

@@ -1,3 +1,6 @@
function __fish_print_portage_available_pkgs --description 'Print all available packages'
find (__fish_print_portage_repository_paths) -mindepth 2 -maxdepth 2 -type d ! '(' '(' -path '*/eclass/*' -o -path '*/metadata/*' -o -path '*/profiles/*' -o -path '*/.*/*' ')' -prune ')' -printf '%P\n'
set -l paths (__fish_print_portage_repository_paths)
set -q paths[1]
or return
find $paths -mindepth 2 -maxdepth 2 -type d ! '(' '(' -path '*/eclass/*' -o -path '*/metadata/*' -o -path '*/profiles/*' -o -path '*/.*/*' ')' -prune ')' -printf '%P\n' 2>/dev/null
end

View File

@@ -1,3 +1,3 @@
function __fish_print_portage_installed_pkgs --description 'Print all installed packages (non-deduplicated)'
find /var/db/pkg -mindepth 2 -maxdepth 2 -type d -printf '%P\n' | string replace -r -- '-[0-9][0-9.]*.*$' ''
find /var/db/pkg -mindepth 2 -maxdepth 2 -type d -printf '%P\n' 2>/dev/null | string replace -r -- '-[0-9][0-9.]*.*$' ''
end

View File

@@ -3,12 +3,14 @@ function __fish_print_portage_repository_paths --description 'Print the paths of
set -l b
set -l c /usr/share/portage/config/repos.conf
test -d $a
and set b (find $a -type f )
and set b (find $a -type f 2>/dev/null)
test -f $a
and set b $a
test -n "$b"
and string match -q "[gentoo]" -- (cat $b)
and string match -q "[gentoo]" -- (cat $b 2>/dev/null)
and set c $b
or set -a c $b
cat $c | string match -g -r '^location = (.*$)'
path is -r -- $c
or return
cat $c 2>/dev/null | string match -g -r '^location = (.*$)'
end

View File

@@ -216,10 +216,12 @@ function __fish_start_bracketed_paste
# we escape single-quotes (and backslashes).
string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct | string collect))
and set -g __fish_paste_quoted 1
commandline -f begin-undo-group
end
function __fish_stop_bracketed_paste
# Restore the last bind mode.
set fish_bind_mode $__fish_last_bind_mode
set -e __fish_paste_quoted
commandline -f end-undo-group
end

View File

@@ -106,7 +106,10 @@ function fish_config --description "Launch fish's web based configuration"
read -P"Overwrite prompt? [y/N]" -l yesno
if string match -riq 'y(es)?' -- $yesno
echo Overwriting
cp $__fish_config_dir/functions/fish_prompt.fish{,.bak}
# Skip the cp if unnecessary,
# or we'd throw an error on a stock fish.
path is $__fish_config_dir/functions/fish_prompt.fish
and cp $__fish_config_dir/functions/fish_prompt.fish{,.bak}
set -l have
if set -q argv[1]

View File

@@ -14,7 +14,10 @@ function fish_default_key_bindings -d "emacs-like key binds"
# This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed.
set fish_key_bindings fish_default_key_bindings
return
# unless the handler somehow doesn't exist, which would leave us without bindings.
# this happens in no-config mode.
functions -q __fish_reload_key_bindings
and return
end
end
@@ -58,6 +61,7 @@ function fish_default_key_bindings -d "emacs-like key binds"
bind --preset $argv \cf forward-char
bind --preset $argv \cb backward-char
bind --preset $argv \ct transpose-chars
bind --preset $argv \cg cancel
bind --preset $argv \c_ undo
bind --preset $argv \cz undo
bind --preset $argv \e/ redo

View File

@@ -0,0 +1,113 @@
function fish_fossil_prompt --description 'Write out the fossil prompt'
# Bail if fossil is not available
if not command -sq fossil
return 1
end
# Read branch and bookmark (bail if not checkout)
set -l branch (fossil branch current 2>/dev/null)
or return 127
set -q fish_color_fossil_clean
or set -g fish_color_fossil_clean green
set -q fish_color_fossil_modified
or set -g fish_color_fossil_modified yellow
set -q fish_color_fossil_dirty
or set -g fish_color_fossil_dirty red
set -q fish_color_fossil_added
or set -g fish_color_fossil_added green
set -q fish_color_fossil_renamed
or set -g fish_color_fossil_renamed magenta
set -q fish_color_fossil_missing
or set -g fish_color_fossil_missing red
set -q fish_color_fossil_deleted
or set -g fish_color_fossil_deleted red
set -q fish_color_fossil_untracked
or set -g fish_color_fossil_untracked yellow
set -q fish_color_fossil_conflict
or set -g fish_color_fossil_conflict red
set -q fish_prompt_fossil_status_added
or set -g fish_prompt_fossil_status_added '✚'
set -q fish_prompt_fossil_status_modified
or set -g fish_prompt_fossil_status_modified '*'
set -q fish_prompt_fossil_status_renamed
or set -g fish_prompt_fossil_status_renamed '⇒'
set -q fish_prompt_fossil_status_deleted
or set -g fish_prompt_fossil_status_deleted '-'
set -q fish_prompt_fossil_status_missing
or set -g fish_prompt_fossil_status_missing '✖'
set -q fish_prompt_fossil_status_untracked
or set -g fish_prompt_fossil_status_untracked '?'
set -q fish_prompt_fossil_status_conflict
or set -g fish_prompt_fossil_status_conflict '×'
set -q fish_prompt_fossil_status_order
or set -g fish_prompt_fossil_status_order added modified renamed deleted missing untracked conflict
echo -n ' ('
set_color magenta
echo -n "$branch"
set_color normal
echo -n '|'
#set -l repo_status (fossil changes --differ 2>/dev/null | string match -rv '\w:|^\s' | string split " " -f1 | sort -u)
set -l repo_status (fossil changes --differ 2>/dev/null | string match -rv '\w:|^\s' | string split " " -f1 | path sort -u)
# Show nice color for a clean repo
if test -z "$repo_status"
set_color $fish_color_fossil_clean
echo -n '✔'
# Handle modified or dirty (unknown state)
else
set -l fossil_statuses
# Take actions for the statuses of the files in the repo
for line in $repo_status
# Add a character for each file status if we have one
switch $line
case 'ADDED'
set -a fossil_statuses added
case 'EDITED'
set -a fossil_statuses modified
case 'EXTRA'
set -a fossil_statuses untracked
case 'DELETED'
set -a fossil_statuses deleted
case 'MISSING'
set -a fossil_statuses missing
case 'RENAMED'
set -a fossil_statuses renamed
case 'CONFLICT'
set -a fossil_statuses conflict
end
end
if string match -qr '^(ADDED|EDITED|DELETED)' $repo_status
set_color $fish_color_fossil_modified
else
set_color --bold $fish_color_fossil_dirty
end
echo -n '⚡'
set_color normal
# Sort status symbols
for i in $fish_prompt_fossil_status_order
if contains -- $i $fossil_statuses
set -l color_name fish_color_fossil_$i
set -l status_name fish_prompt_fossil_status_$i
set_color $$color_name
echo -n $$status_name
end
end
end
set_color normal
echo -n ')'
end

View File

@@ -170,7 +170,7 @@ end
# Decide if git is safe to run.
# On Darwin, git is pre-installed as a stub, which will pop a dialog if you run it.
if string match -q Darwin -- "$(uname)" && string match -q /usr/bin/git -- "$(command -s git)" && type -q xcode-select && type -q xcrun
if string match -q Darwin -- (uname) && string match -q /usr/bin/git -- (command -s git) && type -q xcode-select && type -q xcrun
if not xcode-select --print-path &>/dev/null
# Only the stub git is installed.
# Do not try to run it.
@@ -183,7 +183,7 @@ if string match -q Darwin -- "$(uname)" && string match -q /usr/bin/git -- "$(co
command git --version &>/dev/null &
disown $last_pid &>/dev/null
function __fish_git_prompt_ready
path is "$(xcrun --show-cache-path 2>/dev/null)" || return 1
path is (xcrun --show-cache-path 2>/dev/null) || return 1
# git is ready, erase the function.
functions -e __fish_git_prompt_ready
return 0
@@ -312,7 +312,13 @@ function fish_git_prompt --description "Prompt function for Git"
if contains -- "$__fish_git_prompt_showstashstate" yes true 1
and test -r $git_dir/logs/refs/stash
set stashstate 1
# If we have informative status but don't want to actually
# *compute* the informative status, we might still count the stash.
if contains -- "$__fish_git_prompt_show_informative_status" yes true 1
set stashstate (count < $git_dir/logs/refs/stash)
else
set stashstate 1
end
end
end
@@ -349,7 +355,12 @@ function fish_git_prompt --description "Prompt function for Git"
set -l color_done $$color_done_var
set -l symbol $$symbol_var
set f "$f$color$symbol$color_done"
# If we count some things, print the number
# This won't be done if we actually do the full informative status
# because that does the printing.
contains -- "$__fish_git_prompt_show_informative_status" yes true 1
and set f "$f$color$symbol$$i$color_done"
or set f "$f$color$symbol$color_done"
end
end

View File

@@ -3,6 +3,7 @@ function fish_vcs_prompt --description "Print all vcs prompts"
# This is so we don't try svn if git already worked.
fish_git_prompt $argv
or fish_hg_prompt $argv
or fish_fossil_prompt $argv
# The svn prompt is disabled by default because it's quite slow on common svn repositories.
# To enable it uncomment it.
# You can also only use it in specific directories by checking $PWD.

View File

@@ -28,7 +28,10 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
# This triggers the handler, which calls us again and ensures the user_key_bindings
# are executed.
set fish_key_bindings fish_vi_key_bindings
return
# unless the handler somehow doesn't exist, which would leave us without bindings.
# this happens in no-config mode.
functions -q __fish_reload_key_bindings
and return
end
set -l init_mode insert

View File

@@ -157,7 +157,7 @@ function funced --description 'Edit function definition'
source "$writepath"
else
echo (_ "Saving to original location failed; saving to user configuration instead.")
set writepath $__fish_config_dir/functions/(basename "$writepath")
set writepath $__fish_config_dir/functions/(path basename "$writepath")
if cp $tmpname "$writepath"
printf (_ "Function saved to %s") "$writepath"
echo

View File

@@ -242,11 +242,6 @@ function help --description 'Show help for the fish shell'
$fish_browser $page_url &
disown $last_pid >/dev/null 2>&1
else
# Work around lynx bug where <div class="contents"> always has the same formatting as links (unreadable)
# by using a custom style sheet. See https://github.com/fish-shell/fish-shell/issues/4170
if string match -qr '^lynx' -- $fish_browser
set fish_browser $fish_browser -lss={$__fish_data_dir}/lynx.lss
end
$fish_browser $page_url
end
end

View File

@@ -36,5 +36,20 @@ function man --description "Format and display the on-line manual pages"
set MANPATH $fish_manpath $MANPATH
end
if test (count $argv) -eq 1
# Some of these don't have their own page,
# and adding one would be awkward given that the filename
# isn't guaranteed to be allowed.
# So we override them with the good name.
switch $argv
case :
set argv true
case '['
set argv test
case .
set argv source
end
end
command man $argv
end

View File

@@ -1,104 +0,0 @@
# Lynx Style Sheet
# Used as a custom style sheet (LSS) for the Lynx browser to work around some
# poor defaults. Usage: `lynx -lss=style.lss`
#
# The next line (beginning with "em") means: use bold if mono, otherwise
# brightblue on <defaultbackground> (implicit)
em:bold:brightblue
strong:bold:brightred
b:bold:red
i:bold:brightblue
a:bold:green
img:dim:brown
fig:normal:gray
caption:reverse:brown
hr:normal:yellow
blockquote:normal:brightblue
ul:normal:brown
address:normal:magenta
title:normal:magenta
tt:dim:brightmagenta:default
h1:bold:yellow
h2:normal:brown
h3:normal:green
h4:normal:cyan
label:normal:magenta
q:normal:yellow
small:dim:default
big:bold:yellow
sup:bold:yellow
sub:dim:gray
lh:bold:yellow
li:normal:magenta
code:normal:cyan
cite:normal:cyan
table:normal:brightcyan
tr:bold:brown
td:normal:default
br:normal:default
# Special styles - not corresponding directly to HTML tags
# alert - status bar, when message begins "Alert".
# alink - active link
# normal - default attributes
# status - status bar
# whereis - whereis search target
#
#normal:normal:default:blue
alink:reverse:yellow
status:reverse:yellow
alert:bold:yellow:red
whereis:reverse+underline:magenta
# currently not used
#value:normal:green
#high:bold:brightmagenta
forwbackw.arrow:reverse
# Styles with classes - <ul class=red> etc.
ul.red:underline:brightred
ul.blue:bold:brightblue
li.red:reverse:red
li.blue:bold:blue
strong.a:bold:black
/* em.a:reverse:black */
em.a:bold:bold
strong.b:bold:white
em.b:reverse:white
strong.debug:reverse:green
font.letter:normal:default
input.submit:normal:cyan
tr.baone:bold:yellow
tr.batwo:bold:green
tr.bathree:bold:red
#
# Special handling for link.
link:normal:white
link.green:bold:brightgreen
link.red:bold:black
link.blue:bold:white
link.toc:bold:black:white
# Special cases for link - the rel or title is appended after the class.
# <link rel=next class=red href="1">
link.red.next:bold:red
link.red.prev:bold:yellow
link.blue.prev:bold:yellow
link.blue.next:bold:blue
link.green.toc:bold:white
#
# Define styles that will be used when syntax highlighting is requested
# (commandline option -prettysrc).
span.htmlsrc_comment:normal:white
span.htmlsrc_tag:normal:white
#If you don't like that the tag name and attribute name are displayed
#in different colors, comment the following line.
span.htmlsrc_attrib:normal:cyan
span.htmlsrc_attrval:normal:magenta
span.htmlsrc_abracket:normal:white
span.htmlsrc_entity:normal:white
##span.htmlsrc_href:
##span.htmlsrc_entire:
span.htmlsrc_badseq:normal:red
span.htmlsrc_badtag:normal:red
span.htmlsrc_badattr:normal:red
span.htmlsrc_sgmlspecial:normal:yellow

View File

@@ -293,19 +293,6 @@ body {
border-bottom: #444 dotted 1px;
}
.abbreviation_actions {
width: 8em;
text-align: right;
border-bottom: #444 dotted 1px;
}
.abbreviation_input {
height: 1.5em;
font: inherit;
padding: 3px;
margin: 0;
}
/* The CSS we apply when a table row is filtered */
.data_table_row_filtered {
display: none;

View File

@@ -27,7 +27,6 @@
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'variables'}" id="tab_variables" ng-click="changeView('variables')">variables</div>
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'history'}" id="tab_history" ng-click="changeView('history')">history</div>
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'bindings'}" id="tab_bindings" ng-click="changeView('bindings')">bindings</div>
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'abbreviations'}" id="tab_abbreviations" ng-click="changeView('abbreviations')">abbreviations</div>
</div>
<div id="tab_contents">
<ng-view></ng-view>

View File

@@ -34,10 +34,6 @@ fishconfig.config(
controller: "bindingsController",
templateUrl: "partials/bindings.html"
})
.when("/abbreviations", {
controller: "abbreviationsController",
templateUrl: "partials/abbreviations.html"
})
.otherwise({
redirectTo: "/colors"
})

View File

@@ -395,49 +395,3 @@ controllers.controller("bindingsController", function($scope, $http) {
$scope.fetchBindings();
});
controllers.controller("abbreviationsController", function($scope, $http) {
$scope.abbreviations = [];
$scope.addBlank = function() {
// Add blank entry if it is missing
var hasBlank = {hasBlank: false}
angular.forEach($scope.abbreviations, function(value, key) {
if (value.phrase === "" && value.word === "") {
this.hasBlank = true;
}
}, hasBlank);
if (!$scope.abbreviations) $scope.abbreviations = [];
if (! hasBlank.hasBlank) {
$scope.abbreviations.push({phrase: "", word: "", editable: true})
}
}
$scope.fetchAbbreviations = function() {
$http.get("abbreviations/").then(function(arg) {
$scope.abbreviations = arg.data;
$scope.addBlank();
})};
$scope.editAbbreviation = function(abbreviation) {
abbreviation.editable = true;
}
$scope.saveAbbreviation = function(abbreviation) {
if (abbreviation.word && abbreviation.phrase) {
$http.post("save_abbreviation/", abbreviation).then(function(arg) {
abbreviation.editable = false;
$scope.addBlank();
});
}
};
$scope.removeAbbreviation = function(abbreviation) {
if (abbreviation.word) {
$http.post("remove_abbreviation/", abbreviation).then(function(arg) {
$scope.abbreviations.splice($scope.abbreviations.indexOf(abbreviation), 1);
$scope.addBlank();
});
}
};
$scope.fetchAbbreviations();
});

View File

@@ -41,20 +41,3 @@ filters.filter("filterBinding", function() {
return result;
}
});
filters.filter("filterAbbreviations", function() {
return function(abbreviations, query) {
var result = []
if (abbreviations == undefined) return result;
if (query == null) { return abbreviations};
for(var i=0; i<abbreviations.length; ++i) {
var abbr = abbreviations[i];
if (abbr.word.toLowerCase().indexOf(query) != -1 || abbr.phrase.toLowerCase().indexOf(query.toLowerCase()) != -1) {
result.push(abbr);
}
}
return result;
}
});

View File

@@ -1,22 +0,0 @@
<div id="table_filter_container" style="display: block;">
<input id="table_filter_text_box" class="filter_text_box text_box_transient" placeholder="Filter" ng-model="query">
</div>
<table class="data_table">
<tbody>
<tr class="data_table_row" ng-repeat="abbreviation in abbreviations | filterAbbreviations:query" ng-click="editAbbreviation(abbreviation)">
<td ng-class="{ data_table_cell: true }" style="text-align: right; padding-right: 30px;">
<span ng-hide="abbreviation.editable">{{ abbreviation.word }}</span>
<span ng-show="abbreviation.editable"><input ng-model="abbreviation.word" class="abbreviation_input" style="text-align: right; min-width: 10em;"></span>
</td>
<td ng-class="{ data_table_cell: true }" style="text-align: left; padding-right: 30px;">
<span ng-hide="abbreviation.editable">{{ abbreviation.phrase }}</span>
<span ng-show="abbreviation.editable"><input ng-model="abbreviation.phrase" class="abbreviation_input" style="text-align: left; min-width: 22em;"></span>
</td>
<td ng-class="{ data_table_cell: true }" class="abbreviation_actions">
<span ng-show="abbreviation.editable && abbreviation.word && abbreviation.phrase" ng-click="saveAbbreviation(abbreviation)"><button class="save_button" style="margin: inherit;">Save</button></span>
<a ng-show="abbreviation.word" ng-click="removeAbbreviation(abbreviation)"><img alt="Delete" src="delete.png" style="vertical-align: text-bottom"></a>
</td>
</tr>
</tbody>
</table>

View File

@@ -76,7 +76,7 @@ function fish_prompt
set arrow "$arrow_color# "
end
set -l cwd $cyan(basename (prompt_pwd))
set -l cwd $cyan(prompt_pwd | path basename)
set -l repo_info
if set -l repo_type (_repo_type)

View File

@@ -36,7 +36,7 @@ function fish_prompt
# Prompt status only if it's not 0
set -l prompt_status
test $last_status -ne 0; and set prompt_status (set_color $fish_color_error)"[$last_status]$normal"
test $last_status -ne 0; and set prompt_status (set_color $fish_color_status)"[$last_status]$normal"
# Only show host if in SSH or container
# Store this in a global variable because it's slow and unchanging

View File

@@ -3,7 +3,7 @@
function fish_prompt
set_color $fish_color_cwd
echo -n (basename $PWD)
echo -n (path basename $PWD)
set_color normal
echo -n ' ) '
end

View File

@@ -109,7 +109,7 @@ function fish_prompt
set -q VIRTUAL_ENV_DISABLE_PROMPT
or set -g VIRTUAL_ENV_DISABLE_PROMPT true
set -q VIRTUAL_ENV
and _nim_prompt_wrapper $retc V (basename "$VIRTUAL_ENV")
and _nim_prompt_wrapper $retc V (path basename "$VIRTUAL_ENV")
# git
set -l prompt_git (fish_git_prompt '%s')

Some files were not shown because too many files have changed in this diff Show More