Compare commits

..

369 Commits

Author SHA1 Message Date
David Adam
80394ea4e3 Release 3.7.1 2024-03-19 11:40:45 +08:00
David Adam
445fba4464 CHANGELOG: work on 3.7.1 2024-03-18 22:53:13 +08:00
fortifiedhill
9cebf5c9b6 Update htop completions
Added and updated completions and updated htop link.

(cherry picked from commit 8678ad8ca0)
2024-03-18 22:34:55 +08:00
Xiretza
119d76bc0f Add completions for dmidecode
(cherry picked from commit 8271021fb6)
2024-03-18 22:34:55 +08:00
Felix Luciano Salomon
cc6df6d17f Added completion for ollama
Closes #10327

(cherry picked from commit 90b9bce174)
2024-03-18 22:34:55 +08:00
Mathis Chenuet
77e2fa343d Add completion for pstree (#10317)
* Add completion for pstree.fish

* use fish functions, much better

(cherry picked from commit 73d760560b)
2024-03-18 22:34:55 +08:00
QianChenglong
b864074288 add completion for mycli
Closes #10309

(cherry picked from commit b3c610feff)
2024-03-18 22:34:55 +08:00
Emily Grace Seville
c6f3b24dc5 feat: cobra-cli support (#10293)
* feat: cobra-cli support

* fix: cobra-cli completion

(cherry picked from commit 623f3463a5)
2024-03-18 22:34:55 +08:00
Daniel Kahn Gillmor
d24b1ef229 tab completions: avoid completing gpg --use-embedded-filename
gpg's --use-embedded-filename is a dangerous option that can cause gpg
to write arbitrary content to arbitrary files.

According to the GnuPG maintainer, this is not an option recommended
for use (https://dev.gnupg.org/T4500).  Fish shouldn't encourage users
to supply it.

I've offered https://dev.gnupg.org/T6972 to upstream to make it even
more clear that this option is a bad idea.

While removing it, we might as well also remove
--no-use-embedded-filename, since it is effectively a no-op.

(cherry picked from commit b265152fba)
2024-03-18 22:34:55 +08:00
Jason Nader
d655f40d43 completions: fix wg-quick interface completions
wg outputs space separated list

(cherry picked from commit 28d9f1878d)
2024-03-18 22:34:55 +08:00
Mark Huang
baf5102797 completions for apt and apt-get
(cherry picked from commit 65cf6ada56)
2024-03-18 22:34:55 +08:00
Ikko Eltociear Ashimine
7b595b2e2e Update iwctl.fish
colum -> column

(cherry picked from commit 1e925857f0)
2024-03-18 22:34:55 +08:00
Asuka Minato
f82e29d320 add more strace completion (#10227)
* Update strace.fish

* Update strace.fish

* upper case

(cherry picked from commit 0f97111290)
2024-03-18 22:34:55 +08:00
Damien Picard
d2e1ffc192 Completions: fix Blender completions when it prints to stderr
Some of the completions recently introduced called Blender itself to query some
arguments, and Blender sometimes prints messages to stderr. This output was not
filtered, resulting in the shell printing irrelevant messages during completion.

(cherry picked from commit 4f3e7ddef0)
2024-03-18 22:34:55 +08:00
mhmdanas
a6c00ee637 completions/xbps-query: complete package name after -X
(cherry picked from commit a67b089c89)
2024-03-18 22:34:55 +08:00
NextAlone
e2599545f2 completions/fastboot: fix flash completion
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit c587b2ffcc)
2024-03-18 22:34:55 +08:00
David Adam
98662ae076 CHANGELOG: work on 3.7.1 2024-03-18 22:26:49 +08:00
Mahmoud Al-Qudsi
72d372cca1 Fix unnecessary move warning 2024-03-14 17:05:58 -05:00
Mahmoud Al-Qudsi
e2df29447f Silence warning about unused variable 2024-03-14 17:04:56 -05:00
Fabian Boehm
9b9cfc207f CHANGELOG for 3.7.1 2024-03-13 18:24:01 +01:00
Mahmoud Al-Qudsi
b7b20e9fac Always source file after funced (#10318)
... even if the file hasn't changed. This addresses an oddity in the following
case:

* Shell is started,
* function `foo` is sourced from foo.fish
* foo.fish is *externally* edited and saved
* <Loaded definition of `foo` is now stale, but fish is unaware>
* `funced foo` loads `type -p foo` showing changed definition, user exits
  $EDITOR saving no changes (or with $status 0, more generally).
* Stale definition of `foo` remains

(cherry picked from commit 2c2ab0c1fa)
2024-03-13 18:16:34 +01:00
Jason Nader
fada4f2e01 completions: add ssh -D option
(cherry picked from commit fc58b9c68f)
2024-03-13 18:15:24 +01:00
Paul Gier
2655d9a3fa functions: handle hostname starting with dash
If a hostname starts with a dash `-` character, the prompt_hostname function
fails because the `string` function interprets it as an option instead
of an argument.

(cherry picked from commit 6c9c033126)
2024-03-13 18:15:24 +01:00
Jason Nader
c3aefc581f completions: update 'echo'
(cherry picked from commit 2f332f0019)
2024-03-13 18:15:24 +01:00
Fabian Boehm
36c8746870 docs/argparse: Add some more examples, something on -x
Fixes #10284

(cherry picked from commit 94d3307469)
2024-03-13 18:15:24 +01:00
Paul Ouellette
6cd1b23502 Remove share/completions/highlight.fish
Highlight ships its own completion script:
https://gitlab.com/saalen/highlight/-/blob/master/sh-completion/highlight.fish

(cherry picked from commit 2cb60bed10)
2024-03-13 18:15:24 +01:00
Peter Collingbourne
1f9226aaa4 completions/fastboot: declare -s as taking an argument, add argument completions
(cherry picked from commit 0b3e9609f1)
2024-03-13 18:15:24 +01:00
Nethum Lamahewage
6da36f4ae5 history: fix deleting last entry
(cherry picked from commit a36ff7d143)
2024-03-13 18:15:24 +01:00
zuisong
8ed052079f Add --url-query completion for curl (#10332)
Add missing completion for curl's `--url-query` option

(cherry picked from commit a1e46a94f6)
2024-03-13 18:15:24 +01:00
Fabian Boehm
95f6803241 docs/completions: Remove duplicated content
Fixes #fish-site/121
2024-02-14 21:54:02 +01:00
Johannes Altmanninger
47bb07eda3 __fish_anypager: prefer less over other pagers
This is our traditional behavior; "man" and "git" do the same.

(cherry picked from commit b83f3b0e98)

Proposing this for 3.7.1 because I think see this as regression in 3.7.0 -
a user might have installed bat for syntax highlighting only.
2024-01-21 17:31:24 +01:00
Fabian Boehm
c31e194120 Revert "wildcard: Remove useless access() call for trailing slash"
This reverts commit 6823f5e337.

Fixes #10205
2024-01-09 18:59:32 +01:00
ksyx
001f797f80 fix: crash when running ELF w/ interpreter missing
The function `stat` as defined in `include/x86_64-linux-gnu/sys/stat.h`
marks its arguments as nonnull as in below. This UB causes crash in
release builds with variable `interpreter` assumed to be nonnull. Along
with failing stat returning nonzero value, this ultimately causes
`strlen` to be called with NULL as argument.

Definition of `stat`:
```
extern int stat (const char *__restrict __file,
		 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
```
Reproduce:
```
> # interp.c is any vaild single file C source
> gcc ./interp.c -Wl,--dynamic-linker=/bad -o interp
> echo './interp' > in.txt
> ./fish < in.txt
'./fish < in.txt' terminated by signal SIGSEGV (Address boundary error)
```

Co-authored-by: Moody Liu <mooodyhunter@outlook.com>
2024-01-09 13:23:52 +01:00
Asger Hautop Drewsen
b91723dab6 Log original exit code used when a builtin returns a negative exit code 2024-01-04 16:13:41 +01:00
David Adam
0e4d088b11 Release 3.7.0 2024-01-01 23:15:17 +08:00
Fabian Boehm
20d36cd9a2 set: Remove a broken array read
Hardcode "--erase" as a hack, because "argv[-1]" is *not* a thing.

Introduced in aacc71e585.

Fixed in master by no longer being C++.
2024-01-01 15:13:23 +01:00
David Adam
be0ea9862c CHANGELOG: work on 3.7.0 2024-01-01 22:01:45 +08:00
Fabian Boehm
d6833edf54 CHANGELOG 2024-01-01 00:14:26 +01:00
Fabian Boehm
5c532ace5a CHANGELOG umask fix 2023-12-31 19:40:18 +01:00
Fabian Boehm
3b9b84101a umask: Correctly handle empty symbolic value
Simple return/echo confusion.

Fixes #10177

(cherry picked from commit b895cf49ca)
2023-12-31 19:39:38 +01:00
jydeng
4c616c56b2 add more subcommands for apt (#10100)
(cherry picked from commit b9b850f286)
2023-12-31 23:01:03 +08:00
David Adam
8a447355a2 CHANGELOG: work on 3.7.0 2023-12-31 22:37:18 +08:00
Johannes Stölp
58d1467fb7 [doc]: fix --path description of set cmd
(cherry picked from commit 1cba28c120)
2023-12-31 13:30:10 +08:00
David Adam
8508cc50b0 CHANGELOG: work on 3.7.0 2023-12-31 13:07:02 +08:00
David Adam
1b3f7cf2e5 themes/Nord: include license tag
(cherry picked from commit 31eb429add)
2023-12-31 13:03:01 +08:00
David Adam
6d9c32728e docs/license: note Nord theme license
(cherry picked from commit ea34f71e1c)
2023-12-31 13:03:00 +08:00
David Adam
e0282d0174 docs/license: remove duplication 2023-12-31 12:58:39 +08:00
Johannes Altmanninger
dc90093f8b completions: use POSIX character classes with sed
\s and \S are not supported BSD sed.

Fixes #10163

(cherry picked from commit 81c8cd1b61)
2023-12-31 12:32:52 +08:00
Rudolf Lovrenčić
bfe47e5979 Add object files to ninja completions
When working on a C or C++ projects, it is often handy to compile a
single file (e.g. large refactoring where many files fail to compile so
compiling a single file results in less compiler errors making the compiler
output significantly easier to read and navigate). Current completion offers
only ninja targets which are usually just top level binaries. This commit makes
object files and library files to be offered in the ninja completion.

The change is inspired by the zsh ninja completion [1], but aims to reduce noise
by only matching for entries ending in ".o", ".so" or ".a".

[1] c828f06e08/src/zsh/_ninja (L30)

(cherry picked from commit 2e89e0c205)
2023-12-31 12:32:02 +08:00
Damien Picard
99254d74fe completions: improve Blender completions
- Replace short options with old-style options: even though they are
  single-letter, Blender's options cannot be combined.
- Add comments to separate blocks of options, mirroring Blender's help message.
- Add missing options: render-frame, python-use-system-env, register-allusers,
  unregister, unregister-allusers.
- Remove options: debug-gpu-disable-ssbo, debug-gpu-renderdoc, -R.
- Fix typos:
  - debug-depsgraph-eval (was -evel)
  - debug-depsgraph-pretty (was -time)
  - app-template (was open-last)
- Update output formats:
  - Add descriptions.
  - Add HDR, TIFF, OpenEXR, OpenEXR Multilayer, FFmpeg, Cineon, DPX, JPEG 2000,
    and WebP, which are optional but generally available.
  - Remove IRIZ, which is no longer available.
- Fix arguments for --use-extension: they should be 0 or 1, not true or false.
- Make env-system-* options require a parameter.
- Improve --add-ons by querying the list of add-ons inside Blender rather than a
  hardcoded path. This is because Blender's add-on modules may come from many
  different paths which depend on platform.
- Fix __blender_echo_input_file_name, by relying on extension.
- Fix listing of scene datablocks inside Blend file.
- Add listing of Python text datablocks to execute inside Blend file.

Closes #10150

(cherry picked from commit 9132684617)
2023-12-31 12:30:54 +08:00
Fabian Boehm
0af930d992 Add doctl completion
Just calling a generation thing

(cherry picked from commit e682ffaf11)
2023-12-31 12:21:25 +08:00
sigmaSd
7c20fe8cc6 use a better method
(cherry picked from commit df3c5ab402)
2023-12-31 12:18:48 +08:00
sigmaSd
25f16f0bfd fix deno task completion for jsonc
(cherry picked from commit f924f06df7)
2023-12-31 12:18:48 +08:00
Fabian Boehm
1562a6b99e completions/git: Disable log signatures
Fixes #10144

(cherry picked from commit a2d0016cc1)
2023-12-31 11:36:49 +08:00
Fabian Boehm
1af5fb64b7 vi-bindings: Make "/" open pager and go to insert mode
Fixes #10141

(cherry picked from commit dbdef5d267)
2023-12-31 11:36:01 +08:00
Amy Grace
e2ab7397ac completions: add BSD calendar
(cherry picked from commit d1a906026a)
2023-12-31 11:33:45 +08:00
Amy Grace
e613adda69 completions: add rename (#10136)
* completions: add rename

* add completions for other versions of `rename`

(cherry picked from commit 00ffc397b4)
2023-12-31 11:32:11 +08:00
Amy Grace
80cb735cbe completions: add smerge (Sublime Merge CLI tool) (#10135)
* completions: add smerge (Sublime Merge CLI tool)

* completions: add `-o` (and file completion) to `smerge mergetool`

(cherry picked from commit b7a85fe172)
2023-12-31 11:30:36 +08:00
Ivan Kovnatsky
c0cc78cb54 Add git branch --[no-,contains] completions (#10133)
* Add `git branch --[no-,contains]` completions

* Add __fish_git_commits as an argument

(cherry picked from commit 8c36c21e2e)
2023-12-31 11:29:49 +08:00
SanskritFritz
5b1b466f97 Tab completions for ncdu completed
(cherry picked from commit 684f44bca3)
2023-12-31 11:28:48 +08:00
Fabian Boehm
4d858b3f88 completion: Set up wrapping for gw/gradlew
These were set up as commands in the actual gradle completions, but
they would never be loaded.

(cherry picked from commit 180692fb29)
2023-12-31 11:15:21 +08:00
ridiculousfish
b28eae8be9 Allow custom completions to have leading dots
By default, fish does not complete files that have leading dots, unless the
wildcard itself has a leading dot. However this also affected completions;
for example `git add` would not offer `.gitlab-ci.yml` because it has a
leading dot.

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

Fixes #3707.

(cherry picked from commit b7de768c73)
2023-12-31 09:55:09 +08:00
David Adam
f6676350a7 CHANGELOG: work on 3.7.0 2023-12-31 09:53:20 +08:00
Nater0214
b10611091f completions: add airmon-ng
(cherry picked from commit ca705fcbb5)
2023-12-31 09:47:58 +08:00
NextAlone
c1f1a92b99 completion(usbip): support ipv6 (#10113)
* completion(usbip): support ipv6

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

* completion(usbip): use fish string match

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

* fix: support --remote and -r both

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

---------

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit 382005c33e)
2023-12-31 09:46:39 +08:00
Nater0214
25ae69dac1 completions: add checkinstall
(cherry picked from commit 1a42c97f75)
2023-12-30 23:27:04 +08:00
Dmitriy Shishkov
963166c7ed Replaced double quotation marks with single in dnf.fish completions
(cherry picked from commit bd4adf86f4)
2023-12-30 23:23:06 +08:00
exploide
0acf05eca0 completions: improved netcat completions
- enhanced ncat completions

(cherry picked from commit a390e36e9d)
2023-12-30 23:21:38 +08:00
Asuka Minato
a307ca3680 Update tar.fish (#10079)
* Update tar.fish

* add more long options

* add more options

(cherry picked from commit 9f9accf203)
2023-12-30 23:16:23 +08:00
Fabian Boehm
3ac531785e Add __fish_anypager helper
This makes it easier to get *any pager* in the number of places we do.

Unfortunately:

1. It can't just execute the pager because that might block
2. We can't really set the necessary options for less here
   so they still need to be set outside.

This

Fixes #10074

by falling back to `cat` in that case. We could also decide to abort
instead of using a non-pager, but for history that's probably fine.

(cherry picked from commit ed489d0d52)
2023-12-30 23:15:40 +08:00
Johannes Altmanninger
b11db052cb functions/history.fish: also save when called with --exact
After deleting a history item with

    history delete --exact --case-sensitive the-item

it is still reachable by history search until the shell is restarted.

Let's fix this by saving history after each deletion.  The non-exact variants
of "history delete" already do this.  I think this was just an oversight
owed to the fact that hardly anyone uses "--exact" (else we would surely
have changed it to not require an explicit "--case-sensitive").

(cherry picked from commit 326e62515b)

Fixes #10066
2023-12-30 22:46:58 +08:00
Amy Grace
36ed2b79c2 completions: add xxd
Closes #10137
2023-12-30 10:18:30 +01:00
Grzegorz Milka
03198b7fd3 Add git stash push completions
Closes #10147
2023-12-30 10:09:00 +01:00
tangowithfoxtrot
7370e38069 add completions for bws
Closes #10165
2023-12-30 09:31:33 +01:00
David Adam
ba57704276 CHANGELOG: work on 3.7.0 2023-12-29 23:56:46 +08:00
Eric N. Vander Weele
65beb9307a themes: Synchronize Nord theme in adherence to color palette guidelines
Adhere as best as possible to the style guidelines at
https://www.nordtheme.com/docs/colors-and-palettes. Some adaptations were made
so that `functions <function>` is also syntax highlighted per the upstream
recommendations.

Additionally, the theme file has been reordered to follow the order of variables
defined in interactive syntax-highlighting-variables documentation.

(cherry picked from commit 48ef682cad)
2023-12-29 23:46:55 +08:00
Florian Meißner
afc672e52f Fix typo in read doc
(cherry picked from commit b16a869907)
2023-12-29 23:45:07 +08:00
may
09ac6f8703 update npm completions (#9800)
* update npm install completions

* update npm uninstall

* init npm dep rewrite

+ init npm

* npm uninstall complete global packages

* add npm pack completions

* add npm publish completions

* add npm init completions

* add missing commands, remove outdated, add missing aliases

* add npm audit completions

* implement requested changes

* rename __yarn_ to __npm_

* add missing commands / aliases

* slightly less verbose options, reword dry-run description (meh)

* more commands and options

* add and update completions for several commands

* access, adduser, bugs, ci, config, cache
* dedupe, deprecate, dist-tag, diff, docs, doctor
* edit, exec, explain, explore, find-dupes, fund
* hooks, help-search, install, ls, publish, search
* version, view

* more commands, fixes

* fish_indent

* remove most aliases from command suggestions

* add most other commands

* npm help, --help

* minor fixes

* remove npm builtin completion, new install option, fish_indent

* add completions for npm set, npm get

(cherry picked from commit d19a08cd8c)
2023-12-29 23:34:13 +08:00
Husam Harazi
6871f5d6e4 Add wpctl completions (#10043)
* Add wpctl completions

* Reviewed comments

(cherry picked from commit 3c814bf53d)
2023-12-29 23:15:25 +08:00
Kid
3a86ce87c0 Add --verbose completion to fish_key_reader
This was missing from #8467.

(cherry picked from commit 84e6344c91)
2023-12-29 23:13:01 +08:00
exploide
7d1090b6de completions: added userdel from shadow-utils
(cherry picked from commit 5d0efbf2e8)
2023-12-29 23:11:20 +08:00
Oliver Schrenk
a976589e93 fix typo in set -U option
(Partially cherry picked from commit 631f2c073c)
2023-12-29 23:10:25 +08:00
Nunzio Cicone
ced76a4576 update entr completions
(cherry picked from commit 85deb76c5f)
2023-12-29 22:32:56 +08:00
NextAlone
83185774db completion(loginctl): fix sessions with ssh or other states (#10038)
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit 7250e6fa6a)
2023-12-29 22:29:07 +08:00
Marcelo Mendes Spessoto Junior
6a7d93d9c5 Shortening node.fish completions
Signed-off-by: Marcelo Mendes Spessoto Junior <marcelospe@shinji.linux.ime.usp.br>
(cherry picked from commit 7534572d99)
2023-12-28 22:46:56 +08:00
Fabian Boehm
2fe8b5d313 Don't replace tilde for error messages if we have no $HOME
This was an issue with "--no-execute", which has no variables and
therefore no $HOME:

```fish
fish --no-execute /path/to/file
```

would say the error is in `~/path/to/file`.

Instead, since this is just for a message, we simply return the
filename without doing the replacement.

Fixes #10171

Port of e318585021
2023-12-28 10:20:28 +01:00
Christian Fersch
7008e0eec2 git completion: Handle aliases referencing other aliases (#9992)
(cherry picked from commit 1980a22522)
2023-12-28 11:06:04 +08:00
David Adam
8707c05b7b CHANGELOG: work on 3.7.0 2023-12-27 22:58:33 +08:00
figurantpp
7c21e9c36e Removed type declarations from node descriptions
(cherry picked from commit 5a934e7ae3)
2023-12-27 22:47:27 +08:00
David Adam
ecf8ac6f66 CHANGELOG: work on 3.7.0 2023-12-26 23:24:00 +08:00
Fabian Boehm
6df2fac132 prompt_pwd: Fix missing --
Fixes #10169

(cherry picked from commit b1a1a3b0a7)
2023-12-26 09:00:26 +08:00
Fabian Boehm
f116a81250 Make default theme use named colors only
This gives us the biggest chance that these are *visible* in the
terminal, which allows people to choose something nicer.

It changes two colors - the autosuggestion and the pager
description (i.e. the completion descriptions in the pager).

In a bunch of terminals I've tested these are pretty similar - for the
most part brblack for the suggestions is a bit brighter than 555, and
yellow for the descriptions is less blue
than the original.

We could also make the descriptions brblack, but that's for later.

Technically we are a bit naughty in having a few foreground and
background pairs that might not be visible,
but there's nothing we can do if someone makes white invisible on brblack.

Fixes #9913
Fixes #3443

(cherry picked from commit ed881bcdd8)
2023-12-25 21:31:45 +08:00
Fabian Boehm
ef43069a06 completions/pactl: Fix matching objects
This didn't work for something like `pactl set-card-profile foo
<TAB>`,
because it didn't allow for the card name, as it would just print the
index again and again.

(cherry picked from commit 5f26c56ed5)
2023-12-25 21:25:55 +08:00
elyashiv
2d1a6561e1 [tests] added test for escaped job summary
(cherry picked from commit 3fbff14e9b)
2023-12-25 19:51:33 +08:00
elyashiv
51d5764fb2 [jobs.cpp] added const to escaped cmd string
(cherry picked from commit 4a2c7e38d0)
2023-12-25 19:51:33 +08:00
elyashiv
1ab24e4048 [jobs.cpp] add escaping for job comamnd
(cherry picked from commit 4ea867bc55)
2023-12-25 19:51:33 +08:00
Fabian Boehm
f7ce49a3a9 docs: Add "Writing your own prompt" doc (#9841)
* docs: Add "Writing your own prompt" doc

* Remove a space from the "output"

* some teensy adjustments

* Address feedback

* envvar one more PWD

* More html warning

(cherry picked from commit c385027eca)
2023-12-25 19:21:16 +08:00
Rocka
8319011f24 completions: fix qdbus Q_NOREPLY method completion
(cherry picked from commit c21e13e62e)
2023-12-24 22:58:39 +08:00
David Adam
b12c36e72d CHANGELOG: work on 3.7.0 2023-12-23 23:24:45 +08:00
Fabian Boehm
c54d48f3f9 history: Allow deleting ranges
This allows giving a range like "5..7".

It works in combination with more (including overlapping) ranges or
single indices.

Fixes #9736

(cherry picked from commit 65769bf8c8)
2023-12-23 23:00:50 +08:00
David Adam
446a41e23a CHANGELOG: work on 3.7.0 2023-12-20 00:23:45 +08:00
Quinten Roets
95c3a4045b fish_vi_cursor: add new variable for external cursor mode (#9565)
* add new variable for external cursor mode

* fix backwards compatibility

* add documentation

* document change in changelog

(cherry picked from commit f5506803d7)
2023-12-20 00:06:56 +08:00
rymrg
6295e32f25 Improve fossil prompt execution time (#9528)
* Improve prompt execution time

* Change status to changes

* Remove grep/awk/sort

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

* Make look more consistent with git

(cherry picked from commit 43b1be0579)
2023-12-19 23:53:54 +08:00
David Adam
313b2993f5 Merge branch 'Integration_3.6.4' into Integration_3.7.0 2023-12-08 11:49:02 +08:00
David Adam
112178a2ac Release 3.6.4 2023-12-05 22:16:18 +08:00
Fabian Boehm
b2ef44a277 Switch test to using our printf
This test wants to generate a U+FDD2 to see it is not mishandled.

To do so, we tried to use sh, which on my system is bash and can do
`$'\ufdd2'`.

Unfortunately on other systems it might be dash, which won't do that.

Since I don't know of a good no-dependency portable way to generate
this (I dimly remember python3 being a shim on some systems, so I do
not want to invoke it here), we'll just use our own printf.

Which is a worse test, we control both parts, but it'll do.

Fixes #10134
2023-12-04 19:30:31 +01:00
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
Alex Chan
efd5db4a85 Add a missing space after a comma
(cherry picked from commit ccc8308d41)
2023-11-26 22:45:11 +08:00
Fabian Boehm
8d5d0c24aa expand_cmdsubst: Make more errors known
These printed "Unknown error while evaluating command substitution".

Now they print something like

```
fish: for: status: cannot overwrite read-only variable
for status in foo; end
    ^~~~~^
in command substitution
fish: Invalid arguments
echo (for status in foo; end)
     ^~~~~~~~~~~~~~~~~~~~~~~^
```

for `echo (for status in foo; end)`

This is, of course, still not *great*. Mostly the `fish: Invalid
arguments` is basically entirely redundant.

An alternative is to simply skip the error message, but that requires some
more scaffolding (describe_with_prefix adds some error messages on its
own, so we can't simply say "don't add the prefix if we don't have a
message")

(cherry picked from commit 1b5eec2af6)
(cherry picked from commit 67faa107b0)
2023-11-09 17:53:32 +01:00
Fabian Boehm
255653bf32 docs: Make the vendor dirs a nested list
(cherry picked from commit f81c9cba50)
2023-11-07 19:59:32 +01:00
Fabian Boehm
80000ef4d5 Document $__fish_vendor_confdirs and __fish_build_paths
Fixes #10078

(cherry picked from commit ddd9d183e2)
2023-11-07 19:59:32 +01:00
Fabian Boehm
a7b96fc4ab completions/dnf: Remove "offline-upgrade upgrade"
Fixes #10081

(cherry picked from commit 676da369b4)
2023-11-07 19:59:32 +01:00
Fabian Boehm
657c132dee docs: Fix link
(cherry picked from commit 8fea3cb56d)
2023-11-07 19:59:32 +01:00
Nicholas Rodrigues Lordello
f775ab6ef4 Additional checks for -F support
(cherry picked from commit 93b3a0c1f5)
2023-11-07 19:59:32 +01:00
Nicholas Rodrigues Lordello
66401f8575 ls No Longer Sets LS_COLORS
(cherry picked from commit 5cf36bf3f8)
2023-11-07 19:59:29 +01:00
Wadii Hajji
3444e1cbf3 fix(git): add force-if-includes completion
(cherry picked from commit 3f7fdd5693)
2023-11-07 19:58:08 +01:00
Asuka Minato
be75769564 Update find.fish
add -D and -nowarn

(cherry picked from commit 754e81afa3)
2023-11-07 19:58:08 +01:00
Fabian Boehm
572374333d docs: More on key timeout, key chord limitations
(cherry picked from commit 496fc03b98)
2023-10-24 18:27:14 +02:00
Fabian Boehm
c883d73145 Work on 3.7.0 CHANGELOG 2023-10-17 17:49:34 +02:00
Johannes Altmanninger
211a3ceee1 Copy history pager search field to command line on Enter if no match
Closes #9934

(cherry picked from commit b7f7dcf788)
2023-10-17 17:34:40 +02:00
Johannes Altmanninger
64bff1a51c history pager: delete selected history entry with Shift-Delete
After accidentally running a command that includes a pasted password, I want
to delete command from history. Today we need to recall or type (part of)
that command and type "history delete".  Let's maybe add a shortcut to do
this from the history pager.

The current shortcut is Shift+Delete. I don't think that's very discoverable,
maybe we should use Delete instead (but only if the cursor is at the end of
the commandline, otherwise delete a char).

Closes #9454

(cherry picked from commit 052823c120)
2023-10-17 17:25:11 +02:00
Eddie Lebow
e1c2a4e50c Include subsequence matches in history-pager
If a `contains` search yields no results, try again with `contains_subsequence`.

(cherry picked from commit 00692bcdfe)
2023-10-17 17:04:25 +02:00
Fabian Boehm
85c03e4b67 wildcard: Rationalize file/command completions (#10052)
* wildcard: Remove file size from the description

We no longer add descriptions for normal file completions, so this was
only ever reached if this was a command completion, and then it was
only added if the file wasn't a regular file... in which case it can't
be an executable.

So this was dead.

* Make possible_link() a maybe

This gives us the full information, not just "no" or "maybe"

* wildcard: Rationalize file/command completions

This keeps the entry_t as long as possible, and asks it, so especially
on systems with working d_type we can get by without a single stat in
most cases.

Then it guts file_get_desc, because that is only used for command
completions - we have been disabling file descriptions for *years*,
and so this is never called there.

That means we have no need to print descriptions about e.g. broken symlinks, because those are not executable.

Put together, what this means is that we, in most cases, only do
an *access(2)* call instead of a stat, because that might be checking
more permissions.

So we have the following constellations:

- If we have d_type:
  - We need a stat() for every _symlink_ to get the type (e.g. dir or regular)
    (this is for most symlinks, if we want to know if it's a dir or executable)
  - We need an access() for every file for executables
- If we do not have d_type:
  - We need a stat() for every file
  - We need an lstat() for every file if we do descriptions
    (i.e. just for command completion)
  - We need an access() for every file for executables

As opposed to the current way, where every file gets one lstat whether
with d_type or not, and an additional stat() for links, *and* an
access.

So we go from two syscalls to one for executables.

* Some more comments

* rust link option

* rust remove size

* rust accessovaganza

* Check for .dll first for WSL

This saves quite a few checks if e.g. System32 is in $PATH (which it
is if you inherit windows paths, IIRC).

Note: Our WSL check currently fails for WSL2, where this would
be *more* important because of how abysmal the filesystem performance
on that is.
2023-10-14 08:46:14 +02:00
Fabian Boehm
6be5b02231 Test for mktemp completion
Turns out fish isn't in $PATH on the CI systems

(cherry picked from commit 136dc6ce28)
2023-10-08 22:00:57 +02:00
Fabian Boehm
71ef8d317a fish_config: Fix save with variable with multiple values
Your basic quoting problem, regressed in 3.6.0

(cherry picked from commit 098b7093da)
2023-10-08 21:57:08 +02:00
Fabian Boehm
1b98566f3d docs/set: Correct some errors
(cherry picked from commit ad54f07328)
2023-10-08 21:57:08 +02:00
yanshay
8a8c7abb0f added support for fish_sequence_key_delay_ms to set how long to wait between sequence key presses 2023-10-08 21:56:06 +02:00
Fabian Boehm
724b44907e Reduce stat calls for wildcards ending in "/" (#10032)
This makes it so expand_intermediate_segment knows about the case
where it's last, only followed by a "/".

When it is, it can do without the file_id for finding links (we don't
resolve the files we get here), which allows us to remove a stat()
call.

This speeds up the case of `...*/` by quite a bit.

If that last component was a directory with 1000 subdirectories we
could skip 1000 stat calls!

One slight weirdness: We refuse to add links to directories that we already visited, even if they are the last component and we don't actually follow them. That means we can't do the fast path here either, but we do know if something is a link (if we get d_type), so it still works in common cases.

(cherry picked from commit 86803e4442)
2023-10-08 17:15:20 +02:00
Fabian Boehm
18c65df3c7 Add a clear-screen bind function to clear the screen (#10044)
This can be bound like `bind \cl clear-screen`, and is, by default

In contrast to the current way it doesn't need the external `clear`
command that was always awkward.

Also it will clear the screen and first draw the old prompt to remove
flicker.
Then it will immediately trigger a repaint, so the prompt will be overwritten.

(cherry picked from commit c4ca1a68d3)
2023-10-08 17:15:20 +02:00
Mathijs Henquet
4b12671b1c Fix out of scope opt variable (#10020)
* Fix out of scope opt variable

* Update ls.fish

(cherry picked from commit a809672412)
2023-10-08 17:15:20 +02:00
Fabian Boehm
11304f00cf Apply variable overrides for exec
Fixes #9995

(cherry picked from commit 496d65fb5d)
2023-10-08 17:15:20 +02:00
Fabian Boehm
ac64331217 reader: Only move cursor if needed for repaint-mode
This uses "screen.reset_line" to move the cursor without informing the
reader's machinery (because that deals with positions *in the
commandline*), but then only repainted "if needed" - meaning if the
reader thought anything changed.

That could lead to a situation where the cursor stays at column 0
until you do something, e.g. in

```fish
bind -m insert u undo
```

when you press alt+u - because the *escape* calls repaint-mode, which
puts the cursor in column 0, and then the undo doesn't, which keeps it
there.

Of course this binding should also `repaint-mode`, because it changes
the mode.

Some changes might be ergonomic:

1. Make repaint-mode the default if the mode changed (we would need to
skip it for bracketed-paste)
2. Make triggering the repaint easier - do we need to set
force_exec_prompt_and_repaint to false here as well?

Anyway, this

Fixes #7910

(cherry picked from commit ff433b0cb2)
2023-10-08 17:15:20 +02:00
Fabian Boehm
04492a1a23 open: Don't run xdg-open in the background
This was introduced as a workaround to #7215 - xdg-open's generic path
wouldn't background graphical apps.

This has been fixed a month ago in xdg-open, so we can stop doing it.

The good news is this also allows terminal apps to be used again, so
it

Fixes #10045

(cherry picked from commit f8e38819a5)
2023-10-08 17:15:20 +02:00
Xiretza
52276e4766 completions/pacman: fix -Qp completing packages, not files
--file/-p makes -Q interpret the command line argument as a package file
rather than a package name.

(cherry picked from commit 0cdf801d0b)
2023-10-08 17:15:20 +02:00
Kevin F. Konrad
bd6471d2ce add completions for crc and oc (#10034)
(cherry picked from commit 269c9c3f0c)
2023-10-08 17:15:20 +02:00
Roland Fredenhagen
542e23e87b completions: add watchexec (#10027)
* completions: add watchexec

* review

(cherry picked from commit e6bef40c22)
2023-10-08 17:15:20 +02:00
Fabian Boehm
577dc2be94 screen: Unset color at the end of a line even without clr_eol
This is a sensible thing to do, and fixes some cases where we're
state-dependent.

E.g. this fixes the case in the pager where some things are bold and
some aren't, because that bolding is (rather awkwardly) implicitly
triggered when we have a background, and so we don't notice we need to
re-do that bolding after we moved to the next line because we think we
still have the same color.

Fixes #9617

(cherry picked from commit 10d91b0249)
2023-10-08 17:15:20 +02:00
Charlotte
3027bc355b completions/pkill: use locals.
(cherry picked from commit 7c5777a82a)
2023-10-08 17:15:20 +02:00
NextAlone
9ea7465ab4 completion(loginctl): complete sessions, users, seats (#10023)
* completion(loginctl): complete sessions, users, seats
* fix: rename functions and use builtin to parse strings
* fix: duplicate commands

(cherry picked from commit 3bcde90a88)
2023-10-08 17:15:20 +02:00
Fabian Boehm
57bd21e7ce __fish_complete_command: Fix --foo= logic
This was already supposed to handle `--foo=bar<TAB>` cases, except it
printed the `--foo=` again, causing fish to take that as part of the
token.

See #9538 for a similar thing with __fish_complete_directories.

Fixes #10011

(cherry picked from commit b03327f5d2)
2023-10-08 17:15:20 +02:00
Jason Nader
1119f68e66 completions: add ibmcloud (#10004)
* completions: add ibmcloud

* Update ibmcloud.fish

(cherry picked from commit d6e234c60c)
2023-10-08 17:15:20 +02:00
Asuka Minato
8235fd49ce add gcc completion for link lib (#10007)
* add completion for lib

* use path basename && use -a

(cherry picked from commit 3bf80b2374)
2023-10-08 17:15:20 +02:00
Fabian Boehm
67a0c04605 reader: Use existing search string when opening the history pager
I sometimes find myself doing something like this:

- Look for a commandline that includes "echo" (as an example)
- Type echo, press up a few times
- I can't immediately find what I'm looking for
- Press ctrl-r to open up the history pager
- It uses the current commandline as the search string,
  so now I'm looking for "echo foobar"

This makes it so if the search string already is in use, that's what
the history-pager picks as the initial search string.

(cherry picked from commit 5b44c26a19)
2023-10-08 17:15:20 +02:00
Fabian Boehm
465da28f20 docs/commandline: Add more on the -oc/-ct thing
This was the remaining immediately actionable part of #7375.

It's not definitely the last word, but a change here would require a
bigger plan.

Fixes #7375

(cherry picked from commit 0e81d25b36)
2023-10-08 17:15:20 +02:00
Xiretza
0b1aa0b12e completions: make: respect line continuations in recipes
Without this, a recipe containing a trailing backslash followed by a line not
beginning with tab (like any non-continued recipe lines would) would result in
the continuation showing up in completions.

Whenever a line ends in a backslash, consider the next line invalid as a target.

Regex explanation:

^([^#]*[^#\\])? -- optional prefix not containing comment character and not
                   ending in backslash
(\\\\)*\\$      -- 2n+1 backslashes at end of line (handles escaped backslashes)

(cherry picked from commit fff320b56b)
2023-10-08 17:15:20 +02:00
ghostflyby
f82f92df13 completion for macOS java_home
(cherry picked from commit 33ec25da8a)
2023-10-08 17:15:20 +02:00
Yuntao Zhao
34c19bcee1 Improve completion for rpm-ostree (#9910)
* Some temporary change until compose - commit

* First draft

* Fix an error that prints double completion

* Fix completion errors. Add rpm-ostree alias.

Fix cimpletion where it trigger by multiple commands.
Add update and remove, which are aliases for upgrade and uninstall.

* Remove -r when it is unnecessary

Some command need path completion for arguments no matter what,
which makes -r flag useless

* Remove -x for compose image
-x does not block the path anyway

* Add missing short otpion in compose image

Revert the last change to block -l completion

* Fix description

Fix multiple description.

(cherry picked from commit 9d0d16686e)
2023-10-08 17:15:20 +02:00
Jason Nader
80e5f6b2f8 scp completions: fix path escaping
(cherry picked from commit f6123d235c)
2023-10-08 17:15:20 +02:00
Fabian Boehm
65db0b2ec8 fish_key_reader: Humanize key descriptions
This used to print all codepoints outside of the ASCII range (i.e.
above 0x80) in \uXXXX or \UYYYYYYYY notation.

That's quite awkward, considering that this is about keys that are
being pressed, and many keyboards have actual symbols for these on
them - I have an "ö" key, so I would like to use `bind ö` and not
`bind \u00F6`. So we go by iswgraph.

On a slightly different note, `\e` was written as `\c[ (or \e)`. I do
not believe anyone really uses `\c[` (the `[` would need to
be escaped!), and it's confusing and unnecessary to even mention that.

(cherry picked from commit 55c425a0dd)
2023-10-08 17:15:17 +02:00
Fabian Boehm
4d59d9cfb5 Also allow command and in a pipeline
Similar to `time`, except that one is more common as a command.

Note that this will also allow `builtin and`, which is somewhat
useless, but then it is also useless outside of a pipeline.

Addition to #9985

(cherry picked from commit b454b3bc40)
2023-10-06 18:54:25 +02:00
Fabian Boehm
7815cb363c parse_util: Only reject time in a pipeline without decorator
This allows e.g. `foo | command time`, while still rejecting `foo | time`.

(this should really be done in the ast itself, but tbh most of
parse_util kinda should)

Fixes #9985

(cherry picked from commit 482616f101)
2023-10-06 18:50:02 +02:00
Fabian Boehm
651c1d2dc8 Css refresh (#9982)
This cleans up the CSS, reduces the number of different colors and special settings we use.

It increases contrast so we now pass WCAG AAA (according to chromium), and switches to css variables for colors to make dark mode simpler to implement.

(cherry picked from commit b48fa1f1a0)
2023-10-06 18:49:55 +02:00
Fabian Boehm
04b2e9629f math: Fix docs on --scale
Fixes #9983

(cherry picked from commit e555f1b235)
2023-10-06 18:49:55 +02:00
Fabian Boehm
7260e1f828 sample_prompts/scales: Silence one last git call
Fixes #9975

(cherry picked from commit 5b1ff9459a)
2023-10-06 18:49:55 +02:00
Fabian Boehm
136b99839b print_apt_packages: Go back to apt-cache for non-installed packages
Unfortunately, /var/lib/dpkg/status on recent-ish Debian versions at
least only contains the *installed* packages, rendering this solution
broken.

What we do instead is:

1. Remove a useless newline from each package, so our limit would now
let more full package data sets through
2. Increase the limit by 5x

This yields a completion that runs in ~800ms instead of ~700ms on a
raspberry pi, but gives ~10x the candidates, compared to the old
apt-cache version.

This partially reverts 96deaae7d8

(cherry picked from commit 81cd035950)
2023-10-06 18:49:46 +02:00
figurantpp
ab45e4abf2 Shortens rsync completion description
(cherry picked from commit 6473a9c763)
2023-10-06 18:48:25 +02:00
Kevin Cali
9dc0d3a6e8 docs: correct insert mode key
(cherry picked from commit 716001789b)
2023-10-06 18:48:25 +02:00
ysthakur
5354fe1119 Replace more escapes with quotes in man parser (#9961)
* Replace \(aq with "'" in man parser

* Also replace oq, dq, lq, and rq

(cherry picked from commit 0f19d7118b)
2023-10-06 18:48:25 +02:00
Roland Fredenhagen
85267199c7 completions/iwctl: Show network details in completion (#9960)
* completions/iwctl: Show network details in completion

* apply review comments

(cherry picked from commit 556bee6893)
2023-10-06 18:48:25 +02:00
Axlefublr
cf955c07fc fix __fish_list_current_token not recognizing ~ as $HOME (#9954)
* fix __fish_list_current_token not recognizing ~ as $HOME

* right. it was supposed to be $HOME. lol.

(cherry picked from commit fd68aca6ea)
2023-10-06 18:48:25 +02:00
Fabian Boehm
7bf704fe87 docs: Mention fish_cursor_replace
Fixes #9956

(cherry picked from commit c07136e8d3)
2023-10-06 18:37:46 +02:00
Gregory Anders
c5490893c2 Enable PWD reporting for iTerm2
(cherry picked from commit 69ef51f417)
2023-10-06 18:35:51 +02:00
Roland Fredenhagen
4e63cc23a4 Add iwctl completions (#9932)
* Add iwctl completions

* review-comments

* options

(cherry picked from commit 408ab86090)
2023-10-06 18:35:33 +02:00
Emily Grace Seville
c8177bdd30 Add horcrux completion (#9922)
* feat(completions): horcrux

* feat(changelog): mention completion

* fix(completion): condition for -n

(cherry picked from commit f9d21cc21d)
2023-10-06 18:35:32 +02:00
Gabriel Górski
7a60613b79 Simplify and fix __fish_is_zfs_feature_enabled (#9939)
* Simplify and fix `__fish_is_zfs_feature_enabled`

Previously `__fish_is_zfs_feature_enabled` was doing
`<whitespace>$queried_feature<whitespace>` pattern matching which
was skipping the state part expected in the follow-up checking code.

Passing the dataset/snapshot in a `target` argument is pointless. As
none of the existing code attempts to do this plus it is also a
private function (`__` prefix), rename of the argument and removal
of extra text replacement should not be considered a breaking change.

* Changed the `&& \` into `|| return`

* Run `fish_indent`

(cherry picked from commit 21ddfabb8d)
2023-10-06 18:35:26 +02:00
Fabian Boehm
d1f3058c6d Remove a waccess call when completing executables
We have already run waccess with X_OK. We already *know* the file is
executable.

There is no reason to check again.

Restores some of the speedup from the fast_waccess hack that was
removed to fix #9699.

(cherry picked from commit ee75b45687)
2023-10-06 18:35:26 +02:00
AsukaMinato
7e75fe3d37 add gcc completion lm lz lrt (#9919)
add some gcc completion options

(cherry picked from commit 9a9e133b18)
2023-10-06 18:35:26 +02:00
AsukaMinato
f2d8112136 more gcc -O completion
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
(cherry picked from commit 2110b36426)
2023-10-06 18:35:26 +02:00
Emily Grace Seville
cc72a88ba0 Add Krita completions (#9903)
* feat(completions): support Krita

* feat(completions): support summary options for Krita

* feat(completions): support remaining options for Krita

* feat(completions): remove debug instructions

* feat(completions): hide completions for sizes for Krita

* feat(completions): fix Krita

* feat(changelog): mention new completion

* fix(completions): refactor Krita

* fix(completion): reformat

* feat(completion): dynamically generate workspace list

* fix(completion): refactor

* fix(completion): krita

* fix(completions): use printf

(cherry picked from commit 6ce2ffbbb0)
2023-10-06 18:35:25 +02:00
Emily Grace Seville
8430afbead Add Blender completions (#9905)
(cherry picked from commit 8d3885b9cb)
2023-10-06 18:35:16 +02:00
Pavel savchenko
7c44f78490 Docs: correct small grammatical error in read.rst
(cherry picked from commit c56f9e1981)
2023-10-06 18:35:10 +02:00
EmilySeville7cfg
f95b8470a2 feat(completions): gimp support
(cherry picked from commit 2bc605625e)
2023-10-06 18:35:10 +02:00
Henrik Hørlück Berg
a7c8e0cdfb Fix #9899 integer overflow in string repeat
We could end up overflowing if we print out something that's a multiple of the
chunk size, which would then finish printing in the chunk-printing, but not
break out early.

(cherry picked from commit 6325b3662d)
2023-10-06 18:35:06 +02:00
Fabian Boehm
a573d13cf0 completions/unzip: Dangit FreeBSD
No "--help" and the man page doesn't mention "-h".

(cherry picked from commit 0cfdc90551)
2023-10-01 16:23:52 +02:00
Fabian Boehm
9892ce3a5a wildcard: Remove useless access() call for trailing slash
This confirmed that a file existed via access(file, F_OK).

But we already *know* that it does because this is the expansion for
the "trailing slash" - by definition all wildcard components up to
here have already been checked.

And it's not checking for directoryness either because it does F_OK.

This will remove one `access()` per result, which will cut the number
of syscalls needed for a glob that ends in a "/" in half.

This brings us on-par with e.g. `ls` (which uses statx while we use
newfstatat, but that should have about the same results)

Fixes #9891.

(cherry picked from commit 6823f5e337)
2023-10-01 10:37:29 +02:00
Fabian Boehm
72edd888f1 Return a falsey status if the last -c command has a parse error
This makes `fish -c begin` fail with a status of 127 - it already
printed a syntax error so that was weird. (127 was the status for
syntax errors when piping to fish, so we stay consistent with that)

We allow multiple `-c` commands, and this will return the regular
status if the last `-c` succeeded.

This is fundamentally an extremely weird situation but this is the
simple targeted fix - we did nothing, unsuccessfully, so we should
fail.

Things to consider in future:

1. Return something better than 127 - that's the status for "unknown
command"!
2. Fail after a `-c` failed, potentially even checking all of them
before executing the first?

Fixes #9888

(cherry picked from commit a6c36a014c)
2023-10-01 10:37:29 +02:00
Adam J. Stewart
4ba7855699 Docs: fix code block
(cherry picked from commit 72de1dc201)
2023-10-01 10:37:28 +02:00
Adam J. Stewart
8a7a2f67ca Fix grammar in completion docs
(cherry picked from commit e31c0ebb05)
2023-10-01 10:37:28 +02:00
Fabian Boehm
7b9dafb9e4 completions/rclone: Add version parsing
This had a weird, unnecessary and terrible backwards-incompatibility
in how you get the completions out.

I do not like it but I am in a good enough mood to work around it.

See #9878.

(cherry picked from commit bfd97adbda)
2023-10-01 10:37:28 +02:00
pd
330942cc30 Fix rclone autocompletion script sourcing issue in fish shell
(cherry picked from commit ac2810e9ef)
2023-10-01 10:37:28 +02:00
may
d1b7a2e2e7 add stash completions to git show and git diff
(cherry picked from commit e3e7ab77ad)
2023-10-01 10:37:28 +02:00
AsukaMinato
5699e7857a Add i o for unzip (#9850)
* add -I -O for unzip

* for different distroes.

* avoid grep

(cherry picked from commit bab8fb9517)
2023-10-01 10:37:28 +02:00
Fabian Boehm
8525844961 alias: Escape the function name when replacing
Fixes #8720

(cherry picked from commit 38ac21ba5e)
2023-10-01 10:37:28 +02:00
Andre Eckardt
74bea87244 improved print CSS for fish_config
This commit introduces a fishconfig_print.css that contains special CSS styles that only apply when printing the fishconfig page. This is especially useful when the user wants to print out the key bindings.

(cherry picked from commit cbf9a3bbbd)
2023-10-01 10:37:28 +02:00
Amy Grace
c6c6ac1c69 Force use of macOS's builtin manpath
Prevent a useless warning msg if Homebrew's `man-db` is installed and configured

(cherry picked from commit 4c9fa511e8)
2023-10-01 10:37:28 +02:00
Simon Börjesson
0d65d5a422 Redraw pager on new selection when nothing was selected previously
(cherry picked from commit 71c320ca32)
2023-10-01 10:37:28 +02:00
Zehka
f5f1db4f5b fixed a few smaller things in my translations
(cherry picked from commit a0a2475ccb)
2023-10-01 10:37:28 +02:00
Zehka
2d97e24006 another commit to rectify the chaos i created
(cherry picked from commit 6c6d281938)
2023-10-01 10:37:28 +02:00
Zehka
feccbeeee7 added some german translations
(cherry picked from commit b5fae430c0)
2023-10-01 10:37:28 +02:00
Jo
47c90bf5cd Fix a typo in language.rst
(cherry picked from commit 272d123431)
2023-10-01 10:37:28 +02:00
may
3d4d0e50c6 add completions for git update-index (#9759)
* add git update-index completions

* remove todo

* fix leftover from copying lines

* improve and shorten

(cherry picked from commit 6b1e6dd179)
2023-10-01 10:37:28 +02:00
Kevin F. Konrad
2292d30a73 implement completion for age and age-keygen
(cherry picked from commit ffb6168221)
2023-10-01 10:37:28 +02:00
Fabian Boehm
2316676019 create_manpage_completions: Use raw strings for backslashes
python 3.12 emits a SyntaxWarning for invalid escape sequences.

Fixes #9814

(cherry picked from commit 2eba6845c2)
2023-10-01 10:37:28 +02:00
David Adam
7f8d56da16 Licensing: note MIT licensing status of Dracula theme
(cherry picked from commit 4e13b1b5d5)
2023-10-01 10:37:25 +02:00
Wenhao Ho
66399b9a32 feat: sync the dracula official theme
Signed-off-by: Wenhao Ho <wh.ho@outlook.com>
(cherry picked from commit 201610151f)
2023-10-01 09:44:33 +02:00
Fabian Boehm
513e29f7b6 completions/systemctl: Add some missing commands
Fixes #9804

(cherry picked from commit aac30367bf)
2023-10-01 09:44:33 +02:00
Thomas Klausner
40b0a744e9 When using curses, look for libterminfo as well. (#9794)
Supports NetBSD, where libtinfo isn't available but libterminfo is.

(cherry picked from commit 67d1d80f94)
2023-10-01 09:44:33 +02:00
Fabian Boehm
158e9b6829 create_manpage_completions: Also clear already_output_completions
Prevents issues if we try to read a manpage twice - in which case we
could fall back to another parser, creating different results.

Fixes #9787

(cherry picked from commit 5f672ece84)
2023-10-01 09:44:33 +02:00
Fabian Boehm
a1ac529086 completions/dnf: Use lowercase queryformat
See de9c5c5b59

Fixes #9783

(cherry picked from commit d855725965)
2023-10-01 09:44:33 +02:00
Xiretza
fc0e033b82 complete: fix condition to suppress variable autocompletion
(cherry picked from commit b76e6c5637)
2023-10-01 09:44:33 +02:00
Kid
638a29badc Remove kitty completion in favor of official integration
(cherry picked from commit 93dc8485dd)
2023-10-01 09:44:33 +02:00
Yuntao Zhao
87e0edf989 Add rpm-ostree completion (#9669)
* Add rpm-ostree completion

Add basic command completion for rpm-ostree. This should improve the
user experience for fish users using rpm-ostree.

* Shorten rpm-ostree descriptions

---------

Co-authored-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
(cherry picked from commit 20b500dce8)
2023-10-01 09:44:33 +02:00
Jannik Vieten
bdd3733b26 Improve jq completions and add gojq completions
* completions: updated jq completions

* completions: added completions for gojq

* Shorten jq completion descriptions

* Update gojq.fish

Capitalize first letter of descriptions to match other completions.

---------

Co-authored-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
(cherry picked from commit 480133bcc8)
2023-10-01 09:44:33 +02:00
exploide
11f6b78dad completions: added ip neigh completions
(cherry picked from commit 30ae715183)
2023-10-01 09:44:32 +02:00
may
64a2ed761b add recent commits to completion for git switch --detach
(cherry picked from commit beca70458b)
2023-10-01 09:44:32 +02:00
Paiusco
ee53095271 Create fish_[default|vi]_key_bindings documentation
- Create docs file for both vi and default key bindings
- Remove variable mention on `interactive` and point to their own pages

(cherry picked from commit 564039093b)
2023-10-01 09:44:32 +02:00
AsukaMinato
d733092552 add-qjsc-fish (#9731)
* add-qjsc-fish

* fix -o qjsc.fish

(cherry picked from commit f5e063a462)
2023-10-01 09:44:32 +02:00
Fabian Boehm
7c8b309d79 completions/git: Escape custom command names
This can be triggered by having a custom git command in e.g.
`/mnt/c/Program Files (x86)/foo/`.

Fixes #9738

(cherry picked from commit db5c9badad)
2023-09-09 09:28:33 +02:00
Jan Tojnar
8727a7f9e3 Fix composer require completion
When no development dependencies are installed, the completion would crash with:

    KeyError: 'require-dev'

(cherry picked from commit 9e223577aa)
2023-09-09 09:28:33 +02:00
Paweł Piątkowski
4e731123b5 Ansible completion: fix typo in --limit-hosts
(cherry picked from commit bda9d57417)
2023-09-09 09:28:33 +02:00
Eric N. Vander Weele
43c87e13c9 completions/git: Allow switch to complete remote branches
While it is true that `git switch <remote-branch>` errors to disallow a detached
head without the `-d` option, it is valid to use any starting point (commit or
reference) in conjunction with the `-c` option. Additionally, the starting point
can occur before any option.

This enables the following completions:

* `git switch -c <local-name> <any-branch>`
* `git switch <any-branch> -c <local-name>`
* `git switch -d <any-starting-point>`
* `git switch <any-branch> -d`

The trade-off is this does allow for `git switch <remote-branch>` to be
completed with an error.

Note that this logically reverts 7e3d3cc30f.

(cherry picked from commit fdd4bcf718)
2023-09-09 09:28:33 +02:00
AsukaMinato
480e9809f2 add qjs completion
(cherry picked from commit 8a0510a2f2)
2023-09-09 09:28:33 +02:00
AsukaMinato
afd1d2a527 add completion for ar (#9720)
* add completion for ar

* clean the function

* update CHANGELOG

(cherry picked from commit 36e4b0ff30)
2023-09-09 09:28:28 +02:00
Fabian Boehm
045173968e cirrus: Remove jammy-armv7-32bit
Gives an "exec format error"???
2023-09-09 09:15:13 +02:00
Fabian Boehm
c7d5fafc4e Prune Cirrus CI tasks
It's simply too many, especially given we have some tests that need interactivity.
2023-09-09 08:42:55 +02:00
abp
a2bc5709eb completions: Shortened descriptions
- Mainly work is done on gcc
- Some duplicated removed elsewhere

(cherry picked from commit bbe2a2ba9b)
2023-09-08 19:59:34 +02:00
Eric N. Vander Weele
5df36130b7 reader: Apply fish_color_selection fg color and options in vi visual mode
Vi visual mode selection highlighting behaves unexpectedly when the selection
foreground and background in the highlight spec don't match. The following
unexpected behaviors are:

*  The foreground color is not being applied when defined by the
   `fish_color_selection` variable.
* `set_color` options (e.g., `--bold`) would not be applied under the cursor
  when selection begins in the middle of the command line or when the cursor
  moves forward after visually selecting text backward.

With this change, visual selection respects the foreground color and any
`set_color` options are applied consistently regardless of where visual
selection begins and the position of the cursor during selection.

(cherry picked from commit 4ed53d4e3f)
2023-09-08 19:57:56 +02:00
Andy Hall
cf535f0f76 Fix typo in set docs
(cherry picked from commit 6ff971e4c2)
2023-09-08 19:57:56 +02:00
Eric N. Vander Weele
d49072eb0f docs/interactive: Document fish_color_history_current variable
All *.theme files set variables documented in the "Syntax highlighting
variables" section, and fish_color_history_current was missing.

(cherry picked from commit a6e16a11c2)
2023-09-08 19:57:56 +02:00
Miha Filej
e643bd645c completions/mix: Add options for phx.new in 1.7.2 (#9706)
(cherry picked from commit b5bfff9cac)
2023-09-08 19:57:56 +02:00
Marcin Wojnarowski
bb11800d53 Fix adb path completion (#9707)
Support paths with spaces.

(cherry picked from commit 0f1ef34736)
2023-09-08 19:57:56 +02:00
Fabian Boehm
2c460cd664 completions/zfs: Check for zpool
This is an additional tool, and this function is executed on source
time so we'd spew errors.

(also remove an ineffective line - it's probably *nicer* with the
read, but that's not what's currently effectively doing anything)

(cherry picked from commit 85504ca694)
2023-09-08 19:57:56 +02:00
Fabian Boehm
495f6fecbd docs: Chapter on combining redirections
Fixes #5319

(cherry picked from commit d671710656)
2023-09-08 19:57:56 +02:00
ridiculousfish
47587ee05a Revert "Speed up executable command completions"
This reverts commit 0b55f08de2.

This was found to have caused regressions in completions in #9699

(cherry picked from commit c67d77fc18)
2023-09-08 19:57:56 +02:00
Robert Szulist
de5bd624d8 Add Zabbix completions (#9647)
Add Zabbix completions

(cherry picked from commit 9bd1dc14e5)
2023-09-08 19:57:56 +02:00
Fabian Boehm
b4fccb114c __fish_cursor_xterm: Ignore unknown cursor settings
This prevents leaking the escape sequence by printing nonsense, and it
also allows disabling cursor setting by just setting the variable to
e.g. empty.

And if we ever added any shapes, it would allow them to be used on new
fish and ignored on old

Fixes #9698

(cherry picked from commit e45bddcbb1)
2023-09-08 19:57:56 +02:00
Fabian Boehm
3e638517cd completions/git: Don't take options for --{force-,}create
We do the same for checkout -b.

Fixes #9692

(cherry picked from commit bc04abe3ec)
2023-09-08 19:57:56 +02:00
Fabian Boehm
f1a6e77b72 completions/git: Complete branches for --set-upstream-to
See #9538

(cherry picked from commit 563b4d2372)
2023-09-08 19:57:56 +02:00
Fabian Boehm
037f4b9eea __fish_complete_directories: Remove --foo= from token
Otherwise this would complete

`git --exec-path=foo`, by running `complete -C"'' --exec-path=foo"`,

which would print "--exec-path=foo", and so it would end as

`git --exec-path=--exec-path=foo` because the "replaces token" bit was
lost.

I'm not sure how to solve it cleanly - maybe an additional option to
`complete`?

Anyway, for now this
Fixes #9538.

(cherry picked from commit c39780fefb)
2023-09-08 19:57:56 +02:00
Emily Grace Seville
3e6f5999f5 Add md-to-clip completion
- https://github.com/command-line-interface-pages/v2-tooling/tree/main/md-to-clip

(cherry picked from commit ba7785856e)
2023-09-08 19:57:56 +02:00
Chris Wendt
d6bd3d8dc8 Use stack's dynamic completions (#9681)
* Use dynamic completions for stack

* Pass the plain command

(cherry picked from commit 3a72d098e2)
2023-09-08 19:57:56 +02:00
Fabian Boehm
252f521e95 docs: Prevent overflow for narrow screens
Regression from #9003, this is visible on mobile mainly.

Fixes #9690

(cherry picked from commit ca02e88ef1)
2023-09-08 19:57:56 +02:00
Fabian Boehm
3bef75fb79 builtins: Don't crash for negative return values
Another from the "why are we asserting instead of doing something
sensible" department.

The alternative is to make exit() and return() compute their own exit
code, but tbh I don't want any *other* builtin to hit this either?

Fixes #9659

(cherry picked from commit a16abf22d9)
2023-09-08 19:57:41 +02:00
Fabian Boehm
024fae7983 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-09-08 19:54:53 +02:00
nat-418
da601d4d69 feat: add support for fossil-scm in prompt (#9500)
* feat: add support for fossil-scm in prompt

* fix: change directory testing and string matching

(cherry picked from commit cf67709931)
2023-09-08 19:54:53 +02: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
308 changed files with 7930 additions and 2939 deletions

View File

@@ -8,22 +8,6 @@ linux_task:
container: &step
image: ghcr.io/fish-shell/fish-ci/alpine:latest
memory: 4GB
- name: bionic
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic:latest
- name: bionic-asan-clang
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic-asan-clang:latest
- name: bionic-tsan
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic-tsan:latest
- name: bionic-tsan-clang
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/bionic-tsan-clang:latest
- name: centos7
container:
<<: *step
@@ -36,10 +20,6 @@ linux_task:
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/focal-32bit:latest
- name: xenial
container:
<<: *step
image: ghcr.io/fish-shell/fish-ci/xenial:latest
tests_script:
# cirrus at times gives us 32 procs and 2 GB of RAM
@@ -59,9 +39,6 @@ linux_arm_task:
arm_container:
image: ghcr.io/fish-shell/fish-ci/focal-arm64
only_if: $CIRRUS_REPO_OWNER == 'fish-shell'
- name: jammy-armv7-32bit
arm_container:
image: ghcr.io/fish-shell/fish-ci/jammy-armv7-32bit
tests_script:
# cirrus at times gives us 32 procs and 2 GB of RAM
@@ -78,15 +55,9 @@ linux_arm_task:
freebsd_task:
matrix:
- name: FreeBSD 14
freebsd_instance:
image_family: freebsd-14-0-snap
- name: FreeBSD 13
freebsd_instance:
image: freebsd-13-0-release-amd64
- name: FreeBSD 12.3
freebsd_instance:
image: freebsd-12-3-release-amd64
image: freebsd-13-2-release-amd64
tests_script:
- pkg install -y cmake devel/pcre2 devel/ninja misc/py-pexpect git
# BSDs have the following behavior: root may open or access files even if

View File

@@ -1,3 +1,252 @@
fish 3.7.1 (released March 19, 2024)
====================================
This release of fish fixes the following problems identified in fish 3.7.0:
- Deleting the last history entry via ``history delete`` works again (:issue:`10190`).
- Wildcards (``*``) will no longer sometimes generate paths that did not exist (:issue:`10205`).
This release also contains some improvements:
- A crash when trying to run an ELF program with a missing interpreter has been fixed. This crashed in the process after fork, so did not affect the fish process that tried to start the program (:issue:`10199`).
- ``funced`` will now always ``source`` the file after it has written it, even if the contents did not change. This prevents issues if the file was otherwise modified (:issue:`10318`).
- The warning for when a builtin returns a negative exit code was improved, now mentioning the original status (:issue:`10187`).
- Added completions for
- ``cobra-cli`` (:issue:`10293`)
- ``dmidecode`` (:issue:`10368`)
- ``mycli`` (:issue:`10309`)
- ``ollama`` (:issue:`10327`)
- ``pstree`` (:issue:`10317`)
- Some improvements to documentation and completions.
--------------
fish 3.7.0 (released January 1, 2024)
=====================================
This release of fish includes a number of improvements over fish 3.6.4, detailed below. Although work continues on the porting of fish internals to the Rust programming language, that work is not included in this release. fish 3.7.0 and any future releases in the 3.7 series remain C++ programs.
Notable improvements and fixes
------------------------------
- Improvements to the history pager, including:
- The history pager will now also attempt subsequence matches (:issue:`9476`), so you can find a command line like ``git log 3.6.1..Integration_3.7.0`` by searching for ``gitInt``.
- Opening the history pager will now fill the search field with a search string if you're already in a search (:issue:`10005`). This makes it nicer to search something with :kbd:`↑` and then later decide to switch to the full pager.
- Closing the history pager with enter will now copy the search text to the commandline if there was no match, so you can continue editing the command you tried to find right away (:issue:`9934`).
- Performance improvements for command completions and globbing, where supported by the operating system, especially on slow filesystems such as NFS (:issue:`9891`, :issue:`9931`, :issue:`10032`, :issue:`10052`).
- fish can now be configured to wait a specified amount of time for a multi-key sequence to be completed, instead of waiting indefinitely. For example, this makes binding ``kj`` to switching modes in vi mode possible.
The timeout can be set via the new :envvar:`fish_sequence_key_delay_ms` variable (:issue:`7401`), and may be set by default in future versions.
Deprecations and removed features
---------------------------------
- ``LS_COLORS`` is no longer set automatically by the ``ls`` function (:issue:`10080`). Users
that set ``.dircolors`` should manually import it using other means. Typically this would be ``set -gx LS_COLORS (dircolors -c .dircolors | string split ' ')[3]``
Scripting improvements
----------------------
- Running ``exit`` with a negative number no longer crashes fish (:issue:`9659`).
- ``fish --command`` will now return a non-zero status if parsing failed (:issue:`9888`).
- The ``jobs`` builtin will now escape the commands it prints (:issue:`9808`).
- ``string repeat`` no longer overflows if the count is a multiple of the chunk size (:issue:`9900`).
- The ``builtin`` builtin will now properly error out with invalid arguments instead of doing nothing and returning true (:issue:`9942`).
- ``command time`` in a pipeline is allowed again, as is ``command and`` and ``command or`` (:issue:`9985`).
- ``exec`` will now also apply variable overrides, so ``FOO=bar exec`` will now set ``$FOO`` correctly (:issue:`9995`).
- ``umask`` will now handle empty symbolic modes correctly, like ``umask u=,g=rwx,o=`` (:issue:`10177`).
- Improved error messages for errors occurring in command substitutions (:issue:`10054`).
Interactive improvements
------------------------
- ``read`` no longer enables bracketed paste so it doesn't stay enabled in combined commandlines like ``mysql -p(read --silent)`` (:issue:`8285`).
- Vi mode now uses :envvar:`fish_cursor_external` to set the cursor shape for external commands (:issue:`4656`).
- Opening the history search in vi mode switches to insert mode correctly (:issue:`10141`).
- Vi mode cursor shaping is now enabled in iTerm2 (:issue:`9698`).
- Working directory reporting is enabled for iTerm2 (:issue:`9955`).
- Completing commands as root includes commands not owned by root, fixing a regression introduced in fish 3.2.0 (:issue:`9699`).
- Selection uses ``fish_color_selection`` for the foreground and background colors, as intended, rather than just the background (:issue:`9717`).
- The completion pager will no longer sometimes skip the last entry when moving through a long list (:issue:`9833`).
- The interactive ``history delete`` interface now allows specifying index ranges like "1..5" (:issue:`9736`), and ``history delete --exact`` now properly saves the history (:issue:`10066`).
- Command completion will now call the stock ``manpath`` on macOS, instead of a potential Homebrew version. This prevents awkward error messages (:issue:`9817`).
- A new bind function ``history-pager-delete``, bound to :kbd:`Shift` + :kbd:`Delete` by default, will delete the currently-selected history pager item from history (:issue:`9454`).
- ``fish_key_reader`` will now use printable characters as-is, so pressing "ö" no longer leads to it telling you to bind ``\u00F6`` (:issue:`9986`).
- ``open`` can be used to launch terminal programs again, as an ``xdg-open`` bug has been fixed and a workaround has been removed (:issue:`10045`).
- The ``repaint-mode`` binding will now only move the cursor if there is repainting to be done. This fixes :kbd:`Alt` combination bindings in vi mode (:issue:`7910`).
- A new ``clear-screen`` bind function is used for :kbd:`Ctrl` + :kbd:`l` by default. This clears the screen and repaints the existing prompt at first,
so it eliminates visible flicker unless the terminal is very slow (:issue:`10044`).
- The ``alias`` convenience function has better support for commands with unusual characters, like ``+`` (:issue:`8720`).
- A longstanding issue where items in the pager would sometimes display without proper formatting has been fixed (:issue:`9617`).
- The :kbd:`Alt` + :kbd:`l` binding, which lists the directory of the token under the cursor, correctly expands tilde (``~``) to the home directory (:issue:`9954`).
- Various fish utilities that use an external pager will now try a selection of common pagers if the :envvar:`PAGER` environment variable is not set, or write the output to the screen without a pager if there is not one available (:issue:`10074`).
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
Improved prompts
^^^^^^^^^^^^^^^^
- The default theme now only uses named colors, so it will track the terminal's palette (:issue:`9913`).
- The Dracula theme has now been synced with upstream (:issue:`9807`); use ``fish_config`` to re-apply it to pick up the changes.
- ``fish_vcs_prompt`` now also supports fossil (:issue:`9497`).
- Prompts which display the working directory using the ``prompt_pwd`` function correctly display directories beginning with dashes (:issue:`10169`).
Completions
^^^^^^^^^^^
- Added completions for:
- ``age`` and ``age-keygen`` (:issue:`9813`)
- ``airmon-ng`` (:issue:`10116`)
- ``ar`` (:issue:`9720`)
- ``blender`` (:issue:`9905`)
- ``bws`` (:issue:`10165`)
- ``calendar`` (:issue:`10138`)
- ``checkinstall`` (:issue:`10106`)
- ``crc`` (:issue:`10034`)
- ``doctl``
- ``gimp`` (:issue:`9904`)
- ``gojq`` (:issue:`9740`)
- ``horcrux`` (:issue:`9922`)
- ``ibmcloud`` (:issue:`10004`)
- ``iwctl`` (:issue:`6884`)
- ``java_home`` (:issue:`9998`)
- ``krita`` (:issue:`9903`)
- ``oc`` (:issue:`10034`)
- ``qjs`` (:issue:`9723`)
- ``qjsc`` (:issue:`9731`)
- ``rename`` (:issue:`10136`)
- ``rpm-ostool`` (:issue:`9669`)
- ``smerge`` (:issue:`10135`)
- ``userdel`` (:issue:`10056`)
- ``watchexec`` (:issue:`10027`)
- ``wpctl`` (:issue:`10043`)
- ``xxd`` (:issue:`10137`)
- ``zabbix`` (:issue:`9647`)
- The ``zfs`` completions no longer print errors about setting a read-only variable (:issue:`9705`).
- The ``kitty`` completions have been removed in favor of keeping them upstream (:issue:`9750`).
- ``git`` completions now support aliases that reference other aliases (:issue:`9992`).
- The ``gw`` and ``gradlew`` completions are loaded properly (:issue:`10127`).
- Improvements to many other completions.
- Improvements to the manual page completion generator (:issue:`9787`, :issue:`9814`, :issue:`9961`).
Other improvements
------------------
- Improvements and corrections to the documentation.
- The Web-based configuration now uses a more readable style when printed, such as for a keybinding reference (:issue:`9828`).
- Updates to the German translations (:issue:`9824`).
- The colors of the Nord theme better match their official style (:issue:`10168`).
For distributors
----------------
- The licensing information for some of the derived code distributed with fish was incomplete. Though the license information was present in the source distribution, it was not present in the documentation. This has been corrected (:issue:`10162`).
- The CMake configure step will now also look for libterminfo as an alternative name for libtinfo, as used in NetBSD curses (:issue:`9794`).
----
fish 3.6.4 (released December 5, 2023)
======================================
This release contains a complete fix for the test suite failure in fish 3.6.2 and 3.6.3.
--------------
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

@@ -9,8 +9,9 @@ Most of fish is licensed under the GNU General Public License version 2, and
you can redistribute it and/or modify it under the terms of the GNU GPL as
published by the Free Software Foundation.
fish also includes software licensed under the GNU Lesser General Public
License version 2, the OpenBSD license, the ISC license, and the NetBSD license.
fish also includes software licensed under the CMake license, the Python
Software Foundation License version 2, the OpenBSD license, the ISC license,
the NetBSD license, and the MIT license.
Full licensing information is contained in doc_src/license.rst.

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

@@ -79,6 +79,12 @@ list(APPEND CMAKE_REQUIRED_INCLUDES ${CURSES_INCLUDE_DIRS})
find_library(CURSES_TINFO tinfo)
if (CURSES_TINFO)
set(CURSES_LIBRARY ${CURSES_LIBRARY} ${CURSES_TINFO})
else()
# on NetBSD, libtinfo has a longer name (libterminfo)
find_library(CURSES_TINFO terminfo)
if (CURSES_TINFO)
set(CURSES_LIBRARY ${CURSES_LIBRARY} ${CURSES_TINFO})
endif()
endif()
# Get threads.

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

@@ -32,6 +32,7 @@ The following ``argparse`` options are available. They must appear before all *O
**-x** or **--exclusive** *OPTIONS*
A comma separated list of options that are mutually exclusive. You can use this more than once to define multiple sets of mutually exclusive options.
You give either the short or long version of each option, and you still need to otherwise define the options.
**-N** or **--min-args** *NUMBER*
The minimum number of acceptable non-option arguments. The default is zero.
@@ -163,6 +164,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
--------------------
@@ -194,6 +206,37 @@ After parsing the arguments the ``argv`` variable is set with local scope to any
If an error occurs during argparse processing it will exit with a non-zero status and print error messages to stderr.
Examples
---------
A simple use::
argparse h/help -- $argv
or return
if set -q _flag_help
# TODO: Print help here
return 0
end
This just wants one option - ``-h`` / ``--help``. Any other option is an error. If it is given it prints help and exits.
How :doc:`fish_add_path` parses its args::
argparse -x g,U -x P,U -x a,p g/global U/universal P/path p/prepend a/append h/help m/move v/verbose n/dry-run -- $argv
There are a variety of boolean flags, all with long and short versions. A few of these cannot be used together, and that is what the ``-x`` flag is used for.
``-x g,U`` means that ``--global`` and ``--universal`` or their short equivalents conflict, and if they are used together you get an error.
In this case you only need to give the short or long flag, not the full option specification.
After this it figures out which variable it should operate on according to the ``--path`` flag::
set -l var fish_user_paths
set -q _flag_path
and set var PATH
Limitations
-----------

View File

@@ -143,6 +143,9 @@ The following special input functions are available:
``capitalize-word``
make the current word begin with a capital letter
``clear-screen``
clears the screen and redraws the prompt. if the terminal doesn't support clearing the screen it is the same as ``repaint``.
``complete``
guess the remainder of the current token
@@ -199,6 +202,9 @@ The following special input functions are available:
``history-pager``
invoke the searchable pager on history (incremental search); or if the history pager is already active, search further backwards in time.
``history-pager-delete``
permanently delete the history item selected in the history pager
``history-search-backward``
search the history for the previous match
@@ -374,3 +380,6 @@ The escape key can be used standalone, for example, to switch from insertion mod
Holding alt and something else also typically sends escape, for example holding alt+a will send an escape character and then an "a".
fish waits for a period after receiving the escape character, to determine whether it is standalone or part of an escape sequence. While waiting, additional key presses make the escape key behave as a meta key. If no other key presses come in, it is handled as a standalone escape. The waiting period is set to 30 milliseconds (0.03 seconds). It can be configured by setting the ``fish_escape_delay_ms`` variable to a value between 10 and 5000 ms. This can be a universal variable that you set once from an interactive session.
So the escape character has its own timeout configured with :envvar:`fish_escape_delay_ms`.
See also :ref:`Key sequences <interactive-key-sequences>`.

View File

@@ -74,6 +74,10 @@ The following options change the way ``commandline`` prints the current commandl
**-c** or **--cut-at-cursor**
Only print selection up until the current cursor position.
If combined with ``--tokenize``, this will print up until the last completed token - excluding the token the cursor is in.
This is typically what you would want for instance in completions.
To get both, use both ``commandline --cut-at-cursor --tokenize; commandline --cut-at-cursor --current-token``,
or ``commandline -co; commandline -ct`` for short.
**-o** or **--tokenize**
Tokenize the selection and print one string-type token per line.
@@ -120,8 +124,22 @@ The ``echo $flounder >&`` is the first process, ``less`` the second and ``and ec
**$flounder** is the current token.
More examples:
The most common use for something like completions is
::
set -l tokens (commandline -opc)
which gives the current *process* (what is being completed), tokenized into separate entries, up to but excluding the currently being completed token
If you are then also interested in the in-progress token, add
::
set -l current (commandline -ct)
Note that this makes it easy to render fish's infix matching moot - if possible it's best if the completions just print all possibilities and leave the matching to the current token up to fish's logic.
More examples:
::

View File

@@ -1,6 +1,6 @@
.. _cmd-complete:
complete - edit command specific tab-completions
complete - edit command-specific tab-completions
================================================
Synopsis
@@ -8,7 +8,7 @@ Synopsis
.. synopsis::
complete ((-c | --command) | (-p | --path)) COMMAND [OPTIONS]
complete ((-c | --command) | (-p | --path)) COMMAND [OPTIONS]
complete (-C | --do-complete) [--escape] STRING
Description
@@ -72,7 +72,7 @@ The following options are available:
**-h** or **--help**
Displays help about using this command.
Command specific tab-completions in ``fish`` are based on the notion of options and arguments. An option is a parameter which begins with a hyphen, such as ``-h``, ``-help`` or ``--help``. Arguments are parameters that do not begin with a hyphen. Fish recognizes three styles of options, the same styles as the GNU getopt library. These styles are:
Command-specific tab-completions in ``fish`` are based on the notion of options and arguments. An option is a parameter which begins with a hyphen, such as ``-h``, ``-help`` or ``--help``. Arguments are parameters that do not begin with a hyphen. Fish recognizes three styles of options, the same styles as the GNU getopt library. These styles are:
- Short options, like ``-a``. Short options are a single character long, are preceded by a single hyphen and can be grouped together (like ``-la``, which is equivalent to ``-l -a``). Option arguments may be specified by appending the option with the value (``-w32``), or, if ``--require-parameter`` is given, in the following parameter (``-w 32``).

View File

@@ -0,0 +1,27 @@
.. _cmd-fish_default_key_bindings:
fish_default_key_bindings - set emacs key bindings for fish
===============================================================
Synopsis
--------
.. synopsis::
fish_default_key_bindings
Description
-----------
``fish_default_key_bindings`` sets the emacs key bindings for ``fish`` shell.
Some of the Emacs key bindings are defined :ref:`here <emacs-mode>`.
There are no parameters for ``fish_default_key_bindings``.
Examples
--------
To start using vi key bindings::
fish_default_key_bindings

View File

@@ -56,7 +56,7 @@ Example
> fish_key_reader --verbose
Press a key:
# press alt+enter
hex: 1B char: \c[ (or \e)
hex: 1B char: \e
( 0.027 ms) hex: D char: \cM (or \r)
bind \e\r 'do something'

View File

@@ -0,0 +1,36 @@
.. _cmd-fish_vi_key_bindings:
fish_vi_key_bindings - set vi key bindings for fish
===============================================================
Synopsis
--------
.. synopsis::
fish_vi_key_bindings
fish_vi_key_bindings [--no-erase] [INIT_MODE]
Description
-----------
``fish_vi_key_bindings`` sets the vi key bindings for ``fish`` shell.
If a valid *INIT_MODE* is provided (insert, default, visual), then that mode will become the default
. If no *INIT_MODE* is given, the mode defaults to insert mode.
The following parameters are available:
**--no-erase**
Does not clear previous set bindings
Further information on how to use :ref:`vi-mode <vi-mode>`.
Examples
--------
To start using vi key bindings::
fish_vi_key_bindings
or ``set -g fish_key_bindings fish_vi_key_bindings`` in :ref:`config.fish <configuration>`.

View File

@@ -30,7 +30,7 @@ The following options are available:
Inherit completions from the given *WRAPPED_COMMAND*. See the documentation for :doc:`complete <complete>` for more information.
**-e** *EVENT_NAME* or **--on-event** *EVENT_NAME*
Run this function when the specified named event is emitted. Fish internally generates named events, for example,when showing the prompt. Custom events can be emitted using the :doc:`emit <emit>` command.
Run this function when the specified named event is emitted. Fish internally generates named events, for example, when showing the prompt. Custom events can be emitted using the :doc:`emit <emit>` command.
**-v** *VARIABLE_NAME* or **--on-variable** *VARIABLE_NAME*
Run this function when the variable *VARIABLE_NAME* changes value. Note that :program:`fish` makes no guarantees on any particular timing or even that the function will be run for every single ``set``. Rather it will be run when the variable has been set at least once, possibly skipping some values or being run when the variable has been set to the same value (except for universal variables set in other shells - only changes in the value will be picked up for those).

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

@@ -29,7 +29,7 @@ The following operations (sub-commands) are available:
Returns history items matching the search string. If no search string is provided it returns all history items. This is the default operation if no other operation is specified. You only have to explicitly say ``history search`` if you wish to search for one of the subcommands. The ``--contains`` search option will be used if you don't specify a different search option. Entries are ordered newest to oldest unless you use the ``--reverse`` flag. If stdout is attached to a tty the output will be piped through your pager by the history function. The history builtin simply writes the results to stdout.
**delete**
Deletes history items. The ``--contains`` search option will be used if you don't specify a different search option. If you don't specify ``--exact`` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID separated by a space to delete multiple entries. Just press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports ``--exact --case-sensitive`` deletion.
Deletes history items. The ``--contains`` search option will be used if you don't specify a different search option. If you don't specify ``--exact`` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID, or an ID range separated by a space to delete multiple entries. Just press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports ``--exact --case-sensitive`` deletion.
**merge**
Immediately incorporates history changes from other sessions. Ordinarily ``fish`` ignores history changes from sessions started after the current one. This command applies those changes immediately.

View File

@@ -17,8 +17,9 @@ Description
``math`` performs mathematical calculations.
It supports simple operations such as addition, subtraction, and so on, as well as functions like ``abs()``, ``sqrt()`` and ``ln()``.
By default, the output is a floating-point number with trailing zeroes trimmed.
To get a fixed representation, the ``--scale`` option can be used, including ``--scale=0`` for integer output.
By default, the output shows up to 6 decimal places.
To change the number of decimal places, use the ``--scale`` option, including ``--scale=0`` for integer output.
Trailing zeroes will always be trimmed.
Keep in mind that parameter expansion happens before expressions are evaluated.
This can be very useful in order to perform calculations involving shell variables or the output of command substitutions, but it also means that parenthesis (``()``) and the asterisk (``*``) glob character have to be escaped or quoted.

View File

@@ -106,7 +106,7 @@ The following code stores the value 'hello' in the shell variable :envvar:`foo`.
echo hello|read foo
While this is a neat way to handle command output line-by-line::
The :doc:`while <while>` command is a neat way to handle command output line-by-line::
printf '%s\n' line1 line2 line3 line4 | while read -l foo
echo "This is another line: $foo"
@@ -125,7 +125,7 @@ Delimiters given via "-d" are taken as one string::
echo $first # outputs "a b", $second is empty
echo 'a"foo bar"b (command echo wurst)*" "{a,b}' | read -lt -l a b c
echo $a # outputs 'afoo bar' (without the quotes)
echo $a # outputs 'afoo barb' (without the quotes)
echo $b # outputs '(command echo wurst)* {a,b}' (without the quotes)
echo $c # nothing

View File

@@ -25,7 +25,7 @@ If both *NAME* and *VALUE* are provided, ``set`` assigns any values to variable
Variables in fish are :ref:`lists <variables-lists>`, multiple values are allowed.
One or more variable *INDEX* can be specified including ranges (not for all options.)
If no *VALUE* is given, the variable will be set to the empty list i.e. ``''``.
If no *VALUE* is given, the variable will be set to the empty list.
If ``set`` is ran without arguments, it prints the names and values of all shell variables in sorted order.
Passing :ref:`scope <variables-scope>` or :ref:`export <variables-export>` flags allows filtering this to only matching variables, so ``set --local`` would only show local variables.
@@ -34,11 +34,11 @@ With ``--erase`` and optionally a scope flag ``set`` will erase the matching var
With ``--show``, ``set`` will describe the given variable names, explaining how they have been defined - in which scope with which values and options.
The following scope control variable scope:
The following options control variable scope:
**-U** or **--universal**
Sets a universal variable.
The variable will be immediately available to all the user's ``fish`` instances on the machine, and will be persist across restarts of the shell.
The variable will be immediately available to all the user's ``fish`` instances on the machine, and will be persisted across restarts of the shell.
**-f** or **--function**
Sets a variable scoped to the executing function.
@@ -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:
@@ -63,10 +63,10 @@ These options modify how variables operate:
Causes the specified shell variable to NOT be exported to child processes.
**--path**
Treat specified variable as a :ref:`path variable <variables-path>`; variable will be split on colons (``:``) and will be displayed joined by colons colons when quoted (``echo "$PATH"``) or exported.
Treat specified variable as a :ref:`path variable <variables-path>`; variable will be split on colons (``:``) and will be displayed joined by colons when quoted (``echo "$PATH"``) or exported.
**--unpath**
Causes variable to no longer be tred as a :ref:`path variable <variables-path>`.
Causes variable to no longer be treated as a :ref:`path variable <variables-path>`.
Note: variables ending in "PATH" are automatically path variables.
Further options:
@@ -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

@@ -11,8 +11,46 @@ To provide a list of possible completions for myprog, use the ``-a`` switch. If
complete -c myprog -s o -l output -a "yes no"
In the complete call above, the ``-a`` arguments apply when the option -o/--output has been given, so this offers them for::
There are also special switches for specifying that a switch requires an argument, to disable filename completion, to create completions that are only available in some combinations, etc.. For a complete description of the various switches accepted by the ``complete`` command, see the documentation for the :doc:`complete <cmds/complete>` builtin, or write ``complete --help`` inside the ``fish`` shell.
> myprog -o<TAB>
> myprog --output=<TAB>
By default, option arguments are *optional*, so the candidates are only offered directly attached like that, so they aren't given in this case::
> myprog -o <TAB>
Usually options *require* a parameter, so you would give ``--require-parameter`` / ``-r``::
complete -c myprog -s o -l output -ra "yes no"
which offers yes/no in these cases::
> myprog -o<TAB>
> myprog --output=<TAB>
> myprog -o <TAB>
> myprog --output <TAB>
In the latter two cases, files will also be offered because file completion is enabled by default.
You would either inhibit file completion for a single option::
complete -c myprog -s o -l output --no-files -ra "yes no"
or with a specific condition::
complete -c myprog -f --condition '__fish_seen_subcommand_from somesubcommand'
or you can disable file completions globally for the command::
complete -c myprog -f
If you have disabled them globally, you can enable them just for a specific condition or option with the ``--force-files`` / ``-F`` option::
# Disable files by default
complete -c myprog -f
# but reenable them for --config-file
complete -c myprog -l config-file --force-files -r
As a more comprehensive example, here's a commented excerpt of the completions for systemd's ``timedatectl``::
@@ -76,7 +114,7 @@ For examples of how to write your own complex completions, study the completions
Useful functions for writing completions
----------------------------------------
``fish`` ships with several functions that are very useful when writing command specific completions. Most of these functions name begins with the string ``__fish_``. Such functions are internal to ``fish`` and their name and interface may change in future fish versions. Still, some of them may be very useful when writing completions. A few of these functions are described here. Be aware that they may be removed or changed in future versions of fish.
``fish`` ships with several functions that may be useful when writing command-specific completions. Most of these function names begin with the string ``__fish_``. Such functions are internal to ``fish`` and their name and interface may change in future fish versions. A few of these functions are described here.
Functions beginning with the string ``__fish_print_`` print a newline separated list of strings. For example, ``__fish_print_filesystems`` prints a list of all known file systems. Functions beginning with ``__fish_complete_`` print out a newline separated list of completions with descriptions. The description is separated from the completion by a tab character.
@@ -120,7 +158,7 @@ These paths are controlled by parameters set at build, install, or run time, and
This wide search may be confusing. If you are unsure, your completions probably belong in ``~/.config/fish/completions``.
If you have written new completions for a common Unix command, please consider sharing your work by submitting it via the instructions in :ref:`Further help and development <more-help>`
If you have written new completions for a common Unix command, please consider sharing your work by submitting it via the instructions in :ref:`Further help and development <more-help>`.
If you are developing another program and would like to ship completions with your program, install them to the "vendor" completions directory. As this path may vary from system to system, the ``pkgconfig`` framework should be used to discover this path with the output of ``pkg-config --variable completionsdir fish``.

View File

@@ -187,6 +187,7 @@ man_pages = [
("interactive", "fish-interactive", "", [author], 1),
("relnotes", "fish-releasenotes", "", [author], 1),
("completions", "fish-completions", "", [author], 1),
("prompt", "fish-prompt-tutorial", "", [author], 1),
(
"fish_for_bash_users",
"fish-for-bash-users",

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
=============
@@ -162,6 +171,7 @@ Other help pages
fish_for_bash_users
tutorial
completions
prompt
design
relnotes
license

View File

@@ -125,6 +125,7 @@ Variable Meaning
.. envvar:: fish_color_status the last command's nonzero exit code in the default prompt
.. envvar:: fish_color_cancel the '^C' indicator on a canceled command
.. envvar:: fish_color_search_match history search matches and selected pager items (background only)
.. envvar:: fish_color_history_current the current position in the history for commands like ``dirh`` and ``cdh``
========================================== =====================================================================
@@ -235,7 +236,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:
@@ -255,7 +270,7 @@ Command line editor
The fish editor features copy and paste, a :ref:`searchable history <history-search>` and many editor functions that can be bound to special keyboard shortcuts.
Like bash and other shells, fish includes two sets of keyboard shortcuts (or key bindings): one inspired by the Emacs text editor, and one by the Vi text editor. The default editing mode is Emacs. You can switch to Vi mode by running ``fish_vi_key_bindings`` and switch back with ``fish_default_key_bindings``. You can also make your own key bindings by creating a function and setting the ``fish_key_bindings`` variable to its name. For example::
Like bash and other shells, fish includes two sets of keyboard shortcuts (or key bindings): one inspired by the Emacs text editor, and one by the Vi text editor. The default editing mode is Emacs. You can switch to Vi mode by running :doc:`fish_vi_key_bindings <cmds/fish_vi_key_bindings>` and switch back with :doc:`fish_default_key_bindings <cmds/fish_default_key_bindings>`. You can also make your own key bindings by creating a function and setting the ``fish_key_bindings`` variable to its name. For example::
function fish_hybrid_key_bindings --description \
@@ -331,7 +346,7 @@ Some bindings are common across Emacs and Vi mode, because they aren't text edit
Emacs mode commands
^^^^^^^^^^^^^^^^^^^
To enable emacs mode, use ``fish_default_key_bindings``. This is also the default.
To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key_bindings>`. This is also the default.
- :kbd:`Home` or :kbd:`Control`\ +\ :kbd:`A` moves the cursor to the beginning of the line.
@@ -349,6 +364,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.
@@ -374,8 +391,7 @@ Vi mode commands
Vi mode allows for the use of Vi-like commands at the prompt. Initially, :ref:`insert mode <vi-mode-insert>` is active. :kbd:`Escape` enters :ref:`command mode <vi-mode-command>`. The commands available in command, insert and visual mode are described below. Vi mode shares :ref:`some bindings <shared-binds>` with :ref:`Emacs mode <emacs-mode>`.
To enable vi mode, use ``fish_vi_key_bindings``.
To enable vi mode, use :doc:`fish_vi_key_bindings <cmds/fish_vi_key_bindings>`.
It is also possible to add all emacs-mode bindings to vi-mode by using something like::
@@ -402,14 +418,20 @@ The ``fish_vi_cursor`` function will be used to change the cursor's shape depend
set fish_cursor_default block
# Set the insert mode cursor to a line
set fish_cursor_insert line
# Set the replace mode cursor to an underscore
# Set the replace mode cursors to an underscore
set fish_cursor_replace_one underscore
set fish_cursor_replace underscore
# Set the external cursor to a line. The external cursor appears when a command is started.
# The cursor shape takes the value of fish_cursor_default when fish_cursor_external is not specified.
set fish_cursor_external line
# The following variable can be used to configure cursor shape in
# visual mode, but due to fish_cursor_default, is redundant here
set fish_cursor_visual block
Additionally, ``blink`` can be added after each of the cursor shape parameters to set a blinking cursor in the specified shape.
Fish knows the shapes "block", "line" and "underscore", other values will be ignored.
If the cursor shape does not appear to be changing after setting the above variables, it's likely your terminal emulator does not support the capabilities necessary to do this. It may also be the case, however, that ``fish_vi_cursor`` has not detected your terminal's features correctly (for example, if you are using ``tmux``). If this is the case, you can force ``fish_vi_cursor`` to set the cursor shape by setting ``$fish_vi_force_cursor`` in ``config.fish``. You'll have to restart fish for any changes to take effect. If cursor shape setting remains broken after this, it's almost certainly an issue with your terminal emulator, and not fish.
.. _vi-mode-command:
@@ -427,7 +449,7 @@ Command mode is also known as normal mode.
- :kbd:`i` enters :ref:`insert mode <vi-mode-insert>` at the current cursor position.
- :kbd:`Shift`\ +\ :kbd:`R` enters :ref:`insert mode <vi-mode-insert>` at the beginning of the line.
- :kbd:`Shift`\ +\ :kbd:`I` enters :ref:`insert mode <vi-mode-insert>` at the beginning of the line.
- :kbd:`v` enters :ref:`visual mode <vi-mode-visual>` at the current cursor position.
@@ -435,6 +457,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 +470,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 +478,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 +534,24 @@ 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.
If you use :ref:`vi bindings <vi-mode>`, note that ``bind`` will by default bind keys in :ref:`command mode <vi-mode-command>`. To bind something in :ref:`insert mode <vi-mode-insert>`::
bind --mode insert \cc 'commandline -r ""'
.. _interactive-key-sequences:
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:
@@ -514,14 +562,25 @@ The key sequence (the ``\cc``) here depends on your setup, in particular the ter
Press a key:
bind \e\[C 'do something'
Note that some key combinations are indistinguishable or unbindable. For instance control-i *is the same* as the tab key. This is a terminal limitation that fish can't do anything about.
Note that some key combinations are indistinguishable or unbindable. For instance control-i *is the same* as the tab key. This is a terminal limitation that fish can't do anything about. When ``fish_key_reader`` prints the same sequence for two different keys, then that is because your terminal sends the same sequence for them.
Also, :kbd:`Escape` is the same thing as :kbd:`Alt` in a terminal. To distinguish between pressing :kbd:`Escape` and then another key, and pressing :kbd:`Alt` and that key (or an escape sequence the key sends), fish waits for a certain time after seeing an escape character. This is configurable via the ``fish_escape_delay_ms`` variable.
Also, :kbd:`Escape` is the same thing as :kbd:`Alt` in a terminal. To distinguish between pressing :kbd:`Escape` and then another key, and pressing :kbd:`Alt` and that key (or an escape sequence the key sends), fish waits for a certain time after seeing an escape character. This is configurable via the :envvar:`fish_escape_delay_ms` variable.
If you want to be able to press :kbd:`Escape` and then a character and have it count as :kbd:`Alt`\ +\ that character, set it to a higher value, e.g.::
set -g fish_escape_delay_ms 100
Similarly, to disambiguate *other* keypresses where you've bound a subsequence and a longer sequence, fish has :envvar:`fish_sequence_key_delay_ms`::
# This binds "jk" to switch to normal mode in vi-mode.
# If you kept it like that, every time you press "j",
# fish would wait for a "k" or other key to disambiguate
bind -M insert -m default jk cancel repaint-mode
# After setting this, fish only waits 200ms for the "k",
# or decides to treat the "j" as a separate sequence, inserting it.
set -g fish_sequence_key_delay_ms 200
.. _killring:
Copy and paste (Kill Ring)

View File

@@ -69,30 +69,32 @@ Here we define some of the terms used on this page and throughout the rest of th
Quotes
------
Sometimes features like :ref:`parameter expansion <expand>` and :ref:`character escapes <escapes>` get in the way. When that happens, you can use quotes, either single (``'``) or double (``"``). Between single quotes, fish performs no expansions. Between double quotes, fish only performs :ref:`variable expansion <expand-variable>`. No other kind of expansion (including :ref:`brace expansion <expand-brace>` or parameter expansion) is performed, and escape sequences (for example, ``\n``) are ignored. Within quotes, whitespace is not used to separate arguments, allowing quoted arguments to contain spaces.
Sometimes you want to give a command an argument that contains characters special to fish, like spaces or ``$`` or ``*``. To do that, you can use quotes::
rm "my file.txt"
to remove a file called ``my file.txt`` instead of trying to remove two files, ``my`` and ``file.txt``.
Fish understands two kinds of quotes: Single (``'``) and double (``"``), and both work slightly differently.
Between single quotes, fish performs no expansions. Between double quotes, fish only performs :ref:`variable expansion <expand-variable>` and :ref:`command substitution <expand-command-substitution>` in the ``$(command)``. No other kind of expansion (including :ref:`brace expansion <expand-brace>` or parameter expansion) is performed, and escape sequences (for example, ``\n``) are ignored. Within quotes, whitespace is not used to separate arguments, allowing quoted arguments to contain spaces.
The only meaningful escape sequences in single quotes are ``\'``, which escapes a single quote and ``\\``, which escapes the backslash symbol. The only meaningful escapes in double quotes are ``\"``, which escapes a double quote, ``\$``, which escapes a dollar character, ``\`` followed by a newline, which deletes the backslash and the newline, and ``\\``, which escapes the backslash symbol.
Single quotes have no special meaning within double quotes and vice versa.
Example::
rm "cumbersome filename.txt"
removes the file ``cumbersome filename.txt``, while
::
rm cumbersome filename.txt
removes two files, ``cumbersome`` and ``filename.txt``.
Another example::
More examples::
grep 'enabled)$' foo.txt
searches for lines ending in ``enabled)`` in ``foo.txt`` (the ``$`` is special to ``grep``: it matches the end of the line).
::
apt install "postgres-*"
installs all packages with a name starting with "postgres-", instead of looking through the current directory for files named "postgres-something".
.. _escapes:
Escaping Characters
@@ -236,12 +238,43 @@ As a convenience, the pipe ``&|`` redirects both stdout and stderr to the same p
.. [#] A "pager" here is a program that takes output and "paginates" it. ``less`` doesn't just do pages, it allows arbitrary scrolling (even back!).
Combining pipes and redirections
--------------------------------
It is possible to use multiple redirections and a pipe at the same time. In that case, they are read in this order:
1. First the pipe is set up.
2. Then the redirections are evaluated from left-to-right.
This is important when any redirections reference other file descriptors with the ``&N`` syntax. When you say ``>&2``, that will redirect stdout to where stderr is pointing to *at that time*.
Consider this helper function::
# Just make a function that prints something to stdout and stderr
function print
echo out
echo err >&2
end
Now let's see a few cases::
# Redirect both stderr and stdout to less
# (can also be spelt as `&|`)
print 2>&1 | less
# Show the "out" on stderr, silence the "err"
print >&2 2>/dev/null
# Silence both
print >/dev/null 2>&1
.. _syntax-job-control:
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 +410,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 +504,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 +512,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 +733,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 +765,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 +889,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 +912,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 +1042,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 +1119,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 +1172,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 +1183,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 +1267,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 +1415,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.
@@ -1347,6 +1449,10 @@ You can change the settings of fish by changing the values of certain variables.
sets how long fish waits for another key after seeing an escape, to distinguish pressing the escape key from the start of an escape sequence. The default is 30ms. Increasing it increases the latency but allows pressing escape instead of alt for alt+character bindings. For more information, see :ref:`the chapter in the bind documentation <cmd-bind-escape>`.
.. envvar:: fish_sequence_key_delay_ms
sets how long fish waits for another key after seeing a key that is part of a longer sequence, to disambiguate. For instance if you had bound ``\cx\ce`` to open an editor, fish would wait for this long in milliseconds to see a ctrl-e after a ctrl-x. If the time elapses, it will handle it as a ctrl-x (by default this would copy the current commandline to the clipboard). See also :ref:`Key sequences <interactive-key-sequences>`.
.. envvar:: fish_complete_path
determines where fish looks for completion. When trying to complete for a command, fish looks for files in the directories in this variable.
@@ -1730,7 +1836,13 @@ Configuration files are run in the following order:
- ``$__fish_config_dir/conf.d`` (by default, ``~/.config/fish/conf.d/``)
- ``$__fish_sysconf_dir/conf.d`` (by default, ``/etc/fish/conf.d/``)
- Directories for others to ship configuration snippets for their software. Fish searches the directories under ``$__fish_user_data_dir`` (usually ``~/.local/share/fish``, controlled by the ``XDG_DATA_HOME`` environment variable) and in the ``XDG_DATA_DIRS`` environment variable for a ``fish/vendor_conf.d`` directory; if not defined, the default value of ``XDG_DATA_DIRS`` is ``/usr/share/fish/vendor_conf.d`` and ``/usr/local/share/fish/vendor_conf.d``, unless your distribution customized this.
- Directories for others to ship configuration snippets for their software:
- the directories under ``$__fish_user_data_dir`` (usually ``~/.local/share/fish``, controlled by the ``XDG_DATA_HOME`` environment variable)
- a ``fish/vendor_conf.d`` directory in the directories listed in ``$XDG_DATA_DIRS`` (default ``/usr/share/fish/vendor_conf.d`` and ``/usr/local/share/fish/vendor_conf.d``)
These directories are also accessible in ``$__fish_vendor_confdirs``.
Note that changing that in a running fish won't do anything as by that point the directories have already been read.
If there are multiple files with the same name in these directories, only the first will be executed.
They are executed in order of their filename, sorted (like globs) in a natural order (i.e. "01" sorts before "2").
@@ -1744,6 +1856,8 @@ These files are all executed on the startup of every shell. If you want to run a
If you are developing another program, you may want to add configuration for all users of fish on a system. This is discouraged; if not carefully written, they may have side-effects or slow the startup of the shell. Additionally, users of other shells won't benefit from the fish-specific configuration. However, if they are required, you can install them to the "vendor" configuration directory. As this path may vary from system to system, ``pkg-config`` should be used to discover it: ``pkg-config --variable confdir fish``.
For system integration, fish also ships a file called ``__fish_build_paths.fish``. This can be customized during build, for instance because your system requires special paths to be used.
.. _featureflags:
Future feature flags
@@ -1811,7 +1925,7 @@ To specify a signal handler for the WINCH signal, write::
echo Got WINCH signal!
end
Fish already the following named events for the ``--on-event`` switch:
Fish already has the following named events for the ``--on-event`` switch:
- ``fish_prompt`` is emitted whenever a new fish prompt is about to be displayed.

View File

@@ -175,3 +175,107 @@ products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
License for CMake
-----------------
The ``fish`` source code contains files from [CMake](https://cmake.org) to support the build system.
This code is distributed under the terms of a BSD-style license. Copyright 2000-2017 Kitware, Inc.
and Contributors.
The BSD license for CMake follows.
CMake - Cross Platform Makefile Generator
Copyright 2000-2017 Kitware, Inc. and Contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Kitware, Inc. nor the names of Contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License for code derived from tmux
----------------------------------
``fish`` contains code from [tmux](http://tmux.sourceforge.net), copyrighted by Nicholas Marriott <nicm@users.sourceforge.net> (2007), and made available under the OpenBSD license.
The OpenBSD license is included below.
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
License for UTF8
----------------
``fish`` also contains small amounts of code under the ISC license, namely the UTF-8 conversion functions. This code is copyright © 2007 Alexey Vatchenko \<av@bsdua.org>.
The ISC license agreement follows.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
License for flock
-----------------
``fish`` also contains small amounts of code from NetBSD, namely the ``flock`` fallback function. This code is copyright 2001 The NetBSD Foundation, Inc., and derived from software contributed to The NetBSD Foundation by Todd Vierling.
The NetBSD license follows.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
MIT License
-----------
``fish`` includes a copy of AngularJS, which is copyright 2010-2012 Google, Inc. and licensed under the MIT License. It also includes the Dracula theme, which is copyright 2018 Dracula Team, and the Nord theme, which is copyright 2016-present Sven Greb. These themes are also used under the MIT license.
The MIT license follows.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

172
doc_src/prompt.rst Normal file
View File

@@ -0,0 +1,172 @@
Writing your own prompt
=======================
.. only:: builder_man
.. warning::
This document uses formatting to show what a prompt would look like. If you are viewing this in the man page,
you probably want to switch to looking at the html version instead. Run ``help custom-prompt`` to view it in a web browser.
Fish ships a number of prompts that you can view with the :doc:`fish_config <cmds/fish_config>` command, and many users have shared their prompts online.
However, you can also write your own, or adjust an existing prompt. This is a good way to get used to fish's :doc:`scripting language <language>`.
Unlike other shells, fish's prompt is built by running a function - :doc:`fish_prompt <cmds/fish_prompt>`. Or, more specifically, three functions:
- :doc:`fish_prompt <cmds/fish_prompt>`, which is the main prompt function
- :doc:`fish_right_prompt <cmds/fish_right_prompt>`, which is shown on the right side of the terminal.
- :doc:`fish_mode_prompt <cmds/fish_mode_prompt>`, which is shown if :ref:`vi-mode <vi-mode>` is used.
These functions are run, and whatever they print is displayed as the prompt (minus one trailing newline).
Here, we will just be writing a simple fish_prompt.
Our first prompt
----------------
Let's look at a very simple example::
function fish_prompt
echo $PWD '>'
end
This prints the current working directory (:envvar:`PWD`) and a ``>`` symbol to show where the prompt ends. The ``>`` is :ref:`quoted <quotes>` because otherwise it would signify a :ref:`redirection <redirects>`.
Because we've used :doc:`echo <cmds/echo>`, it adds spaces between the two so it ends up looking like (assuming ``_`` is your cursor):
.. role:: white
.. parsed-literal::
:class: highlight
:white:`/home/tutorial >`\ _
Formatting
----------
``echo`` adds spaces between its arguments. If you don't want those, you can use :doc:`string join <cmds/string-join>` like this::
function fish_prompt
string join '' -- $PWD '>'
end
The ``--`` indicates to ``string`` that no options can come after it, in case we extend this with something that can start with a ``-``.
There are other ways to remove the space, including ``echo -s`` and :doc:`printf <cmds/printf>`.
Adding colo(u)r
---------------
This prompt is functional, but a bit boring. We could add some color.
Fortunately, fish offers the :doc:`set_color <cmds/set_color>` command, so you can do::
echo (set_color red)foo
``set_color`` can also handle RGB colors like ``set_color 23b455``, and other formatting options including bold and italics.
So, taking our previous prompt and adding some color::
function fish_prompt
string join '' -- (set_color green) $PWD (set_color normal) '>'
end
A "normal" color tells the terminal to go back to its normal formatting options.
What ``set_color`` does internally is to print an escape sequence that tells the terminal to change color. So if you see something like::
echo \e\[31mfoo
that could just be ``set_color red``.
Shortening the working directory
--------------------------------
This is fine, but our :envvar:`PWD` can be a bit long, and we are typically only interested in the last few directories. We can shorten this with the :doc:`prompt_pwd <cmds/prompt_pwd>` helper that will give us a shortened working directory::
function fish_prompt
string join '' -- (set_color green) (prompt_pwd) (set_color normal) '>'
end
``prompt_pwd`` takes options to control how much to shorten. For instance, if we want to display the last two directories, we'd use ``prompt_pwd --full-length-dirs 2``::
function fish_prompt
string join '' -- (set_color green) (prompt_pwd --full-length-dirs 2) (set_color normal) '>'
end
With a current directory of "/home/tutorial/Music/Lena Raine/Oneknowing", this would print
.. role:: green
.. parsed-literal::
:class: highlight
:green:`~/M/Lena Raine/Oneknowing`>_
Status
------
One important bit of information that every command returns is the :ref:`status <variables-status>`. This is a whole number from 0 to 255, and usually it is used as an error code - 0 if the command returned successfully, or a number from 1 to 255 if not.
It's useful to display this in your prompt, but showing it when it's 0 seems kind of wasteful.
First of all, since every command (except for :doc:`set <cmds/set>`) changes the status, you need to store it for later use as the first thing in your prompt. Use a :ref:`local variable <variables-scope>` so it will be confined to your prompt function::
set -l last_status $status
And after that, you can set a string if it not zero::
# Prompt status only if it's not 0
set -l stat
if test $last_status -ne 0
set stat (set_color red)"[$last_status]"(set_color normal)
end
And to print it, we add it to our ``string join``::
string join '' -- (set_color green) (prompt_pwd) (set_color normal) $stat '>'
If ``$last_status`` was 0, ``$stat`` is empty, and so it will simply disappear.
So our entire prompt is now::
function fish_prompt
set -l last_status $status
# Prompt status only if it's not 0
set -l stat
if test $last_status -ne 0
set stat (set_color red)"[$last_status]"(set_color normal)
end
string join '' -- (set_color green) (prompt_pwd) (set_color normal) $stat '>'
end
And it looks like:
.. role:: green
.. role:: red
.. parsed-literal::
:class: highlight
:green:`~/M/L/Oneknowing`\ :red:`[1]`>_
after we run ``false`` (which returns 1).
Where to go from here?
----------------------
We have now built a simple but working and usable prompt, but of course more can be done.
- Fish offers more helper functions:
- ``prompt_login`` to describe the user/hostname/container or ``prompt_hostname`` to describe just the host
- ``fish_is_root_user`` to help with changing the symbol for root.
- ``fish_vcs_prompt`` to show version control information (or ``fish_git_prompt`` / ``fish_hg_prompt`` / ``fish_svn_prompt`` to limit it to specific systems)
- You can add a right prompt by changing :doc:`fish_right_prompt <cmds/fish_right_prompt>` or a vi-mode prompt by changing :doc:`fish_mode_prompt <cmds/fish_mode_prompt>`.
- Some prompts have interesting or advanced features
- Add the time when the prompt was printed
- Show various integrations like python's venv
- Color the parts differently.
You can look at fish's sample prompts for inspiration. Open up :doc:`fish_config <cmds/fish_config>`, find one you like and pick it. For example::
fish_config prompt show # <- shows all the sample prompts
fish_config prompt choose disco # <- this picks the "disco" prompt for this session
funced fish_prompt # <- opens fish_prompt in your editor, and reloads it once the editor exits

View File

@@ -1,5 +1,18 @@
:root {
color-scheme: light dark; /* both supported */
color-scheme: light dark; /* both supported */
--link-color: #0030B3;
--visited-link-color: #6363bb;
--hover-link-color: #00A5F4;
--text-color: #222;
--main-background: #EEEEFA;
--secondary-background: #ddddea;
--outer-background: linear-gradient(to bottom, #a7cfdf 0%,#23538a 100%);
--code-background: rgba(255,255,255, .2);
--code-border: #ac9;
--sidebar-border-color: #ccc;
--secondary-link-color: #444;
--highlight-background: #FFF;
--td-background: white;
}
html {
@@ -8,7 +21,10 @@ html {
}
body {
background: linear-gradient(to bottom, #a7cfdf 0%,#23538a 100%);
background: var(--outer-background);
}
html, body, input {
/* Pick a font.
sans-serif is the Browser default. This is great because the user could change it.
Unfortunately the defaults are decades old and e.g. on Windows still use Arial in Firefox and Edge,
@@ -29,8 +45,7 @@ body {
body {
/* These stay, assuming some browsers pick different defaults */
font-size: 100%;
background-color: #eeeefa;
color: #000;
background-color: var(--main-background);
margin: 0;
padding: 0;
}
@@ -97,7 +112,7 @@ div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points {
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: #444444;
color: var(--secondary-link-color);
margin: 10px;
list-style: none;
}
@@ -132,7 +147,7 @@ div.sphinxsidebar h3 {
}
div.sphinxsidebar h4 {
color: #444444;
color: var(--secondary-link-color);
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
@@ -162,14 +177,14 @@ a:hover, div.footer a {
}
div.related a, div.sphinxsidebar a {
color: #444444;
color: var(--secondary-link-color);
}
div.warning {
border: 1px solid #f66;
}
div.admonition {
div.admonition, div.versionchanged {
padding: 7px;
}
@@ -177,7 +192,7 @@ p.admonition-title::after {
content: ":";
}
p.admonition-title {
p.admonition-title, span.versionmodified {
display: inline;
font-weight: bold;
}
@@ -192,10 +207,6 @@ div.footer {
font-size: 75%;
}
th, dl.field-list > dt {
background-color: #ede;
}
table.docutils {
border-collapse: collapse;
}
@@ -212,9 +223,9 @@ th > :first-child, td > :first-child {
/* End of SPHINX IMPORT */
div#fmain {
color: #222;
color: var(--text-color);
padding: 1em 2em;
background-color: #EEEEFA;
background-color: var(--main-background);
border-radius: 14px;
position: relative;
margin: 1em auto 1em;
@@ -227,7 +238,8 @@ div#fmain {
div.related {
margin-bottom: 0;
padding: 0.5em 0;
border-top: 1px solid #ccc;
border-top: 1px solid;
border-color: var(--sidebar-border-color);
margin-top: 0;
}
@@ -243,15 +255,10 @@ div.section {
width: 100%;
}
div.related a:hover,
div.footer a:hover,
div.sphinxsidebar a:hover {
color: #0095C4;
}
div.related:first-child {
border-top: 0;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid;
border-color: var(--sidebar-border-color);
}
.inline-search {
@@ -265,7 +272,8 @@ form.inline-search input[type="submit"] {
}
div.sphinxsidebar {
border-right: 1px solid #ccc;
border-right: 1px solid;
border-color: var(--sidebar-border-color);
border-radius: 0px;
line-height: 1em;
font-size: smaller;
@@ -325,7 +333,8 @@ ul.simple > li:not(:first-child) > p {
form.inline-search input,
div.sphinxsidebar input {
border: 1px solid #999999;
border: 1px solid;
border-color: var(--sidebar-border-color);
font-size: smaller;
border-radius: 3px;
}
@@ -364,7 +373,8 @@ div.body hr {
div.body pre, code {
border-radius: 3px;
border: 1px solid #ac9;
border: 1px solid;
border-color: var(--code-border);
}
div.highlight {
@@ -399,28 +409,31 @@ div.body div.seealso {
border: 1px solid #dddd66;
}
div.body a {
color: #0072aa;
a {
color: var(--link-color);
}
div.body a:visited {
color: #6363bb;
color: var(--visited-link-color);
}
div.related a:hover,
div.footer a:hover,
div.sphinxsidebar a:hover,
div.body a:hover {
color: #00B0E4;
color: var(--hover-link-color);
}
code {
/* Make inline-code better visible */
background-color: rgba(20,20,80, .1);
background-color: var(--code-background);
padding-left: 5px;
padding-right: 5px;
margin-left: 3px;
margin-right: 3px;
}
tt, code, pre, dl > dt span ~ em, #synopsis p, #synopsis code, .command {
tt, code, pre, dl > dt span ~ em, #synopsis p, #synopsis code, .command, button {
/* Pick a monospace font.
ui-monospace is the monospace version of system-ui - the system's monospace font.
Unfortunately it's barely supported anywhere (at time of writing only Safari does!),
@@ -467,7 +480,8 @@ div.body tt.xref, div.body a tt, div.body code.xref, div.body a code {
}
table.docutils {
border: 1px solid #ddd;
border: 1px solid;
border-color: var(--sidebar-border-color);
min-width: 20%;
border-radius: 3px;
margin-top: 1em;
@@ -478,7 +492,8 @@ table.docutils {
}
table.docutils td, table.docutils th {
border: 1px solid #ddd !important;
border: 1px solid;
border-color: var(--sidebar-border-color);
border-radius: 3px;
}
@@ -486,13 +501,13 @@ table p, table li {
text-align: left !important;
}
table.docutils th {
background-color: #eee;
th {
background-color: var(--secondary-background);
padding: 0.3em 0.5em;
}
table.docutils td {
background-color: white;
background-color: var(--td-background);
padding: 0.3em 0.5em;
}
@@ -508,16 +523,8 @@ div.footer {
margin-right: 10px;
}
.refcount {
color: #060;
}
.stableabi {
color: #229;
}
.highlight {
background: #FFF;
background: var(--highlight-background);
}
#synopsis p {
@@ -552,6 +559,10 @@ aside.footnote > p {
line-height: 1.5em;
}
div.documentwrapper {
width: 100%;
}
/* On screens that are less than 700px wide remove anything non-essential
- the sidebar, the gradient background, ... */
@media screen and (max-width: 700px) {
@@ -606,6 +617,7 @@ aside.footnote > p {
.gray { color: #777 }
.purple { color: #551a8b; font-weight: bold; }
.red { color: #FF0000; }
.green { color: #00FF00; }
/* Color based on the Name.Function (.nf) class from pygments.css. */
.command { color: #005fd7 }
@@ -621,11 +633,10 @@ aside.footnote > p {
.prompt { color: #8f7902; }
kbd {
background-color: #f9f9f9;
border: 1px solid #aaa;
background-color: var(--td-background);
border: 1px solid;
border-color: var(--sidebar-border-color);
border-radius: .2em;
box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1);
color: #000;
padding: 0.1em 0.3em;
}
@@ -637,91 +648,38 @@ div.body .internal.reference:link {
content: "$";
}
.footnote, .footnote-reference {
background-color: #ddddea;
background-color: var(--secondary-background);
font-size: 90%;
}
@media (prefers-color-scheme: dark) {
body {
background: linear-gradient(to top, #1f1f3f 0%,#051f3a 100%);
:root {
--link-color: #5fb0fc;
--text-color: #DDD;
--main-background: #202028;
--secondary-background: #112;
--outer-background: linear-gradient(to top, #1f1f3f 0%,#051f3a 100%);
--code-background: rgba(20, 20, 25, .2);
--code-border: #536;
--sidebar-border-color: #666;
--secondary-link-color: #DDD;
--highlight-background: #000;
--td-background: #111;
}
div#fmain {
color: #DDD;
background-color: #202028;
box-shadow: 0 0 5px 1px #000;
}
div.body pre, code {
border: 1px solid #536;
}
.footnote, .footnote-reference {
background-color: #101020;
}
div.sphinxsidebar {
border-right: 1px solid #666;
}
div.related:first-child {
border-bottom: 1px solid #666;
}
div.related {
border-top: 1px solid #666;
}
div.sphinxsidebar a, div.footer {
color: #DDD;
}
div.sphinxsidebar h3 a, div.related a, div.sphinxsidebar h3, div.footer a {
color: #DDD;
}
.highlight {
background: #000;
}
kbd {
background-color: #111;
border: 1px solid #444;
box-shadow: 0.1em 0.1em 0.2em rgba(100,100,100,0.1);
color: #FFF;
}
table.docutils th {
background-color: #222;
}
table.docutils td {
background-color: #111;
}
input {
background-color: #222;
color: #DDD;
}
dt:target, span.highlighted {
background-color: #404060;
}
table.docutils {
border: 1px solid #222;
}
table.docutils td, table.docutils th {
border: 1px solid #222 !important;
}
div.body a {
color: #2092fa;
}
/* Color based on the Name.Function (.nf) class from pygments.css. */
.command { color: #008fd7 }
/* The table background on fishfish Beta r1 */
th, dl.field-list > dt {
background-color: #121;
}
code {
background-color: rgba(200, 200, 255, .2);
}
}

View File

@@ -1,20 +1,19 @@
.highlight .hll { background-color: #ffffcc }
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
.highlight .k { color: #204a87; font-weight: bold } /* Keyword */
.highlight .o { color: #00a6b2; } /* Operator */
.highlight .p { color: #00bfff; } /* Punctuation */
.highlight .c { color: #777; font-style: italic; } /* Comment */
.highlight .ch { color: #8f7902; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #8f7902; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #8f7902; font-style: italic } /* Comment.Preproc */
.highlight .cpf { color: #8f7902; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #8f7902; font-style: italic } /* Comment.Single */
.highlight .cs { color: #8f7902; font-style: italic } /* Comment.Special */
.highlight .o { color: #005F66; } /* Operator */
.highlight .p { color: #000f8f; } /* Punctuation */
.highlight .c { color: #575757; font-style: italic; } /* Comment */
.highlight .ch { color: #645502; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #645502; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #645502; font-style: italic } /* Comment.Preproc */
.highlight .cpf { color: #645502; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #645502; font-style: italic } /* Comment.Single */
.highlight .cs { color: #645502; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */
.highlight .gr { color: #ef2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .gp { color: #8f7902 } /* Generic.Prompt */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
@@ -24,15 +23,15 @@
.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */
.highlight .s { color: #4e9a06 } /* Literal.String */
.highlight .s { color: #2F5B06 } /* Literal.String */
.highlight .na { color: #c4a000 } /* Name.Attribute */
.highlight .nb { color: #204a87 } /* Name.Builtin */
.highlight .no { color: #00bfff } /* Name.Constant */
.highlight .no { color: #000f8f } /* Name.Constant */
.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #ce5c00 } /* Name.Entity */
.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #005fd7 } /* Name.Function */
.highlight .nl { color: #f57900 } /* Name.Label */
.highlight .nf { color: #004BCC; } /* Name.Function */
.highlight .nl { color: #f57900; } /* Name.Label */
.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
.highlight .w { color: #f8f8f8; } /* Text.Whitespace */
@@ -46,13 +45,13 @@
.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
.highlight .sd { color: #8f7902; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4daf08 } /* Literal.String.Double */
.highlight .se { color: #00a6b2 } /* Literal.String.Escape */
.highlight .s2 { color: #2E6506 } /* Literal.String.Double */
.highlight .se { color: #800400 } /* Literal.String.Escape */
.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
.highlight .s1 { color: #d0d00b } /* Literal.String.Single */
.highlight .s1 { color: #605000 } /* Literal.String.Single */
.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
@@ -66,12 +65,26 @@
:root {
--contrast: #FFFFFF;
}
.highlight .k { color: #507a97; font-weight: bold } /* Keyword */
.highlight .nf { color: #008fd7 } /* Name.Function */
.highlight .nb { color: #209a87 } /* Name.Builtin */
.highlight .no { color: #00bfff } /* Name.Constant */
.highlight .p { color: #00bfff; } /* Punctuation */
.highlight .k { color: #60A3BE; font-weight: bold } /* Keyword */
.highlight .nf { color: #00a0ff } /* Name.Function */
.highlight .nb { color: #A0AfF7 } /* Name.Builtin - we don't emit this, it's for bash scripts*/
.highlight .s { color: #4eFa06 } /* Literal.String */
.highlight .s1 { color: #a0a00b } /* Literal.String.Single */
.highlight .s2 { color: #9ce781 } /* Literal.String.Double */
.highlight .c { color: #969696; font-style: italic; } /* Comment */
.highlight .ch { color: #b19602; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #b19602; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #b19602; font-style: italic } /* Comment.Preproc */
.highlight .cpf { color: #b19602; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #b19602; font-style: italic } /* Comment.Single */
.highlight .cs { color: #b19602; font-style: italic } /* Comment.Special */
.highlight .o { color: #00F6b2; } /* Operator */
.highlight .se { color: #00a6b2 } /* Literal.String.Escape */
}
.highlight .g { color: var(--contrast) } /* Generic */
.highlight .gp { color: var(--contrast) } /* Generic.Prompt */
.highlight .l { color: var(--contrast) } /* Literal */
.highlight .n { color: var(--contrast) } /* Name */
.highlight .x { color: var(--contrast) } /* Other */

219
po/de.po
View File

@@ -4,33 +4,19 @@
# Hermann J. Beckers <hj.beckers@onlinehome.de>, 2006.
# Benjamin Weis <benjamin.weis@gmx.com>, 2013
#
#: /tmp/fish.i8YroE/implicit/share/completions/exif.fish:1
#: /tmp/fish.i8YroE/implicit/share/completions/exif.fish:2
#: /tmp/fish.i8YroE/implicit/share/completions/exif.fish:3
#: /tmp/fish.i8YroE/implicit/share/completions/exif.fish:4
#: /tmp/fish.i8YroE/implicit/share/completions/exif.fish:5
#: /tmp/fish.i8YroE/implicit/share/completions/meson.fish:1
#: /tmp/fish.i8YroE/implicit/share/completions/meson.fish:2
#: /tmp/fish.i8YroE/implicit/share/completions/meson.fish:3
#: /tmp/fish.i8YroE/implicit/share/completions/rustc.fish:3
#: /tmp/fish.i8YroE/implicit/share/completions/rustc.fish:4
#: /tmp/fish.i8YroE/implicit/share/completions/rustc.fish:5
#: /tmp/fish.i8YroE/implicit/share/completions/rustc.fish:6
#: /tmp/fish.i8YroE/implicit/share/completions/rustc.fish:7
#: /tmp/fish.i8YroE/implicit/share/completions/rustc.fish:8
msgid ""
msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-23 11:20+0100\n"
"PO-Revision-Date: 2013-11-01 18:36+0100\n"
"PO-Revision-Date: 2023-06-01 23:33+0200\n"
"Last-Translator: Fabian Homborg\n"
"Language-Team: deutsch <de@li.org>\n"
"Language: \n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.5\n"
"X-Generator: Poedit 3.3.1\n"
#: src/ast.cpp:685 src/ast.cpp:706
#, c-format
@@ -164,7 +150,7 @@ msgstr "Die Anzahl Argumente zählen"
#: src/builtin.cpp:376
msgid "Remove job from job list"
msgstr ""
msgstr "Job aus der Jobliste entfernen"
#: src/builtin.cpp:377
msgid "Print arguments"
@@ -176,7 +162,7 @@ msgstr "Werte Block aus, wenn die Bedingung falsch ist"
#: src/builtin.cpp:379
msgid "Emit an event"
msgstr ""
msgstr "Ein Ereignis auslösen"
#: src/builtin.cpp:380
msgid "End a block of commands"
@@ -184,7 +170,7 @@ msgstr "Befehlsblock beenden"
#: src/builtin.cpp:381
msgid "Evaluate a string as a statement"
msgstr ""
msgstr "Eine Zeichenfolge als Befehl ausführen"
#: src/builtin.cpp:382
msgid "Run command in current process"
@@ -228,7 +214,7 @@ msgstr "Derzeit laufende Jobs ausgeben"
#: src/builtin.cpp:392
msgid "Evaluate math expressions"
msgstr ""
msgstr "Mathematische Formel berechnen"
#: src/builtin.cpp:393
msgid "Negate exit status of job"
@@ -240,15 +226,15 @@ msgstr "Befehl ausführen, wenn vorheriger Befehl fehlerhaft war"
#: src/builtin.cpp:395
msgid "Handle paths"
msgstr ""
msgstr "Pfade behandeln"
#: src/builtin.cpp:396
msgid "Prints formatted text"
msgstr ""
msgstr "Formatierten Text ausgeben"
#: src/builtin.cpp:397
msgid "Print the working directory"
msgstr ""
msgstr "Das Arbeitsverzeichnis ausgeben"
#: src/builtin.cpp:398
msgid "Generate random number"
@@ -260,7 +246,7 @@ msgstr "Eine Eingabezeile in Variablen einlesen"
#: src/builtin.cpp:400
msgid "Show absolute path sans symlinks"
msgstr ""
msgstr "Absoluten Pfad ohne symbolische Verknüpfungen anzeigen"
#: src/builtin.cpp:401
msgid "Stop the currently evaluated function"
@@ -284,11 +270,11 @@ msgstr "Strings manipulieren"
#: src/builtin.cpp:407
msgid "Conditionally run blocks of code"
msgstr ""
msgstr "Anweisungsblock bedingungsabhängig ausführen"
#: src/builtin.cpp:409
msgid "Measure how long a command or block takes"
msgstr ""
msgstr "Dauer der Ausführung eines Befehls oder Blocks messen"
#: src/builtin.cpp:411
msgid "Check if a thing is a thing"
@@ -296,11 +282,11 @@ msgstr ""
#: src/builtin.cpp:412
msgid "Get/set resource usage limits"
msgstr ""
msgstr "Ressourcen-Limits abfragen/setzen"
#: src/builtin.cpp:413
msgid "Wait for background processes completed"
msgstr ""
msgstr "Auf den Abschluss von Hintergrundprozessen warten"
#: src/builtin.cpp:414
msgid "Perform a command multiple times"
@@ -318,53 +304,52 @@ msgstr "Heimordner für %ls"
#: src/complete.cpp:63
#, c-format
msgid "Variable: %ls"
msgstr ""
msgstr "Variable: %ls"
#: src/complete.cpp:66
#, c-format
msgid "Abbreviation: %ls"
msgstr ""
msgstr "Abkürzung: %ls"
#: src/complete.cpp:1514
msgid "completion reached maximum recursion depth, possible cycle?"
msgstr ""
msgstr "Vervollständigung hat die maximale Rekursionstiefe erreicht, möglicher Kreis?"
#: src/env.cpp:1340
msgid ""
"Could not determine current working directory. Is your locale set correctly?"
msgstr ""
msgid "Could not determine current working directory. Is your locale set correctly?"
msgstr "Das aktuelle Arbeitsverzeichnis konnte nicht bestimmt werden. Ist die locale korrekt eingestellt?"
#: src/env_dispatch.cpp:471
#, c-format
msgid "Using fallback terminal type '%s'."
msgstr ""
msgstr "Nutze Rückfallterminaltyp '%s'."
#: src/env_dispatch.cpp:474
#, c-format
msgid "Could not set up terminal using the fallback terminal type '%s'."
msgstr ""
msgstr "Konnte mit dem Rückfallterminaltyp '%s' kein Terminal einrichten."
#: src/env_dispatch.cpp:575
msgid "Could not set up terminal."
msgstr ""
msgstr "Konnte das Terminal nicht einrichten"
#: src/env_dispatch.cpp:577
msgid "TERM environment variable not set."
msgstr ""
msgstr "TERM-Umgebungsvariable nicht gesetzt."
#: src/env_dispatch.cpp:579
#, c-format
msgid "TERM environment variable set to '%ls'."
msgstr ""
msgstr "TERM-Umgebungsvariable auf '%ls' gesetzt."
#: src/env_dispatch.cpp:581
msgid "Check that this terminal type is supported on this system."
msgstr ""
msgstr "Überprüfe, ob dieser Terminaltyp auf diesem System unterstützt wird."
#: src/env_universal_common.cpp:425
#, c-format
msgid "Unable to write to universal variables file '%ls': %s"
msgstr ""
msgstr "Die Universal-Variablen-Datei '%ls' kann nicht geschrieben werden: %s"
#: src/env_universal_common.cpp:441
#, c-format
@@ -374,19 +359,17 @@ msgstr "Konnte Datei '%ls' nicht zu '%ls' umbenennen: %s"
#: src/env_universal_common.cpp:485
#, c-format
msgid "Unable to open temporary file '%ls': %s"
msgstr ""
msgstr "Die temporäre Datei '%ls' kann nicht geöffnet werden: %s"
#: src/env_universal_common.cpp:499
#, c-format
msgid "Locking the universal var file took too long (%.3f seconds)."
msgstr ""
"Die Datei für universelle Variablen zu sperren dauerte zu lange (%.3f "
"Sekunden)"
msgstr "Die Datei für universelle Variablen zu sperren dauerte zu lange (%.3f Sekunden)"
#: src/env_universal_common.cpp:542
#, c-format
msgid "Unable to open universal variable file '%s': %s"
msgstr ""
msgstr "Die Universal-Variablen-Datei '%s' kann nicht geöffnet werden: %s"
#: src/env_universal_common.cpp:920
#, c-format
@@ -411,12 +394,12 @@ msgstr ""
#: src/env_universal_common.cpp:1134
#, c-format
msgid "Unable to make a pipe for universal variables using '%ls': %s"
msgstr ""
msgstr "Kann keine Pipe für die universalen Variablen über '%ls' anlegen: %s"
#: src/env_universal_common.cpp:1142
#, c-format
msgid "Unable to open a pipe for universal variables using '%ls': %s"
msgstr ""
msgstr "Kann keine Pipe für die universalen Variablen über '%ls' öffnen: %s"
#: src/event.cpp:184
#, c-format
@@ -463,7 +446,7 @@ msgstr ""
#: src/expand.cpp:555
msgid "Mismatched braces"
msgstr ""
msgstr "Unpassende Klammern"
#: src/fish.cpp:395
#, c-format
@@ -477,12 +460,12 @@ msgstr "Kann den no-execute Modus nicht in einer interaktiven Sitzung nutzen"
#: src/fish.cpp:581
#, c-format
msgid "Error reading script file '%s':"
msgstr ""
msgstr "Die Script-Datei '%s' kann nicht gelesen werden:"
#: src/fish.cpp:595
#, c-format
msgid "Error while reading file %ls\n"
msgstr ""
msgstr "Fehler beim Lesen der Datei %ls\n"
#: src/fish_indent.cpp:932 src/fish_key_reader.cpp:317
#, c-format
@@ -508,7 +491,7 @@ msgstr "Öffnen von \"%s\" fehlgeschlagen: %s\n"
#: src/fish_indent.cpp:1072
#, c-format
msgid "%s\n"
msgstr ""
msgstr "%s\n"
#: src/history.cpp:381
#, c-format
@@ -518,41 +501,41 @@ msgstr "Sperren der Geschichts-Datei dauerte zu lang (%.3f Sekunden)."
#: src/history.cpp:887
#, c-format
msgid "Error when renaming history file: %s"
msgstr ""
msgstr "Fehler beim Umbenennen der Verlaufsdatei: %s"
#: src/history.cpp:1285
#, c-format
msgid "History session ID '%ls' is not a valid variable name. "
msgstr ""
msgstr "Verlaufssitzungs-ID '%ls' ist kein gültiger Variablenname."
#: src/io.cpp:25
#, c-format
msgid "An error occurred while redirecting file '%ls'"
msgstr ""
msgstr "Bei der Umleitung der Datei '%ls' ist ein Fehler aufgetreten"
#: src/io.cpp:26
#, c-format
msgid "The file '%ls' already exists"
msgstr ""
msgstr "Die Datei '%ls' existiert bereits"
#: src/io.cpp:254
#, c-format
msgid "Path '%ls' is not a directory"
msgstr ""
msgstr "Pfad '%ls' ist kein Ordner"
#: src/io.cpp:257
#, c-format
msgid "Path '%ls' does not exist"
msgstr ""
msgstr "Pfad '%ls' nicht gefunden"
#: src/output.cpp:434
#, c-format
#, fuzzy, c-format
msgid "Tried to use terminfo string %s on line %ld of %s, which is "
msgstr ""
msgstr "Versucht, terminfo Text %s in Zeile %ld von %s zu nutzen, welcher undefiniert ist. Bitte melde diesen Fehler."
#: src/pager.cpp:45
msgid "search: "
msgstr ""
msgstr "Suche: "
#: src/pager.cpp:541
#, c-format
@@ -566,32 +549,31 @@ msgstr "Zeilen %lu bis %lu von %lu"
#: src/pager.cpp:551
msgid "(no matches)"
msgstr ""
msgstr "(keine Treffer)"
#: src/parse_execution.cpp:524
#, c-format
msgid "switch: Expected at most one argument, got %lu\n"
msgstr ""
msgstr "switch: Erwartet höchstens einen Parameter, aber %lu angegeben\n"
#: src/parse_execution.cpp:740
#, c-format
msgid ""
"Unknown command. A component of '%ls' is not a directory. Check your $PATH."
msgstr ""
msgid "Unknown command. A component of '%ls' is not a directory. Check your $PATH."
msgstr "Befehl nicht gefunden. Ein Element von '%ls' ist kein Verzeichnis. Überprüfe deinen $PATH"
#: src/parse_execution.cpp:744
#, c-format
msgid "Unknown command. A component of '%ls' is not a directory."
msgstr ""
msgstr "Befehl nicht gefunden. Eine Komponente von '%ls' ist kein Verzeichnis."
#: src/parse_execution.cpp:750
#, c-format
msgid "Unknown command. '%ls' exists but is not an executable file."
msgstr ""
msgstr "Befehl nicht gefunden. '%ls' existiert, ist aber keine ausführbare Datei."
#: src/parse_execution.cpp:791
msgid "Unknown command:"
msgstr ""
msgstr "Befehl nicht gefunden:"
#: src/parse_execution.cpp:839
msgid "The expanded command was empty."
@@ -600,38 +582,38 @@ msgstr ""
#: src/parse_execution.cpp:1005
#, c-format
msgid "Invalid redirection: %ls"
msgstr ""
msgstr "Ungültige Umleitung: %ls"
#: src/parse_execution.cpp:1016
#, c-format
msgid "Invalid redirection target: %ls"
msgstr ""
msgstr "Ungültiges Umleitungsziel: %ls"
#: src/parse_execution.cpp:1027
#, c-format
msgid "Requested redirection to '%ls', which is not a valid file descriptor"
msgstr ""
msgstr "Umleitung zu '%ls' angefordert, dies ist aber kein gültiger Dateideskriptor"
#: src/parse_util.cpp:34
#, c-format
msgid "The '%ls' command can not be used immediately after a backgrounded job"
msgstr ""
msgstr "Der Befehl '%ls' kann nicht direkt nach einem Hintergrundjob aufgerufen werden"
#: src/parse_util.cpp:38
msgid "Backgrounded commands can not be used as conditionals"
msgstr ""
msgstr "Hintergrundbefehle können nicht als Bedingungen benutzt werden"
#: src/parse_util.cpp:41
msgid "'end' does not take arguments. Did you forget a ';'?"
msgstr ""
msgstr "'end' braucht keine Parameter. Fehlendes ';'?"
#: src/parse_util.cpp:44
msgid "The 'time' command may only be at the beginning of a pipeline"
msgstr ""
msgstr "Der 'time' Befehl darf nur am Anfang einer Pipeline stehen"
#: src/parse_util.cpp:1180
msgid "$status is not valid as a command. See `help conditions`"
msgstr ""
msgstr "$status ist kein gültiger Befehl. Siehe `help conditions`"
#: src/parser.cpp:166
#, c-format
@@ -645,35 +627,35 @@ msgstr "Zeit\tSum\tBefehl\n"
#: src/parser.cpp:220
#, c-format
msgid "in function '%ls'"
msgstr ""
msgstr "in der Funktion '%ls'"
#: src/parser.cpp:235
#, c-format
msgid " with arguments '%ls'"
msgstr ""
msgstr "mit den Parametern '%ls'"
#: src/parser.cpp:242
msgid "in command substitution\n"
msgstr ""
msgstr "in der Befehlsersetzung\n"
#: src/parser.cpp:248
#, c-format
msgid "from sourcing file %ls\n"
msgstr ""
msgstr "aus der Quelldatei %ls\n"
#: src/parser.cpp:256
#, c-format
msgid "in event handler: %ls\n"
msgstr ""
msgstr "im Ereignis-Handler: %ls\n"
#: src/parser.cpp:276
#, c-format
msgid "\tcalled on line %d of file %ls\n"
msgstr ""
msgstr "\taufgerufen in Zeile %d der Datei %ls\n"
#: src/parser.cpp:279
msgid "\tcalled during startup\n"
msgstr ""
msgstr "\twährend des Starts aufgerufen\n"
#: src/parser.cpp:428
#, c-format
@@ -682,21 +664,21 @@ msgstr "%ls (Zeile %d): "
#: src/parser.cpp:431
msgid "Startup"
msgstr ""
msgstr "Start"
#: src/parser.cpp:433
msgid "Standard input"
msgstr ""
msgstr "Standardeingabe"
#: src/parser.cpp:647
#, c-format
msgid "%ls (line %lu): "
msgstr ""
msgstr "%ls (Zeile %lu): "
#: src/parser.cpp:651
#, c-format
msgid "%ls: "
msgstr ""
msgstr "%ls: "
#: src/path.cpp:291
#, c-format
@@ -706,8 +688,7 @@ msgstr ""
#: src/path.cpp:293
#, c-format
msgid "Please set the %ls or HOME environment variable before starting fish."
msgstr ""
"Bitte setzen sie %ls oder die HOME Umgebungsvariable bevor sie fish starten."
msgstr "Bitte setzen sie %ls oder die HOME Umgebungsvariable bevor sie fish starten."
#: src/path.cpp:297
#, c-format
@@ -747,8 +728,7 @@ msgid "A second attempt to exit will terminate them.\n"
msgstr "Ein zweites 'exit' wird sie beenden.\n"
#: src/proc.cpp:207
msgid ""
"Use 'disown PID' to remove jobs from the list without terminating them.\n"
msgid "Use 'disown PID' to remove jobs from the list without terminating them.\n"
msgstr ""
#: src/proc.cpp:900
@@ -777,8 +757,7 @@ msgid "No TTY for interactive shell (tcgetpgrp failed)"
msgstr "Kein TTY für interaktive Shell (tcgetpgrp schlug fehl)"
#: src/reader.cpp:2493
msgid ""
"I appear to be an orphaned process, so I am quitting politely. My pid is "
msgid "I appear to be an orphaned process, so I am quitting politely. My pid is "
msgstr ""
#: src/reader.cpp:2535
@@ -1113,23 +1092,17 @@ msgstr "Fehler beim Einrichten der Pipe aufgetreten"
#: src/parse_constants.h:229
#, c-format
msgid ""
"The function '%ls' calls itself immediately, which would result in an "
"infinite loop."
msgstr ""
"Die Funktion '%ls' ruft sich sofort selbst auf. Dies wäre eine "
"Endlosschleife."
msgid "The function '%ls' calls itself immediately, which would result in an infinite loop."
msgstr "Die Funktion '%ls' ruft sich sofort selbst auf. Dies wäre eine Endlosschleife."
#: src/parse_constants.h:233
msgid ""
"The call stack limit has been exceeded. Do you have an accidental infinite "
"loop?"
msgid "The call stack limit has been exceeded. Do you have an accidental infinite loop?"
msgstr ""
#: src/parse_constants.h:236
#, c-format
msgid "Unknown builtin '%ls'"
msgstr "unbekannter interner Befehl '%ls'"
msgstr "Unbekannter interner Befehl '%ls'"
#: src/parse_constants.h:239
#, c-format
@@ -1199,14 +1172,11 @@ msgid "Unsupported use of '='. In fish, please use 'set %ls %ls'."
msgstr ""
#: src/parse_constants.h:289
msgid ""
"'time' is not supported for background jobs. Consider using 'command time'."
msgid "'time' is not supported for background jobs. Consider using 'command time'."
msgstr ""
#: src/parse_constants.h:293
msgid ""
"'{ ... }' is not supported for grouping commands. Please use 'begin; ...; "
"end'"
msgid "'{ ... }' is not supported for grouping commands. Please use 'begin; ...; end'"
msgstr ""
#: src/parse_tree.h:63
@@ -1316,8 +1286,7 @@ msgid "Select directory by letter or number: "
msgstr ""
#: /tmp/fish.i8YroE/explicit/share/functions/cdh.fish:6
msgid ""
"Error: expected a number between 1 and %d or letter in that range, got \"%s\""
msgid "Error: expected a number between 1 and %d or letter in that range, got \"%s\""
msgstr ""
#: /tmp/fish.i8YroE/explicit/share/functions/edit_command_buffer.fish:2
@@ -5692,7 +5661,7 @@ msgstr "Inhalt der Konfigurationsdatei ausgeben"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-extracttemplates.fish:2
msgid "Set temp dir"
msgstr "temp-Verzeichnis festlegen"
msgstr "Temp-Verzeichnis festlegen"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-file.fish:2
msgid "Resync package contents from source"
@@ -5733,7 +5702,7 @@ msgstr "Architektur festlegen"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-file.fish:13
msgid "Set sources.list file"
msgstr "sources.list-Datei angeben"
msgstr "Sources.list-Datei festlegen"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-file.fish:14
msgid "Only display package name"
@@ -6058,7 +6027,7 @@ msgstr "Zeitablauf für Zwischenspeicher angeben"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-listbugs.fish:19
msgid "Specify apt config file"
msgstr "apt-Konfigurationsdatei angeben"
msgstr "Apt-Konfigurationsdatei angeben"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-listbugs.fish:21
msgid "Assume no to all questions"
@@ -6233,7 +6202,7 @@ msgstr "Keine Meldungen auf Standardausgabe"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-proxy-import.fish:5
msgid "Recurse into subdir"
msgstr "in Unterverzeichnis verzweigen"
msgstr "In Unterverzeichnisse absteigen"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-proxy-import.fish:6
msgid "Dir to import"
@@ -6261,7 +6230,7 @@ msgstr "Status der Abhängigkeiten anzeigen"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-rdepends.fish:5
msgid "List packages depending on"
msgstr "Pakete auflisten, die abhängen von "
msgstr "Pakete auflisten, die abhängen von"
#: /tmp/fish.i8YroE/implicit/share/completions/apt-rdepends.fish:6
msgid "Comma-separated list of dependency types to follow recursively"
@@ -13475,7 +13444,7 @@ msgstr ""
#: /tmp/fish.i8YroE/implicit/share/completions/castnow.fish:14
#: /tmp/fish.i8YroE/implicit/share/completions/mplayer.fish:7
msgid "Play in random order"
msgstr "in zufälliger Reihenfolge spielen"
msgstr "In zufälliger Reihenfolge spielen"
#: /tmp/fish.i8YroE/implicit/share/completions/castnow.fish:15
msgid "List all files in directories recursively"
@@ -16138,7 +16107,7 @@ msgstr ""
#: /tmp/fish.i8YroE/implicit/share/completions/complete.fish:5
msgid "Old style long option to complete"
msgstr "zu vervollständigende lange Option im alten Format"
msgstr "Zu vervollständigende lange Option im alten Format"
#: /tmp/fish.i8YroE/implicit/share/completions/complete.fish:6
msgid "Don't use file completion"
@@ -22557,10 +22526,9 @@ msgstr "Änderung in der Anzahl von Worttrennern ignorieren"
#: /tmp/fish.i8YroE/implicit/share/completions/diff.fish:6
msgid "Ignore all white space"
msgstr "white space (Worttrenner) ignorieren"
msgstr "Alle Leerräume (Worttrenner) ignorieren"
#: /tmp/fish.i8YroE/implicit/share/completions/diff.fish:7
#: /tmp/fish.i8YroE/implicit/share/completions/git.fish:36
#: /tmp/fish.i8YroE/implicit/share/completions/diff.fish:7 /tmp/fish.i8YroE/implicit/share/completions/git.fish:36
#: /tmp/fish.i8YroE/implicit/share/completions/git.fish:802
msgid "Ignore changes whose lines are all blank"
msgstr "Änderungen ignorieren, deren Zeilen alle leer sind"
@@ -23262,8 +23230,7 @@ msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
#: /tmp/fish.i8YroE/implicit/share/completions/dive.fish:2
msgid ""
"If CI=true in the environment, use the given yaml to drive validation rules"
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
#: /tmp/fish.i8YroE/implicit/share/completions/dive.fish:3
@@ -23287,9 +23254,7 @@ msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
#: /tmp/fish.i8YroE/implicit/share/completions/dive.fish:8
msgid ""
"Skip the interactive TUI and write the layer analysis statistics to a given "
"file"
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
#: /tmp/fish.i8YroE/implicit/share/completions/dive.fish:9

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
@@ -74,11 +74,22 @@ function __fish_adb_list_files
end
# Return list of directories suffixed with '/'
__fish_adb_run_command find -H "$token*" -maxdepth 0 -type d 2\>/dev/null | awk '{print $1"/"}'
__fish_adb_run_command find -H "$token*" -maxdepth 0 -type d 2\>/dev/null | awk '{print $0"/"}'
# Return list of 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,3 @@
complete -c age-keygen -s o -l output -n "not __fish_contains_opt -s o output" -d "output file for secret key"
complete -c age-keygen -s y -n "not __fish_contains_opt -s y" -d "read identity file, print recipient(s)"
complete -c age -l version -d "print version number"

View File

@@ -0,0 +1,9 @@
complete -c age -s e -l encrypt -n "not __fish_contains_opt -s d decrypt" -d "encrypt"
complete -c age -s r -l recipient -n "not __fish_contains_opt -s d decrypt; and not __fish_contains_opt -s p passphrase" -d "public key"
complete -c age -s R -l recipients-file -n "not __fish_contains_opt -s d decrypt; and not __fish_contains_opt -s p passphrase" -d "file with public key(s)"
complete -c age -s a -l armor -n "not __fish_contains_opt -s d decrypt" -d "PEM encode ciphertext"
complete -c age -s p -l passphrase -n "not __fish_contains_opt -s d decrypt; and not __fish_contains_opt -s r recipient -s R recipients-file" -d "passphrase"
complete -c age -s d -l decrypt -n "not __fish_contains_opt -s e encrypt" -d "decrypt"
complete -c age -s i -l identity -n "__fish_contains_opt -s e encrypt -s d decrypt" -d "file with private key(s)"
complete -c age -s j -n "__fish_contains_opt -s e encrypt -s d decrypt" -d "plugin"
complete -c age -l version -d "print version number"

View File

@@ -0,0 +1,6 @@
#airmon-ng
set -l commands "start stop check"
complete -c airmon-ng -x -n "not __fish_seen_subcommand_from $commands" -a "$commands"
complete -c airmon-ng -x -n "__fish_seen_subcommand_from $commands; and not __fish_seen_subcommand_from (__fish_print_interfaces)" -a "(__fish_print_interfaces)"
complete -c airmon-ng -f

View File

@@ -8,7 +8,7 @@ complete -c ansible -s f -l forks -a "(seq 0 100)" -d "Number of parallel proces
complete -c ansible -s h -l help -d "Shows a help message"
complete -c ansible -s i -l inventory -r -d "Specify inventory host path or comma separated host list"
complete -c ansible -s l -l limit -r -d "Further limit selected hosts to an additional pattern"
complete -c ansible -l limit-hosts -r -d "List all matching hosts"
complete -c ansible -l list-hosts -r -d "List all matching hosts"
complete -c ansible -s m -l module-name -r -d "Module name to execute (default=command)"
complete -c ansible -s M -l module-path -r -d "Specify path(s) to module library (default=None)"
complete -c ansible -l new-vault-password-file -f -d "New vault password file for rekey"

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

@@ -36,6 +36,7 @@ complete -f -n __fish_apt_no_subcommand -c apt-get -a clean -d 'Clean local cach
complete -f -n __fish_apt_no_subcommand -c apt-get -a autoclean -d 'Clean packages no longer be downloaded'
complete -f -n __fish_apt_no_subcommand -c apt-get -a autoremove -d 'Remove automatically installed packages'
complete -c apt-get -l no-install-recommends -d 'Do not install recommended packages'
complete -c apt-get -l no-install-suggests -d 'Do not install suggested packages'
complete -c apt-get -s d -l download-only -d 'Download Only'
complete -c apt-get -s f -l fix-broken -d 'Correct broken dependencies'
complete -c apt-get -s m -l fix-missing -d 'Ignore missing packages'
@@ -43,10 +44,12 @@ complete -c apt-get -l no-download -d 'Disable downloading packages'
complete -c apt-get -s q -l quiet -d 'Quiet mode'
complete -c apt-get -s s -l simulate -l just-print -l dry-run -l recon -l no-act -d 'Perform a simulation'
complete -c apt-get -s y -l yes -l assume-yes -d 'Automatic yes to prompts'
complete -c apt-get -l assume-no -d 'Automatic no to prompts'
complete -c apt-get -s u -l show-upgraded -d 'Show upgraded packages'
complete -c apt-get -s V -l verbose-versions -d 'Show full versions for packages'
complete -c apt-get -s b -l compile -l build -d 'Compile source packages'
complete -c apt-get -l install-recommends -d 'Install recommended packages'
complete -c apt-get -l install-suggests -d 'Install suggested packages'
complete -c apt-get -l ignore-hold -d 'Ignore package Holds'
complete -c apt-get -l no-upgrade -d "Do not upgrade packages"
complete -c apt-get -l force-yes -d 'Force yes'

View File

@@ -37,7 +37,18 @@ complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -a '(__fish_pri
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -a '(__fish_print_apt_packages --installed | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250)'
complete -k -c apt -n "__fish_seen_subcommand_from $handle_file_pkg_subcmds" -a '(__fish_complete_suffix .deb)'
complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-recommends
complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-recommends -d 'Do not install recommended packages'
complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-suggests -d 'Do not install suggested packages'
complete -c apt -n "__fish_seen_subcommand_from install" -s d -l download-only -d 'Download Only'
complete -c apt -n "__fish_seen_subcommand_from install" -s f -l fix-broken -d 'Correct broken dependencies'
complete -c apt -n "__fish_seen_subcommand_from install" -s m -l fix-missing -d 'Ignore missing packages'
complete -c apt -n "__fish_seen_subcommand_from install" -l no-download -d 'Disable downloading packages'
complete -c apt -n "__fish_seen_subcommand_from install" -s q -l quiet -d 'Quiet mode'
complete -c apt -n "__fish_seen_subcommand_from install" -s s -l simulate -l just-print -l dry-run -l recon -l no-act -d 'Perform a simulation'
complete -c apt -n "__fish_seen_subcommand_from install" -s y -l yes -l assume-yes -d 'Automatic yes to prompts'
complete -c apt -n "__fish_seen_subcommand_from install" -l assume-no -d 'Automatic no to prompts'
complete -c apt -n "__fish_seen_subcommand_from install" -l install-recommends -d 'Install recommended packages'
complete -c apt -n "__fish_seen_subcommand_from install" -l install-suggests -d 'Install suggested packages'
# This advanced flag is the safest way to upgrade packages that otherwise would have been kept back
complete -c apt -n "__fish_seen_subcommand_from upgrade" -l with-new-pkgs
@@ -59,15 +70,24 @@ __fish_apt_option list -l all-versions -d 'Show all versions of any package'
# Search
__fish_apt_subcommand search -r -d 'Search for packages'
# Search
# Show
__fish_apt_subcommand show -r -d 'Show package information'
# Showsrc
__fish_apt_subcommand showsrc -r -d 'Show source package information'
# Source
__fish_apt_subcommand source -r -d 'Download source package'
# Install
__fish_apt_subcommand install -r -d 'Install packages'
__fish_apt_option install -l reinstall -d 'Reinstall package'
# Reinstall
__fish_apt_subcommand reinstall -r -d 'Reinstall packages'
# Remove
__fish_apt_subcommand remove -r -d 'Remove packages'
__fish_apt_subcommand remove -x -d 'Remove packages'
# Edit sources
__fish_apt_subcommand edit-sources -d 'Edit sources list'
@@ -80,6 +100,7 @@ __fish_apt_subcommand upgrade -r -d 'Upgrade packages'
# Full Upgrade
__fish_apt_subcommand full-upgrade -r -d 'Upgrade packages, removing others when needed'
__fish_apt_subcommand dist-upgrade -r -d 'Upgrade packages, removing others when needed'
# Purge
__fish_apt_subcommand purge -x -d 'Remove packages and delete their config files'
@@ -90,6 +111,15 @@ __fish_apt_subcommand changelog -r -d 'Download and display package changelog'
# Autoremove
__fish_apt_subcommand autoremove -d 'Remove packages no longer needed as dependencies'
# Autoremove
__fish_apt_subcommand autopurge -d 'Remove packages no longer needed as dependencies and delete their config files'
# Clean
__fish_apt_subcommand clean -d 'Remove downloaded packages from cache'
# Autoclean
__fish_apt_subcommand autoclean -d 'Remove obsolete packages from cache'
# Policy
__fish_apt_subcommand policy -x -d 'Display source or package priorities'
@@ -99,4 +129,13 @@ __fish_apt_subcommand depends -r -d 'List package dependencies'
# Rdepends
__fish_apt_subcommand rdepends -r -d 'List package reverse dependencies'
# Download
__fish_apt_subcommand download -x -d 'Download packages'
# Build-dep
__fish_apt_subcommand build-dep -x -d 'Install packages needed to build the given package'
# Help
__fish_apt_subcommand help -d 'Print help page'
functions -e __fish_apt_subcommand __fish_apt_option

20
share/completions/ar.fish Normal file
View File

@@ -0,0 +1,20 @@
function __single
complete -f -c ar -n __fish_use_subcommand -a $argv[1] -d $argv[2] # no dash
end
__single d "Delete modules from the archive."
__single m "move members in an archive."
__single p "Print the specified members of the archive, to the standard output file."
__single q "Quick append; Historically, add the files member... to the end of archive, without checking for replacement."
__single r "Insert the files member... into archive (with replacement)."
__single s "Add an index to the archive, or update it if it already exists."
__single t "Display a table listing the contents of archive, or those of the files listed in member."
__single x "Extract members (named member) from the archive."
functions -e __single
# TODO add mod
# A number of modifiers (mod) may immediately follow the p keyletter, to specify variations on an operation's behavior:
# add dash
# command format
# ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file

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

@@ -0,0 +1,175 @@
function __blender_player -d 'Check if -a option has been used, to run animation player'
return (__fish_contains_opt -s a; and not __fish_contains_opt -s b background)
end
function __blender_echo_input_file_name
# Find last argument ending in .blend (or .blend1, etc.)
# This is because a Blender invocation can open multiple blend file
# sequentially, so we need to find the last one up to this point.
set -l path (commandline -poc |
string match -r '.*\\.blend[0-9]*$' |
tail --lines=1)
# Using eval to expand ~ and variables specified on the commandline.
eval echo $path
end
function __blender_list_scenes
blender --background (__blender_echo_input_file_name) --python-expr 'import bpy
for scene in bpy.data.scenes:
print(f"\t{scene.name}")' 2>/dev/null |
string replace -r -f '^\t' ''
end
function __blender_list_texts
blender --background (__blender_echo_input_file_name) --python-expr 'import bpy
for text in bpy.data.texts:
print(f"\t{text.name}")' 2>/dev/null |
string replace -r -f '^\t' ''
end
function __blender_list_engines
blender --background --engine help 2>/dev/null | string replace -r -f '^\t' ''
end
function __blender_list_addons
blender --background --python-expr 'import addon_utils
for mod in addon_utils.modules():
print(f"\t{mod.__name__}")' 2>/dev/null |
string replace -r -f '^\t' ''
end
complete -c blender -n 'not __blender_player' -o h -l help -d 'Show help'
complete -c blender -n 'not __blender_player' -o v -l version -d 'Show version'
# Render Options:
complete -c blender -n 'not __blender_player' -o b -l background -d 'Hide UI'
complete -c blender -n 'not __blender_player' -o a -l render-anim -d 'Render animation'
complete -c blender -n 'not __blender_player; and test -e (__blender_echo_input_file_name)' -o S -l scene -a '(__blender_list_scenes)' -d 'Specify scene' -x
complete -c blender -n 'not __blender_player' -o f -l render-frame -d 'Render specified frame(s)' -x
complete -c blender -n 'not __blender_player' -o s -l frame-start -d 'Specify start frame' -x
complete -c blender -n 'not __blender_player' -o e -l frame-end -d 'Specify end frame' -x
complete -c blender -n 'not __blender_player' -o j -l frame-jump -d 'Skip frame count' -x
complete -c blender -n 'not __blender_player' -o o -l render-output -d 'Specify render output' -r
complete -c blender -n 'not __blender_player' -o E -l engine -a '(__blender_list_engines)' -d 'Render engine' -x
complete -c blender -n 'not __blender_player' -o t -l threads -d 'Specify thread count'
# Format Options:
complete -c blender -n 'not __blender_player' -o F -l render-format -a 'TGA\tTarga
RAWTGA\tTarga\ Raw
JPEG\tJPEG
IRIS\tIRIS
AVIRAW\tAVI\ Raw
AVIJPEG\tAVI\ with\ JPEG\ codec
PNG\tPNG
BMP\tBMP
HDR\tHDR
TIFF\tTIFF
OPEN_EXR\tOpenEXR
OPEN_EXR_MULTILAYER\tOpenEXR\ Multilayer
FFMPEG\tFFmpeg\ Video
CINEON\tCineon
DPX\tDPX
JP2\tJPEG\ 2000
WEBP\tWebP' -d 'Specify render format' -x
complete -c blender -n 'not __blender_player' -o x -l use-extension -a '0\tfalse
1\ttrue' -d 'Whether to add a file extension to an end of a file' -x
# Animation Playback Options:
complete -c blender -n 'not __blender_player' -o a -d 'Run as animation player'
complete -c blender -n '__blender_player' -o p -x -d 'Specify position and size'
complete -c blender -n '__blender_player' -o m -d 'Read from disk (do not buffer)'
complete -c blender -n '__blender_player' -o f -x -d 'Specify FPS to start with'
complete -c blender -n '__blender_player' -o j -x -d 'Specify frame step'
complete -c blender -n '__blender_player' -o s -x -d 'Specify start frame'
complete -c blender -n '__blender_player' -o e -x -d 'Specify end frame'
complete -c blender -n '__blender_player' -o c -x -d 'Memory in MB for cache'
# Window Options:
complete -c blender -n 'not __blender_player' -o w -l window-border -d 'Show window borders'
complete -c blender -n 'not __blender_player' -o W -l window-fullscreen -d 'Show in fullscreen'
complete -c blender -n 'not __blender_player' -o p -l window-geometry -d 'Specify position and size' -x
complete -c blender -n 'not __blender_player' -o M -l window-maximized -d 'Maximize window'
complete -c blender -n 'not __blender_player' -o con -l start-console -d 'Open console'
complete -c blender -n 'not __blender_player' -l no-native-pixels -d 'Do not use native pixel size'
complete -c blender -n 'not __blender_player' -l no-window-focus -d 'Open unfocused'
# Python Options:
complete -c blender -n 'not __blender_player' -o y -l enable-autoexec -d 'Enable Python scripts automatic execution'
complete -c blender -n 'not __blender_player' -o Y -l disable-autoexec -d 'Disable Python scripts automatic execution'
complete -c blender -n 'not __blender_player' -o P -l python -d 'Specify Python script' -r
complete -c blender -n 'not __blender_player; and test -e (__blender_echo_input_file_name)' -l python-text -a '(__blender_list_texts)' -d 'Specify Python text block' -x
complete -c blender -n 'not __blender_player' -l python-expr -d 'Specify Python expression' -x
complete -c blender -n 'not __blender_player' -l python-console -d 'Open interactive console'
complete -c blender -n 'not __blender_player' -l python-exit-code -d 'Specify Python exit code on exception'
complete -c blender -n 'not __blender_player' -l python-use-system-env -d 'Use system env vars and user site-packages'
complete -c blender -n 'not __blender_player' -l addons -a '(__fish_append , (__blender_list_addons))' -d 'Specify addons' -x
# Logging Options:
complete -c blender -n 'not __blender_player' -l log -d 'Enable logging categories' -x
complete -c blender -n 'not __blender_player' -l log-level -d 'Specify log level' -x
complete -c blender -n 'not __blender_player' -l log-show-basename -d 'Hide file leading path'
complete -c blender -n 'not __blender_player' -l log-show-backtrace -d 'Show backtrace'
complete -c blender -n 'not __blender_player' -l log-show-timestamp -d 'Show timestamp'
complete -c blender -n 'not __blender_player' -l log-file -d 'Specify log file' -r
# Debug Options:
complete -c blender -n 'not __blender_player' -o d -l debug -d 'Enable debugging'
complete -c blender -n 'not __blender_player' -l debug-value -d 'Specify debug value'
complete -c blender -n 'not __blender_player' -l debug-events -d 'Enable debug messages from the event system'
complete -c blender -n 'not __blender_player' -l debug-ffmpeg -d 'Enable debug messages from FFmpeg library'
complete -c blender -n 'not __blender_player' -l debug-handlers -d 'Enable debug messages for event handling'
complete -c blender -n 'not __blender_player' -l debug-libmv -d 'Enable debug messages for libmv library'
complete -c blender -n 'not __blender_player' -l debug-cycles -d 'Enable debug messages for Cycles'
complete -c blender -n 'not __blender_player' -l debug-memory -d 'Enable fully guarded memory allocation and debugging'
complete -c blender -n 'not __blender_player' -l debug-jobs -d 'Enable time profiling for background jobs'
complete -c blender -n 'not __blender_player' -l debug-python -d 'Enable debug messages for Python'
complete -c blender -n 'not __blender_player' -l debug-depsgraph -d 'Enable all debug messages for dependency graph'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-eval -d 'Enable debug messages for dependency graph related on evalution'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-build -d 'Enable debug messages for dependency graph related on its construction'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-tag -d 'Enable debug messages for dependency graph related on tagging'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-no-threads -d 'Enable single treaded evaluation for dependency graph'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-time -d 'Enable debug messages for dependency graph related on timing'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-pretty -d 'Enable colors for dependency graph debug messages'
complete -c blender -n 'not __blender_player' -l debug-depsgraph-uuid -d 'Enable virefication for dependency graph session-wide identifiers'
complete -c blender -n 'not __blender_player' -l debug-ghost -d 'Enable debug messages for Ghost'
complete -c blender -n 'not __blender_player' -l debug-wintab -d 'Enable debug messages for Wintab'
complete -c blender -n 'not __blender_player' -l debug-gpu -d 'Enable GPU debug context and infromation for OpenGL'
complete -c blender -n 'not __blender_player' -l debug-gpu-force-workarounds -d 'Enable workarounds for typical GPU issues'
complete -c blender -n 'not __blender_player' -l debug-wm -d 'Enable debug messages for window manager'
complete -c blender -n 'not __blender_player' -l debug-xr -d 'Enable debug messages for virtual reality contexts'
complete -c blender -n 'not __blender_player' -l debug-xr-time -d 'Enable debug messages for virtual reality frame rendering times'
complete -c blender -n 'not __blender_player' -l debug-all -d 'Enable all debug messages'
complete -c blender -n 'not __blender_player' -l debug-io -d 'Enable debug for I/O'
complete -c blender -n 'not __blender_player' -l debug-fpe -d 'Enable floating point exceptions'
complete -c blender -n 'not __blender_player' -l debug-exit-on-error -d 'Exit on internal error'
complete -c blender -n 'not __blender_player' -l debug-freestyle -d 'Enable debug messages for Freestyle'
complete -c blender -n 'not __blender_player' -l disable-crash-handler -d 'Disable crash handler'
complete -c blender -n 'not __blender_player' -l disable-abort-handler -d 'Disable abort handler'
complete -c blender -n 'not __blender_player' -l verbose -d 'Specify logging verbosity level' -x
# GPU Options:
complete -c blender -n 'not __blender_player' -l gpu-backend -a 'vulkan metal opengl' -d 'Specify GPU backend' -x
# Misc Options:
complete -c blender -n 'not __blender_player' -l open-last -d 'Open the most recent .blend file'
complete -c blender -n 'not __blender_player' -l app-template -a default -d 'Specify app template' -x
complete -c blender -n 'not __blender_player' -l factory-startup -d 'Do not read startup.blend'
complete -c blender -n 'not __blender_player' -l enable-event-simulate -d 'Enable event simulation'
complete -c blender -n 'not __blender_player' -l env-system-datafiles -d 'Set BLENDER_SYSTEM_DATAFILES variable' -r
complete -c blender -n 'not __blender_player' -l env-system-scripts -d 'Set BLENDER_SYSTEM_SCRIPTS variable' -r
complete -c blender -n 'not __blender_player' -l env-system-python -d 'Set BLENDER_SYSTEM_PYTHON variable' -r
complete -c blender -n 'not __blender_player' -o noaudio -d 'Disable sound'
complete -c blender -n 'not __blender_player' -o setaudio -a 'None SDL OpenAL CoreAudio JACK PulseAudio WASAPI' -d 'Specify sound device' -x
complete -c blender -n 'not __blender_player' -o r -l register -d 'Register .blend extension for current user'
complete -c blender -n 'not __blender_player' -l register-allusers -d 'Register .blend extension for all users'
complete -c blender -n 'not __blender_player' -l unregister -d 'Unregister .blend extension for current user'
complete -c blender -n 'not __blender_player' -l unregister-allusers -d 'Unregister .blend extension for all users'
complete -c blender -n 'not __blender_player' -o - -d 'End option processing, following arguments passed to python'

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

@@ -0,0 +1 @@
bws completions fish | source

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

@@ -0,0 +1,10 @@
# calendar
complete -c calendar -s A -s l -d "Today + N days forward"
complete -c calendar -s a -d "Process all users' calendars and mail the results"
complete -c calendar -s B -d "Today - N days backward"
complete -c calendar -s b -d "Cyrillic date calculation mode"
complete -c calendar -s e -d "Today + N days forward, if today is Friday"
complete -c calendar -s f -rF -d "Path to default calendar file"
complete -c calendar -s t -x -d "Today is [[[cc]yy]mm]dd]"
complete -c calendar -s w -d "Print day of the week name"

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

@@ -0,0 +1,78 @@
#checkinstall
# Set yes/no variable
set -l yn "yes no"
# Base-level completion
complete -c checkinstall -f
# Package type selection
complete -c checkinstall -x -o t -l type -a "slackware rpm debian" -d "Choose packaging system"
complete -c checkinstall -f -o S -d "Build a Slackware package"
complete -c checkinstall -f -o R -d "Build an RPM package"
complete -c checkinstall -f -o D -d "Build a Debian package"
# Install options
complete -c checkinstall -x -l install -a "$yn" -d "Toggle created package installation"
complete -c checkinstall -x -l fstrans -a "$yn" -d "Enable/disable the filesystem translation code"
# Scripting options
complete -c checkinstall -f -o y -l default -d "Accept default answers to all questions"
complete -c checkinstall -x -l pkgname -d "Set name"
complete -c checkinstall -x -l pkgversion -d "Set version"
complete -c checkinstall -x -o A -l arch -l pkgarch -d "Set architecture"
complete -c checkinstall -x -l pkgrelease -d "Set release"
complete -c checkinstall -x -l pkglicense -d "Set license"
complete -c checkinstall -x -l pkggroup -d "Set software group"
complete -c checkinstall -x -l pkgsource -d "Set source location"
complete -c checkinstall -x -l pkgalitsource -d "Set alternate source location"
complete -c checkinstall -F -r -l pakdir -a "(__fish_complete_directories)" -d "The new package will be saved here"
complete -c checkinstall -x -l maintainer -d "The package maintainer (.deb)"
complete -c checkinstall -x -l provides -d "Features provided by this package"
complete -c checkinstall -x -l requires -d "Features required by this package"
complete -c checkinstall -x -l recommends -d "Features recommended by this package"
complete -c checkinstall -x -l sggests -d "Featues suggested by this package"
complete -c checkinstall -x -l conflicts -d "Packages that this package cannot be installed with (.deb)"
complete -c checkinstall -x -l replaces -d "Packages that this package replaces (.deb)"
complete -c checkinstall -x -l rpmflags -d "Pass these flags to the rpm installer"
complete -c checkinstall -f -l rpmi -d "Use the -i flag for rpm when installing a .rpm"
complete -c checkinstall -f -l rpmu -d "Use the -U flag for rpm when installing a .rpm"
complete -c checkinstall -x -l dpkgflags -d "Pass these flags to the dpkg installer"
complete -c checkinstall -x -l spec -a "(__fish_complete_path)" -d ".spec file location"
complete -c checkinstall -f -l nodoc -d "Do not include documentation files"
# Info display options
complete -c checkinstall -x -o d -a "0 1 2" -d "Set debug level"
complete -c checkinstall -f -o si -d "Run an interactive install command"
complete -c checkinstall -x -l showinstall -a "$yn" -d "Toggle interactive install command"
complete -c checkinstall -f -o ss -d "Run an interactive Slackware installation script"
complete -c checkinstall -x -l showslack -a "$yn" -d "Toggle interactive Slackware installation script"
# Package tuning options
complete -c checkinstall -x -l autodoinst -a "$yn" -d "Toggle the creation of a doinst.sh script"
complete -c checkinstall -x -l strip -a "$yn" -d "Strip any ELF binaries found inside the package"
complete -c checkinstall -x -l stripso -a "$yn" -d "Strop any ELF binary libraries (.so files)"
complete -c checkinstall -x -l addso -a "$yn" -d "Search for ant shared libs and add them to /etc/ld.so.conf"
complete -c checkinstall -x -l reset-uids -a "$yn" -d "Reset perms for all files"
complete -c checkinstall -x -l gzman -a "$yn" -d "Compress any man pages found inside the package"
complete -c checkinstall -x -l docdir -a "(__fish_complete_directories)" -d "Where to put documentation files"
complete -c checkinstall -x -l umask -d "Set the umask value"
complete -c checkinstall -x -l exclude -a "(__fish_complete_path)" -d "Excluse these files/directories from the package"
complete -c checkinstall -F -r -l include -d "Include file/directories in this file in the package"
complete -c checkinstall -f -l inspect -d "Inspect the package's file list"
complete -c checkinstall -f -l review-spec -d "Review the dpec file before creating a .rpm"
complete -c checkinstall -f -l review-control -d "Review the control file before creating a .deb"
complete -c checkinstall -f -l newslack -d "Use the new (8.1+) Slackware description format"
complete -c checkinstall -F -l with-tar -d "Manually set the path to the tar binary"
# Cleanup options
complete -c checkinstall -x -l deldoc -a "$yn" -d "Delete doc-pak upon termination"
complete -c checkinstall -x -l deldesc -a "$yn" -d "Delete description-pak upon termination"
complete -c checkinstall -x -l delspec -a "$yn" -d "Delete spec file upon termination"
complete -c checkinstall -f -l bk -d "Backup any overwritten files"
complete -c checkinstall -x -l backup -a "$yn" -d "Toggle backup"
# About checkinstall
complete -c checkinstall -f -o h -l help -d "Show help"
complete -c checkinstall -f -l copyright -d "Show Copyright information"
complete -c checkinstall -f -l version -d "Show version information"

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

@@ -0,0 +1 @@
cobra-cli completion fish | source

View File

@@ -29,7 +29,7 @@ import json
json_data = open('composer.json')
data = json.load(json_data)
json_data.close()
packages = itertools.chain(data['require'].keys(), data['require-dev'].keys())
packages = itertools.chain(data.get('require', {}).keys(), data.get('require-dev', {}).keys())
print(\"\n\".join(packages))
" | $python -S
end

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

@@ -0,0 +1 @@
crc completion fish | source

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'
@@ -231,3 +231,4 @@ complete -c curl -l eprt -l no-eprt -d 'for --disable-eprt'
complete -c curl -l epsv -l no-epsv -d 'for --disable-epsv'
complete -c curl -l max-redir -d 'Set maximum number of redirects'
complete -c curl -l xattr -d 'Store metadata in xattrs (like origin URL)'
complete -c curl -l url-query -d '(HTTP) Add a URL query part'

View File

@@ -1 +1,4 @@
deno completions fish | source
# complete deno task
complete -f -c deno -n "__fish_seen_subcommand_from task" -n "__fish_is_nth_token 2" -a "(NO_COLOR=1 deno task &| string match -rg '^- (\S*)')"

View File

@@ -0,0 +1,22 @@
function __fish_dmidecode_complete_keywords
dmidecode -s 2>&1 1>/dev/null | string match -rg '^\s+(.*)'
end
function __fish_dmidecode_complete_types
dmidecode -t 2>&1 1>/dev/null | string match -rg '^\s+(.*)'
end
complete -c dmidecode -f
complete -c dmidecode -s d -l dev-mem -r -d 'Memory device file'
complete -c dmidecode -s q -l quiet -d 'Be less verbose'
complete -c dmidecode -l no-quirks -d 'Decode everything exactly as it is'
complete -c dmidecode -s s -l string -xa '(__fish_dmidecode_complete_keywords)' -d 'Only display specified value'
complete -c dmidecode -s t -l type -xa '(__fish_dmidecode_complete_types)' -d 'Only display entries of specified type'
complete -c dmidecode -s H -l handle -x -d 'Only display specified handle'
complete -c dmidecode -s u -l dump -d 'Do not decode the entries'
complete -c dmidecode -l dump-bin -r -d 'Dump DMI data to a file'
complete -c dmidecode -l from-dump -r -d 'Read DMI data generated using --dump-bin'
complete -c dmidecode -l no-sysfs -d 'Do not attempt to read DMI data from sysfs files'
complete -c dmidecode -l oem-string -x -d 'Only display the value of the OEM string number N'
complete -c dmidecode -s h -l help -d 'Display usage information and exit'
complete -c dmidecode -s V -l version -d 'Display the version and exit'

View File

@@ -3,7 +3,7 @@
#
function __dnf_list_installed_packages
dnf repoquery --cacheonly "$cur*" --qf "%{NAME}" --installed </dev/null
dnf repoquery --cacheonly "$cur*" --qf "%{name}" --installed </dev/null
end
function __dnf_list_available_packages
@@ -21,12 +21,12 @@ function __dnf_list_available_packages
# This schema is bad, there is only a "pkg" field with the full
# packagename-version-release.fedorarelease.architecture
# tuple. We are only interested in the packagename.
set results (sqlite3 /var/cache/dnf/packages.db "SELECT pkg FROM available WHERE pkg LIKE \"$tok%\"" 2>/dev/null |
set results (sqlite3 /var/cache/dnf/packages.db "SELECT pkg FROM available WHERE pkg LIKE '$tok%'" 2>/dev/null |
string replace -r -- '-[^-]*-[^-]*$' '')
else
# In some cases dnf will ask for input (e.g. to accept gpg keys).
# Connect it to /dev/null to try to stop it.
set results (dnf repoquery --cacheonly "$tok*" --qf "%{NAME}" --available </dev/null 2>/dev/null)
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}" --available </dev/null 2>/dev/null)
end
if set -q results[1]
set results (string match -r -- '.*\\.rpm$' $files) $results
@@ -175,7 +175,6 @@ complete -c dnf -n __fish_use_subcommand -xa offline-upgrade -d "Prepare offline
complete -c dnf -n "__fish_seen_subcommand_from offline-upgrade" -xa download -d "Download updates for offline upgrade"
complete -c dnf -n "__fish_seen_subcommand_from offline-upgrade" -xa clean -d "Remove cached packages"
complete -c dnf -n "__fish_seen_subcommand_from offline-upgrade" -xa reboot -d "Reboot and install packages"
complete -c dnf -n "__fish_seen_subcommand_from offline-upgrade" -xa upgrade -d "Install cached packages without reboot"
complete -c dnf -n "__fish_seen_subcommand_from offline-upgrade" -xa log -d "Show logs of upgrade attempts"
# Provides

View File

@@ -0,0 +1 @@
doctl completion fish | source

View File

@@ -2,4 +2,3 @@ complete -c echo -s n -d "Do not output a newline"
complete -c echo -s s -d "Do not separate arguments with spaces"
complete -c echo -s E -d "Disable backslash escapes"
complete -c echo -s e -d "Enable backslash escapes"
complete -c echo -s h -l help -d "Display help and exit"

View File

@@ -1,5 +1,9 @@
complete -c entr -s a -d 'Respond to all events'
complete -c entr -s c -d 'Clear the screen before running'
complete -c entr -s d -d 'Track directories and exit if new file added'
complete -c entr -s n -d 'Run in non-interactive mode'
complete -c entr -s p -d 'Postpone execution of utility until a file is modified'
complete -c entr -s r -d 'Launch utility at startup and reload on file change'
complete -c entr -s c -d 'Clears the screen before running the utility'
complete -c entr -s h -l help -d 'Display help'
complete -c entr -s v -l version -d 'Output version information'
complete -c entr -s s -d 'Evaluate using the interpreter in SHELL env variable'
complete -c entr -s z -d 'Exit after utility completes'
complete -c entr -x -a '(__fish_complete_subcommand)'

View File

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

View File

@@ -1,15 +1,19 @@
set -l commands flashall getvar oem flashing reboot update erase format devices flash get_staged help stage boot fetch
function __fish_fastboot_list_partition_or_file
if __fish_seen_subcommand_from (__fish_fastboot_list_partition){_a,_b,}
__fish_complete_path
else
__fish_fastboot_list_partition
set -l tokens (commandline -opc)
# if last 2 token is flash, then list file
if test (count $tokens) -gt 2
if test $tokens[-2] = flash
__fish_complete_path
return
end
end
__fish_fastboot_list_partition
end
function __fish_fastboot_list_partition
set -l partitions boot bootloader dtbo modem odm odm_dlkm oem product pvmfw radio recovery system vbmeta vendor vendor_dlkm cache userdata system_ext
set -l partitions boot bootloader cache cust dtbo metadata misc modem odm odm_dlkm oem product pvmfw radio recovery system system_ext userdata vbmeta vendor vendor_dlkm vmbeta_system
for i in $partitions
echo $i
end
@@ -20,7 +24,7 @@ complete -c fastboot -s v -l verbose -d 'Verbose output'
complete -c fastboot -l version -d 'Display version'
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s w -d 'Wipe userdata'
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s s -d 'Specify a device'
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s s -x -a "(fastboot devices)" -d 'Specify a device'
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -s S -d 'Break into sparse files no larger than SIZE'
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -l slot -d 'Use SLOT; \'all\' for both slots, \'other\' for non-current slot (default: current active slot)' -xa "all other a b"
complete -n "not __fish_seen_subcommand_from $commands" -c fastboot -l set-active -d 'Sets the active slot before rebooting' -xa "a b"
@@ -73,4 +77,3 @@ complete -n '__fish_seen_subcommand_from reboot' -c fastboot -xa 'bootloader fas
# oem
complete -n '__fish_seen_subcommand_from oem' -c fastboot -xa 'device-info lock unlock edl'

View File

@@ -22,7 +22,11 @@ complete -c find -o regextype -d "Specify regular expression type" -a "emacs pos
complete -c find -o version -l version -d "Display version and exit"
complete -c find -o warn -d "Turn warnings on"
complete -c find -o nowarn -d "Turn warnings off"
complete -c find -o O0 -d "Equivalent to optimisation level 1."
complete -c find -o O1 -d "Default optimisation level and corresponds to the traditional behaviour."
complete -c find -o O2 -d "Any -type or -xtype tests are performed after any tests based only on the names of files."
complete -c find -o O3 -d "The full cost-based query optimiser is enabled."
complete -c find -s D -d "Print diagnostic information." -x -a "exec opt rates search stat time tree all help"
# Tests

View File

@@ -1,3 +1,4 @@
complete -c fish_key_reader -s h -l help -d 'Display help and exit'
complete -c fish_key_reader -s v -l version -d 'Display version and exit'
complete -c fish_key_reader -s c -l continuous -d 'Start a continuous session'
complete -c fish_key_reader -s V -l verbose -d 'Output timing and explain sequence'

View File

@@ -99,7 +99,7 @@ complete -c gcc -o Wno-deprecated -d '(C++ only) Do not warn about usage of depr
complete -c gcc -o Wstrict-null-sentinel -d '(C++ only) Warn also about the use of an uncasted "NULL" as sentinel'
complete -c gcc -o Wno-non-template-friend -d '(C++ only) Disable warnings when non-templatized friend functions are declared within a template'
complete -c gcc -o Wold-style-cast -d 'Warn if an C-style cast to a non-void type is used in a C++ program'
complete -c gcc -o Woverloaded-virtual -d '(C++ only) Warn when a function declaration hides virtual functions from a base class'
complete -c gcc -o Woverloaded-virtual -d '(C++ only) Warn when a function hides virtual functions from a base class'
complete -c gcc -o Wno-pmf-conversions -d '(C++ only) Disable the diagnostic for converting a bound pointer to member function to a plain pointer'
complete -c gcc -o Wsign-promo -d '(C++ only) Warn when overload resolution promotes from unsigned or enumerated type to a signed type'
complete -c gcc -o fconstant-string-class -d 'Use class-name as the name of the class to instantiate for each literal string specified with the syntax "@"'
@@ -212,7 +212,7 @@ complete -c gcc -o Wvolatile-register-var -d 'Warn if a register variable is dec
complete -c gcc -o Wdisabled-optimization -d 'Warn if a requested optimization pass is disabled'
complete -c gcc -o Wpointer-sign -d 'Warn for pointer argument passing or assignment with different signedness'
complete -c gcc -o Werror -d 'Make all warnings into errors'
complete -c gcc -o Wstack-protector -d 'This option is only active when -fstack-protector is active'
complete -c gcc -o Wstack-protector -d 'Only active when -fstack-protector is active'
complete -c gcc -s g -d 'Produce debugging information in the operating systems native format (stabs, COFF, XCOFF, or DWARF 2)'
complete -c gcc -o ggdb -d 'Produce debugging information for use by GDB'
complete -c gcc -o gstabs -d 'Produce debugging information in stabs format (if that is supported), without GDB extensions'
@@ -236,7 +236,7 @@ complete -c gcc -s Q -d 'Makes the compiler print out each function name as it i
complete -c gcc -o ftime-report -d 'Makes the compiler print some statistics about the time consumed by each pass when it finishes'
complete -c gcc -o fmem-report -d 'Makes the compiler print some statistics about permanent memory allocation when it finishes'
complete -c gcc -o fprofile-arcs -d 'Add code so that program flow arcs are instrumented'
complete -c gcc -l coverage -d 'This option is used to compile and link code instrumented for coverage analysis'
complete -c gcc -l coverage -d 'Used to compile and link code instrumented for coverage analysis'
complete -c gcc -o ftest-coverage -d 'Produce a notes file that the gcov code-coverage utility can use to show program coverage'
complete -c gcc -o dletters -d 'Says to make debugging dumps during compilation at times specified by letters'
complete -c gcc -o fdump-rtl-pass -d 'Says to make debugging dumps during compilation at times specified by letters'
@@ -248,8 +248,8 @@ complete -c gcc -o fdump-class-hierarchy-options -d '(C++ only) Dump a represent
complete -c gcc -o fdump-ipa-switch -d 'Control the dumping at various stages of inter-procedural analysis language tree to a file'
complete -c gcc -o fdump-tree-switch -d 'Control the dumping at various stages of processing the intermediate language tree to a file'
complete -c gcc -o fdump-tree-switch-options -d 'Control the dumping at various stages of processing the intermediate language tree to a file'
complete -c gcc -o ftree-vectorizer-verbose -d 'This option controls the amount of debugging output the vectorizer prints' -x -a "1 2 3 4 5"
complete -c gcc -o frandom-seed -d 'This option provides a seed that GCC uses when it would otherwise use random numbers' -x
complete -c gcc -o ftree-vectorizer-verbose -d 'Controls the amount of debugging output the vectorizer prints' -x -a "1 2 3 4 5"
complete -c gcc -o frandom-seed -d 'Provides a seed that GCC uses when it would otherwise use random numbers' -x
complete -c gcc -o fsched-verbose -d 'On targets that use instruction scheduling, this option controls the amount of debugging output the scheduler prints' -x -a "1 2 3 4 5"
complete -c gcc -o save-temps -d 'Store the usual "temporary" intermediate files permanently; place them in the current directory and name them based on the source file'
complete -c gcc -o time -d 'Report the CPU time taken by each subprocess in the compilation sequence'
@@ -261,13 +261,18 @@ complete -c gcc -o print-prog-name -r -d 'Like -print-file-name, but searches fo
complete -c gcc -o print-libgcc-file-name -d 'Same as -print-file-name=libgcc'
complete -c gcc -o print-search-dirs -d 'Print the name of the configured installation directory and a list of program and library directories gcc will search---and dont do anything else'
complete -c gcc -o dumpmachine -d 'Print the compilers target machine (for example, i686-pc-linux-gnu)---and dont do anything else'
complete -c gcc -o dumpversion -d 'Print the compiler version (for example, 3'
complete -c gcc -o dumpversion -d 'Print the compiler version (for example, 3.0,6.3 or 7)---and dont do anything else'
complete -c gcc -o dumpspecs -d 'Print the compilers built-in specs---and dont do anything else'
complete -c gcc -o feliminate-unused-debug-types -d 'Normally, when producing DWARF2 output, GCC will emit debugging information for all types declared in a compilation unit, regardless of whether or not they are actually used in that compilation unit'
complete -c gcc -o O -d 'Optimize'
complete -c gcc -o O1 -d 'Optimize'
complete -c gcc -o O2 -d 'Optimize even more'
complete -c gcc -o O3 -d 'Optimize yet more'
complete -c gcc -o O0 -d 'Do not optimize'
complete -c gcc -o Os -d 'Optimize for size'
complete -c gcc -o Ofast -d 'Disregard strict standards compliance'
complete -c gcc -o Og -d 'Optimize debugging experience'
complete -c gcc -o Oz -d 'Optimize aggressively for size rather than speed'
complete -c gcc -o fno-default-inline -d 'Do not make member functions inline by default merely because they are defined inside the class scope (C++ only)'
complete -c gcc -o fno-defer-pop -d 'Always pop the arguments to each function call as soon as that function returns'
complete -c gcc -o fforce-mem -d 'Force memory operands to be copied into registers before doing arithmetic on them'
@@ -298,13 +303,13 @@ complete -c gcc -o fcse-skip-blocks -d 'This is similar to -fcse-follow-jumps, b
complete -c gcc -o frerun-cse-after-loop -d 'Re-run common subexpression elimination after loop optimizations has been performed'
complete -c gcc -o frerun-loop-opt -d 'Run the loop optimizer twice'
complete -c gcc -o fgcse -d 'Perform a global common subexpression elimination pass'
complete -c gcc -o fgcse-lm -d 'When -fgcse-lm is enabled, global common subexpression elimination will attempt to move loads which are only killed by stores into themselves'
complete -c gcc -o fgcse-sm -d 'When -fgcse-sm is enabled, a store motion pass is run after global common subexpression elimination'
complete -c gcc -o fgcse-las -d 'When -fgcse-las is enabled, the global common subexpression elimination pass eliminates redundant loads that come after stores to the same memory location (both partial and full redundancies)'
complete -c gcc -o fgcse-lm -d 'Global common subexpression elimination will attempt to move loads which are only killed by stores into themselves'
complete -c gcc -o fgcse-sm -d 'A store motion pass is run after global common subexpression elimination'
complete -c gcc -o fgcse-las -d 'The global common subexpression elimination pass eliminates redundant loads that come after stores to the same memory location (both partial and full redundancies)'
complete -c gcc -o fgcse-after-reload -d 'When -fgcse-after-reload is enabled, a redundant load elimination pass is performed after reload'
complete -c gcc -o floop-optimize -d 'Perform loop optimizations: move constant expressions out of loops, simplify exit test conditions and optionally do strength-reduction as well'
complete -c gcc -o floop-optimize2 -d 'Perform loop optimizations using the new loop optimizer'
complete -c gcc -o funsafe-loop-optimizations -d 'If given, the loop optimizer will assume that loop indices do not overflow, and that the loops with nontrivial exit condition are not infinite'
complete -c gcc -o funsafe-loop-optimizations -d 'The loop optimizer will assume that loop indices do not overflow, and that the loops with nontrivial exit condition are not infinite'
complete -c gcc -o fcrossjumping -d 'Perform cross-jumping transformation'
complete -c gcc -o fif-conversion -d 'Attempt to transform conditional jumps into branch-less equivalents'
complete -c gcc -o fif-conversion2 -d 'Use conditional execution (where available) to transform conditional jumps into branch-less equivalents'
@@ -334,13 +339,13 @@ complete -c gcc -o ftree-sink -d 'Perform forward store motion on trees'
complete -c gcc -o ftree-ccp -d 'Perform sparse conditional constant propagation (CCP) on trees'
complete -c gcc -o ftree-store-ccp -d 'Perform sparse conditional constant propagation (CCP) on trees'
complete -c gcc -o ftree-dce -d 'Perform dead code elimination (DCE) on trees'
complete -c gcc -o ftree-dominator-opts -d 'Perform a variety of simple scalar cleanups (constant/copy propagation, redundancy elimination, range propagation and expression simplification) based on a dominator tree traversal'
complete -c gcc -o ftree-dominator-opts -d 'Perform a variety of simple scalar cleanups based on a dominator tree traversal'
complete -c gcc -o ftree-ch -d 'Perform loop header copying on trees'
complete -c gcc -o ftree-loop-optimize -d 'Perform loop optimizations on trees'
complete -c gcc -o ftree-loop-linear -d 'Perform linear loop transformations on tree'
complete -c gcc -o ftree-loop-im -d 'Perform loop invariant motion on trees'
complete -c gcc -o ftree-loop-ivcanon -d 'Create a canonical counter for number of iterations in the loop for that determining number of iterations requires complicated analysis'
complete -c gcc -o fivopts -d 'Perform induction variable optimizations (strength reduction, induction variable merging and induction variable elimination) on trees'
complete -c gcc -o fivopts -d 'Perform induction variable optimizations on trees'
complete -c gcc -o ftree-sra -d 'Perform scalar replacement of aggregates'
complete -c gcc -o ftree-copyrename -d 'Perform copy renaming on trees'
complete -c gcc -o ftree-ter -d 'Perform temporary expression replacement during the SSA->normal phase'
@@ -353,7 +358,7 @@ complete -c gcc -o funroll-loops -d 'Unroll loops whose number of iterations can
complete -c gcc -o funroll-all-loops -d 'Unroll all loops, even if their number of iterations is uncertain when the loop is entered'
complete -c gcc -o fsplit-ivs-in-unroller -d 'Enables expressing of values of induction variables in later iterations of the unrolled loop using the value in the first iteration'
complete -c gcc -o fvariable-expansion-in-unroller -d 'With this option, the compiler will create multiple copies of some local variables when unrolling a loop which can result in superior code'
complete -c gcc -o fprefetch-loop-arrays -d 'If supported by the target machine, generate instructions to prefetch memory to improve the performance of loops that access large arrays'
complete -c gcc -o fprefetch-loop-arrays -d 'Generate instructions to prefetch memory to improve the performance of loops that access large arrays'
complete -c gcc -o fno-peephole -d 'Disable any machine-specific peephole optimizations'
complete -c gcc -o fno-peephole2 -d 'Disable any machine-specific peephole optimizations'
complete -c gcc -o fno-guess-branch-probability -d 'Do not guess branch probabilities using heuristics'
@@ -372,21 +377,21 @@ complete -c gcc -o falign-jumps -d 'Align branch targets to a power-of-two bound
complete -c gcc -o funit-at-a-time -d 'Parse the whole compilation unit before starting to produce code'
complete -c gcc -o fweb -d 'Constructs webs as commonly used for register allocation purposes and assign each web individual pseudo register'
complete -c gcc -o fwhole-program -d 'Assume that the current compilation unit represents whole program being compiled'
complete -c gcc -o fno-cprop-registers -d 'After register allocation and post-register allocation instruction splitting, we perform a copy-propagation pass to try to reduce scheduling dependencies and occasionally eliminate the copy'
complete -c gcc -o fno-cprop-registers -d 'After register allocation and post-register allocation instruction splitting, perform a copy-propagation pass to try to reduce scheduling dependencies and occasionally eliminate the copy'
complete -c gcc -o fprofile-generate -d 'Enable options usually used for instrumenting application to produce profile useful for later recompilation with profile feedback based optimization'
complete -c gcc -o fprofile-use -d 'Enable profile feedback directed optimizations, and optimizations generally profitable only with profile feedback available'
complete -c gcc -o ffloat-store -d 'Do not store floating point variables in registers, and inhibit other options that might change whether a floating point value is taken from a register or memory'
complete -c gcc -o ffast-math -d 'Sets -fno-math-errno, -funsafe-math-optimizations, -fno-trapping-math, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans and fcx-limited-range'
complete -c gcc -o fno-math-errno -d 'Do not set ERRNO after calling math functions that are executed with a single instruction, e'
complete -c gcc -o funsafe-math-optimizations -d 'Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid and (b) may violate IEEE or ANSI standards'
complete -c gcc -o ffinite-math-only -d 'Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs'
complete -c gcc -o ffinite-math-only -d 'Allow optimizations for floating-point arithmetic that assume arguments and results are not NaNs or +-Infs'
complete -c gcc -o fno-trapping-math -d 'Compile code assuming that floating-point operations cannot generate user-visible traps'
complete -c gcc -o frounding-math -d 'Disable transformations and optimizations that assume default floating point rounding behavior'
complete -c gcc -o fsignaling-nans -d 'Compile code assuming that IEEE signaling NaNs may generate uservisible traps during floating-point operations'
complete -c gcc -o fsingle-precision-constant -d 'Treat floating point constant as single precision constant instead of implicitly converting it to double precision constant'
complete -c gcc -o fcx-limited-range -d 'When enabled, this option states that a range reduction step is not needed when performing complex division'
complete -c gcc -o fno-cx-limited-range -d 'When enabled, this option states that a range reduction step is not needed when performing complex division'
complete -c gcc -o fbranch-probabilities -d 'After running a program compiled with -fprofile-arcs, you can compile it a second time using -fbranch-probabilities, to improve optimizations based on the number of times each branch was taken'
complete -c gcc -o fcx-limited-range -d 'When enabled, states that a range reduction step is not needed when performing complex division'
complete -c gcc -o fno-cx-limited-range -d 'When enabled, states that a range reduction step is not needed when performing complex division'
complete -c gcc -o fbranch-probabilities -d 'After running a program with -fprofile-arcs, one can compile it again with this option, to improve optimizations based on the number of times each branch was taken'
complete -c gcc -o fprofile-values -d 'If combined with -fprofile-arcs, it adds code so that some data about values of expressions in the program is gathered'
complete -c gcc -o fvpt -d 'If combined with -fprofile-arcs, it instructs the compiler to add a code to gather information about values of expressions'
complete -c gcc -o frename-registers -d 'Attempt to avoid false dependencies in scheduled code by making use of registers left over after register allocation'
@@ -430,13 +435,13 @@ complete -c gcc -s M -d 'Instead of outputting the result of preprocessing, outp
complete -c gcc -o MM -d 'Like -M but do not mention header files that are found in system header directories, nor header files that are included, directly or indirectly, from such a header'
complete -c gcc -o MF -d 'When used with -M or -MM, specifies a file to write the dependencies to'
complete -c gcc -o MG -d 'In conjunction with an option such as -M requesting dependency generation, -MG assumes missing header files are generated files and adds them to the dependency list without raising an error'
complete -c gcc -o MP -d 'This option instructs CPP to add a phony target for each dependency other than the main file, causing each to depend on nothing'
complete -c gcc -o MP -d 'Instructs CPP to add a phony target for each dependency other than the main file, causing each to depend on nothing'
complete -c gcc -o MT -d 'Change the target of the rule emitted by dependency generation'
complete -c gcc -o MQ -d 'Same as -MT, but it quotes any characters which are special to Make'
complete -c gcc -o MD -d 'is equivalent to -M -MF file, except that -E is not implied'
complete -c gcc -o MMD -d 'Like -MD except mention only user header files, not system header files'
complete -c gcc -o fpch-deps -d 'When using precompiled headers, this flag will cause the dependency-output flags to also list the files from the precompiled headers dependencies'
complete -c gcc -o fpch-preprocess -d 'This option allows use of a precompiled header together with -E'
complete -c gcc -o fpch-preprocess -d 'Allows use of a precompiled header together with -E'
complete -c gcc -s x -d 'Specify the source language' -a 'c c-header cpp-output
c++ c++-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output
objective-c++ objective-c++-header objective-c++-cpp-output
@@ -450,11 +455,11 @@ complete -c gcc -o include -d 'Process file as if "#include "file"" appeared as
complete -c gcc -o imacros -d 'Exactly like -include, except that any output produced by scanning file is thrown away'
complete -c gcc -o idirafter -d 'Search dir for header files, but do it after all directories specified with -I and the standard system directories have been exhausted'
complete -c gcc -o iprefix -d 'Specify prefix as the prefix for subsequent -iwithprefix options'
complete -c gcc -o iwithprefix -d 'Append dir to the prefix specified previously with -iprefix, and add the resulting directory to the include search path'
complete -c gcc -o iwithprefixbefore -d 'Append dir to the prefix specified previously with -iprefix, and add the resulting directory to the include search path'
complete -c gcc -o isysroot -d 'This option is like the --sysroot option, but applies only to header files'
complete -c gcc -o iwithprefix -d 'Append dir to prefix defined with -iprefix, and add the result to the include search path. Add to same place as -I'
complete -c gcc -o iwithprefixbefore -d 'Append dir to prefix defined with -iprefix, and add the result to the include search path. Add to same place as -idirafter'
complete -c gcc -o isysroot -d 'Like the --sysroot option, but only to header files'
complete -c gcc -o isystem -d 'Search dir for header files, after all directories specified by -I but before the standard system directories'
complete -c gcc -o iquote -d 'Search dir only for header files requested with "#include "file""; they are not searched for "#include <file>", before all directories specified by -I and before the standard system directories'
complete -c gcc -o iquote -d 'Search dir only for header files requested with "#include "file""'
complete -c gcc -o fdollars-in-identifiers -d 'Accept $ in identifiers'
complete -c gcc -o fextended-identifiers -d 'Accept universal character names in identifiers'
complete -c gcc -o fpreprocessed -d 'Indicate to the preprocessor that the input file has already been preprocessed'
@@ -485,7 +490,12 @@ complete -c gcc -s c -d 'Compile or assemble the source files, but do not link.'
complete -c gcc -s S -d 'Stop after the stage of compilation proper; do not assemble'
complete -c gcc -s E -d 'Stop after the preprocessing stage; do not run the compiler proper'
complete -c gcc -o llibrary -d 'Search the library named library when linking'
complete -c gcc -a '-l(path basename /usr/lib/lib*.so* | string match -r -g "^lib(.*?)\.so.*")'
complete -c gcc -s l -d 'Search the library named library when linking'
complete -c gcc -o ldl -d 'Search the dynamic loader library when linking'
complete -c gcc -o lm -d 'Search the math library when linking'
complete -c gcc -o lz -d 'Search the zlib library when linking'
complete -c gcc -o lrt -d 'Search the realtime extensions library when linking'
complete -c gcc -o lobjc -d 'You need this special case of the -l option in order to link an Objective-C or Objective-C++ program'
complete -c gcc -o nostartfiles -d 'Do not use the standard system startup files when linking'
complete -c gcc -o nodefaultlibs -d 'Do not use the standard system libraries when linking'
@@ -500,13 +510,13 @@ complete -c gcc -o static-libgcc -d 'Force static libgcc'
complete -c gcc -o symbolic -d 'Bind references to global symbols when building a shared object'
complete -c gcc -o Xlinker -d 'Pass option as an option to the linker'
complete -c gcc -s u -d 'Pretend the symbol symbol is undefined, to force linking of library modules to define it'
complete -c gcc -o Idir -d 'Add the directory dir to the head of the list of directories to be searched for header files'
complete -c gcc -o iquotedir -d 'Add the directory dir to the head of the list of directories to be searched for header files only for the case of #include "file"; they are not searched for #include <file>, otherwise just like -I'
complete -c gcc -o L -d 'Add directory dir to the list of directories to be searched for -l'
complete -c gcc -o B -d 'This option specifies where to find the executables, libraries, include files, and data files of the compiler itself'
complete -c gcc -o specs -r -d 'Process file after the compiler reads in the standard specs file, in order to override the defaults that the gcc driver program uses when determining what switches to pass to cc1, cc1plus, as, ld, etc'
complete -c gcc -o Idir -d 'Add dir to the head of the list of directories to be searched for header files'
complete -c gcc -o iquotedir -d 'Add dir to the head of the list of directories to be searched for header files only for the case of #include "file"'
complete -c gcc -o L -d 'Add dir to the list of directories to be searched for -l'
complete -c gcc -o B -d 'Specifies where to find the executables, libraries, include files, and data files of the compiler itself'
complete -c gcc -o specs -r -d 'Process file after the compiler reads in the standard specs file'
complete -c gcc -l sysroot -x -a '(__fish_complete_directories)' -d 'Use dir as the logical root directory for headers and libraries'
complete -c gcc -o I- -d 'This option has been deprecated'
complete -c gcc -o I- -d 'Deprecated'
complete -c gcc -s b -d 'The argument machine specifies the target machine for compilation'
complete -c gcc -s V -d 'The argument version specifies which version of GCC to run'
complete -c gcc -o EL -d 'Compile code for little endian mode'
@@ -523,7 +533,7 @@ complete -c gcc -o msoft-float -d 'Generate output containing library calls for
complete -c gcc -o mfloat-abi -d 'Specifies which ABI to use for floating point values' -x
complete -c gcc -o mlittle-endian -d 'Generate code for a processor running in little-endian mode'
complete -c gcc -o mbig-endian -d 'Generate code for a processor running in big-endian mode; the default is to compile code for a little-endian processor'
complete -c gcc -o mwords-little-endian -d 'This option only applies when generating code for big-endian processors'
complete -c gcc -o mwords-little-endian -d 'Only applies when generating code for big-endian processors'
complete -c gcc -o mcpu -d 'This specifies the name of the target ARM processor' -x
complete -c gcc -o mtune -d 'Tune output for this cpu without restricting the instructions to it'
complete -c gcc -o march -d 'This specifies the name of the target ARM architecture' -x
@@ -532,8 +542,8 @@ complete -c gcc -o mfpe -x -d 'This specifies what floating point hardware (or h
complete -c gcc -o mfp -x -d 'This specifies what floating point hardware (or hardware emulation) is available on the target'
complete -c gcc -o mstructure-size-boundary -x -d 'The size of all structures and unions will be rounded up to a multiple of the number of bits set by this option'
complete -c gcc -o mabort-on-noreturn -d 'Generate a call to the function "abort" at the end of a "noreturn" function'
complete -c gcc -o mlong-calls -d 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mno-long-calls -d 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mlong-calls -d 'Perform function calls by first loading the address of the function into a register and then performing a subroutine call on it'
complete -c gcc -o mno-long-calls -d 'Do not perform function calls by first loading the address of the function into a register and then performing a subroutine call on it'
complete -c gcc -o mnop-fun-dllimport -d 'Disable support for the "dllimport" attribute'
complete -c gcc -o msingle-pic-base -d 'Treat the register used for PIC addressing as read-only, rather than loading it in the prologue for each function'
complete -c gcc -o mpic-register -x -d 'Specify the register to be used for PIC addressing'
@@ -543,7 +553,7 @@ complete -c gcc -o mthumb -d 'Generate code for the 16-bit Thumb instruction set
complete -c gcc -o mtpcs-frame -d 'Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all non-leaf functions'
complete -c gcc -o mtpcs-leaf-frame -d 'Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all leaf functions'
complete -c gcc -o mcallee-super-interworking -d 'Gives all externally visible functions in the file being compiled an ARM instruction set header which switches to Thumb mode before executing the rest of the function'
complete -c gcc -o mcaller-super-interworking -d 'Allows calls via function pointers (including virtual functions) to execute correctly regardless of whether the target code has been compiled for interworking or not'
complete -c gcc -o mcaller-super-interworking -d 'Allow calls via function pointers (including virtual functions) to execute correctly regardless of whether the target code has been compiled for interworking'
complete -c gcc -o mtp -x -d 'Specify the access model for the thread local storage pointer'
complete -c gcc -o mmcu -x -d 'Specify ATMEL AVR instruction set or MCU type'
complete -c gcc -o msize -d 'Output instruction sizes to the asm file'
@@ -556,15 +566,15 @@ complete -c gcc -o mint8 -d 'Assume int to be 8 bit integer'
complete -c gcc -o momit-leaf-frame-pointer -d 'Dont keep the frame pointer in a register for leaf functions'
complete -c gcc -o mspecld-anomaly -d 'When enabled, the compiler will ensure that the generated code does not contain speculative loads after jump instructions'
complete -c gcc -o mno-specld-anomaly -d 'Dont generate extra code to prevent speculative loads from occurring'
complete -c gcc -o mcsync-anomaly -d 'When enabled, the compiler will ensure that the generated code does not contain CSYNC or SSYNC instructions too soon after conditional branches'
complete -c gcc -o mcsync-anomaly -d 'Ensure that the generated code does not contain CSYNC or SSYNC instructions too soon after conditional branches'
complete -c gcc -o mno-csync-anomaly -d 'Dont generate extra code to prevent CSYNC or SSYNC instructions from occurring too soon after a conditional branch'
complete -c gcc -o mlow-64k -d 'When enabled, the compiler is free to take advantage of the knowledge that the entire program fits into the low 64k of memory'
complete -c gcc -o mlow-64k -d 'Compiler is free to take advantage of the knowledge that the entire program fits into the low 64k of memory'
complete -c gcc -o mno-low-64k -d 'Assume that the program is arbitrarily large'
complete -c gcc -o mid-shared-library -d 'Generate code that supports shared libraries via the library ID method'
complete -c gcc -o mno-id-shared-library -d 'Generate code that doesnt assume ID based shared libraries are being used'
complete -c gcc -o mshared-library-id -x -d 'Specified the identification number of the ID based shared library being compiled'
complete -c gcc -o mlong-calls -d 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mno-long-calls -d 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mlong-calls -d 'Perform function calls by first loading the address of the function into a register and then performing a subroutine call on it'
complete -c gcc -o mno-long-calls -d 'Does not perform function calls by first loading the address of the function into a register and then performing a subroutine call on it'
complete -c gcc -o march -d 'Generate code for the specified architecture'
complete -c gcc -o mcpu -d 'Generate code for the specified architecture'
complete -c gcc -o type -d 'Generate code for the specified architecture'
@@ -572,35 +582,35 @@ complete -c gcc -o mtune -d 'Tune to architecture-type everything applicable abo
complete -c gcc -o type -d 'Tune to architecture-type everything applicable about the generated code, except for the ABI and the set of available instructions'
complete -c gcc -o mmax-stack-frame -d '=n Warn when the stack frame of a function exceeds n bytes'
complete -c gcc -o melinux-stacksize -d '=n Only available with the cris-axis-aout target'
complete -c gcc -o metrax4 -d 'The options -metrax4 and -metrax100 are synonyms for -march=v3 and -march=v8 respectively'
complete -c gcc -o metrax100 -d 'The options -metrax4 and -metrax100 are synonyms for -march=v3 and -march=v8 respectively'
complete -c gcc -o metrax4 -d 'Synonym for -march=v3'
complete -c gcc -o metrax100 -d 'Synonym for -march=v8'
complete -c gcc -o mmul-bug-workaround -d 'Work around a bug in the "muls" and "mulu" instructions for CPU models where it applies'
complete -c gcc -o mno-mul-bug-workaround -d 'Work around a bug in the "muls" and "mulu" instructions for CPU models where it applies'
complete -c gcc -o mpdebug -d 'Enable CRIS-specific verbose debug-related information in the assembly code'
complete -c gcc -o mcc-init -d 'Do not use condition-code results from previous instruction; always emit compare and test instructions before use of condition codes'
complete -c gcc -o mno-side-effects -d 'Do not emit instructions with side-effects in addressing modes other than post-increment'
complete -c gcc -o mstack-align -d 'These options (no-options) arranges (eliminate arrangements) for the stack-frame, individual data and constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mno-stack-align -d 'These options (no-options) arranges (eliminate arrangements) for the stack-frame, individual data and constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mdata-align -d 'These options (no-options) arranges (eliminate arrangements) for the stack-frame, individual data and constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mno-data-align -d 'These options (no-options) arranges (eliminate arrangements) for the stack-frame, individual data and constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mconst-align -d 'These options (no-options) arranges (eliminate arrangements) for the stack-frame, individual data and constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mno-const-align -d 'These options (no-options) arranges (eliminate arrangements) for the stack-frame, individual data and constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o m32-bit -d 'Similar to the stack- data- and const-align options above, these options arrange for stack-frame, writable data and constants to all be 32-bit, 16-bit or 8-bit aligned'
complete -c gcc -o m16-bit -d 'Similar to the stack- data- and const-align options above, these options arrange for stack-frame, writable data and constants to all be 32-bit, 16-bit or 8-bit aligned'
complete -c gcc -o m8-bit -d 'Similar to the stack- data- and const-align options above, these options arrange for stack-frame, writable data and constants to all be 32-bit, 16-bit or 8-bit aligned'
complete -c gcc -o mstack-align -d 'Arranges for the stack-frame to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mno-stack-align -d 'Eliminate arrangements for the stack-frame to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mdata-align -d 'Arranges for the individual data to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mno-data-align -d 'Eliminate arrangements for the individual data to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mconst-align -d 'Arranges for the constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o mno-const-align -d 'Eliminate arrangements for the constants to be aligned for the maximum single data access size for the chosen CPU model'
complete -c gcc -o m32-bit -d 'Arrange for stack-frame, writable data and constants to all be 32-bit, 16-bit or 8-bit aligned'
complete -c gcc -o m16-bit -d 'Arrange for stack-frame, writable data and constants to all be 32-bit, 16-bit or 8-bit aligned'
complete -c gcc -o m8-bit -d 'Arrange for stack-frame, writable data and constants to all be 32-bit, 16-bit or 8-bit aligned'
complete -c gcc -o mno-prologue-epilogue -d 'With -mno-prologue-epilogue, the normal function prologue and epilogue that sets up the stack-frame are omitted and no return instructions or return sequences are generated in the code'
complete -c gcc -o mprologue-epilogue -d 'With -mno-prologue-epilogue, the normal function prologue and epilogue that sets up the stack-frame are omitted and no return instructions or return sequences are generated in the code'
complete -c gcc -o mno-gotplt -d 'With -fpic and -fPIC, dont generate (do generate) instruction sequences that load addresses for functions from the PLT part of the GOT rather than (traditional on other architectures) calls to the PLT'
complete -c gcc -o mgotplt -d 'With -fpic and -fPIC, dont generate (do generate) instruction sequences that load addresses for functions from the PLT part of the GOT rather than (traditional on other architectures) calls to the PLT'
complete -c gcc -o maout -d 'Legacy no-op option only recognized with the cris-axis-aout target'
complete -c gcc -o melf -d 'Legacy no-op option only recognized with the cris-axis-elf and cris-axis-linux-gnu targets'
complete -c gcc -o mno-gotplt -d 'With -fpic and -fPIC, dont generate instruction sequences that load addresses for functions from the PLT part of the GOT rather than (traditional on other architectures) calls to the PLT'
complete -c gcc -o mgotplt -d 'With -fpic and -fPIC, generate instruction sequences that load addresses for functions from the PLT part of the GOT rather than (traditional on other architectures) calls to the PLT'
complete -c gcc -o maout -d 'Legacy no-op flag only recognized with the cris-axis-aout target'
complete -c gcc -o melf -d 'Legacy no-op flag only recognized with the cris-axis-elf and cris-axis-linux-gnu targets'
complete -c gcc -o melinux -d 'Only recognized with the cris-axis-aout target, where it selects a GNU/linux-like multilib, include files and instruction set for -march=v8'
complete -c gcc -o mlinux -d 'Legacy no-op option only recognized with the cris-axis-linux-gnu target'
complete -c gcc -o sim -d 'This option, recognized for the cris-axis-aout and cris-axis-elf arranges to link with input-output functions from a simulator library'
complete -c gcc -o mlinux -d 'Legacy no-op flag only recognized with the cris-axis-linux-gnu target'
complete -c gcc -o sim -d 'When recognized for the cris-axis-aout and cris-axis-elf arranges to link with input-output functions from a simulator library'
complete -c gcc -o sim2 -d 'Like -sim, but pass linker options to locate initialized data at 0x40000000 and zero-initialized data at 0x80000000'
complete -c gcc -o mmac -d 'Enable the use of multiply-accumulate instructions'
complete -c gcc -o mpush-args -d 'Push instructions will be used to pass outgoing arguments when functions are called'
complete -c gcc -o Fdir -d 'Add the framework directory dir to the head of the list of directories to be searched for header files'
complete -c gcc -o Fdir -d 'Add the framework dir to the list of directories to be searched for headers'
complete -c gcc -o gused -d 'Emit debugging information for symbols that are used'
complete -c gcc -o gfull -d 'Emit debugging information for all symbols and types'
complete -c gcc -o mmacosx-version-min -d '=version The earliest version of MacOS X that this executable will run on is version'
@@ -612,8 +622,8 @@ complete -c gcc -o all_load -d 'Loads all members of static archive libraries'
complete -c gcc -o arch_errors_fatal -d 'Cause the errors having to do with files that have the wrong architecture to be fatal'
complete -c gcc -o bind_at_load -d 'Causes the output file to be marked such that the dynamic linker will bind all undefined references when the file is loaded or launched'
complete -c gcc -o bundle -d 'Produce a Mach-o bundle format file'
complete -c gcc -o bundle_loader -d 'This option specifies the executable that will be loading the build output file being linked'
complete -c gcc -o dynamiclib -d 'When passed this option, GCC will produce a dynamic library instead of an executable when linking, using the Darwin libtool command'
complete -c gcc -o bundle_loader -d 'Specifies the executable that will be loading the build output file being linked'
complete -c gcc -o dynamiclib -d 'When enabled, GCC will produce a dynamic library instead of an executable when linking, using the Darwin libtool command'
complete -c gcc -o force_cpusubtype_ALL -d 'This causes GCCs output file to have the ALL subtype, instead of one controlled by the -mcpu or -march option'
complete -c gcc -o allowable_client -d 'These options are passed to the Darwin linker'
complete -c gcc -o client_name -d 'These options are passed to the Darwin linker'
@@ -686,7 +696,7 @@ complete -c gcc -o mode -d 'Selects the IEEE rounding mode'
complete -c gcc -o mtrap-precision -d 'In the Alpha architecture, floating point traps are imprecise'
complete -c gcc -o precision -d 'In the Alpha architecture, floating point traps are imprecise'
complete -c gcc -o mieee-conformant -d 'This option marks the generated code as IEEE conformant'
complete -c gcc -o mbuild-constants -d 'Normally GCC examines a 32- or 64-bit integer constant to see if it can construct it from smaller constants in two or three instructions'
complete -c gcc -o mbuild-constants -d 'This option require to construct all integer constants using code (maximum is six)'
complete -c gcc -o malpha-as -d 'Select whether to generate code to be assembled by the vendor-supplied assembler (-malpha-as) or by the GNU assembler -mgas'
complete -c gcc -o mgas -d 'Select whether to generate code to be assembled by the vendor-supplied assembler (-malpha-as) or by the GNU assembler -mgas'
complete -c gcc -o mbwx -d 'Indicate whether GCC should generate code to use the optional BWX, CIX, FIX and MAX instruction sets'
@@ -703,8 +713,8 @@ complete -c gcc -o mexplicit-relocs -d 'Older Alpha assemblers provided no way t
complete -c gcc -o mno-explicit-relocs -d 'Older Alpha assemblers provided no way to generate symbol relocations except via assembler macros'
complete -c gcc -o msmall-data -d 'When -mexplicit-relocs is in effect, static data is accessed via gp-relative relocations'
complete -c gcc -o mlarge-data -d 'When -mexplicit-relocs is in effect, static data is accessed via gp-relative relocations'
complete -c gcc -o msmall-text -d 'When -msmall-text is used, the compiler assumes that the code of the entire program (or shared library) fits in 4MB, and is thus reachable with a branch instruction'
complete -c gcc -o mlarge-text -d 'When -msmall-text is used, the compiler assumes that the code of the entire program (or shared library) fits in 4MB, and is thus reachable with a branch instruction'
complete -c gcc -o msmall-text -d 'Assumes that the code of the entire program (or shared library) fits in 4MB, and is thus reachable with a branch instruction'
complete -c gcc -o mlarge-text -d 'Does not assume that the code of the entire program (or shared library) fits in 4MB, and is thus reachable with a branch instruction'
complete -c gcc -o mcpu -d '=cpu_type Set the instruction set and instruction scheduling parameters for machine type cpu_type'
complete -c gcc -o mtune -d '=cpu_type Set only the instruction scheduling parameters for machine type cpu_type'
complete -c gcc -o mmemory-latency -d '=time Sets the latency the scheduler should assume for typical memory references as seen by the application'
@@ -809,8 +819,8 @@ complete -c gcc -o mno-ieee-fp -d 'Control whether or not the compiler uses IEEE
complete -c gcc -o msoft-float -d 'Generate output containing library calls for floating point'
complete -c gcc -o mno-fp-ret-in-387 -d 'Do not use the FPU registers for return values of functions'
complete -c gcc -o mno-fancy-math-387 -d 'Some 387 emulators do not support the "sin", "cos" and "sqrt" instructions for the 387'
complete -c gcc -o malign-double -d 'Control whether GCC aligns "double", "long double", and "long long" variables on a two word boundary or a one word boundary'
complete -c gcc -o mno-align-double -d 'Control whether GCC aligns "double", "long double", and "long long" variables on a two word boundary or a one word boundary'
complete -c gcc -o malign-double -d 'Aligns "double", "long double", and "long long" variables on a two word boundary'
complete -c gcc -o mno-align-double -d 'Aligns "double", "long double", and "long long" variables on a one word boundary'
complete -c gcc -o m96bit-long-double -d 'These switches control the size of "long double" type'
complete -c gcc -o m128bit-long-double -d 'These switches control the size of "long double" type'
complete -c gcc -o mmlarge-data-threshold -d '=number When -mcmodel=medium is specified, the data greater than threshold are placed in large data section'
@@ -834,7 +844,7 @@ complete -c gcc -o m3dnow -d 'These switches enable or disable the use of instru
complete -c gcc -o mno-3dnow -d 'These switches enable or disable the use of instructions in the MMX, SSE, SSE2 or 3DNow! extended instruction sets'
complete -c gcc -o mpush-args -d 'Use PUSH operations to store outgoing parameters'
complete -c gcc -o mno-push-args -d 'Use PUSH operations to store outgoing parameters'
complete -c gcc -o maccumulate-outgoing-args -d 'If enabled, the maximum amount of space required for outgoing arguments will be computed in the function prologue'
complete -c gcc -o maccumulate-outgoing-args -d 'The maximum amount of space required for outgoing arguments will be computed in the function prologue'
complete -c gcc -o mthreads -d 'Support thread-safe exception handling on Mingw32'
complete -c gcc -o mno-align-stringops -d 'Do not align destination of inlined string operations'
complete -c gcc -o minline-all-stringops -d 'By default GCC inlines string operations only when destination is known to be aligned at least to 4 byte boundary'
@@ -922,8 +932,8 @@ complete -c gcc -o mshort -d 'Consider type "int" to be 16 bits wide, like "shor
complete -c gcc -o mnobitfield -d 'Do not use the bit-field instructions'
complete -c gcc -o mbitfield -d 'Do use the bit-field instructions'
complete -c gcc -o mrtd -d 'Use a different function-calling convention, in which functions that take a fixed number of arguments return with the "rtd" instruction, which pops their arguments while returning'
complete -c gcc -o malign-int -d 'Control whether GCC aligns "int", "long", "long long", "float", "double", and "long double" variables on a 32-bit boundary (-malign-int) or a 16-bit boundary (-mno-align-int)'
complete -c gcc -o mno-align-int -d 'Control whether GCC aligns "int", "long", "long long", "float", "double", and "long double" variables on a 32-bit boundary (-malign-int) or a 16-bit boundary (-mno-align-int)'
complete -c gcc -o malign-int -d 'Make GCC align "int", "long", "long long", "float", "double", and "long double" variables on a 32-bit boundary'
complete -c gcc -o mno-align-int -d 'Make GCC aligns "int", "long", "long long", "float", "double", and "long double" variables on 16-bit boundary'
complete -c gcc -o mpcrel -d 'Use the pc-relative addressing mode of the 68000 directly, instead of using a global offset table'
complete -c gcc -o mno-strict-align -d 'Do not (do) assume that unaligned memory references will be handled by the system'
complete -c gcc -o mstrict-align -d 'Do not (do) assume that unaligned memory references will be handled by the system'
@@ -965,7 +975,7 @@ complete -c gcc -o m210 -d 'Generate code for the 210 processor'
complete -c gcc -o m340 -d 'Generate code for the 210 processor'
complete -c gcc -o EB -d 'Generate big-endian code'
complete -c gcc -o EL -d 'Generate little-endian code'
complete -c gcc -o march -d '=arch Generate code that will run on arch, which can be the name of a generic MIPS ISA, or the name of a particular processor'
complete -c gcc -o march -d '=arch Generate code that will run on arch, which can be the name of a generic MIPS ISA, or the name of the processor'
complete -c gcc -o mtune -d '=arch Optimize for arch'
complete -c gcc -o mips1 -d 'Equivalent to -march=mips1'
complete -c gcc -o mips2 -d 'Equivalent to -march=mips2'
@@ -974,12 +984,8 @@ complete -c gcc -o mips4 -d 'Equivalent to -march=mips4'
complete -c gcc -o mips32 -d 'Equivalent to -march=mips32'
complete -c gcc -o mips32r2 -d 'Equivalent to -march=mips32r2'
complete -c gcc -o mips64 -d 'Equivalent to -march=mips64'
complete -c gcc -o mips16 -d 'Generate (do not generate) MIPS16 code'
complete -c gcc -o mno-mips16 -d 'Generate (do not generate) MIPS16 code'
complete -c gcc -o mabi -d '=eabi Generate code for the given ABI'
complete -c gcc -o mabi -d '=eabi Generate code for the given ABI'
complete -c gcc -o mabi -d '=eabi Generate code for the given ABI'
complete -c gcc -o mabi -d '=eabi Generate code for the given ABI'
complete -c gcc -o mips16 -d 'Generate MIPS16 code'
complete -c gcc -o mno-mips16 -d 'Do not generate MIPS16 code'
complete -c gcc -o mabi -d '=eabi Generate code for the given ABI'
complete -c gcc -o mabicalls -d 'Generate (do not generate) SVR4-style position-independent code'
complete -c gcc -o mno-abicalls -d 'Generate (do not generate) SVR4-style position-independent code'
@@ -1001,11 +1007,11 @@ complete -c gcc -o mips3d -d 'Use (do not use) the MIPS-3D ASE'
complete -c gcc -o mno-mips3d -d 'Use (do not use) the MIPS-3D ASE'
complete -c gcc -o mlong64 -d 'Force "long" types to be 64 bits wide'
complete -c gcc -o mlong32 -d 'Force "long", "int", and pointer types to be 32 bits wide'
complete -c gcc -o msym32 -d 'Assume (do not assume) that all symbols have 32-bit values, regardless of the selected ABI'
complete -c gcc -o mno-sym32 -d 'Assume (do not assume) that all symbols have 32-bit values, regardless of the selected ABI'
complete -c gcc -s G -d 'Put global and static items less than or equal to num bytes into the small data or bss section instead of the normal data or bss section'
complete -c gcc -o membedded-data -d 'Allocate variables to the read-only data section first if possible, then next in the small data section if possible, otherwise in data'
complete -c gcc -o mno-embedded-data -d 'Allocate variables to the read-only data section first if possible, then next in the small data section if possible, otherwise in data'
complete -c gcc -o msym32 -d 'Assume that all symbols have 32-bit values, regardless of the selected ABI'
complete -c gcc -o mno-sym32 -d 'Do not assume that all symbols have 32-bit values, regardless of the selected ABI'
complete -c gcc -s G -d 'Put global and static items less than or equal to num bytes into the small data or bss section instead of the normal one'
complete -c gcc -o membedded-data -d 'Allocate variables if possible to the read-only data section first, then in the small data section, otherwise in data'
complete -c gcc -o mno-embedded-data -d 'Does not allocate variables if possible to the read-only data section first, then in the small data section, otherwise in data'
complete -c gcc -o muninit-const-in-rodata -d 'Put uninitialized "const" variables in the read-only data section'
complete -c gcc -o mno-uninit-const-in-rodata -d 'Put uninitialized "const" variables in the read-only data section'
complete -c gcc -o msplit-addresses -d 'Enable (disable) use of the "%hi()" and "%lo()" assembler relocation operators'
@@ -1025,35 +1031,34 @@ complete -c gcc -o mno-mad -d 'Enable (disable) use of the "mad", "madu" and "mu
complete -c gcc -o mfused-madd -d 'Enable (disable) use of the floating point multiply-accumulate instructions, when they are available'
complete -c gcc -o mno-fused-madd -d 'Enable (disable) use of the floating point multiply-accumulate instructions, when they are available'
complete -c gcc -o nocpp -d 'Tell the MIPS assembler to not run its preprocessor over user assembler files (with a '
complete -c gcc -o mfix-r4000 -d 'Work around certain R4000 CPU errata: - A double-word or a variable shift may give an incorrect result if executed immediately after starting an integer division'
complete -c gcc -o mno-fix-r4000 -d 'Work around certain R4000 CPU errata: - A double-word or a variable shift may give an incorrect result if executed immediately after starting an integer division'
complete -c gcc -o mfix-r4400 -d 'Work around certain R4400 CPU errata: - A double-word or a variable shift may give an incorrect result if executed immediately after starting an integer division'
complete -c gcc -o mno-fix-r4400 -d 'Work around certain R4400 CPU errata: - A double-word or a variable shift may give an incorrect result if executed immediately after starting an integer division'
complete -c gcc -o mfix-vr4120 -d 'Work around certain VR4120 errata: - "dmultu" does not always produce the correct result'
complete -c gcc -o mno-fix-vr4120 -d 'Work around certain VR4120 errata: - "dmultu" does not always produce the correct result'
complete -c gcc -o mfix-r4000 -d 'Work around certain R4000 CPU errata'
complete -c gcc -o mno-fix-r4000 -d 'Does not work around certain R4000 CPU errata'
complete -c gcc -o mfix-r4400 -d 'Work around certain R4400 CPU errata'
complete -c gcc -o mno-fix-r4400 -d 'Does not work around certain R4400 CPU errata'
complete -c gcc -o mfix-vr4120 -d 'Work around certain VR4120 errata'
complete -c gcc -o mno-fix-vr4120 -d 'Does not work around certain VR4120 errata'
complete -c gcc -o mfix-vr4130 -d 'Work around the VR4130 "mflo"/"mfhi" errata'
complete -c gcc -o mfix-sb1 -d 'Work around certain SB-1 CPU core errata'
complete -c gcc -o mno-fix-sb1 -d 'Work around certain SB-1 CPU core errata'
complete -c gcc -o mflush-func -d 'Specifies the function to call to flush the I and D caches, or to not call any such function'
complete -c gcc -o mno-flush-func -d 'Specifies the function to call to flush the I and D caches, or to not call any such function'
complete -c gcc -o mbranch-likely -d 'Enable or disable use of Branch Likely instructions, regardless of the default for the selected architecture'
complete -c gcc -o mno-branch-likely -d 'Enable or disable use of Branch Likely instructions, regardless of the default for the selected architecture'
complete -c gcc -o mno-fix-sb1 -d 'Does not work around certain SB-1 CPU core errata'
complete -c gcc -o mflush-func -d 'Specifies the function to call to flush the I and D caches'
complete -c gcc -o mno-flush-func -d 'Specifies to not call the function to flush the I and D caches'
complete -c gcc -o mbranch-likely -d 'Enable use of Branch Likely instructions, regardless of the default for the selected architecture'
complete -c gcc -o mno-branch-likely -d 'Disable use of Branch Likely instructions, regardless of the default for the selected architecture'
complete -c gcc -o mfp-exceptions -d 'Specifies whether FP exceptions are enabled'
complete -c gcc -o mno-fp-exceptions -d 'Specifies whether FP exceptions are enabled'
complete -c gcc -o mvr4130-align -d 'The VR4130 pipeline is two-way superscalar, but can only issue two instructions together if the first one is 8-byte aligned'
complete -c gcc -o mno-vr4130-align -d 'The VR4130 pipeline is two-way superscalar, but can only issue two instructions together if the first one is 8-byte aligned'
complete -c gcc -o mvr4130-align -d 'VR4130 pipeline is two-way superscalar, but can only issue two instructions together if the first one is 8-byte aligned'
complete -c gcc -o mno-vr4130-align -d 'VR4130 pipeline is two-way superscalar, but can only issue two instructions together if the first one is 8-byte aligned'
complete -c gcc -o mlibfuncs -d 'Specify that intrinsic library functions are being compiled, passing all values in registers, no matter the size'
complete -c gcc -o mno-libfuncs -d 'Specify that intrinsic library functions are being compiled, passing all values in registers, no matter the size'
complete -c gcc -o mepsilon -d 'Generate floating-point comparison instructions that compare with respect to the "rE" epsilon register'
complete -c gcc -o mno-epsilon -d 'Generate floating-point comparison instructions that compare with respect to the "rE" epsilon register'
complete -c gcc -o mabi -d '=gnu Generate code that passes function parameters and return values that (in the called function) are seen as registers $0 and up, as opposed to the GNU ABI which uses global registers $231 and up'
complete -c gcc -o mabi -d '=gnu Generate code that passes function parameters and return values that (in the called function) are seen as registers $0 and up, as opposed to the GNU ABI which uses global registers $231 and up'
complete -c gcc -o mzero-extend -d 'When reading data from memory in sizes shorter than 64 bits, use (do not use) zero-extending load instructions by default, rather than sign-extending ones'
complete -c gcc -o mno-zero-extend -d 'When reading data from memory in sizes shorter than 64 bits, use (do not use) zero-extending load instructions by default, rather than sign-extending ones'
complete -c gcc -o mzero-extend -d 'When reading data from memory in sizes shorter than 64 bits, use zero-extending load instructions by default, rather than sign-extending ones'
complete -c gcc -o mno-zero-extend -d 'When reading data from memory in sizes shorter than 64 bits, do not use zero-extending load instructions by default, rather than sign-extending ones'
complete -c gcc -o mknuthdiv -d 'Make the result of a division yielding a remainder have the same sign as the divisor'
complete -c gcc -o mno-knuthdiv -d 'Make the result of a division yielding a remainder have the same sign as the divisor'
complete -c gcc -o mtoplevel-symbols -d 'Prepend (do not prepend) a : to all global symbols, so the assembly code can be used with the "PREFIX" assembly directive'
complete -c gcc -o mno-toplevel-symbols -d 'Prepend (do not prepend) a : to all global symbols, so the assembly code can be used with the "PREFIX" assembly directive'
complete -c gcc -o mtoplevel-symbols -d 'Prepend a : to all global symbols, so the assembly code can be used with the "PREFIX" assembly directive'
complete -c gcc -o mno-toplevel-symbols -d 'Do not prepend a : to all global symbols, so the assembly code can be used with the "PREFIX" assembly directive'
complete -c gcc -o melf -d 'Generate an executable in the ELF format, rather than the default mmo format used by the mmix simulator'
complete -c gcc -o mbranch-predict -d 'Use (do not use) the probable-branch instructions, when static branch prediction indicates a probable branch'
complete -c gcc -o mno-branch-predict -d 'Use (do not use) the probable-branch instructions, when static branch prediction indicates a probable branch'
@@ -1067,7 +1072,7 @@ complete -c gcc -o mam33 -d 'Generate code which uses features specific to the A
complete -c gcc -o mno-am33 -d 'Do not generate code which uses features specific to the AM33 processor'
complete -c gcc -o mreturn-pointer-on-d0 -d 'When generating a function which returns a pointer, return the pointer in both "a0" and "d0"'
complete -c gcc -o mno-crt0 -d 'Do not link in the C run-time initialization object file'
complete -c gcc -o mrelax -d 'Indicate to the linker that it should perform a relaxation optimization pass to shorten branches, calls and absolute memory addresses'
complete -c gcc -o mrelax -d 'Tell the linker it should perform a relaxation optimization to shorten branches, calls and absolute memory addresses'
complete -c gcc -o march -d 'Generate code that will run on cpu-type, which is the name of a system representing a certain processor type'
complete -c gcc -o type -d 'Generate code that will run on cpu-type, which is the name of a system representing a certain processor type'
complete -c gcc -o mbacc -d 'Use byte loads and stores when generating code'
@@ -1121,12 +1126,12 @@ complete -c gcc -o mmfpgpr -d 'GCC supports two related instruction set architec
complete -c gcc -o mno-mfpgpr -d 'GCC supports two related instruction set architectures for the RS/6000 and PowerPC'
complete -c gcc -o mnew-mnemonics -d 'Select which mnemonics to use in the generated assembler code'
complete -c gcc -o mold-mnemonics -d 'Select which mnemonics to use in the generated assembler code'
complete -c gcc -o mcpu -d '=cpu_type Set architecture type, register usage, choice of mnemonics, and instruction scheduling parameters for machine type cpu_type'
complete -c gcc -o mtune -d '=cpu_type Set the instruction scheduling parameters for machine type cpu_type, but do not set the architecture type, register usage, or choice of mnemonics, as -mcpu=cpu_type would'
complete -c gcc -o mcpu -d '=cpu_type Set architecture type, register usage, choice of mnemonics, and instruction scheduling parameters for type cpu_type'
complete -c gcc -o mtune -d '=cpu_type Set the instruction scheduling parameters for cpu_type, but do not set the architecture type, register usage, or choice of mnemonics, as -mcpu=cpu_type'
complete -c gcc -o mswdiv -d 'Generate code to compute division as reciprocal estimate and iterative refinement, creating opportunities for increased throughput'
complete -c gcc -o mno-swdiv -d 'Generate code to compute division as reciprocal estimate and iterative refinement, creating opportunities for increased throughput'
complete -c gcc -o maltivec -d 'Generate code that uses (does not use) AltiVec instructions, and also enable the use of built-in functions that allow more direct access to the AltiVec instruction set'
complete -c gcc -o mno-altivec -d 'Generate code that uses (does not use) AltiVec instructions, and also enable the use of built-in functions that allow more direct access to the AltiVec instruction set'
complete -c gcc -o mno-swdiv -d 'Do not generate code to compute division as reciprocal estimate and iterative refinement, creating opportunities for increased throughput'
complete -c gcc -o maltivec -d 'Generate code that uses AltiVec instructions, and also enable the use of built-in functions that allow more direct access to the AltiVec instruction set'
complete -c gcc -o mno-altivec -d 'Generate code that does not use AltiVec instructions, and also enable the use of built-in functions that allow more direct access to the AltiVec instruction set'
complete -c gcc -o mvrsave -d 'Generate VRSAVE instructions when generating AltiVec code'
complete -c gcc -o mno-vrsave -d 'Generate VRSAVE instructions when generating AltiVec code'
complete -c gcc -o msecure-plt -d 'Generate code that allows ld and ld'
@@ -1136,9 +1141,8 @@ complete -c gcc -o mno-isel -d 'This switch enables or disables the generation o
complete -c gcc -o misel -d '=yes/no This switch has been deprecated'
complete -c gcc -o mspe -d 'This switch enables or disables the generation of SPE simd instructions'
complete -c gcc -o mno-isel -d 'This switch enables or disables the generation of SPE simd instructions'
complete -c gcc -o mspe -d '=yes/no This option has been deprecated'
complete -c gcc -o mfloat-gprs -d 'This switch enables or disables the generation of floating point operations on the general purpose registers for architectures that support it'
complete -c gcc -o mfloat-gprs -d 'This switch enables or disables the generation of floating point operations on the general purpose registers for architectures that support it'
complete -c gcc -o mspe -d '=yes/no Deprecated'
complete -c gcc -o mfloat-gprs -d 'This switch enables or disables the generation of floating point operations on the general purpose registers'
complete -c gcc -o m32 -d 'Generate code for 32-bit or 64-bit environments of Darwin and SVR4 targets (including GNU/Linux)'
complete -c gcc -o m64 -d 'Generate code for 32-bit or 64-bit environments of Darwin and SVR4 targets (including GNU/Linux)'
complete -c gcc -o mfull-toc -d 'Modify generation of the TOC (Table Of Contents), which is created for every executable file'
@@ -1156,37 +1160,35 @@ complete -c gcc -o msoft-float -d 'Generate code that does not use (uses) the fl
complete -c gcc -o mhard-float -d 'Generate code that does not use (uses) the floating-point register set'
complete -c gcc -o mmultiple -d 'Generate code that uses (does not use) the load multiple word instructions and the store multiple word instructions'
complete -c gcc -o mno-multiple -d 'Generate code that uses (does not use) the load multiple word instructions and the store multiple word instructions'
complete -c gcc -o mstring -d 'Generate code that uses (does not use) the load string instructions and the store string word instructions to save multiple registers and do small block moves'
complete -c gcc -o mno-string -d 'Generate code that uses (does not use) the load string instructions and the store string word instructions to save multiple registers and do small block moves'
complete -c gcc -o mupdate -d 'Generate code that uses (does not use) the load or store instructions that update the base register to the address of the calculated memory location'
complete -c gcc -o mno-update -d 'Generate code that uses (does not use) the load or store instructions that update the base register to the address of the calculated memory location'
complete -c gcc -o mstring -d 'Generate code that uses the load string and store string word instructions to save registers and do small block moves'
complete -c gcc -o mno-string -d 'Generate code that does not use the load string and store string word instructions to save registers and do small block moves'
complete -c gcc -o mupdate -d 'Generate code that uses the load or store instructions that update the base register to the address of the calculated memory location'
complete -c gcc -o mno-update -d 'Generate code that does not use the load or store instructions that update the base register to the address of the calculated memory location'
complete -c gcc -o mfused-madd -d 'Generate code that uses (does not use) the floating point multiply and accumulate instructions'
complete -c gcc -o mno-fused-madd -d 'Generate code that uses (does not use) the floating point multiply and accumulate instructions'
complete -c gcc -o mno-bit-align -d 'On System V'
complete -c gcc -o mbit-align -d 'On System V'
complete -c gcc -o mno-strict-align -d 'On System V'
complete -c gcc -o mstrict-align -d 'On System V'
complete -c gcc -o mrelocatable -d 'On embedded PowerPC systems generate code that allows (does not allow) the program to be relocated to a different address at runtime'
complete -c gcc -o mno-relocatable -d 'On embedded PowerPC systems generate code that allows (does not allow) the program to be relocated to a different address at runtime'
complete -c gcc -o mrelocatable-lib -d 'On embedded PowerPC systems generate code that allows (does not allow) the program to be relocated to a different address at runtime'
complete -c gcc -o mno-relocatable-lib -d 'On embedded PowerPC systems generate code that allows (does not allow) the program to be relocated to a different address at runtime'
complete -c gcc -o mno-toc -d 'On System V'
complete -c gcc -o mtoc -d 'On System V'
complete -c gcc -o mlittle -d 'On System V'
complete -c gcc -o mlittle-endian -d 'On System V'
complete -c gcc -o mbig -d 'On System V'
complete -c gcc -o mbig-endian -d 'On System V'
complete -c gcc -o mdynamic-no-pic -d 'On Darwin and Mac OS X systems, compile code so that it is not relocatable, but that its external references are relocatable'
complete -c gcc -o mprioritize-restricted-insns -d '=priority This option controls the priority that is assigned to dispatch-slot restricted instructions during the second scheduling pass'
complete -c gcc -o msched-costly-dep -d '=dependence_type This option controls which dependences are considered costly by the target during instruction scheduling'
complete -c gcc -o minsert-sched-nops -d '=scheme This option controls which nop insertion scheme will be used during the second scheduling pass'
complete -c gcc -o mcall-sysv -d 'On System V'
complete -c gcc -o mno-bit-align -d 'On System V.4 and embedded PowerPC do not force structures and unions that contain bit-fields to be aligned to the base type of the bit-field.'
complete -c gcc -o mbit-align -d 'On System V.4 and embedded PowerPC do force structures and unions that contain bit-fields to be aligned to the base type of the bit-field'
complete -c gcc -o mno-strict-align -d 'On System V.4 and embedded PowerPC do not assume that unaligned memory references are handled by the system'
complete -c gcc -o mstrict-align -d 'On System V.4 and embedded PowerPC do assume that unaligned memory references are handled by the syste'
complete -c gcc -o mrelocatable -d 'On embedded PowerPC generate code that allows the program to be relocated to a different address at runtime'
complete -c gcc -o mno-relocatable -d 'On embedded PowerPC generate code that does not allow the program to be relocated to a different address at runtime'
complete -c gcc -o mrelocatable-lib -d 'On embedded PowerPC generate code that allows the program to be relocated to a different address at runtime'
complete -c gcc -o mno-relocatable-lib -d 'On embedded PowerPC generate code that does not allow the program to be relocated to a different address at runtime'
complete -c gcc -o mno-toc -d 'On System V.4 and embedded PowerPC do not assume that register 2 contains a pointer to a global area pointing to the addresses used in the program'
complete -c gcc -o mtoc -d 'On System V.4 and embedded PowerPC do assume that register 2 contains a pointer to a global area pointing to the addresses used in the program'
complete -c gcc -o mlittle -d 'On System V.4 and embedded PowerPC compile code for the processor in little-endian mode'
complete -c gcc -o mlittle-endian -d 'On System V.4 and embedded PowerPC compile code for the processor in little-endian mode'
complete -c gcc -o mbig -d 'On System V.4 and embedded PowerPC compile code for the processor in big-endian mode'
complete -c gcc -o mbig-endian -d 'On System V.4 and embedded PowerPC compile code for the processor in big-endian mode'
complete -c gcc -o mdynamic-no-pic -d 'On Darwin and Mac OS X, compile code so that it is not relocatable, but that its external references are relocatable'
complete -c gcc -o mprioritize-restricted-insns -d '=priority Controls the priority that is assigned to dispatch-slot restricted instructions during the second scheduling pass'
complete -c gcc -o msched-costly-dep -d '=dependence_type Controls which dependences are considered costly by the target during instruction scheduling'
complete -c gcc -o minsert-sched-nops -d '=scheme Controls which nop insertion scheme will be used during the second scheduling pass'
complete -c gcc -o mcall-sysv -d 'Specify both -mcall-sysv and -meabi options'
complete -c gcc -o mcall-sysv-eabi -d 'Specify both -mcall-sysv and -meabi options'
complete -c gcc -o mcall-sysv-noeabi -d 'Specify both -mcall-sysv and -mno-eabi options'
complete -c gcc -o mcall-solaris -d 'On System V'
complete -c gcc -o mcall-linux -d 'On System V'
complete -c gcc -o mcall-gnu -d 'On System V'
complete -c gcc -o mcall-netbsd -d 'On System V'
complete -c gcc -o mcall-linux -d 'On System V.4 and embedded PowerPC compile code for the Linux-based GNU system'
complete -c gcc -o mcall-netbsd -d 'On System V.4 and embedded PowerPC compile code for the NetBSD operating system'
complete -c gcc -o maix-struct-return -d 'Return all structures in memory (as specified by the AIX ABI)'
complete -c gcc -o msvr4-struct-return -d 'Return structures smaller than 8 bytes in registers (as specified by the SVR4 ABI)'
complete -c gcc -o mabi -d 'Extend the current ABI with a particular extension, or remove such extension'
@@ -1196,27 +1198,26 @@ complete -c gcc -o mabi -d 'Disable Booke SPE ABI extensions for the current ABI
complete -c gcc -o spe -d 'Disable Booke SPE ABI extensions for the current ABI'
complete -c gcc -o mabi -d '=ibmlongdouble Change the current ABI to use IBM extended precision long double'
complete -c gcc -o mabi -d '=ieeelongdouble Change the current ABI to use IEEE extended precision long double'
complete -c gcc -o mprototype -d 'On System V'
complete -c gcc -o mno-prototype -d 'On System V'
complete -c gcc -o mprototype -d 'On System V.4 and embedded PowerPC assume that all calls to variable argument functions are properly prototyped'
complete -c gcc -o mno-prototype -d 'On System V.4 and embedded PowerPC does not assume that all calls to variable argument functions are properly prototyped'
complete -c gcc -o msim -d 'On embedded PowerPC systems, assume that the startup module is called sim-crt0'
complete -c gcc -o mmvme -d 'On embedded PowerPC systems, assume that the startup module is called crt0'
complete -c gcc -o mads -d 'On embedded PowerPC systems, assume that the startup module is called crt0'
complete -c gcc -o myellowknife -d 'On embedded PowerPC systems, assume that the startup module is called crt0'
complete -c gcc -o mvxworks -d 'On System V'
complete -c gcc -o mvxworks -d 'On System V.4 and embedded PowerPC, specify that you are compiling for a VxWorks system'
complete -c gcc -o mwindiss -d 'Specify that you are compiling for the WindISS simulation environment'
complete -c gcc -o memb -d 'On embedded PowerPC systems, set the PPC_EMB bit in the ELF flags header to indicate that eabi extended relocations are used'
complete -c gcc -o meabi -d 'On System V'
complete -c gcc -o mno-eabi -d 'On System V'
complete -c gcc -o msdata -d '=eabi On System V'
complete -c gcc -o msdata -d '=sysv On System V'
complete -c gcc -o msdata -d 'On System V'
complete -c gcc -o msdata -d 'On System V'
complete -c gcc -o msdata-data -d 'On System V'
complete -c gcc -o msdata -d 'On embedded PowerPC systems, put all initialized global and static data in the '
complete -c gcc -o mno-sdata -d 'On embedded PowerPC systems, put all initialized global and static data in the '
complete -c gcc -s G -d 'On embedded PowerPC systems, put global and static items less than or equal to num bytes into the small data or bss sections instead of the normal data or bss section'
complete -c gcc -o mregnames -d 'On System V'
complete -c gcc -o mno-regnames -d 'On System V'
complete -c gcc -o meabi -d 'On System V.4 and embedded PowerPC do adhere to the Embedded Applications Binary Interface (EABI), which is a set of modifications to the System V.4 specs'
complete -c gcc -o mno-eabi -d 'On System V.4 and embedded PowerPC do not adhere to the Embedded Applications Binary Interface (EABI), which is a set of modifications to the System V.4 specifications'
complete -c gcc -o msdata -d '=eabi On System V.4 and embedded PowerPC, put small initialized const global and static data in the .sdata2, which is pointed to by register r2. Put small initialized non-const global and static data in the .sdata, which is pointed to by register r13. Put small uninitialized global and static data in the .sbss, which is adjacent to the .sdata. This option is incompatible with -mrelocatable and sets -memb'
complete -c gcc -o msdata -d '=sysv On System V.4 and embedded PowerPC, put small global and static data in the .sdata, which is pointed to by register r13. Put small uninitialized global and static data in the .sbss, which is adjacent to the .sdata. This option is incompatible with -mrelocatable'
complete -c gcc -o msdata -d '=default On System V.4 and embedded PowerPC, if -meabi is used, compile code the same as -msdata=eabi, otherwise same as -msdata=sysv'
complete -c gcc -o msdata -d '=data On System V.4 and embedded PowerPC, put small global data in the .sdata section. Put small uninitialized global data in the .sbss section. Do not use register r13 to address small data. Default behavior unless other -msdata options are used'
complete -c gcc -o msdata -d 'Enable optimizations that use the small data section. This may be useful for working around optimizer bugs'
complete -c gcc -o mno-sdata -d 'Disable optimizations that use the small data section. This may be useful for working around optimizer bugs'
complete -c gcc -s G -d 'On embedded PowerPC, put global and static items less than or equal to num bytes into the small data or bss sections instead of the normal'
complete -c gcc -o mregnames -d 'On System V.4 and embedded PowerPC do emit register names in the assembly language output using symbolic forms'
complete -c gcc -o mno-regnames -d 'On System V.4 and embedded PowerPC do not emit register names in the assembly language output using symbolic forms'
complete -c gcc -o mlongcall -d 'Default to making all function calls indirectly, using a register, so that functions which reside further than 32 megabytes (33,554,432 bytes) from the current location can be called'
complete -c gcc -o mno-longcall -d 'Default to making all function calls indirectly, using a register, so that functions which reside further than 32 megabytes (33,554,432 bytes) from the current location can be called'
complete -c gcc -o pthread -d 'Adds support for multithreading with the pthreads library'
@@ -1277,7 +1278,7 @@ complete -c gcc -o mno-renesas -d 'Comply with the calling conventions defined f
complete -c gcc -o mnomacsave -d 'Mark the "MAC" register as call-clobbered, even if -mhitachi is given'
complete -c gcc -o mieee -d 'Increase IEEE-compliance of floating-point code'
complete -c gcc -o misize -d 'Dump instruction size and location in the assembly code'
complete -c gcc -o mpadstruct -d 'This option is deprecated'
complete -c gcc -o mpadstruct -d 'Deprecated'
complete -c gcc -o mspace -d 'Optimize for space instead of speed'
complete -c gcc -o mprefergot -d 'When generating position-independent code, emit function calls using the Global Offset Table instead of the Procedure Linkage Table'
complete -c gcc -o musermode -d 'Generate a library function call to invalidate instruction cache entries, after fixing up a trampoline'
@@ -1289,8 +1290,8 @@ complete -c gcc -o mindexed-addressing -d 'Enable the use of the indexed address
complete -c gcc -o mgettrcost -d '=number Set the cost assumed for the gettr instruction to number'
complete -c gcc -o mpt-fixed -d 'Assume pt* instructions wont trap'
complete -c gcc -o minvalid-symbols -d 'Assume symbols might be invalid'
complete -c gcc -o mno-app-regs -d 'Specify -mapp-regs to generate output using the global registers 2 through 4, which the SPARC SVR4 ABI reserves for applications'
complete -c gcc -o mapp-regs -d 'Specify -mapp-regs to generate output using the global registers 2 through 4, which the SPARC SVR4 ABI reserves for applications'
complete -c gcc -o mapp-regs -d 'Generate output using the global registers 2 through 4, which the SPARC SVR4 ABI reserves for applications'
complete -c gcc -o mno-app-regs -d 'Does not generate output using the global registers 2 through 4, which the SPARC SVR4 ABI reserves for applications'
complete -c gcc -o mfpu -d 'Generate output containing floating point instructions'
complete -c gcc -o mhard-float -d 'Generate output containing floating point instructions'
complete -c gcc -o mno-fpu -d 'Generate output containing library calls for floating point'
@@ -1299,11 +1300,11 @@ complete -c gcc -o mhard-quad-float -d 'Generate output containing quad-word (lo
complete -c gcc -o msoft-quad-float -d 'Generate output containing library calls for quad-word (long double) floating point instructions'
complete -c gcc -o mno-unaligned-doubles -d 'Assume that doubles have 8 byte alignment'
complete -c gcc -o munaligned-doubles -d 'Assume that doubles have 8 byte alignment'
complete -c gcc -o mno-faster-structs -d 'With -mfaster-structs, the compiler assumes that structures should have 8 byte alignment'
complete -c gcc -o mfaster-structs -d 'With -mfaster-structs, the compiler assumes that structures should have 8 byte alignment'
complete -c gcc -o mimpure-text -d '-mimpure-text, used in addition to -shared, tells the compiler to not pass -z text to the linker when linking a shared object'
complete -c gcc -o mfaster-structs -d 'Assumes that structures should have 8 byte alignment'
complete -c gcc -o mno-faster-structs -d 'Does not assume that structures should have 8 byte alignment'
complete -c gcc -o mimpure-text -d 'Used in addition to -shared, tells to not pass -z text to the linker when linking a shared object'
complete -c gcc -o mcpu -d '=cpu_type Set the instruction set, register set, and instruction scheduling parameters for machine type cpu_type'
complete -c gcc -o mtune -d '=cpu_type Set the instruction scheduling parameters for machine type cpu_type, but do not set the instruction set or register set that the option -mcpu=cpu_type would'
complete -c gcc -o mtune -d '=cpu_type Set the instruction scheduling parameters for cpu_type, but do not set the instruction set or register set that the option -mcpu=cpu_type would'
complete -c gcc -o mv8plus -d 'With -mv8plus, GCC generates code for the SPARC-V8+ ABI'
complete -c gcc -o mno-v8plus -d 'With -mv8plus, GCC generates code for the SPARC-V8+ ABI'
complete -c gcc -o mvis -d 'With -mvis, GCC generates code that takes advantage of the UltraSPARC Visual Instruction Set extensions'
@@ -1323,7 +1324,7 @@ complete -c gcc -o pthread -d 'This is a synonym for -pthreads'
complete -c gcc -s G -d 'Create a shared object'
complete -c gcc -o Qy -d 'Identify the versions of each tool used by the compiler, in a "'
complete -c gcc -o Qn -d 'Refrain from adding "'
complete -c gcc -o mcpu -d '=cpu_type Set the instruction set, register set, and instruction scheduling parameters for machine type cpu_type'
complete -c gcc -o mcpu -d '=cpu_type Set the instruction set, register set, and instruction scheduling parameters for cpu_type'
complete -c gcc -o mbig-memory -d 'Generates code for the big or small memory model'
complete -c gcc -o mbig -d 'Generates code for the big or small memory model'
complete -c gcc -o msmall-memory -d 'Generates code for the big or small memory model'
@@ -1353,8 +1354,8 @@ complete -c gcc -o mparallel-mpy -d 'Allow the generation of MPY││ADD and MP
complete -c gcc -o mno-parallel-mpy -d 'Allow the generation of MPY││ADD and MPY││SUB parallel instructions, provided -mparallel-insns is also specified'
complete -c gcc -o mlong-calls -d 'Treat all calls as being far away (near)'
complete -c gcc -o mno-long-calls -d 'Treat all calls as being far away (near)'
complete -c gcc -o mno-ep -d 'Do not optimize (do optimize) basic blocks that use the same index pointer 4 or more times to copy pointer into the "ep" register, and use the shorter "sld" and "sst" instructions'
complete -c gcc -o mep -d 'Do not optimize (do optimize) basic blocks that use the same index pointer 4 or more times to copy pointer into the "ep" register, and use the shorter "sld" and "sst" instructions'
complete -c gcc -o mep -d 'Optimize basic blocks that use the same index pointer 4 or more times to copy pointer into the "ep" register, and use the shorter "sld" and "sst" instructions'
complete -c gcc -o mno-ep -d 'Do not optimize basic blocks that use the same index pointer 4 or more times to copy pointer into the "ep" register, and use the shorter "sld" and "sst" instructions'
complete -c gcc -o mno-prolog-function -d 'Do not use (do use) external functions to save and restore registers at the prologue and epilogue of a function'
complete -c gcc -o mprolog-function -d 'Do not use (do use) external functions to save and restore registers at the prologue and epilogue of a function'
complete -c gcc -o mspace -d 'Try to make the code as small as possible'
@@ -1363,12 +1364,12 @@ complete -c gcc -o msda -d '=n Put static or global variables whose size is n by
complete -c gcc -o mzda -d '=n Put static or global variables whose size is n bytes or less into the first 32 kilobytes of memory'
complete -c gcc -o mv850 -d 'Specify that the target processor is the V850'
complete -c gcc -o mbig-switch -d 'Generate code suitable for big switch tables'
complete -c gcc -o mapp-regs -d 'This option will cause r2 and r5 to be used in the code generated by the compiler'
complete -c gcc -o mno-app-regs -d 'This option will cause r2 and r5 to be treated as fixed registers'
complete -c gcc -o mapp-regs -d 'Will cause r2 and r5 to be used in the code generated by the compiler'
complete -c gcc -o mno-app-regs -d 'Will cause r2 and r5 to be treated as fixed registers'
complete -c gcc -o mv850e1 -d 'Specify that the target processor is the V850E1'
complete -c gcc -o mv850e -d 'Specify that the target processor is the V850E'
complete -c gcc -o mdisable-callt -d 'This option will suppress generation of the CALLT instruction for the v850e and v850e1 flavors of the v850 architecture'
complete -c gcc -o munix -d 'Do not output certain jump instructions ("aobleq" and so on) that the Unix assembler for the VAX cannot handle across long ranges'
complete -c gcc -o mdisable-callt -d 'Will suppress generation of the CALLT instruction for the v850e and v850e1 flavors of the v850 architecture'
complete -c gcc -o munix -d 'Do not output certain jump instructions (i.e. "aobleq") the Unix assembler for the VAX cannot handle across long ranges'
complete -c gcc -o mgnu -d 'Do output those jump instructions, on the assumption that you will assemble with the GNU assembler'
complete -c gcc -o mg -d 'Output code for g-format floating point numbers instead of d-format'
complete -c gcc -o msim -d 'Choose startup files and linker script suitable for the simulator'
@@ -1378,31 +1379,31 @@ complete -c gcc -o mfused-madd -d 'Enable or disable use of fused multiply/add a
complete -c gcc -o mno-fused-madd -d 'Enable or disable use of fused multiply/add and multiply/subtract instructions in the floating-point option'
complete -c gcc -o mtext-section-literals -d 'Control the treatment of literal pools'
complete -c gcc -o mno-text-section-literals -d 'Control the treatment of literal pools'
complete -c gcc -o mtarget-align -d 'When this option is enabled, GCC instructs the assembler to automatically align instructions to reduce branch penalties at the expense of some code density'
complete -c gcc -o mno-target-align -d 'When this option is enabled, GCC instructs the assembler to automatically align instructions to reduce branch penalties at the expense of some code density'
complete -c gcc -o mlongcalls -d 'When this option is enabled, GCC instructs the assembler to translate direct calls to indirect calls unless it can determine that the target of a direct call is in the range allowed by the call instruction'
complete -c gcc -o mno-longcalls -d 'When this option is enabled, GCC instructs the assembler to translate direct calls to indirect calls unless it can determine that the target of a direct call is in the range allowed by the call instruction'
complete -c gcc -o fbounds-check -d 'For front-ends that support it, generate additional code to check that indices used to access arrays are within the declared range'
complete -c gcc -o ftrapv -d 'This option generates traps for signed overflow on addition, subtraction, multiplication operations'
complete -c gcc -o fwrapv -d 'This option instructs the compiler to assume that signed arithmetic overflow of addition, subtraction and multiplication wraps around using twos-complement representation'
complete -c gcc -o mtarget-align -d 'Instructs the assembler to automatically align instructions to reduce branch penalties at the expense of some code density'
complete -c gcc -o mno-target-align -d 'Instructs the assembler to not automatically align instructions to reduce branch penalties at the expense of some code density'
complete -c gcc -o mlongcalls -d 'Tell assembler to translate direct calls to indirect calls'
complete -c gcc -o mno-longcalls -d 'Tell assembler to not translate direct calls to indirect calls'
complete -c gcc -o fbounds-check -d 'Generate additional code to check that indices used to access arrays are within the declared range'
complete -c gcc -o ftrapv -d 'Generates traps for signed overflow on addition, subtraction, multiplication operations'
complete -c gcc -o fwrapv -d 'Assume that signed arithmetic overflow of addition, subtraction and multiplication wraps around using twos-complement representation'
complete -c gcc -o fexceptions -d 'Enable exception handling'
complete -c gcc -o fnon-call-exceptions -d 'Generate code that allows trapping instructions to throw exceptions'
complete -c gcc -o funwind-tables -d 'Similar to -fexceptions, except that it will just generate any needed static data, but will not affect the generated code in any other way'
complete -c gcc -o fasynchronous-unwind-tables -d 'Generate unwind table in dwarf2 format, if supported by target machine'
complete -c gcc -o funwind-tables -d 'Similar to -fexceptions, except that it will just generate any needed static data, but will not affect in any other way'
complete -c gcc -o fasynchronous-unwind-tables -d 'Generate unwind table in dwarf2 format'
complete -c gcc -o fpcc-struct-return -d 'Return "short" "struct" and "union" values in memory like longer ones, rather than in registers'
complete -c gcc -o freg-struct-return -d 'Return "struct" and "union" values in registers when possible'
complete -c gcc -o fshort-enums -d 'Allocate to an "enum" type only as many bytes as it needs for the declared range of possible values'
complete -c gcc -o fshort-double -d 'Use the same size for "double" as for "float"'
complete -c gcc -o fshort-wchar -d 'Override the underlying type for wchar_t to be short unsigned int instead of the default for the target'
complete -c gcc -o fshared-data -d 'Requests that the data and non-"const" variables of this compilation be shared data rather than private data'
complete -c gcc -o fno-common -d 'In C, allocate even uninitialized global variables in the data section of the object file, rather than generating them as common blocks'
complete -c gcc -o fno-common -d 'In C, allocate even uninitialized global variables in the data section of the object file, rather than as common blocks'
complete -c gcc -o fno-ident -d 'Ignore the #ident directive'
complete -c gcc -o finhibit-size-directive -d 'Dont output a "'
complete -c gcc -o fverbose-asm -d 'Put extra commentary information in the generated assembly code to make it more readable'
complete -c gcc -o fpic -d 'Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine'
complete -c gcc -o fPIC -d 'If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table'
complete -c gcc -o fpie -d 'These options are similar to -fpic and -fPIC, but generated position independent code can be only linked into executables'
complete -c gcc -o fPIE -d 'These options are similar to -fpic and -fPIC, but generated position independent code can be only linked into executables'
complete -c gcc -o fPIC -d 'Emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table'
complete -c gcc -o fpie -d 'Similar to -fpic and -fPIC, but generated position independent code can be only linked into executables'
complete -c gcc -o fPIE -d 'Similar to -fpic and -fPIC, but generated position independent code can be only linked into executables'
complete -c gcc -o fno-jump-tables -d 'Do not use jump tables for switch statements even where it would be more efficient than other code generation strategies'
complete -c gcc -o ffixed-reg -d 'Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role)'
complete -c gcc -o fcall-used-reg -d 'Treat the register named reg as an allocable register that is clobbered by function calls'
@@ -1410,13 +1411,13 @@ complete -c gcc -o fcall-saved-reg -d 'Treat the register named reg as an alloca
complete -c gcc -o fpack-struct -d 'Without a value specified, pack all structure members together without holes' -x
complete -c gcc -o finstrument-functions -d 'Generate instrumentation calls for entry and exit to functions'
complete -c gcc -o fstack-check -d 'Generate code to verify that you do not go beyond the boundary of the stack'
complete -c gcc -o fstack-limit-register -d 'Generate code to ensure that the stack does not grow beyond a certain value, either the value of a register or the address of a symbol'
complete -c gcc -o fstack-limit-symbol -d 'Generate code to ensure that the stack does not grow beyond a certain value, either the value of a register or the address of a symbol'
complete -c gcc -o fno-stack-limit -d 'Generate code to ensure that the stack does not grow beyond a certain value, either the value of a register or the address of a symbol'
complete -c gcc -o fstack-limit-register -d 'Generate code to ensure that the stack does not grow beyond the value of a register'
complete -c gcc -o fstack-limit-symbol -d 'Generate code to ensure that the stack does not grow beyond the address of a symbol'
complete -c gcc -o fno-stack-limit -d 'Does not generate code to ensure that the stack does not grow beyond a certain value, either the value of a register or the address of a symbol'
complete -c gcc -o fargument-alias -d 'Specify the possible relationships among parameters and between parameters and global data'
complete -c gcc -o fargument-noalias -d 'Specify the possible relationships among parameters and between parameters and global data'
complete -c gcc -o fargument-noalias-global -d 'Specify the possible relationships among parameters and between parameters and global data'
complete -c gcc -o fleading-underscore -d 'This option and its counterpart, -fno-leading-underscore, forcibly change the way C symbols are represented in the object file'
complete -c gcc -o fleading-underscore -d 'This flag and -fno-leading-underscore, forcibly change the way C symbols are represented in the object file'
complete -c gcc -o ftls-model -d '=model Alter the thread-local storage model to be used'
complete -c gcc -o fvisibility -a 'default internal hidden protected' -d 'Set the default ELF image symbol visibility'
complete -c gcc -o fopenmp -d 'Enable handling of OpenMP directives "#pragma omp" in C/C++ and "!$omp" in Fortran'

View File

@@ -0,0 +1,29 @@
complete -c gimp -s h -l help -d 'show help'
complete -c gimp -l help-all -d 'show help with advanced options'
complete -c gimp -l help-gtk -d 'show help with GTK+ options'
complete -c gimp -l help-gegl -d 'show help with GEGL options'
complete -c gimp -s v -l version -d 'show version'
complete -c gimp -l license -d 'show licence'
complete -c gimp -l verbose -d 'show verbosely'
complete -c gimp -s n -l new-instance -d 'open new instance'
complete -c gimp -s a -l as-new -d 'open with new images'
complete -c gimp -s i -l no-interface -d 'hide UI'
complete -c gimp -s d -l no-data -d 'do not load patterns, gradients, palettes, and brushes'
complete -c gimp -s f -l no-fonts -d 'do not load fonts'
complete -c gimp -s s -l no-splash -d 'hide splash screen'
complete -c gimp -l no-shm -d 'do not use shared memory'
complete -c gimp -l no-cpu-accel -d 'do not use CPU acceleration'
complete -c gimp -l display -d 'open with X display' -r
complete -c gimp -l session -d 'open with alternative sessionrc' -r
complete -c gimp -s g -l gimprc -d 'open with alternative gimprc' -r
complete -c gimp -l system-gimprc -d 'open with alternative system gimprc' -r
complete -c gimp -l dump-gimprc -d 'show gimprc'
complete -c gimp -l console-messages -d 'show messages on the console'
complete -c gimp -l debug-handlers -d 'enable debug handlers'
complete -c gimp -l stack-trace-mode -d 'whether generate stack-trace in case of fatal signals' -a 'never query always' -x
complete -c gimp -l pdb-compat-mode -d 'whether PDB provides aliases for deprecated functions' -a 'off on warn' -x
complete -c gimp -l batch-interpreter -d 'run procedure to use to process batch events' -r
complete -c gimp -s b -l batch -d 'run command non-interactively' -a '-' -r

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,28 @@
# Pure Go implementation of jq
# https://github.com/itchyny/gojq
complete -c gojq -s c -l compact-output -d "Compact output, no pretty-print"
complete -c gojq -s r -l raw-output -d "Output raw strings without quotes"
complete -c gojq -s j -l join-output -d "Stop printing a newline after each output"
complete -c gojq -s 0 -l nul-output -d "Print NUL after each output"
complete -c gojq -s C -l color-output -d "Colorize output even if piped"
complete -c gojq -s M -l monochrome-output -d "Stop colorizing output"
complete -c gojq -l yaml-output -d "Output as YAML"
complete -c gojq -l indent -x -d "Number of spaces for indentation"
complete -c gojq -l tab -d "Use tabs for indentation"
complete -c gojq -s n -l null-input -d "Use null as input value"
complete -c gojq -s R -l raw-input -d "Read input as raw strings"
complete -c gojq -s s -l slurp -d "Read all inputs into an array"
complete -c gojq -l stream -d "Parse input in stream fashion"
complete -c gojq -l yaml-input -d "Read input as YAML"
complete -c gojq -s f -l from-file -rF -d "Load query from file"
complete -c gojq -s L -xa "(__fish_complete_directories)" -d "Directory to search modules from"
complete -c gojq -l arg -x -d "Set variable to string value"
complete -c gojq -l argjson -x -d "Set variable to JSON value"
complete -c gojq -l slurpfile -x -d "Set variable to the JSON contents of the file"
complete -c gojq -l rawfile -x -d "Set variable to the contents of the file"
complete -c gojq -l args -d "Consume remaining arguments as positional string values"
complete -c gojq -l jsonargs -d "Consume remaining arguments as positional JSON values"
complete -c gojq -s e -l exit-status -d "Exit 1 when the last value is false or null"
complete -c gojq -s v -l version -d "Print gojq version"
complete -c gojq -s h -l help -d "Print help"

View File

@@ -0,0 +1 @@
complete -c gradlew -w gradle

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

@@ -0,0 +1 @@
complete -c gw -w gradle

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

@@ -1,8 +0,0 @@
complete -c highlight -s O -l out-format -d 'Output file in given format' -xa 'xterm256 latex tex rtf html xhtml ansi bbcode svg'
complete -c highlight -s t -l tab -d 'Specify tab length' -x
complete -c highlight -s i -l input -d 'Name of the input file' -r
complete -c highlight -s o -l output -d 'Name of the output file' -r
complete -c highlight -s d -l outdir -d 'Output directory' -r
complete -c highlight -s S -l syntax -d 'Set type of the source code' -xa "(highlight -p | sed -r 's/^(.*\S)\s+:\s*(\S+).*\$/\2\t\1/; /^\$/d')"
complete -c highlight -s s -l style -d 'Highlight style' -xa "(highlight --list-themes | sed '/^\$\| /d')"

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

@@ -0,0 +1,8 @@
set -l subcommands 'bind split'
set -l subcommand_show_condition "not __fish_seen_subcommand_from $subcommands"
set -l split_option_show_condition "__fish_seen_subcommand_from split"
complete -c horcrux -a bind -n "$subcommand_show_condition" -f -d 'Bind directory'
complete -c horcrux -a split -n "$subcommand_show_condition" -f -d 'Split file'
complete -c horcrux -s n -r -n "$split_option_show_condition" -d 'Count of horcruxes to make'
complete -c horcrux -s t -r -n "$split_option_show_condition" -d 'Count of horcruxes required to resurrect the original file'

View File

@@ -1,11 +1,22 @@
# htop is an interactive process viewer.
# See: http://hisham.hm/htop
# See: https://htop.dev
complete -c htop -l delay -s d -d 'Update interval' -x
complete -c htop -l no-color -s C -d 'Start htop in monochrome mode'
complete -c htop -l no-colour -d 'Start htop in monochrome mode'
complete -c htop -l filter -s F -d 'Filter processes by terms matching the commands' -x
complete -c htop -l help -s h -d 'Show help and exit'
complete -c htop -l pid -s p -d 'Show only given PIDs' -x -a '(__fish_append , (__fish_complete_pids))'
complete -c htop -l user -s u -d 'Monitor given user' -x -a '(__fish_complete_users)'
complete -c htop -l sort-key -d 'Sort column' -xa '(htop --sort-key help)'
complete -c htop -l version -s v -d 'Show version and exit'
complete -c htop -l pid -s p -d 'Show only given PIDs' -xa '(__fish_append , (__fish_complete_pids))'
complete -c htop -l sort-key -s s -d 'Sort column' -xa '(htop --sort-key help)'
complete -c htop -l user -s u -d 'Monitor given user' -xa '(__fish_complete_users)'
complete -c htop -l no-unicode -s U -d 'Do not use unicode but ASCII characters for graph meters'
complete -c htop -l no-mouse -s M -d 'Disable support of mouse control'
complete -c htop -l readonly -d 'Disable all system and process changing features'
complete -c htop -l version -s V -d 'Show version and exit'
complete -c htop -l tree -s t -d 'Show processes in tree view'
complete -c htop -l highlight-changes -s H -d 'Highlight new and old processes' -x
complete -c htop -l drop-capabilites -d 'Drop unneeded Linux capabilites (Requires libpcap support)' -xka "
off
basic
strict
"

View File

@@ -0,0 +1 @@
complete -c ibmcloud -f -a '(__fish_argcomplete_complete (commandline -opc) --generate-bash-completion)'

View File

@@ -4,11 +4,12 @@
# Also the manpage and even the grammar it accepts is utter shite (options can only be before commands, some things are only in the BNF, others only in the text)
# It also quite likes the word "dev", even though it needs it less than the BNF specifies
set -l ip_commands link address addrlabel route rule neigh ntable tunnel tuntap maddr mroute mrule monitor xfrm netns l2tp tcp_metrics
set -l ip_commands link address addrlabel route rule neighbour ntable tunnel tuntap maddr mroute mrule monitor xfrm netns l2tp tcp_metrics
set -l ip_addr a ad add addr addre addres address
set -l ip_link l li lin link
set -l ip_neigh n ne nei neig neigh neighb neighbo neighbor neighbour
set -l ip_route r ro rou rout route
set -l ip_all_commands $ip_commands $ip_addr $ip_link $ip_route
set -l ip_all_commands $ip_commands $ip_addr $ip_link $ip_neigh $ip_route
function __fish_ip_commandwords
set -l skip 0
@@ -61,10 +62,10 @@ function __fish_ip_commandwords
else
echo $word
end
case n ne nei neig neigh
case n ne nei neig neigh neighb neighbo neighbor neighbour
if test $have_command = 0
set have_command 1
echo neigh
echo neighbour
else
echo $word
end
@@ -239,6 +240,18 @@ function __fish_ip_types
xfrm "Virtual xfrm interface"
end
function __fish_ip_neigh_states
printf '%s\t%s\n' permanent "entry is valid forever" \
noarp "entry is valid without validation" \
reachable "entry is valid until timeout" \
stale "entry is valid but suspicious" \
none "pseudo state" \
incomplete "entry has not yet been validated" \
delay "entry validation is currently delayed" \
probe "neighbor is being probed" \
failed "neighbor validation has ultimately failed"
end
function __fish_complete_ip
set -l cmd (__fish_ip_commandwords)
set -l count (count $cmd)
@@ -418,6 +431,66 @@ function __fish_complete_ip
case help
end
end
case neighbour
if not set -q cmd[3]
printf '%s\t%s\n' help "Show help" \
add "Add new neighbour entry" \
delete "Delete neighbour entry" \
change "Change neighbour entry" \
replace "Add or change neighbour entry" \
show "List neighbour entries" \
flush "Flush neighbour entries" \
get "Lookup neighbour entry"
else
switch $cmd[2]
case add del delete change replace
switch $cmd[-2]
case lladdr
case nud
__fish_ip_neigh_states
case proxy
case dev
__fish_ip_device
case '*'
echo lladdr
echo nud
echo proxy
echo dev
echo router
echo use
echo managed
echo extern_learn
end
case show flush
switch $cmd[-2]
case to
case dev
__fish_ip_device
case vrf
case nud
__fish_ip_neigh_states
echo all
case '*'
echo to
echo dev
echo vrf
echo nomaster
echo proxy
echo unused
echo nud
end
case get
switch $cmd[-2]
case to
case dev
__fish_ip_device
case '*'
echo proxy
echo to
echo dev
end
end
end
case route
if not set -q cmd[3]
printf '%s\t%s\n' add "Add new route" \

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

@@ -0,0 +1,176 @@
# Execute an `iwctl ... list` command and parse output
function __iwctl_filter -w iwctl
# set results "iwctl $cmd list | tail -n +5"
# if test -n "$empty"
# set -a results "| string match --invert '*$empty*'"
# end
# eval "$results" | awk '{print $2}'
# awk does not work on multiline entries, therefor we use string match,
# which has the added benefit of filtering out the `No devices in ...` lines
argparse -i all-columns -- $argv
# remove color escape sequences
set -l results (iwctl $argv | string replace -ra '\e\[[\d;]+m' '')
# calculate column widths
set -l headers $results[3]
# We exploit the fact that all column labels will have >2 space to the left, and inside column labels there is always only one space.
set -l leading_ws (string match -r "^ *" -- $headers | string length)
set -l column_widths (string match -a -r '(?<= )\S.*?(?: (?=\S)|$)' -- $headers | string length)
if set -ql _flag_all_columns
for line in (string match " *" -- $results[5..] | string sub -s (math $leading_ws + 1))
for column_width in $column_widths
printf %s\t (string sub -l $column_width -- $line | string trim -r)
set line (string sub -s (math $column_width + 1) -- $line)
end
printf "\n"
end
else
# only take lines starting with ` `, i.e., no `No devices ...`
# then take the first column as substring
string match " *" $results[5..] | string sub -s (math $leading_ws + 1) -l $column_widths[1] | string trim -r
end
# string match -rg " .{$(math $header_spaces[1] - 2)}(.{$(math $first_column_label + $header_spaces[2])})" $results[5..] | string trim
end
function __iwctl_match_subcoms
set -l match (string split --no-empty " " -- $argv)
set argv (commandline -poc)
# iwctl allows to specify arguments for username, password, passphrase and dont-ask regardless of any following commands
argparse -i 'u/username=' 'p/password=' 'P/passphrase=' 'v/dont-ask' -- $argv
set argv $argv[2..]
if test (count $argv) != (count $match)
return 1
end
while set -q argv[1]
string match -q -- $match[1] $argv[1]
or return 1
set -e match[1] argv[1]
end
end
function __iwctl_connect
set argv (commandline -poc)
# remove all options
argparse -i 'u/username=' 'p/password=' 'P/passphrase=' 'v/dont-ask' -- $argv
# station name should now be the third argument (`iwctl station <wlan>`)
for network in (__iwctl_filter station $argv[3] get-networks rssi-dbms --all-columns)
set network (string split \t -- $network)
set -l strength "$network[3]"
# This follows iwctls display of * to ****
# https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/client/station.c?id=4a0a97379008489daa108c9bc0a4204c1ae9c6a8#n380
if test $strength -ge -6000
set strength 4
else if test $strength -ge -6700
set strength 3
else if test $strength -ge -7500
set strength 2
else
set strength 1
end
printf "%s\t[%s] - %s\n" "$network[1]" (string repeat -n $strength '*' | string pad -rw 4 -c -) "$network[2]"
end
end
# The `empty` messages in case we want to go back to using those
# set ad_hoc '(__iwctl_filter ad-hoc "No devices in Ad-Hoc mode available.")'
# set adpater '(__iwctl_filter adapter)'
# set ap '(__iwctl_filter ap "No devices in access point mode available.")'
# set device '(__iwctl_filter device)'
# set dpp '(__iwctl_filter dpp "No DPP-capable devices available")'
# set known_networks '(__iwctl_filter known-networks)'
# set station '(__iwctl_filter station "No devices in Station mode available.")'
# set wsc '(__iwctl_filter wsc "No WSC-capable devices available")'
complete -f iwctl
# Options
complete -c iwctl -s h -l help
complete -c iwctl -s p -l password -rf
complete -c iwctl -s u -l username -rf
complete -c iwctl -s P -l passphrase -rf
complete -c iwctl -s v -l dont-ask -d "Don't ask for missing credentials"
# Subcommand
complete -c iwctl -n '__iwctl_match_subcoms' \
-a "ad-hoc adapter ap debug device dpp exit help known-networks quit station version wsc"
# ad-hoc
complete -c iwctl -n '__iwctl_match_subcoms ad-hoc' -a list -d "List devices in Ad-Hoc mode"
complete -c iwctl -n '__iwctl_match_subcoms ad-hoc' -a "(__iwctl_filter ad-hoc list)"
complete -c iwctl -n '__iwctl_match_subcoms "ad-hoc *"' -n 'not __iwctl_match_subcoms ad-hoc list' -a start -d "Start or join an Ad-Hoc network"
complete -c iwctl -n '__iwctl_match_subcoms "ad-hoc *"' -n 'not __iwctl_match_subcoms ad-hoc list' -a start_open -d "Start of join an open Ad-Hoc network"
complete -c iwctl -n '__iwctl_match_subcoms "ad-hoc *"' -n 'not __iwctl_match_subcoms ad-hoc list' -a stop -d "Leave an Ad-Hoc network"
# adapter
complete -c iwctl -n '__iwctl_match_subcoms adapter' -a "list" -d "List adapters"
complete -c iwctl -n '__iwctl_match_subcoms adapter' -a "(__iwctl_filter adapter list)"
complete -c iwctl -n '__iwctl_match_subcoms "adapter *"' -n 'not __iwctl_match_subcoms adapter list' -a "show" -d "Show adapter info"
complete -c iwctl -n '__iwctl_match_subcoms "adapter *"' -n 'not __iwctl_match_subcoms adapter list' -a "set-property" -d "Set property"
# TODO implement completions for `properties`, i.e. all rows with `*` in first column
# ap
complete -c iwctl -n '__iwctl_match_subcoms ap' -a "list" -d "List devices in AP mode"
complete -c iwctl -n '__iwctl_match_subcoms ap' -a "(__iwctl_filter ap list)"
complete -c iwctl -n '__iwctl_match_subcoms "ap *"' -n 'not __iwctl_match_subcoms ap list' -a start -d "Start an access point"
complete -c iwctl -n '__iwctl_match_subcoms "ap *"' -n 'not __iwctl_match_subcoms ap list' -a start-profile -d "Start an access point based on a disk profile"
complete -c iwctl -n '__iwctl_match_subcoms "ap *"' -n 'not __iwctl_match_subcoms ap list' -a stop -d "Stop a started access point"
complete -c iwctl -n '__iwctl_match_subcoms "ap *"' -n 'not __iwctl_match_subcoms ap list' -a show -d "Show AP info"
complete -c iwctl -n '__iwctl_match_subcoms "ap *"' -n 'not __iwctl_match_subcoms ap list' -a get-networks -d "Get network list after scanning"
# debug
complete -c iwctl -n '__iwctl_match_subcoms "debug *"' -a connect -d "Connect to a specific BSS"
complete -c iwctl -n '__iwctl_match_subcoms "debug *"' -a roam -d "Roam to a BSS"
complete -c iwctl -n '__iwctl_match_subcoms "debug *"' -a get-networks -d "Get networks"
complete -c iwctl -n '__iwctl_match_subcoms "debug *"' -a autoconnect -d "Set autoconnect property"
complete -c iwctl -n '__iwctl_match_subcoms "debug * autoconnect"' -a "on off" -d "Set autoconnect property"
# device
complete -c iwctl -n '__iwctl_match_subcoms device' -a "list" -d "List devices"
complete -c iwctl -n '__iwctl_match_subcoms device' -a "(__iwctl_filter device list)"
complete -c iwctl -n '__iwctl_match_subcoms "device *"' -n 'not __iwctl_match_subcoms device list' -a "show" -d "Show device info"
complete -c iwctl -n '__iwctl_match_subcoms "device *"' -n 'not __iwctl_match_subcoms device list' -a "set-property" -d "Set property"
# TODO implement completions for `properties`, i.e. all rows with `*` in first column
# dpp
complete -c iwctl -n '__iwctl_match_subcoms dpp' -a "list" -d "List DPP-capable devices"
complete -c iwctl -n '__iwctl_match_subcoms dpp' -a "(__iwctl_filter dpp list)"
complete -c iwctl -n '__iwctl_match_subcoms "dpp *"' -n 'not __iwctl_match_subcoms dpp list' -a start-enrollee -d "Starts a DPP Enrollee"
complete -c iwctl -n '__iwctl_match_subcoms "dpp *"' -n 'not __iwctl_match_subcoms dpp list' -a start-configurator -d "Starts a DPP Configurator"
complete -c iwctl -n '__iwctl_match_subcoms "dpp *"' -n 'not __iwctl_match_subcoms dpp list' -a stop -d "Aborts a DPP operations"
complete -c iwctl -n '__iwctl_match_subcoms "dpp *"' -n 'not __iwctl_match_subcoms dpp list' -a show -d "Show the DPP state"
# known-networks
# TODO Does not support SSIDs ending/starting on whitespace. Not sure how to fix.
complete -c iwctl -n '__iwctl_match_subcoms known-networks' -a "list" -d "List known networks"
complete -c iwctl -n '__iwctl_match_subcoms known-networks' -a "(__iwctl_filter known-networks list)"
complete -c iwctl -n '__iwctl_match_subcoms "known-networks *"' -n 'not __iwctl_match_subcoms known-networks list' -a forget -d "Forget a known network"
complete -c iwctl -n '__iwctl_match_subcoms "known-networks *"' -n 'not __iwctl_match_subcoms known-networks list' -a show -d "Show nown network"
complete -c iwctl -n '__iwctl_match_subcoms "known-networks *"' -n 'not __iwctl_match_subcoms known-networks list' -a set-property -d "Set property"
# station
complete -c iwctl -n '__iwctl_match_subcoms station' -a "list" -d "List devices in Station mode"
complete -c iwctl -n '__iwctl_match_subcoms station' -a "(__iwctl_filter station list)"
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a connect -d "Connect to network"
complete -c iwctl -n '__iwctl_match_subcoms "station * connect"' -a "(__iwctl_connect)" -d "Connect to network" --keep-order
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a connect-hidden -d "Connect to hidden network"
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a disconnect -d "Disconnect"
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a get-networks -d "Get networks"
complete -c iwctl -n '__iwctl_match_subcoms "station * get-networks"' -a "rssi-dbms rssi-bars"
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a get-hidden-access-points -d "Get hidden APs"
complete -c iwctl -n '__iwctl_match_subcoms "station * get-hidden-access-points"' -a "rssi-dbms"
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a scan -d "Scan for networks"
complete -c iwctl -n '__iwctl_match_subcoms "station *"' -n 'not __iwctl_match_subcoms station list' -a show -d "Show station info"
# wsc
complete -c iwctl -n '__iwctl_match_subcoms wsc' -a "list" -d "List WSC-capable devices"
complete -c iwctl -n '__iwctl_match_subcoms wsc' -a "(__iwctl_filter wsc list)"
complete -c iwctl -n '__iwctl_match_subcoms "wsc *"' -n 'not __iwctl_match_subcoms wsc list' -a push-button -d "PushButton Mode"
complete -c iwctl -n '__iwctl_match_subcoms "wsc *"' -n 'not __iwctl_match_subcoms wsc list' -a start-user-pin -d "PIN mode"
complete -c iwctl -n '__iwctl_match_subcoms "wsc *"' -n 'not __iwctl_match_subcoms wsc list' -a start-pin -d "PIN mode with generated PIN"
complete -c iwctl -n '__iwctl_match_subcoms "wsc *"' -n 'not __iwctl_match_subcoms wsc list' -a cancel -d "Aborts WSC operations"

View File

@@ -0,0 +1,45 @@
function __fish_complete_macos_java_version
set -l json (/usr/libexec/java_home -X|plutil -convert json -o - -)
osascript -l JavaScript -s o -e "JSON.parse('$json').forEach(e => console.log(`\${e.JVMVersion}\t\${e.JVMArch} \${e.JVMName} by--exec \${e.JVMVendor}`))"
end
function __fish_complete_macos_java_home_exec
# seperate the buffer into two parts
# where the first used to get the JAVA_HOME
# and the second is the subcommand to complete
set -l cmds (string replace -a -r ' *java_home *' '' (commandline) )
set -l cmds (string replace -r ' *--exec *' \n -- "$cmds")
# parse the java_home argv to get $JAVA_HOME/bin
argparse v/version= a/arch= -- "$cmds[1]"
set -l get_java_home /usr/libexec/java_home
if test -n "$_flag_v"
set get_java_home "$get_java_home -v $_flag_v"
end
if test -n "$_flag_a"
set get_java_home "$get_java_home -a $_flag_a"
end
set -l java_bin_dir (eval $get_java_home)"/bin"
# if such $binary in $JAVA_HOME/bin
# complete the subcommand
# else
# complete using $binary as prefix
set -l binary (string match -r '^.*?(?= )' $cmds[2])
if test -f "$java_bin_dir/$binary"
complete -C $cmds[2]
else
command ls $java_bin_dir | string match -r ^"$binary.*"
end
end
complete -ec java_home
complete -xc java_home -n "__fish_not_contain_opt -s h exec " -l exec
complete -xc java_home -n "__fish_contains_opt exec " -a "(__fish_complete_macos_java_home_exec)"
complete -xc java_home -n "__fish_not_contain_opt -s h exec " -s v -l version -a '(__fish_complete_macos_java_version)' -d 'Filter versions (as if JAVA_VERSION had been set in the environment).'
complete -xc java_home -n "__fish_not_contain_opt -s h exec " -s a -l arch -a "arm64 x86_64" -d 'Filter architecture (as if JAVA_ARCH had been set in the environment).'
complete -xc java_home -n "__fish_not_contain_opt -s h exec " -s h -l help -d 'Usage information.'
complete -fc java_home -n "__fish_not_contain_opt -s h exec " -s F -l failfast -d 'Fail when filters return no JVMs, do not continue with default.'
complete -fc java_home -n "__fish_not_contain_opt -s h exec " -s X -l xml -d 'Print full JVM list and additional data as XML plist.'
complete -fc java_home -n "__fish_not_contain_opt -s h exec " -s V -l verbose -d 'Print full JVM list with architectures.'

View File

@@ -1,27 +1,29 @@
# jq is a lightweight and flexible command-line JSON processor.
# See: https://stedolan.github.io/jq
complete -c jq -l version -d 'Output version and exit'
complete -c jq -l seq -d 'Use application/json-seq MIME type scheme'
complete -c jq -l version -d 'Output jq version'
complete -c jq -l seq -d 'Use application/json-seq MIME type'
complete -c jq -l stream -d 'Parse input in streaming fasion'
complete -c jq -l slurp -s s -d 'Run filter just once in large array'
complete -c jq -l raw-input -s R -d 'Don\'t parse as JSON but as string'
complete -c jq -l slurp -s s -d 'Read input to array and filter once'
complete -c jq -l raw-input -s R -d 'Parse input as string (not JSON)'
complete -c jq -l null-input -s n -d 'Ignore input and treat it as null'
complete -c jq -l compact-output -s c -d 'Don\'t pretty-print JSON'
complete -c jq -l tab -d 'Use a tab for indentation instead of 2 spaces'
complete -c jq -l indent -x -d 'Use given number of spaces for indentation'
complete -c jq -l tab -d 'Indent w/ tabs instead of spaces'
complete -c jq -l indent -x -d 'Num of spaces per indent'
complete -c jq -l color-output -s C -d 'Color output'
complete -c jq -l monochrome-output -s M -d 'Don\'t color output'
complete -c jq -l ascii-output -s a -d 'Replace UTF-8 characters with escape sequences'
complete -c jq -l unbuffered -d 'Flush output after each JSON object is printed'
complete -c jq -l ascii-output -s a -d 'Replace UTF-8 chars w/ escape sequences'
complete -c jq -l unbuffered -d 'Flush output after each JSON object'
complete -c jq -l sort-keys -s S -d 'Sort object keys in output'
complete -c jq -l raw-output -s r -d 'If output is string output its content directly to stdout'
complete -c jq -l raw-output -s r -d 'Write string output w/out quotes'
complete -c jq -l join-output -s j -d 'Raw output without newlines'
complete -c jq -l from-file -s f -r -d 'Read filter from file'
complete -c jq -s L -d 'Prepend given directory to search modules'
complete -c jq -l exit-status -s e -x -d 'Set exit status'
complete -c jq -s L -d 'Prepend dir to module search list'
complete -c jq -l exit-status -s e -d 'Set exit status from output'
complete -c jq -l arg -x -d 'Set variable'
complete -c jq -l argjson -x -d 'Set JSON-encoded variable'
complete -c jq -l slurpfile -r -d 'Read JSON in file and bind to given variable'
complete -c jq -l argfile -r -d 'Read JSON in file and bind to given variable [see man]'
complete -c jq -l run-tests -r -d 'Run tests in given file'
complete -c jq -l slurpfile -x -d 'Read JSON in file and bind to given variable'
complete -c jq -l argfile -x -d 'Read JSON in file and bind to given variable [see man]'
complete -c jq -l args -d 'Remaining args are positional string args'
complete -c jq -l jsonargs -d 'Remaining args are positional JSON text args'
complete -c jq -l run-tests -d 'Run tests in given file'

View File

@@ -1,7 +0,0 @@
function __ksi_completions
set --local ct (commandline --current-token)
set --local tokens (commandline --tokenize --cut-at-cursor --current-process)
printf "%s\n" $tokens $ct | command kitty +complete fish2
end
complete -f -c kitty -a "(__ksi_completions)"

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

@@ -0,0 +1,43 @@
function __krita_complete_image_format
set -l previous_token (commandline -oc)[-1]
set -l current_token (commandline -t)
if test "$previous_token" = --new-image
switch $current_token
case '*,*,*'
# nothing is completed as arbitrary width and height are expected
case '*,'
printf '%s,\n' U8 U16 F16 F32 |
string replace -r '^' $current_token
case '*'
printf '%s,\n' RGBA XYZA LABA CMYKA GRAY YCbCrA
end
end
end
function __krita_list_workspaces
path basename ~/.local/share/krita/workspaces/*.kws |
path change-extension ''
end
complete -c krita -s h -l help -d 'show help'
complete -c krita -l help-all -d 'show help with Qt options'
complete -c krita -s v -l version -d 'show version'
complete -c krita -l export -d 'export file as image'
complete -c krita -l export-pdf -d 'export file as PDF'
complete -c krita -l export-sequence -d 'export animation as sequence'
complete -c krita -l export-filename -d 'exported filename' -n '__fish_seen_subcommand_from --export --export-pdf --export-sequence' -r
complete -c krita -l template -d 'open template' -r
complete -c krita -l nosplash -d 'hide splash screen'
complete -c krita -l canvasonly -d 'open with canvasonly mode'
complete -c krita -l fullscreen -d 'open with fullscreen mode'
complete -c krita -l workspace -d 'open with workspace' -a '(__krita_list_workspaces)' -x
complete -c krita -l file-layer -d 'open with file-layer' -r
complete -c krita -l resource-location -d 'open with resource' -r
complete -c krita -l new-image -d 'open with new image'
complete -c krita -a '(__krita_complete_image_format)' -x

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,10 +1,12 @@
#loginctl (systemd 248)
#loginctl (systemd 254)
#variables
set -l seen __fish_seen_subcommand_from
set -l commands activate attach disable-linger enable-linger flush-devices kill-session kill-user list-seats list-sessions list-users lock-session lock-sessions seat-status session-status show-seat show-session show-user terminate-seat terminate-session terminate-user unlock-session unlock-sessions user-status
set -l output cat export json json-pretty json-seq json-sse short short-full short-iso short-iso-precise short-monotonic short-precise short-unix verbose with-unit
complete -c loginctl -f
#commands
complete -c loginctl -x -n "not $seen $commands" -a "$commands"
@@ -25,3 +27,23 @@ complete -c loginctl -x -n "not $seen $commands" -s P -d "Equivalent to --value
complete -c loginctl -x -n "not $seen $commands" -l signal -s s -d "Which signal to send"
complete -c loginctl -f -n "not $seen $commands" -l value -d "When showing properties, only print the value"
complete -c loginctl -f -n "not $seen $commands" -l version -d "Show package version"
function __fish_loginctl_list_sessions
loginctl list-sessions --no-legend --no-pager --output=short | string replace -r '^\s*(\d+)\s+\d+\s+(\S+)\s+(\S+\s+)?(\S+\d+).*' '$1\t$2 at $4'
end
function __fish_loginctl_list_users
loginctl list-users --no-legend --no-pager --output=short | string replace -r '(\d+) (\S+) .*' '$1\t$2'
end
function __fish_loginctl_list_seats
loginctl list-seats --no-legend --no-pager --output=short
end
complete -c loginctl -n "$seen session-status show-session activate lock-session unlock-session terminate-session kill-session" -a '(__fish_loginctl_list_sessions)'
complete -c loginctl -n "$seen user-status show-user enable-linger disable-linger terminate-user kill-user" -a '(__fish_loginctl_list_users)'
complete -c loginctl -n "$seen seat-status show-seat attach terminate-seat" -a '(__fish_loginctl_list_seats)'

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

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