Compare commits

...

135 Commits

Author SHA1 Message Date
David Adam
4a618f14f1 Release 3.6.3 2023-12-04 23:54:24 +08:00
David Adam
f471810408 tests: fix test for 3.6.2 changes 2023-12-04 23:53:47 +08:00
David Adam
a51437ec83 Release 3.6.2
Fix for CVE-2023-49284.
2023-12-04 23:00:02 +08:00
Fabian Boehm
09986f5563 Encode all ENCODE_DIRECT codepoints with encode_direct 2023-12-04 23:00:01 +08:00
David Adam
c0de5dd804 CHANGELOG: fix date for 3.6.1
(cherry picked from commit e2579a59ba)
2023-12-04 23:00:01 +08:00
Fabian Boehm
bc56a0436b CHANGELOG: Add 3.6.2 section 2023-08-03 18:17:05 +02:00
David Adam
f39bc9317d Release 3.6.1 2023-03-25 14:50:41 +08:00
David Adam
2f47f7d9c0 CHANGELOG: work on 3.6.1 2023-03-25 11:31:12 +08:00
NextAlone
37e7e90bff completion/ssh-copy-id: add completion (#9675)
Add completions for ssh-copy-id.

Refactored __ssh_history_completions into its own file for autoloading across
completions.

(cherry picked from commit 45b6622986)

Conflicts:
	CHANGELOG.rst
2023-03-22 12:30:01 -05:00
NextAlone
7f867298e7 completion/git: complete tags for force option (#9678)
(cherry picked from commit ff34c1a573)
2023-03-22 11:07:33 -05:00
Mahmoud Al-Qudsi
80b31e87ec Merge deno completions update from #9676
(Can't cherry-pick because GitHub tricked me into rebasing instead of
squashing.)
2023-03-22 11:04:41 -05:00
NextAlone
e00f63b9e9 completion/adb: add execout and complete props
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit da3323bbc2)
2023-03-21 22:20:57 -05:00
Fabian Boehm
693595a6c0 Silence fstatat errors
These just keep happening, people run haunted computers.

Fixes #9674.

(cherry picked from commit cd7e8c00e1)
2023-03-21 17:17:55 +01:00
David Adam
a1f79b3acc CHANGELOG: work on 3.6.1 2023-03-18 00:41:09 +08:00
David Adam
88043088f2 CHANGELOG: work on 3.6.1 2023-03-18 00:14:24 +08:00
David Adam
38be704434 Revert "Disable bracketed paste for read"
This reverts commit 71dc334010.

Although this is a partial fix for the problem behaviour, it is too much of a
breaking change for my appetite in a minor release.
2023-03-18 00:11:56 +08:00
Fabian Boehm
71dc334010 Disable bracketed paste for read
It's not of much use (read will only read a single line anyway) and
breaks things

Fixes #8285

(cherry picked from commit af49b4d0f8)
2023-03-16 20:31:37 +08:00
lengyijun
22cb03c236 Fixes #8924 via __fish_complete_suffix overhaul
Before:
* hand write arg parse
* only accepts one suffix

After:
* use `arg_parse` to parse args
* accepts multi suffixes

Closes #9611.

(cherry picked from commit aa65856ee0)
2023-03-12 22:12:11 -05:00
David Adam
6ac8d76b2b CHANGELOG: work on 3.6.1 2023-03-11 22:59:36 +08:00
NextAlone
9b790287ef completions/adb: unroot and optimize devices show (#9650)
* completions/adb: add unroot command

Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>

* completions/adb: use product and model both to show device

Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>

---------

Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit f0c5484eda)
2023-03-10 16:53:27 -06:00
Shun Sakai
4497f58b3e Update completions for pandoc (#9651)
- Change completions for input formats, output formats and highlight
  styles to dynamically complete
- Add more valid PDF engines

(cherry picked from commit 1a7e3024cc)
2023-03-10 16:53:17 -06:00
Fabian Boehm
fdd9fe27b8 CHANGELOG 2023-03-05 16:10:50 +01:00
Xiretza
b1dc7e8697 builtins: set_color: remove unhandled -v/--version flag
Invoking `set_color -v` crashes fish.

(cherry picked from commit dd7b177d72)
2023-03-05 16:09:47 +01:00
Agatha Lovelace
77c92d80ab support prepending please instead of sudo/doas
(cherry picked from commit e32e6daced)
2023-03-05 16:09:47 +01:00
Fabian Boehm
74969f94fe CHANGELOG 2023-03-03 19:25:36 +01:00
Maurizio De Santis
b567bf5652 Fix typo
(cherry picked from commit 68ba30d8c8)
2023-03-03 19:25:21 +01:00
Fabian Boehm
2b0f051eba CHANGELOG 2023-03-03 18:44:09 +01:00
mhmdanas
2d80ed36f8 xbps: actually show all packages in __fish_print_xbps_packages's output.
`xbps-query` actually parses `-Rsl` as `-Rs l`, which means that packages
without the letter "l" in their names or descriptions are not included in
`__fish_print_xbps_packages`'s output.

(cherry picked from commit 0f39de2eee)
2023-03-03 18:07:49 +01:00
Fabian Boehm
3bf3061d8c CHANGELOG 2023-03-02 16:35:08 +01:00
Fabian Boehm
37575c5f79 reader: Remove assert in history search
This isn't a great use of `assert` because it turns a benign "oh I
need to search again" bug into a crash.

Fixes #9628

(cherry picked from commit 7c91d009c1)
2023-03-02 16:34:19 +01:00
Fabian Boehm
1a20184ba4 Silence ENODEV errors for fstatat
Some broken gdrive filesystem can return these.

Fixes #9550

(cherry picked from commit e90f003d2d)
2023-02-27 22:40:59 +08:00
Fabian Boehm
338451c25c webconfig: Set a variable before
This fixes things if a theme is entirely empty.

Fixes #9590

(cherry picked from commit acde38fed3)
2023-02-27 22:40:59 +08:00
Fabian Boehm
17332226e4 __fish_complete_directories: Use an empty command as the dummy
Fixes #9574

(cherry picked from commit 200095998a)
2023-02-27 22:40:59 +08:00
Fabian Boehm
2419f39cfd fish_git_prompt: Allow counting stash without full informative
Fixes #9572

(cherry picked from commit 5aaa1e69bc)
2023-02-27 22:40:58 +08:00
Fabian Boehm
822203d7b0 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

(cherry picked from commit 7ac2fe2bd3)
2023-02-27 22:40:58 +08:00
Fabian Boehm
fdf075149f man: Reroute ".",":","[" to the proper names
Fixes #9552

(cherry picked from commit 8ff78eddf0)
2023-02-27 22:40:58 +08:00
David Adam
9f83155fca CHANGELOG: work on 3.6.1 2023-02-27 22:27:15 +08:00
Shun Sakai
76d9de6282 Add completions for scrypt
(cherry picked from commit 189f4ca3c3)
2023-02-27 22:25:49 +08:00
bagohart
89880839e8 Add tab completion for stow (#9571)
(cherry picked from commit 3dd8db281b)
2023-02-27 22:25:26 +08:00
matt wartell
38afce70da fix 3 instances of old command substitution $()
(cherry picked from commit 904839dcce)
2023-02-27 22:25:26 +08:00
Jay
c42c3ebe6f 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.

(cherry picked from commit ce268b74dd)
2023-02-27 22:25:24 +08:00
NextAlone
c8526bfe4d completions/apkanalyzer: add completion for apkanalyzer
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit 176097cc49)
2023-02-27 22:24:56 +08:00
Delapouite
c11f2cf664 completions/systemctl: add import-environment command
Man page reference:
https://man.archlinux.org/man/systemctl.1#Environment_Commands

(cherry picked from commit a29d760ca0)
2023-02-27 22:24:56 +08:00
bagohart
3fa5a808a0 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>
(cherry picked from commit ef07e21d40)
2023-02-27 22:24:52 +08:00
Fabian Boehm
a48c787439 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*.

(cherry picked from commit b1b2294390)
2023-02-27 22:24:13 +08:00
Dmitry Gerasimov
e92eec1ab1 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>
(cherry picked from commit c3a72111e9)
2023-02-27 22:24:13 +08:00
Branch Vincent
ceb0389e83 completions: add pre-commit
(cherry picked from commit d69a290c2f)
2023-02-27 22:24:13 +08:00
NextAlone
7776bba8b5 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.

(cherry picked from commit 3604e8854b)
2023-02-27 22:24:13 +08:00
David Adam
f59edf23d0 CHANGELOG: work on 3.6.1 2023-02-21 22:06:32 +08:00
Wout De Puysseleir
d55ac1fb94 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

(cherry picked from commit 43a7c20ddb)
2023-02-21 21:54:14 +08:00
David Adam
d0f1d5e595 docs/index: update some formatting from #9482
(cherry picked from commit e20d78431b)
2023-02-21 21:18:03 +08:00
Fabian Boehm
308e0ceb9d __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

(cherry picked from commit 4a8ebc0744)
2023-02-21 20:52:14 +08:00
David Adam
61b87f585d debian packaging: add dependency on procps
See https://bugs.debian.org/1029940

(cherry picked from commit 2a24295e50)
2023-01-29 21:21:57 +08:00
Johannes Altmanninger
2e30403f98 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

(cherry picked from commit 243ade838b)
2023-01-28 21:26:36 +01:00
Johannes Altmanninger
847119a65d 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).

(cherry picked from commit befa240756)
2023-01-24 20:41:06 +01:00
Johannes Altmanninger
c8da990652 completions/git: fix typo
(cherry picked from commit f033b4df7d)
2023-01-24 20:41:06 +01:00
Johannes Altmanninger
c97a922d35 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).

(cherry picked from commit 7c1c3f9f77)
2023-01-24 20:41:06 +01:00
Johannes Altmanninger
b65974bb0a 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)

(cherry picked from commit 72e9d02650)
2023-01-24 20:41:06 +01:00
Fabian Boehm
6a982fe71f completions/git: Some rewordings
These are the longest subcommand descriptions, so it gives us more space

(cherry picked from commit 21f1eebd01)
2023-01-23 21:18:57 +01:00
Fabian Boehm
88d3803503 completions/git: Don't leak submodule subcommands
Introduced in f5711ad5ed through an unclean edit.

(cherry picked from commit 3548aae552)
2023-01-23 21:18:57 +01:00
Fabian Boehm
ef5b29652f Fix last PCRE2_UCHAR32
See #9502

(cherry picked from commit bd871c5372)
2023-01-23 20:04:43 +01:00
Fabian Boehm
b4ee54dc68 CHANGELOG: Open up 3.6.1 2023-01-22 19:06:12 +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
140 changed files with 2629 additions and 1431 deletions

View File

@@ -1,3 +1,100 @@
fish 3.6.3 (released December 4, 2023)
======================================
This release contains a fix for a test suite failure in fish 3.6.2.
--------------
fish 3.6.2 (released December 4, 2023)
======================================
This release of fish contains a security fix for CVE-2023-49284, a minor security problem identified
in fish 3.6.1 and previous versions (thought to affect all released versions of fish).
fish uses certain Unicode non-characters internally for marking wildcards and expansions. It
incorrectly allowed these markers to be read on command substitution output, rather than
transforming them into a safe internal representation.
For example, ``echo \UFDD2HOME`` has the same output as ``echo $HOME``.
While this may cause unexpected behavior with direct input, this may become a minor security problem
if the output is being fed from an external program into a command substitution where this output
may not be expected.
--------------
fish 3.6.1 (released March 25, 2023)
====================================
This release of fish contains a number of fixes for problems identified in fish 3.6.1, as well as some enhancements.
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`).
Deprecations and removed features
---------------------------------
- The Web-based configuration for abbreviations has been removed, as it was not functional with the changes abbreviations introduced in 3.6.0 (:issue:`9460`).
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`).
- ``set_color -v`` no longer crashes fish (:issue:`9640`).
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`)
- Variables that were set while the locale was C (the default ASCII-only locale) will now properly be encoded if the locale is switched (:issue:`2613`, :issue:`9473`).
- Escape during history search restores the original command line again (fixing a regression in 3.6.0).
- Using ``--help`` on builtins now respects the ``$MANPAGER`` variable, in preference to ``$PAGER`` (:issue:`9488`).
- :kbd:`Control-G` closes the history pager, like other shells (:issue:`9484`).
- The documentation for the ``:``, ``[`` and ``.`` builtin commands can now be looked up with ``man`` (:issue:`9552`).
- fish no longer crashes when searching history for non-ASCII codepoints case-insensitively (:issue:`9628`).
- The :kbd:`Alt-S` binding will now also use ``please`` if available (:issue:`9635`).
- Themes that don't specify every color option can be installed correctly in the Web-based configuration (:issue:`9590`).
- Compatibility with Midnight Commander's prompt integration has been improved (:issue:`9540`).
- A spurious error, noted when using fish in Google Drive directories under WSL 2, has been silenced (:issue:`9550`).
- Using ``read`` in ``fish_greeting`` or similar functions will not trigger an infinite loop (:issue:`9564`).
- Compatibility when upgrading from old versions of fish (before 3.4.0) has been improved (:issue:`9569`).
Improved prompts
^^^^^^^^^^^^^^^^
- The git prompt will compute the stash count to be used independently of the informative status (:issue:`9572`).
Completions
^^^^^^^^^^^
- Added completions for:
- ``apkanalyzer`` (:issue:`9558`)
- ``neovim`` (:issue:`9543`)
- ``otool``
- ``pre-commit`` (:issue:`9521`)
- ``proxychains`` (:issue:`9486`)
- ``scrypt`` (:issue:`9583`)
- ``stow`` (:issue:`9571`)
- ``trash`` and helper utilities ``trash-empty``, ``trash-list``, ``trash-put``, ``trash-restore`` (:issue:`9560`)
- ``ssh-copy-id`` (:issue:`9675`)
- Improvements to many completions, including the speed of completing directories in WSL 2 (:issue:`9574`).
- Completions using ``__fish_complete_suffix`` are now offered in the correct order, fixing a regression in 3.6.0 (:issue:`8924`).
- ``git`` completions for ``git-foo``-style commands was restored, fixing a regression in 3.6.0 (:issue:`9457`).
- File completion now offers ``../`` and ``./`` again, fixing a regression in 3.6.0 (:issue:`9477`).
- The behaviour of completions using ``__fish_complete_path`` matches standard path completions (:issue:`9285`).
Other improvements
------------------
- Improvements and corrections to the documentation.
For distributors
----------------
- fish 3.6.1 builds correctly on Cygwin (:issue:`9502`).
--------------
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

@@ -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:
@@ -175,7 +175,7 @@ Remove _$smurf_ from the scope::
> set -e smurf
Remove _$smurf_ from the global and universal scoeps::
Remove _$smurf_ from the global and universal scopes::
> set -e -Ug smurf

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

@@ -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 (for example) ``/usr/local/bin/fish``, ``/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,31 @@ 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 +242,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 +378,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 +472,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 +480,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:
@@ -638,17 +701,21 @@ When using this feature together with list brackets, the brackets will be used f
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 +733,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 +857,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 +880,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 +1010,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.
@@ -1021,6 +1087,24 @@ Here is an example of local vs function-scoped variables::
# 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:
@@ -1056,8 +1140,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 +1151,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 +1235,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>`.
@@ -1323,6 +1383,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.

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

@@ -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 unroot exec-out
return 1
end
end
@@ -14,7 +14,7 @@ function __fish_adb_get_devices -d 'Run adb devices and parse output'
set -l procs (ps -Ao comm= | string match 'adb')
# Don't run adb devices unless the server is already started - it takes a while to init
if set -q procs[1]
adb devices -l | string replace -rf '(\S+).*model:(\S+).*' '$1'\t'$2'
adb devices -l | string replace -rf '(\S+).*product:(\S+).*model:(\S+).*' '$1'\t'$2 $3'
end
end
@@ -79,6 +79,17 @@ function __fish_adb_list_files
__fish_adb_run_command find -H "$token*" -maxdepth 0 -type f 2\>/dev/null
end
function __fish_adb_list_bin
# list all binary without group
__fish_adb_run_command ls -1 /system/bin/ 2\>/dev/null
__fish_adb_run_command ls -1 /system/xbin/ 2\>/dev/null
end
function __fish_adb_list_properties
__fish_adb_run_command getprop | string match -rg '\[(.*)\]:'
end
# Generic options, must come before command
complete -n __fish_adb_no_subcommand -c adb -o a -d 'Listen on all network interfaces'
complete -n __fish_adb_no_subcommand -c adb -o d -d 'Use first USB device'
@@ -118,11 +129,13 @@ complete -f -n __fish_adb_no_subcommand -c adb -a get-serialno -d 'Prints serial
complete -f -n __fish_adb_no_subcommand -c adb -a get-devpath -d 'Prints device path'
complete -f -n __fish_adb_no_subcommand -c adb -a status-window -d 'Continuously print the device status'
complete -f -n __fish_adb_no_subcommand -c adb -a root -d 'Restart the adbd daemon with root permissions'
complete -f -n __fish_adb_no_subcommand -c adb -a unroot -d 'Restart the adbd daemon without root permissions'
complete -f -n __fish_adb_no_subcommand -c adb -a usb -d 'Restart the adbd daemon listening on USB'
complete -f -n __fish_adb_no_subcommand -c adb -a tcpip -d 'Restart the adbd daemon listening on TCP'
complete -f -n __fish_adb_no_subcommand -c adb -a ppp -d 'Run PPP over USB'
complete -f -n __fish_adb_no_subcommand -c adb -a sideload -d 'Sideloads the given package'
complete -f -n __fish_adb_no_subcommand -c adb -a reconnect -d 'Kick current connection from host side and make it reconnect.'
complete -f -n __fish_adb_no_subcommand -c adb -a exec-out -d 'Execute a command on the device and send its stdout back'
# install options
complete -n '__fish_seen_subcommand_from install' -c adb -s l -d 'Forward-lock the app'
@@ -207,3 +220,11 @@ complete -n '__fish_seen_subcommand_from logcat' -c adb -s e -l regex -d 'Only p
complete -n '__fish_seen_subcommand_from logcat' -c adb -s m -l max-count -d 'Quit after print <count> lines'
complete -n '__fish_seen_subcommand_from logcat' -c adb -l print -d 'Print all message even if they do not matches, requires --regex and --max-count'
complete -n '__fish_seen_subcommand_from logcat' -c adb -l uid -d 'Only display log messages from UIDs present in the comma separate list <uids>'
# commands that accept listing device binaries
complete -n '__fish_seen_subcommand_from exec-out' -c adb -f -a "(__fish_adb_list_bin)" -d "Command on device"
complete -n '__fish_seen_subcommand_from shell' -c adb -f -a "(__fish_adb_list_bin)" -d "Command on device"
# setprop and getprop in shell
complete -n '__fish_seen_subcommand_from setprop' -c adb -f -a "(__fish_adb_list_properties)" -d 'Property to set'
complete -n '__fish_seen_subcommand_from getprop' -c adb -f -a "(__fish_adb_list_properties)" -d 'Property to get'

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,12 +1,4 @@
complete -x -c asciidoctor -k -a "
(
__fish_complete_suffix .asciidoc
__fish_complete_suffix .adoc
__fish_complete_suffix .ad
__fish_complete_suffix .asc
__fish_complete_suffix .txt
)
"
complete -x -c asciidoctor -k -a "(__fish_complete_suffix .asciidoc .adoc .ad .asc .txt)"
# Security Settings
complete -c asciidoctor -s B -l base-dir -d "Base directory containing the document"

View File

@@ -2,7 +2,7 @@
complete -f -c at -s V -d "Display version and exit"
complete -f -c at -s q -d "Use specified queue"
complete -f -c at -s m -d "Send mail to user"
complete -c at -s f -k -x -a "(__fish_complete_suffix (commandline -ct) '' 'At job')" -d "Read job from file"
complete -c at -s f -k -x -a "(__fish_complete_suffix --description='At job' '')" -d "Read job from file"
complete -f -c at -s l -d "Alias for atq"
complete -f -c at -s d -d "Alias for atrm"
complete -f -c at -s v -d "Show the time"

View File

@@ -163,6 +163,4 @@ complete -c aura -n $sync -s y -l refresh -d 'Download fresh copy of the package
complete -c aura -n "$sync; and $argument" -xa "$listall $listgroups"
# Upgrade options
complete -c aura -n "$upgrade; and $argument" -k -xa '(__fish_complete_suffix pkg.tar.xz)' -d 'Package file'
complete -c aura -n "$upgrade; and $argument" -k -xa '(__fish_complete_suffix pkg.tar.gz)' -d 'Package file'
complete -c aura -n "$upgrade; and $argument" -k -xa '(__fish_complete_suffix pkg.tar.zst)' -d 'Package file'
complete -c aura -n "$upgrade; and $argument" -k -xa '(__fish_complete_suffix pkg.tar.xz pkg.tar.gz pkg.tar.zst)' -d 'Package file'

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

@@ -1,14 +1,4 @@
complete -c bunzip2 -k -x -a "(
__fish_complete_suffix .tbz
__fish_complete_suffix .tbz2
)
"
complete -c bunzip2 -k -x -a "(
__fish_complete_suffix .bz
__fish_complete_suffix .bz2
)
"
complete -c bunzip2 -k -x -a "(__fish_complete_suffix .tbz .tbz2 .bz2 .bz)"
complete -c bunzip2 -s c -l stdout -d "Decompress to stdout"
complete -c bunzip2 -s f -l force -d Overwrite

View File

@@ -1,13 +1,3 @@
complete -c bzcat -k -x -a "(
__fish_complete_suffix .tbz
__fish_complete_suffix .tbz2
)
"
complete -c bzcat -k -x -a "(
__fish_complete_suffix .bz
__fish_complete_suffix .bz2
)
"
complete -c bzcat -k -x -a "(__fish_complete_suffix .tbz .tbz2 .bz .bz2)"
complete -c bzcat -s s -l small -d "Reduce memory usage"

View File

@@ -1,15 +1,5 @@
complete -c bzip2 -s c -l stdout -d "Compress to stdout"
complete -c bzip2 -s d -l decompress -k -x -a "(
__fish_complete_suffix .tbz
__fish_complete_suffix .tbz2
)
"
complete -c bzip2 -s d -l decompress -k -x -a "(
__fish_complete_suffix .bz
__fish_complete_suffix .bz2
)
"
complete -c bzip2 -s d -l decompress -k -x -a "(__fish_complete_suffix .tbz .tbz2 .bz .bz2)"
complete -c bzip2 -s z -l compress -d "Compress file"
complete -c bzip2 -s t -l test -d "Check integrity"

View File

@@ -1,11 +1,2 @@
complete -c bzip2recover -k -x -a "(
__fish_complete_suffix .tbz
__fish_complete_suffix .tbz2
)
"
complete -c bzip2recover -k -x -a "(__fish_complete_suffix .tbz .tbz2 .bz .bz2)"
complete -c bzip2recover -k -x -a "(
__fish_complete_suffix .bz
__fish_complete_suffix .bz2
)
"

View File

@@ -6,10 +6,7 @@ set -l __fish_castnow_keys "space\tToggle\ between\ play\ and\ pause m\tToggle\
complete -c castnow -l tomp4 -d "Convert file to mp4 during playback"
complete -c castnow -l device -d "Specify name of Chromecast device to be used" -x
complete -c castnow -l address -d "Specify IP or hostname of Chromecast device" -x
complete -c castnow -l subtitles -d "Path or URL to SRT or VTT file" -k -x -a "(
__fish_complete_suffix .srt
__fish_complete_suffix .vtt
)"
complete -c castnow -l subtitles -d "Path or URL to SRT or VTT file" -k -x -a "(__fish_complete_suffix .srt .vtt)"
complete -c castnow -l subtitles-scale -d "Set subtitles font scale" -x
complete -c castnow -l subtitles-color -d "Set subtitles font RGBA color" -x
complete -c castnow -l subtitles-port -d "Specify port to be used for serving subtitles" -x

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

@@ -4,4 +4,4 @@
complete -p '*clang++*' -n __fish_should_complete_switches -xa '(__fish_complete_clang)'
complete -p '*clang++*' -n 'not __fish_should_complete_switches' \
-k -xa "(__fish_complete_suffix .o; __fish_complete_suffix .out; __fish_complete_suffix .c; __fish_complete_suffix .cpp; __fish_complete_suffix .so; __fish_complete_suffix .dylib)"
-k -xa "(__fish_complete_suffix .o .out .c .cpp .so .dylib)"

View File

@@ -5,8 +5,8 @@
# This pattern unfortunately matches clang-format, etc. as well.
complete -p '*clang*' -n __fish_should_complete_switches -xa '(__fish_complete_clang)'
complete -c clang -n 'not __fish_should_complete_switches' \
-k -xa "(__fish_complete_suffix .o; __fish_complete_suffix .out; __fish_complete_suffix .c; __fish_complete_suffix .cpp; __fish_complete_suffix .so; __fish_complete_suffix .dylib)"
-k -xa "(__fish_complete_suffix .o .out .c .cpp .so .dylib)"
# again but without the -x this time for the pattern-matched completion
complete -p '*clang*' -n 'not __fish_should_complete_switches' \
-k -a "(__fish_complete_suffix .o; __fish_complete_suffix .out; __fish_complete_suffix .c; __fish_complete_suffix .cpp; __fish_complete_suffix .so; __fish_complete_suffix .dylib)"
-k -a "(__fish_complete_suffix .o .out .c .cpp .so .dylib)"

View File

@@ -1,9 +1,4 @@
complete -k -x -c cmark -a "
(
__fish_complete_suffix .md
__fish_complete_suffix .markdown
)
"
complete -k -x -c cmark -a "(__fish_complete_suffix .md .markdown)"
complete -x -c cmark -s t -l to -a "html man xml latex commonmark" -d "Output format"
complete -c cmark -l width -d "Wrap width"

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

@@ -1,4 +1,4 @@
complete -c curl -n 'string match -qr "^@" -- (commandline -ct)' -k -xa "(printf '%s\n' -- @(__fish_complete_suffix (commandline -ct | string replace -r '^@' '') ''))"
complete -c curl -n 'string match -qr "^@" -- (commandline -ct)' -k -xa "(printf '%s\n' -- @(__fish_complete_suffix --complete=(commandline -ct | string replace -r '^@' '') ''))"
# These based on the autogenerated completions.
complete -c curl -l abstract-unix-socket -d '(HTTP) Connect through an abstract Unix domain socket'

View File

@@ -1 +1,19 @@
deno completions fish | source
# complete deno task
set searchForDenoFilesCode '
// order matters
const denoFile = ["deno.json", "deno.jsonc", "package.json"];
for (const file of denoFile) {
try {
Deno.statSync(file);
// file exists
const props = file === "package.json" ? "scripts" : "tasks";
console.log(
Object.keys(JSON.parse(Deno.readTextFileSync(file))[props]).join("\n"),
);
break;
} catch {}
}
'
complete -f -c deno -n "__fish_seen_subcommand_from task" -n "__fish_is_nth_token 2" -a "(deno eval '$searchForDenoFilesCode')"

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

@@ -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
@@ -358,12 +359,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 +457,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 +500,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 +529,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 +548,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 +585,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 +694,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 +708,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 +735,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 +742,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 +754,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 +789,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 +885,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 +946,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 +1012,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 +1044,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 +1189,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 +1203,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 +1238,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 +1297,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 +1369,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 +1468,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 +1484,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 +1524,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 +1687,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 +1762,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 +1782,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 +1921,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
@@ -1889,19 +2041,19 @@ complete -f -c git -n '__fish_git_using_command tag' -s v -l verify -d 'Verify s
complete -f -c git -n '__fish_git_using_command tag' -s f -l force -d 'Force overwriting existing tag'
complete -f -c git -n '__fish_git_using_command tag' -s l -l list -d 'List tags'
complete -f -c git -n '__fish_git_using_command tag' -l contains -xka '(__fish_git_commits)' -d 'List tags that contain a commit'
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_git_contains_opt -s d delete -s v verify' -ka '(__fish_git_tags)' -d Tag
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_git_contains_opt -s d delete -s v verify -s f force' -ka '(__fish_git_tags)' -d Tag
# TODO options
### worktree
set -l git_worktree_commands add list lock move prune remove unlock
complete -c git -n __fish_git_needs_command -a worktree -d 'Manage multiple working trees'
complete -f -c git -n "__fish_git_using_command worktree" -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 +2087,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 +2146,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 +2223,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 +2335,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 +2349,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 +2385,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 @@
complete -c gunzip -s c -l stdout -d "Compress to stdout"
complete -c gunzip -k -x -a "(
__fish_complete_suffix .gz
__fish_complete_suffix .tgz
)
"
complete -c gunzip -k -x -a "(__fish_complete_suffix .gz .tgz)"
complete -c gunzip -s f -l force -d Overwrite
complete -c gunzip -s h -l help -d "Display help and exit"
complete -c gunzip -s k -l keep -d "Keep input files"

View File

@@ -1,7 +1,4 @@
complete -c gv -k -xa "(__fish_complete_suffix .ps)"
complete -c gv -k -xa "(__fish_complete_suffix .ps.gz)"
complete -c gv -k -xa "(__fish_complete_suffix .eps)"
complete -c gv -k -xa "(__fish_complete_suffix .pdf)"
complete -c gv -k -xa "(__fish_complete_suffix .ps .ps.gz .eps .pdf)"
complete -c gv -l monochrome -d 'Display document using only black and white'
complete -c gv -l grayscale -d 'Display document without colors'
complete -c gv -l color -d 'Display document as usual'

View File

@@ -1,10 +1,5 @@
complete -c gzip -s c -l stdout -d "Compress to stdout"
complete -c gzip -s d -l decompress -k -x -a "
(
__fish_complete_suffix .gz
__fish_complete_suffix .tgz
)
"
complete -c gzip -s d -l decompress -k -x -a "(__fish_complete_suffix .gz .tgz)"
complete -c gzip -s f -l force -d Overwrite
complete -c gzip -s h -l help -d "Display help and exit"

View File

@@ -11,4 +11,4 @@ complete -c hjson -n __fish_should_complete_switches -a -rt -d "round trip comme
complete -c hjson -n __fish_should_complete_switches -a -nocol -d "disable color output"
complete -c hjson -n __fish_should_complete_switches -a "-cond=" -d "set condense option [default 60]"
complete -c hjson -k -xa "(__fish_complete_suffix .hjson; __fish_complete_suffix .json)"
complete -c hjson -k -xa "(__fish_complete_suffix .hjson .json)"

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

@@ -1,6 +1,6 @@
# Completions for the FreeBSD `kldload` kernel module load utility
function __fish_list_kldload_options
set -l klds (__fish_complete_suffix /boot/kernel/(commandline -ct) ".ko" | string replace -r '.*/(.+)\\.ko' '$1')
set -l klds (__fish_complete_suffix --complete=/boot/kernel/(commandline -ct) ".ko" | string replace -r '.*/(.+)\\.ko' '$1')
# Completing available klds is fast, but completing it with a call to __fish_whatis
# is decidedly not. With 846 modules (FreeBSD 11.1), fish --profile 'complete -C"kldload "' returns the following:
# 10671 11892698 > complete -C"kldload "

View File

@@ -1,4 +1,4 @@
complete -c latexmk -k -x -a "(__fish_complete_suffix (commandline -ct) .tex '(La)TeX file')"
complete -c latexmk -k -x -a "(__fish_complete_suffix --description='(La)TeX file' .tex)"
complete -c latexmk -o bibtex -d 'use bibtex when needed (default)'
complete -c latexmk -o bibtex- -d 'never use bibtex'
complete -c latexmk -o bibtex-cond -d 'use bibtex when needed, but only if the bib files exist'

View File

@@ -1,6 +1,5 @@
__fish_complete_lpr lp
complete -c lpr -k -xa "(__fish_complete_suffix .pdf)"
complete -c lpr -k -xa "(__fish_complete_suffix .ps)"
complete -c lpr -k -xa "(__fish_complete_suffix .pdf .ps)"
complete -c lp -s d -d 'Prints files to the named printer' -xa '(__fish_print_lpr_printers)'
complete -c lp -s i -d 'Specifies an existing job to modify' -x
complete -c lp -s n -d 'Sets the number of copies to print from 1 to 100' -x

View File

@@ -8,7 +8,7 @@ complete -c lpadmin -s v -d 'Sets the device-uri attribute of the printer queue'
complete -c lpadmin -s D -d 'Provides a textual description of the destination' -x
complete -c lpadmin -s E -d 'Enables the destination and accepts jobs'
complete -c lpadmin -s L -d 'Provides a textual location of the destination' -x
complete -c lpadmin -s P -d 'Specify a PDD file to use with the printer' -k -xa "(__fish_complete_suffix .ppd; __fish_complete_suffix .ppd.gz)"
complete -c lpadmin -s P -d 'Specify a PDD file to use with the printer' -k -xa "(__fish_complete_suffix .ppd .ppd.gz)"
complete -c lpadmin -s o -xa cupsIPPSupplies=true -d 'Specify if IPP supply level values should be reported'
complete -c lpadmin -s o -xa cupsIPPSupplies=false -d 'Specify if IPP supply level values should be reported'
complete -c lpadmin -s o -xa cupsSNMPSupplies=true -d 'Specify if SNMP supply level values should be reported'

View File

@@ -1,6 +1,5 @@
__fish_complete_lpr lpr
complete -c lpr -k -xa "(__fish_complete_suffix .pdf)"
complete -c lpr -k -xa "(__fish_complete_suffix .ps)"
complete -c lpr -k -xa "(__fish_complete_suffix .pdf .ps)"
complete -c lpr -s H -x -d 'Specifies an alternate server' -xa '(__fish_print_hostnames)'
complete -c lpr -s C -s J -s T -x -d 'Sets the job name'
#complete -c lpr -o '\\#' -d 'Sets the number of copies to print from 1 to 100' -xa

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

@@ -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

@@ -13,7 +13,7 @@ end
# The results of this function are as if __fish_complete_suffix were called
# while cd'd into the openocd scripts directory
function __fish_complete_openocd_path
__fish_complete_suffix (commandline -ct) "$argv[1]" "$argv[2]" (__fish_openocd_prefix)/share/openocd/scripts
__fish_complete_suffix --prefix=(__fish_openocd_prefix)/share/openocd/scripts "$argv[1]"
end
complete -c openocd -f # at no point does openocd take arbitrary arguments

View File

@@ -37,6 +37,6 @@ complete -x -c optipng -n __fish_should_complete_switches -a '-dir\t"write outpu
complete -x -c optipng -n __fish_should_complete_switches -a '-log\t"log messages to <file>"'
complete -x -c optipng -n 'not __fish_prev_arg_in -out -dir -log' \
-k -a '(__fish_complete_suffix .png; __fish_complete_suffix .pnm; __fish_complete_suffix .tiff; __fish_complete_suffix .bmp)'
-k -a '(__fish_complete_suffix .png .pnm .tiff .bmp)'
complete -x -c optipng -n '__fish_prev_arg_in -dir' -a '(__fish_complete_directories)'

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

@@ -159,4 +159,4 @@ complete -c $progname -n "$files" -l machinereadable -d 'Show in machine readabl
# Upgrade options
# Theoretically, pacman reads packages in all formats that libarchive supports
# In practice, it's going to be tar.xz or tar.gz or tar.zst
complete -c $progname -n "$upgrade" -k -xa '(__fish_complete_suffix pkg.tar.zst; __fish_complete_suffix pkg.tar.xz; __fish_complete_suffix pkg.tar.gz)' -d 'Package file'
complete -c $progname -n "$upgrade" -k -xa '(__fish_complete_suffix pkg.tar.zst pkg.tar.xz pkg.tar.gz)' -d 'Package file'

View File

@@ -141,4 +141,4 @@ complete -c $progname -n "$sync" -xa "$listall $listgroups"
# Upgrade options
# Theoretically, pacman reads packages in all formats that libarchive supports
# In practice, it's going to be tar.xz, tar.gz, tar.zst, or just pkg.tar (uncompressed pkg)
complete -c $progname -n "$upgrade" -k -xa '(__fish_complete_suffix pkg.tar.zst; __fish_complete_suffix pkg.tar.xz; __fish_complete_suffix pkg.tar.gz; __fish_complete_suffix pkg.tar;)' -d 'Package file'
complete -c $progname -n "$upgrade" -k -xa '(__fish_complete_suffix pkg.tar.zst pkg.tar.xz pkg.tar.gz pkg.tar)' -d 'Package file'

View File

@@ -2,14 +2,14 @@
# Copyright (c) 2018 David Sanson
# Licensed under the GNU General Public License version 2
set -l informats commonmark creole docbook docx epub gfm haddock html jats json latex markdown markdown_github markdown_mmd markdown_phpextra markdown_strict mediawiki muse native odt opml org rst t2t textile tikiwiki twiki vimwiki
set -l outformats asciidoc beamer commonmark context docbook docbook4 docbook5 docx dokuwiki dzslides epub epub2 epub3 fb2 gfm haddock html html4 html5 icml jats json latex man markdown markdown_github markdown_mmd markdown_phpextra markdown_strict mediawiki ms muse native odt opendocument opml org plain pptx revealjs rst rtf s5 slideous slidy tei texinfo textile zimwiki
set -l highlight_styles pygments tango espresso zenburn kate monochrome breezedark haddock
set -l informats (pandoc --list-input-formats)
set -l outformats (pandoc --list-output-formats)
set -l highlight_styles (pandoc --list-highlight-styles)
set -l datadir $HOME/.pandoc
# Only suggest installed engines
set -l pdfengines
for engine in pdflatex lualatex xelatex wkhtmltopdf weasyprint prince context pdfroff
for engine in pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint pagedjs-cli prince context pdfroff
if type -q $engine
set pdfengines $pdfengines $engine
end
@@ -83,18 +83,8 @@ complete -c pandoc -r -l citation-abbreviations
complete -c pandoc -r -f -l print-highlight-style -k -a "(__fish_complete_suffix 'theme' )"
complete -c pandoc -r -f -l highlight_style -k -a "(__fish_complete_suffix 'theme' )"
complete -c pandoc -r -f -l csl -k -a "(__fish_complete_suffix 'csl' )"
complete -c pandoc -r -f -l reference-file -k -a "(__fish_complete_suffix 'odt') (__fish_complete_suffix 'docx')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'bib')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'bibtex')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'copac')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'json')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'yaml')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'enl')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'xml')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'wos')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'medline')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'mods')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'ria')"
complete -c pandoc -r -f -l reference-file -k -a "(__fish_complete_suffix 'odt' 'docx')"
complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'bib' 'bibtex' 'copac' 'json' 'yaml' 'enl' 'xml' 'wos' 'medline' 'mods' 'ria')"
complete -c pandoc -r -f -l lua-filter -k -a "(__fish_complete_suffix 'lua')"
# options that take files in DATADIR

View File

@@ -17,7 +17,7 @@ complete -c patch -s f -l force -d "Like -t, but ignore bad-Prereq patches, assu
complete -c patch -s F -l fuzz -x -d "Number of LINES for inexact 'fuzzy' matching" -a "(seq 0 9){\tfuzz lines}"
complete -c patch -s g -l get -x -d "Get files from RCS etc. if positive; ask if negative" -a '(seq -1 1){\t\n}'
complete -c patch -l help -f -d "Display help"
complete -c patch -s i -l input -x -d "Read patch from FILE instead of stdin" -k -a "( __fish_complete_suffix .patch; __fish_complete_suffix .diff)"
complete -c patch -s i -l input -x -d "Read patch from FILE instead of stdin" -k -a "( __fish_complete_suffix .patch .diff)"
complete -c patch -s l -l ignore-whitespace -d "Ignore whitespace changes between patch & input"
complete -c patch -s n -l normal -d "Interpret patch as normal diff"
complete -c patch -s N -l forward -d "Ignore patches that seem reversed or already applied"

View File

@@ -95,7 +95,7 @@ complete -f -c phpunit -l do-not-cache-result -d 'Do not write test results to c
# Configuration Options:
complete -x -c phpunit -l prepend -d 'A PHP script that is included as early as possible'
complete -x -c phpunit -l bootstrap -d 'A PHP script that is included before the tests run'
complete -x -c phpunit -s c -l configuration -k -a '(__fish_complete_suffix .xml; __fish_complete_suffix .xml.dist)' -d 'Read configuration from XML file'
complete -x -c phpunit -s c -l configuration -k -a '(__fish_complete_suffix .xml .xml.dist)' -d 'Read configuration from XML file'
complete -f -c phpunit -l no-configuration -d 'Ignore default configuration file (phpunit.xml)'
complete -f -c phpunit -l no-logging -d 'Ignore logging configuration'
complete -f -c phpunit -l no-extensions -d 'Do not load PHPUnit extensions'

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

@@ -0,0 +1,23 @@
# Completions for the scrypt encryption utility
complete -x -c scrypt -n __fish_use_subcommand -a enc -d "Encrypt file"
complete -x -c scrypt -n __fish_use_subcommand -a dec -d "Decrypt file"
complete -x -c scrypt -n __fish_use_subcommand -a info -d "Print information about the encryption parameters"
complete -c scrypt -n "__fish_seen_subcommand_from enc dec" -s f -d "Force the operation to proceed"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -l logN -a "(seq 10 40)" -d "Set the work parameter N"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -s M -d "Use at most the specified bytes of RAM"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -s m -d "Use at most the specified fraction of the available RAM"
complete -c scrypt -n "__fish_seen_subcommand_from enc dec" -s P -d "Deprecated synonym for `--passphrase dev:stdin-once`"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -s p -a "(seq 1 32)" -d "Set the work parameter p"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -l passphrase -a "
dev:tty-stdin\t'Read from /dev/tty, or stdin if fails (default)'
dev:stdin-once\t'Read from stdin'
dev:tty-once\t'Read from /dev/tty'
env:(set -xn)\t'Read from the environment variable'
file:(__fish_complete_path)\t'Read from the file'
" -d "Read the passphrase using the specified method"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -s r -a "(seq 1 32)" -d "Set the work parameter r"
complete -x -c scrypt -n "__fish_seen_subcommand_from enc dec" -s t -d "Use at most the specified seconds of CPU time"
complete -c scrypt -n "__fish_seen_subcommand_from enc dec" -s v -d "Print encryption parameters and memory/CPU limits"
complete -x -c scrypt -n "not __fish_seen_subcommand_from enc dec info" -l version -d "Print version"

View File

@@ -0,0 +1,108 @@
# Commands
complete -c ssh-copy-id -d Remote -xa "(__fish_complete_user_at_hosts)"
complete -c ssh-copy-id -d Remote -k -fa '(__ssh_history_completions)'
# Options
complete -c ssh-copy-id -s i -d IdentityFile -r -F
complete -c ssh-copy-id -s p -d Port -r -x
complete -c ssh-copy-id -s F -d 'Alternate ssh config file' -r -F
# Load completions shared by various ssh tools like ssh, scp and sftp.
complete -c ssh-copy-id -s o -d Options -xa "
AddKeysToAgent
AddressFamily
BatchMode
BindAddress
BindInterface
CanonicalDomains
CanonicalizeFallbackLocal
CanonicalizeHostname
CanonicalizeMaxDots
CanonicalizePermittedCNAMEs
CASignatureAlgorithms
CertificateFile
ChallengeResponseAuthentication
CheckHostIP
Ciphers
ClearAllForwardings
Compression
ConnectionAttempts
ConnectTimeout
ControlMaster
ControlPath
ControlPersist
DynamicForward
EscapeChar
ExitOnForwardFailure
FingerprintHash
ForwardAgent
ForwardX11
ForwardX11Timeout
ForwardX11Trusted
GatewayPorts
GlobalKnownHostsFile
GSSAPIAuthentication
GSSAPIClientIdentity
GSSAPIDelegateCredentials
GSSAPIKexAlgorithms
GSSAPIKeyExchange
GSSAPIRenewalForcesRekey
GSSAPIServerIdentity
GSSAPITrustDns
HashKnownHosts
Host
HostbasedAuthentication
HostbasedKeyTypes
HostKeyAlgorithms
HostKeyAlias
Hostname
IdentitiesOnly
IdentityAgent
IdentityFile
IPQoS
KbdInteractiveAuthentication
KbdInteractiveDevices
KexAlgorithms
LocalCommand
LocalForward
LogLevel
MACs
Match
NoHostAuthenticationForLocalhost
NumberOfPasswordPrompts
PasswordAuthentication
PermitLocalCommand
PKCS11Provider
Port
PreferredAuthentications
ProxyCommand
ProxyJump
ProxyUseFdpass
PubkeyAcceptedKeyTypes
PubkeyAuthentication
RekeyLimit
RemoteCommand
RemoteForward
RequestTTY
SendEnv
ServerAliveCountMax
ServerAliveInterval
SetEnv
StreamLocalBindMask
StreamLocalBindUnlink
StrictHostKeyChecking
TCPKeepAlive
Tunnel
TunnelDevice
UpdateHostKeys
User
UserKnownHostsFile
VerifyHostKeyDNS
VisualHostKey
XAuthLocation
"
complete -c ssh-copy-id -s f -d 'Force mode'
complete -c ssh-copy-id -s n -d 'Dry run'
complete -c ssh-copy-id -s s -d 'Use sftp'
complete -c ssh-copy-id -s h -s \? -d 'Show help'

View File

@@ -5,11 +5,6 @@ __fish_complete_ssh ssh
# ssh specific completions
#
# Also retrieve `user@host` entries from history
function __ssh_history_completions
history --prefix ssh --max=100 | string replace -rf '.* ([A-Za-z0-9._:-]+@[A-Za-z0-9._:-]+).*' '$1'
end
complete -c ssh -d Remote -xa "(__fish_complete_user_at_hosts)"
complete -c ssh -d Remote -k -fa '(__ssh_history_completions)'

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

@@ -1,8 +1,6 @@
complete -c tex -o help -d "Display help and exit"
complete -c tex -o version -d "Display version and exit"
complete -c tex -k -x -a "(
__fish_complete_suffix (commandline -ct) .tex '(La)TeX file'
)"
complete -c tex -k -x -a "(__fish_complete_suffix --description='(La)TeX file' .tex)"
complete -c tex -o file-line-error -d "Show errors in style file:line"
complete -c tex -o no-file-line-error -d "Show errors not in style file:line"

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

@@ -8,14 +8,14 @@ set -l formats raw row bitwise extfile
set -l line_endings LF CR CRLF
set -l woff_fmts woff woff2
complete -f -c ttx -k -a '(__fish_complete_suffix .otf; __fish_complete_suffix .ttf; __fish_complete_suffix .ttx; __fish_complete_suffix .ttc)'
complete -c ttx -f -n "__fish_is_nth_token 1" -k -a '(__fish_complete_suffix .otf; __fish_complete_suffix .ttf; __fish_complete_suffix .ttx)'
complete -f -c ttx -k -a '(__fish_complete_suffix .otf .ttf .ttx .ttc)'
complete -c ttx -f -n "__fish_is_nth_token 1" -k -a '(__fish_complete_suffix .otf .ttf .ttx)'
# General options
complete -c ttx -f -s h -d'Show help message'
complete -c ttx -f -l version -d'Show version info'
complete -c ttx -x -s d -d'Set output folder' -a '(__fish_complete_directories)'
complete -c ttx -r -s o -d'Set output filename' -k -a '(__fish_complete_suffix .otf; __fish_complete_suffix .ttf; __fish_complete_suffix .ttx)'
complete -c ttx -r -s o -d'Set output filename' -k -a '(__fish_complete_suffix .otf .ttf .ttx)'
complete -c ttx -f -s f -d'Force output overwrite'
complete -c ttx -f -s v -d'Verbose output'
complete -c ttx -f -s q -d'Quiet mode'
@@ -35,7 +35,7 @@ complete -c ttx -x -l unicodedata -d'Custom database for character names [Unicod
complete -c ttx -x -l newline -d'Set EOL format' -a "$line_endings"
# Compile options
complete -c ttx -x -s m -d'Merge named TTF/OTF with SINGLE .ttx input' -k -a '(__fish_complete_suffix .otf; __fish_complete_suffix .ttf)'
complete -c ttx -x -s m -d'Merge named TTF/OTF with SINGLE .ttx input' -k -a '(__fish_complete_suffix .otf .ttf)'
complete -c ttx -f -s b -d'Don\'t recalculate glyph bounding boxes'
complete -c ttx -f -l recalc-timestamp -d'Set font modified timestamp to current time'
complete -c ttx -x -l flavor -d'Set WOFF flavor' -a "$woff_fmts"

View File

@@ -28,11 +28,7 @@ complete -c unzip -s M -d "pipe through `more` pager"
if unzip -v 2>/dev/null | string match -eq Debian
# the first non-switch argument should be the zipfile
complete -c unzip -n "__fish_is_nth_token 1" -k -xa '(
__fish_complete_suffix .zip
__fish_complete_suffix .jar
__fish_complete_suffix .aar
)'
complete -c unzip -n "__fish_is_nth_token 1" -k -xa '(__fish_complete_suffix .zip .jar .aar)'
# Files thereafter are either files to include or exclude from the operation
set -l zipfile
@@ -41,10 +37,6 @@ if unzip -v 2>/dev/null | string match -eq Debian
else
# all tokens should be zip files
complete -c unzip -k -xa '(
__fish_complete_suffix .zip
__fish_complete_suffix .jar
__fish_complete_suffix .aar
)'
complete -c unzip -k -xa '(__fish_complete_suffix .zip .jar .aar)'
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

@@ -1,12 +1,5 @@
complete -c xz -s z -l compress -d Compress
complete -c xz -s d -l decompress -l uncompress -d Decompress -k -x -a "
(
__fish_complete_suffix .xz
__fish_complete_suffix .txz
__fish_complete_suffix .lzma
__fish_complete_suffix .tlz
)
"
complete -c xz -s d -l decompress -l uncompress -d Decompress -k -x -a "(__fish_complete_suffix .xz .txz .lzma .tlz)"
complete -c xz -s t -l test -d 'Test the integrity of compressed files'
complete -c xz -s l -l list -d 'Print information about compressed files'

View File

@@ -170,7 +170,7 @@ complete -c $progname -n "$files" -l machinereadable -d 'Show in machine readabl
# Upgrade options
# Theoretically, pacman reads packages in all formats that libarchive supports
# In practice, it's going to be tar.xz, tar.gz or tar.zst
complete -c $progname -n "$upgrade" -k -xa '(__fish_complete_suffix pkg.tar.zst; __fish_complete_suffix pkg.tar.xz; __fish_complete_suffix pkg.tar.gz)' -d 'Package file'
complete -c $progname -n "$upgrade" -k -xa '(__fish_complete_suffix pkg.tar.zst pkg.tar.xz pkg.tar.gz)' -d 'Package file'
## Yaourt only stuff
# Clean options

View File

@@ -1,8 +1,4 @@
complete -c zcat -k -x -a "(
__fish_complete_suffix .gz
__fish_complete_suffix .tgz
)
"
complete -c zcat -k -x -a "(__fish_complete_suffix .gz .tgz)"
complete -c zcat -s f -l force -d Overwrite
complete -c zcat -s h -l help -d "Display help and exit"
complete -c zcat -s L -l license -d "Print license"

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

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

@@ -1,10 +1,5 @@
function __fish_complete_docutils -d "Completions for Docutils common options" -a cmd
complete -x -c $cmd -k -a "
(
__fish_complete_suffix .rst
__fish_complete_suffix .txt
)
"
complete -x -c $cmd -k -a "(__fish_complete_suffix .rst .txt)"
# General Docutils Options
complete -c $cmd -l title -d "Specify the docs title"

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

@@ -1,79 +1,52 @@
# Find files ending in any of the non-switch arguments and output them as completions.
# * --description provides the description that should be part of each generated completion,
# * --prefix=DIR makes __fish_complete_suffix behave as if it were called in DIR rather than $PWD
# * --complete=PREFIX only lists files that begin with PREFIX
#
# Find files that complete $argv[1], has the suffix $argv[2], and output them
# as completions with the optional description $argv[3]. Then, also output
# completions for the files that don't have the suffix, so you want to use
# "complete -k" on the output. Both $argv[1] and $argv[3] are optional,
# if only one is specified, it is assumed to be the argument to complete. If
# $argv[4] is present, it is treated as a prefix for the path, i.e. in lieu
# of $PWD.
# Files matching the above preconditions are printed first then other, non-matching files
# are printed for fallback purposes. As such, it is imperative that `complete` calls that
# shell out to `__fish_complete_suffix` are made with a `-k` switch to ensure sort order
# is preserved.
function __fish_complete_suffix -d "Complete using files"
set -l _flag_prefix ""
set -l _flag_complete (commandline -ct)
# Variable declarations
argparse 'prefix=' 'description=' 'complete=' -- $argv
set -l comp
set -l suff
set -l desc
set -l files
set -l prefix ""
switch (count $argv)
case 1
set comp (commandline -ct)
set suff $argv
set desc ""
case 2
set comp $argv[1]
set suff $argv[2]
set desc ""
case 3
set comp $argv[1]
set suff $argv[2]
set desc $argv[3]
case 4
set comp $argv[1]
set suff $argv[2]
set desc $argv[3]
set prefix $argv[4]
# Only directories are supported as prefixes, and to use the same logic
# for both absolute prefixed paths and relative non-prefixed paths, $prefix
# must terminate in a `/` if it is present, so it can be unconditionally
# prefixed to any path to get the desired result.
if not string match -qr '/$' $prefix
set prefix $prefix/
end
end
set -l suff (string escape --style=regex -- $argv)
# Simple and common case: no prefix, just complete normally and sort matching files first.
if test -z $prefix
set -l suffix (string escape --style=regex -- $suff)
if test -z $_flag_prefix
# Use normal file completions.
set files (complete -C "__fish_command_without_completions $comp")
set -l files_with_suffix (string match -r -- "^.*$suffix\$" $files)
set files (complete -C "__fish_command_without_completions $_flag_complete")
set -l files_with_suffix (string match -r -- (string join "|" "^.*"$suff\$) $files)
set -l directories (string match -r -- '^.*/$' $files)
set files $files_with_suffix $directories $files
else
# Only directories are supported as prefixes, and to use the same logic
# for both absolute prefixed paths and relative non-prefixed paths, $_flag_prefix
# must terminate in a `/` if it is present, so it can be unconditionally
# prefixed to any path to get the desired result.
if not string match -qr '/$' $_flag_prefix
set _flag_prefix $_flag_prefix/
end
# Strip leading ./ as it confuses the detection of base and suffix
# It is conditionally re-added below.
set base $prefix(string replace -r '^("\')?\\./' '' -- $comp | string trim -c '\'"') # " make emacs syntax highlighting happy
set base $_flag_prefix(string replace -r '^("\')?\\./' '' -- $_flag_complete | string trim -c '\'"') # " make emacs syntax highlighting happy
set -l all
set -l files_with_suffix
set -l dirs
# If $comp is "./ma" and the file is "main.py", we'll catch that case here,
# If $_flag_complete is "./ma" and the file is "main.py", we'll catch that case here,
# but complete.cpp will not consider it a match, so we have to output the
# correct form.
# Also do directory completion, since there might be files with the correct
# suffix in a subdirectory.
set all $base*
set files_with_suffix (string match -r -- ".*"(string escape --style=regex -- $suff) $all)
if not string match -qr '/$' -- $suff
set files_with_suffix (string match -r -- (string join "|" ".*"$suff) $all)
if not string match -qr '/$' -- $argv
set dirs $base*/
# The problem is that we now have each directory included twice in the output,
@@ -88,7 +61,7 @@ function __fish_complete_suffix -d "Complete using files"
end
set files $files_with_suffix $dirs $all
if string match -qr '^\\./' -- $comp
if string match -qr '^\\./' -- $_flag_complete
set files ./$files
else
# "Escape" files starting with a literal dash `-` with a `./`
@@ -97,14 +70,14 @@ function __fish_complete_suffix -d "Complete using files"
end
if set -q files[1]
if string match -qr -- . "$desc"
set desc "\t$desc"
if string match -qr -- . "$_flag_description"
set _flag_description "\t$_flag_description"
end
if string match -qr -- . "$prefix"
set prefix (string escape --style=regex -- $prefix)
if string match -qr -- . "$_flag_prefix"
set prefix (string escape --style=regex -- $_flag_prefix)
set files (string replace -r -- "^$prefix" "" $files)
end
printf "%s$desc\n" $files
printf "%s$_flag_description\n" $files
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

@@ -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

@@ -19,7 +19,7 @@ function __fish_print_xbps_packages
end
end
# prints: <package name> Package
xbps-query -Rsl | sed 's/^... \([^ ]*\)-.* .*/\1/; s/$/\t'Package'/' | tee $cache_file
xbps-query -Rs "" | sed 's/^... \([^ ]*\)-.* .*/\1/; s/$/\t'Package'/' | tee $cache_file
return 0
else
xbps-query -l | sed 's/^.. \([^ ]*\)-.* .*/\1/' # TODO: actually put package versions in tab for locally installed packages

View File

@@ -98,7 +98,7 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
bind --preset $argv \ed 'set -l cmd (commandline); if test -z "$cmd"; echo; dirh; commandline -f repaint; else; commandline -f kill-word; end'
bind --preset $argv \cd delete-or-exit
bind --preset $argv \es "if command -q sudo; fish_commandline_prepend sudo; else if command -q doas; fish_commandline_prepend doas; end"
bind --preset $argv \es 'for cmd in sudo doas please; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end'
# Allow reading manpages by pressing F1 (many GUI applications) or Alt+h (like in zsh).
bind --preset $argv -k f1 __fish_man_page

View File

@@ -0,0 +1,3 @@
function __ssh_history_completions -d "Retrieve `user@host` entries from history"
history --prefix ssh --max=100 | string replace -rf '.* ([A-Za-z0-9._:-]+@[A-Za-z0-9._:-]+).*' '$1'
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

@@ -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

@@ -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

@@ -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

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