Compare commits

..

296 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
276 changed files with 5764 additions and 2320 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,17 +55,11 @@ 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-1-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-core devel/pcre2 devel/ninja misc/py-pexpect git-lite
- 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
# the mode bits would otherwise disallow it. For example root may open()
# a file with write privileges even if the file has mode 400. This breaks

View File

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

View File

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

View File

@@ -1,7 +1,182 @@
fish 3.7.0 (released ???)
===================================
fish 3.7.1 (released March 19, 2024)
====================================
.. ignore: 9439 9440 9442 9452 9469 9480 9482
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
------------------------------
@@ -9,63 +184,69 @@ Notable improvements and fixes
abbr --erase (abbr --list)
can now be used to clean out all old abbreviations (:issue:`9468`).
- ``abbr --add --universal`` now warns about --universal being non-functional, to make it easier to detect old-style ``abbr`` calls (:issue:`9475`).
- ``functions --handlers-type caller-exit`` once again lists functions defined as ``function --on-job-exit caller``, rather than them being listed by ``functions --handlers-type process-exit``.
- ``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`).
- ``functions`` and ``type`` now show where a function was copied and where it originally was instead of saying ``Defined interactively``.
- Stack trace now shows line numbers for copied functions.
- ``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`).
- The history pager now shows fuzzy (subsequence) matches in the absence of exact substring matches (:issue:`9476`).
- Variables that were set while the locale was C (i.e. ASCII) will now properly be encoded if the locale is switched (:issue:`2613`, :issue:`9473`).
- Escape during history search restores the original commandline again (regressed in 3.6.0).
- Using ``--help`` on builtins now respects the $MANPAGER variable in preference to $PAGER (:issue:`9488`).
- Command-specific tab completions may now offer results whose first character is a period. For example, it is now possible to tab-complete ``git add`` for files with leading periods. The default file completions hide these files, unless the token itself has a leading period (:issue:`3707`).
New or improved bindings
^^^^^^^^^^^^^^^^^^^^^^^^
- 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``
- ``mix phx``
- ``neovim``
- ``stow``
- ``trash`` and helper utilities ``trash-empty``, ``trash-list``, ``trash-put``, ``trash-restore``
- ``apkanalyzer``
- ``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`)
- git's completion for ``git-foo``-style commands was fixed (:issue:`9457`)
- File completion now offers ``../`` and ``./`` again (:issue:`9477`)
Improved terminal support
^^^^^^^^^^^^^^^^^^^^^^^^^
- 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
----------------
- *Placeholder to fix Sphinx warning*
- fish 3.6.1 builds correctly on Cygwin (:issue:`9502`).
--------------
fish 3.6.0 (released January 7, 2023)
=====================================

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

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

@@ -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.
@@ -205,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

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

View File

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

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

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

View File

@@ -107,11 +107,11 @@ If you want to share your script with others, you might want to use :command:`en
#!/usr/bin/env fish
echo Hello from fish $version
This will call ``env``, which then goes through :envvar:`PATH` to find a program called "fish". This makes it work, whether fish is installed in /usr/local/bin/fish or /usr/bin/fish or ~/.local/bin/fish, as long as that directory is in :envvar:`PATH`.
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.
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
=============
@@ -171,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``
========================================== =====================================================================
@@ -269,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 \
@@ -345,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.
@@ -390,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::
@@ -418,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:
@@ -443,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.
@@ -534,6 +540,12 @@ If you change your mind on a binding and want to go back to fish's default, you
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
"""""""""""""
@@ -550,14 +562,25 @@ In these cases, :doc:`fish_key_reader <cmds/fish_key_reader>` can tell you how t
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

@@ -91,7 +91,7 @@ searches for lines ending in ``enabled)`` in ``foo.txt`` (the ``$`` is special t
::
apt install "postgres-*"
apt install "postgres-*"
installs all packages with a name starting with "postgres-", instead of looking through the current directory for files named "postgres-something".
@@ -238,6 +238,37 @@ 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
@@ -693,29 +724,10 @@ The ``$`` symbol can also be used multiple times, as a kind of "dereference" ope
# 20
# 30
``$$foo[$i]`` is "the value of the variable named by ``$foo[$i]``".
``$$foo[$i]`` is "the value of the variable named by ``$foo[$i]``.
When using this feature together with list brackets, the brackets will be used from the inside out. ``$$foo[5]`` will use the fifth element of ``$foo`` as a variable name, instead of giving the fifth element of all the variables $foo refers to. That would instead be expressed as ``$$foo[1..-1][5]`` (take all elements of ``$foo``, use them as variable names, then give the fifth element of those).
Some more examples::
set listone 1 2 3
set listtwo 4 5 6
set var listone listtwo
echo $$var
# Output is 1 2 3 4 5 6
echo $$var[1]
# Output is 1 2 3
echo $$var[2][3]
# $var[1] is listtwo, third element of that is 6, output is 6
echo $$var[..][2]
# The second element of every variable, so output is
# 2 5
.. _expand-command-substitution:
Command substitution
@@ -1099,13 +1111,12 @@ Here is an example of local vs function-scoped variables::
set gnu "In the beginning there was nothing, which exploded"
end
# This will not output anything, since the pirate was local
echo $pirate
# This will output the good Captain's speech
# since $captain had function-scope.
# This will not output anything, since the pirate was local
echo $captain
# This will output Sir Terry's wisdom.
# This will output the good Captain's speech since $captain had function-scope.
echo $gnu
# Will output Sir Terry's wisdom.
end
When a function calls another, local variables aren't visible::
@@ -1142,8 +1153,7 @@ If you want to override a variable for a single command, you can use "var=val" s
Unlike other shells, fish will first set the variable and then perform other expansions on the line, so::
set foo banana
foo=gagaga echo $foo
# prints gagaga, while in other shells it might print "banana"
foo=gagaga echo $foo # prints gagaga, while in other shells it might print "banana"
Multiple elements can be given in a :ref:`brace expansion<expand-brace>`::
@@ -1320,14 +1330,10 @@ That covers the positional arguments, but commandline tools often get various op
A more robust approach to option handling is :doc:`argparse <cmds/argparse>`, which checks the defined options and puts them into various variables, leaving only the positional arguments in $argv. Here's a simple example::
function mybetterfunction
# We tell argparse about -h/--help and -s/--second
# - these are short and long forms of the same option.
# The "--" here is mandatory,
# it tells it from where to read the arguments.
# We tell argparse about -h/--help and -s/--second - these are short and long forms of the same option.
# The "--" here is mandatory, it tells it from where to read the arguments.
argparse h/help s/second -- $argv
# exit if argparse failed because
# it found an option it didn't recognize
# - it will print an error
# exit if argparse failed because it found an option it didn't recognize - it will print an error
or return
# If -h or --help is given, we print a little help text and return
@@ -1443,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.
@@ -1766,8 +1776,7 @@ Let's make up an example. This function will :ref:`glob <expand-wildcard>` the f
# If there are more than 5 files
if test (count $files) -gt 5
# and both stdin (for reading input)
# and stdout (for writing the prompt)
# and both stdin (for reading input) and stdout (for writing the prompt)
# are terminals
and isatty stdin
and isatty stdout
@@ -1827,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").
@@ -1841,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
@@ -1908,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,7 +177,7 @@ a:hover, div.footer a {
}
div.related a, div.sphinxsidebar a {
color: #444444;
color: var(--secondary-link-color);
}
div.warning {
@@ -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 */

View File

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

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

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

@@ -1,6 +1,6 @@
# Completions for the `apt` command
# macOS has a /usr/bin/apt that is something else entirely:
# macOS has a /usr/bin/apt that is something else entirely:
# (apt - Returns the path to a Java home directory from the current user's settings)
if [ "$(uname -s)" = Darwin -a "$(command -s apt)" = /usr/bin/apt ]
exit 1
@@ -14,7 +14,7 @@ set -l handle_file_pkg_subcmds install
function __fish_apt_subcommand -V all_subcmds
set -l subcommand $argv[1]
set -e argv[1]
complete -f -c apt -n "__fish_is_first_token" -a $subcommand $argv
complete -f -c apt -n "not __fish_seen_subcommand_from $all_subcmds" -a $subcommand $argv
end
function __fish_apt_option
@@ -33,12 +33,22 @@ end
complete -c apt -f
# We use -k to keep PWD directories (from the .deb completion) after packages, so we need to sort the packages
complete -k -c apt -n "__fish_seen_subcommand_from $handle_file_pkg_subcmds" -kxa '(__fish_complete_suffix .deb)'
complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -kxa '(__fish_print_apt_packages | sort)'
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -kxa '(__fish_print_apt_packages --installed | sort)'
complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -a '(__fish_print_apt_packages | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250 | sort)'
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -a '(__fish_print_apt_packages --installed | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250)'
complete -k -c apt -n "__fish_seen_subcommand_from $handle_file_pkg_subcmds" -a '(__fish_complete_suffix .deb)'
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
@@ -60,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'
@@ -81,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'
@@ -91,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'
@@ -100,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,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

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

View File

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

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

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

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

View File

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

@@ -8,7 +8,7 @@ complete -x -f -c dpkg-reconfigure -s h -l help -d 'Display help'
# General options
complete -f -c dpkg-reconfigure -s f -l frontend -r -a "dialog readline noninteractive gnome kde editor web" -d 'Set configuration frontend'
complete -f -c dpkg-reconfigure -s p -l priority -r -a "low medium high critical" -d 'Set priority threshold'
complete -f -c dpkg-reconfigure -l default-priority -d "Use current default priority threshold"
complete -f -c dpkg-reconfigure -l default-priority -d "Use current default ("(echo get debconf/priority | debconf-communicate 2>/dev/null | string match -r '\w+$')") priority threshold"
complete -f -c dpkg-reconfigure -s u -l unseen-only -d 'Show only unseen question'
complete -f -c dpkg-reconfigure -l force -d 'Reconfigure also inconsistent packages'
complete -f -c dpkg-reconfigure -l no-reload -d 'Prevent reloading templates'

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

@@ -24,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"

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'

File diff suppressed because it is too large Load Diff

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

View File

@@ -39,7 +39,7 @@ function __fish_git_commits
# that happens for 3 commits out of 600k.
# For fish, at the time of writing, out of 12200 commits, 7 commits need 8 characters.
# And since this takes about 1/3rd of the time that disambiguating takes...
__fish_git log --pretty=tformat:"%H"\t"%<(64,trunc)%s" --all --max-count=1000 2>/dev/null \
__fish_git log --no-show-signature --pretty=tformat:"%H"\t"%<(64,trunc)%s" --all --max-count=1000 2>/dev/null \
| string replace -r '^([0-9a-f]{10})[0-9a-f]*\t(.*)' '$1\t$2'
end
@@ -47,7 +47,7 @@ function __fish_git_recent_commits
# Like __fish_git_commits, but not on all branches and limited to
# the last 50 commits. Used for fixup, where only the current branch
# and the latest commits make sense.
__fish_git log --pretty=tformat:"%h"\t"%<(64,trunc)%s" --max-count=50 $argv 2>/dev/null
__fish_git log --no-show-signature --pretty=tformat:"%h"\t"%<(64,trunc)%s" --max-count=50 $argv 2>/dev/null
end
function __fish_git_branches
@@ -324,31 +324,33 @@ function __fish_git_files
end
# Only try printing if the file was selected.
if set -q file[1]
# Without "-z", git sometimes _quotes_ filenames.
# It adds quotes around it _and_ escapes the character.
# e.g. `"a\\b"`.
# We just remove the quotes and hope it works out.
# If this contains newlines or tabs,
# there is nothing we can do, but that's a general issue with scripted completions.
set file (string trim -c \" -- $file)
# The relative filename.
if string match -q './*' -- (commandline -ct)
printf './%s\n' $file\t$desc
else
printf '%s\n' "$file"\t$desc
end
# Now from repo root.
# Only do this if the filename isn't a simple child,
# or the current token starts with ":"
if string match -q '../*' -- $file
or string match -q ':*' -- (commandline -ct)
set -l fromroot (builtin realpath -- $file 2>/dev/null)
# `:` starts pathspec "magic", and the second `:` terminates it.
# `/` is the magic letter for "from repo root".
# If we didn't terminate it we'd have to escape any special chars
# (non-alphanumeric, glob or regex special characters, in whatever dialect git uses)
and set fromroot (string replace -- "$root/" ":/:" "$fromroot")
and printf '%s\n' "$fromroot"\t$desc
for d in $desc
# Without "-z", git sometimes _quotes_ filenames.
# It adds quotes around it _and_ escapes the character.
# e.g. `"a\\b"`.
# We just remove the quotes and hope it works out.
# If this contains newlines or tabs,
# there is nothing we can do, but that's a general issue with scripted completions.
set file (string trim -c \" -- $file)
# The relative filename.
if string match -q './*' -- (commandline -ct)
printf './%s\t%s\n' $file $d
else
printf '%s\t%s\n' "$file" $d
end
# Now from repo root.
# Only do this if the filename isn't a simple child,
# or the current token starts with ":"
if string match -q '../*' -- $file
or string match -q ':*' -- (commandline -ct)
set -l fromroot (builtin realpath -- $file 2>/dev/null)
# `:` starts pathspec "magic", and the second `:` terminates it.
# `/` is the magic letter for "from repo root".
# If we didn't terminate it we'd have to escape any special chars
# (non-alphanumeric, glob or regex special characters, in whatever dialect git uses)
and set fromroot (string replace -- "$root/" ":/:" "$fromroot")
and printf '%s\t%s\n' "$fromroot" $d
end
end
end
end
@@ -623,7 +625,7 @@ end
# but a command can be aliased multiple times)
# Approximately duplicates the logic from https://github.com/git/git/blob/d486ca60a51c9cb1fe068803c3f540724e95e83a/contrib/completion/git-completion.bash#L1130
# The Git script also finds aliases that reference other aliases via a loop but this is fine for a PoC
# The bash script also finds aliases that reference other aliases via a loop but we handle that separately
function __fish_git_aliased_command
for word in (string split ' ' -- $argv)
switch $word
@@ -646,6 +648,31 @@ git config -z --get-regexp 'alias\..*' | while read -lz alias cmdline
# Git aliases can contain chars that variable names can't - escape them.
set -l alias (string replace 'alias.' '' -- $alias | string escape --style=var)
set -g __fish_git_alias_$alias $command $cmdline
set --append -g __fish_git_aliases $alias
end
# Resolve aliases that call another alias
for alias in $__fish_git_aliases
set -l handled $alias
while true
set -l alias_varname __fish_git_alias_$alias
set -l aliased_command $$alias_varname[1][1]
set -l aliased_escaped (string escape --style=var -- $aliased_command)
set -l aliased_varname __fish_git_alias_$aliased_escaped
set -q $aliased_varname
or break
# stop infinite recursion
contains $aliased_escaped $handled
and break
# expand alias in cmdline
set -l aliased_cmdline $$alias_varname[1][2]
set -l aliased_cmdline (string replace " $aliased_command " " $$aliased_varname[1][2..-1] " -- " $aliased_cmdline ")
set -g $alias_varname $$aliased_varname[1][1] (string trim "$aliased_cmdline")
set --append handled $aliased_escaped
end
end
function __fish_git_using_command
@@ -1040,6 +1067,7 @@ complete -f -c git -n __fish_git_needs_command -a show -d 'Show the last commit
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_branches)'
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_tags)' -d Tag
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_commits)'
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n __fish_git_needs_rev_files -n 'not contains -- -- (commandline -opc)' -xa '(__fish_git_complete_rev_files)'
complete -F -c git -n '__fish_git_using_command show' -n 'contains -- -- (commandline -opc)'
complete -f -c git -n '__fish_git_using_command show' -l format -d 'Pretty-print the contents of the commit logs in a given format' -a '(__fish_git_show_opt format)'
@@ -1231,10 +1259,12 @@ complete -f -c git -n '__fish_git_using_command branch' -s a -l all -d 'Lists bo
complete -f -c git -n '__fish_git_using_command branch' -s r -l remotes -d 'List or delete (if used with -d) the remote-tracking branches.'
complete -f -c git -n '__fish_git_using_command branch' -s t -l track -l track -d 'Track remote branch'
complete -f -c git -n '__fish_git_using_command branch' -l no-track -d 'Do not track remote branch'
complete -f -c git -n '__fish_git_using_command branch' -l set-upstream-to -d 'Set remote branch to track'
complete -f -c git -n '__fish_git_using_command branch' -l set-upstream-to -d 'Set remote branch to track' -ka '(__fish_git_branches)'
complete -f -c git -n '__fish_git_using_command branch' -l merged -d 'List branches that have been merged'
complete -f -c git -n '__fish_git_using_command branch' -l no-merged -d 'List branches that have not been merged'
complete -f -c git -n '__fish_git_using_command branch' -l unset-upstream -d 'Remove branch upstream information'
complete -f -c git -n '__fish_git_using_command branch' -l contains -d 'List branches that contain the specified commit' -xa '(__fish_git_commits)'
complete -f -c git -n '__fish_git_using_command branch' -l no-contains -d 'List branches that don\'t contain the specified commit' -xa '(__fish_git_commits)'
### bundle
set -l bundlecommands create verify list-heads unbundle
@@ -1369,6 +1399,7 @@ complete -f -c git -n '__fish_git_using_command describe' -l first-parent -d 'Fo
### diff
complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits and working tree'
complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_ranges)'
complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_complete_stashes)'
complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index'
complete -c git -n '__fish_git_using_command diff' -l staged -d 'Show diff of changes in the index'
complete -c git -n '__fish_git_using_command diff' -l no-index -d 'Compare two paths on the filesystem'
@@ -1871,6 +1902,7 @@ complete -f -c git -n '__fish_git_using_command push' -s n -l dry-run -d 'Do eve
complete -f -c git -n '__fish_git_using_command push' -l porcelain -d 'Produce machine-readable output'
complete -f -c git -n '__fish_git_using_command push' -s f -l force -d 'Force update of remote refs'
complete -f -c git -n '__fish_git_using_command push' -l force-with-lease -d 'Force update of remote refs, stopping if other\'s changes would be overwritten'
complete -f -c git -n '__fish_git_using_command push' -l force-if-includes -d 'Force an update only if the tip of the remote-tracking ref has been integrated locally'
complete -f -c git -n '__fish_git_using_command push' -s u -l set-upstream -d 'Add upstream (tracking) reference'
complete -f -c git -n '__fish_git_using_command push' -s q -l quiet -d 'Be quiet'
complete -f -c git -n '__fish_git_using_command push' -s v -l verbose -d 'Be verbose'
@@ -1956,9 +1988,10 @@ complete -F -c git -n '__fish_git_using_command restore' -n '__fish_git_contains
# switch options
complete -f -c git -n __fish_git_needs_command -a switch -d 'Switch to a branch'
complete -f -c git -n '__fish_git_using_command switch' -ka '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
complete -f -c git -n '__fish_git_using_command switch' -ka '(__fish_git_local_branches)'
complete -f -c git -n '__fish_git_using_command switch' -r -s c -l create -d 'Create a new branch'
complete -f -c git -n '__fish_git_using_command switch' -r -s C -l force-create -d 'Force create a new branch'
complete -f -c git -n '__fish_git_using_command switch' -ka '(__fish_git_branches)'
complete -f -c git -n '__fish_git_using_command switch' -s c -l create -d 'Create a new branch'
complete -f -c git -n '__fish_git_using_command switch' -s C -l force-create -d 'Force create a new branch'
complete -f -c git -n '__fish_git_using_command switch' -s d -l detach -rka '(__fish_git_recent_commits --all)'
complete -f -c git -n '__fish_git_using_command switch' -s d -l detach -d 'Switch to a commit for inspection and discardable experiment' -rka '(__fish_git_refs)'
complete -f -c git -n '__fish_git_using_command switch' -l guess -d 'Guess branch name from remote branch (default)'
complete -f -c git -n '__fish_git_using_command switch' -l no-guess -d 'Do not guess branch name from remote branch'
@@ -2039,9 +2072,45 @@ complete -f -c git -n '__fish_git_using_command tag' -s v -l verify -d 'Verify s
complete -f -c git -n '__fish_git_using_command tag' -s f -l force -d 'Force overwriting existing tag'
complete -f -c git -n '__fish_git_using_command tag' -s l -l list -d 'List tags'
complete -f -c git -n '__fish_git_using_command tag' -l contains -xka '(__fish_git_commits)' -d 'List tags that contain a commit'
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_git_contains_opt -s d delete -s v verify' -ka '(__fish_git_tags)' -d Tag
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_git_contains_opt -s d delete -s v verify -s f force' -ka '(__fish_git_tags)' -d Tag
# TODO options
### update-index
complete -c git -n __fish_git_needs_command -a update-index -d 'Register file contents in the working tree to the index'
complete -f -c git -n '__fish_git_using_command update-index' -l add -d 'Add specified files to the index'
complete -f -c git -n '__fish_git_using_command update-index' -l remove -d 'Remove specified files from the index'
complete -f -c git -n '__fish_git_using_command update-index' -l refresh -d 'Refresh current index'
complete -f -c git -n '__fish_git_using_command update-index' -s q -d 'Continue refresh after error'
complete -f -c git -n '__fish_git_using_command update-index' -l ignore-submodules -d 'Do not try to update submodules'
complete -f -c git -n '__fish_git_using_command update-index' -l unmerged -d 'Continue on unmerged changes in the index'
complete -f -c git -n '__fish_git_using_command update-index' -l ignore-missing -d 'Ignores missing files during a refresh'
complete -f -c git -n '__fish_git_using_command update-index' -l index-info -d 'Read index information from stdin'
complete -x -c git -n '__fish_git_using_command update-index' -l chmod -a '+x\tAdd\ execute\ permissions -x\tRemove\ execute\ permissions' -d 'Set execute permissions'
complete -f -c git -n '__fish_git_using_command update-index' -l assume-unchanged -d 'Set the "assume unchanged" bit for the paths'
complete -f -c git -n '__fish_git_using_command update-index' -l no-assume-unchanged -d 'Unset the "assume unchanged" bit'
complete -f -c git -n '__fish_git_using_command update-index' -l really-refresh -d 'Refresh but check stat info unconditionally'
complete -f -c git -n '__fish_git_using_command update-index' -l skip-worktree -d 'Set the "fsmonitor valid" bit'
complete -f -c git -n '__fish_git_using_command update-index' -l no-skip-worktree -d 'Unset the "fsmonitor valid" bit'
complete -f -c git -n '__fish_git_using_command update-index' -l fsmonitor-valid -d 'Set the "fsmonitor valid" bit'
complete -f -c git -n '__fish_git_using_command update-index' -l no-fsmonitor-valid -d 'Unset the "fsmonitor valid" bit'
complete -f -c git -n '__fish_git_using_command update-index' -s g -l again -d 'Run git update-index on paths with differing index'
complete -f -c git -n '__fish_git_using_command update-index' -l unresolve -d 'Restores the state of a file during a merge'
complete -r -c git -n '__fish_git_using_command update-index' -l info-only -d 'Do not create objects in the object database'
complete -f -c git -n '__fish_git_using_command update-index' -l force-remove -d 'Forcefully remove the file from the index'
complete -f -c git -n '__fish_git_using_command update-index' -l replace -d 'Replace conflicting entries'
complete -f -c git -n '__fish_git_using_command update-index' -l stdin -d 'Read list of paths from stdin'
complete -f -c git -n '__fish_git_using_command update-index' -l verbose -d 'Report changes to index'
complete -x -c git -n '__fish_git_using_command update-index' -l index-version -a "2\t\t3\t\t4" -d 'Set index-version'
complete -f -c git -n '__fish_git_using_command update-index' -s z -d 'Seperate paths with NUL instead of LF'
complete -f -c git -n '__fish_git_using_command update-index' -l split-index -d 'Enable split index mode'
complete -f -c git -n '__fish_git_using_command update-index' -l no-split-index -d 'Disable split index mode'
complete -f -c git -n '__fish_git_using_command update-index' -l untracked-cache -d 'Enable untracked cache feature'
complete -f -c git -n '__fish_git_using_command update-index' -l no-untracked-cache -d 'Disable untracked cache feature'
complete -f -c git -n '__fish_git_using_command update-index' -l test-untracked-cache -d 'Only perform tests on the working directory'
complete -f -c git -n '__fish_git_using_command update-index' -l force-untracked-cache -d 'Same as --untracked-cache'
complete -f -c git -n '__fish_git_using_command update-index' -l fsmonitor -d 'Enable files system monitor feature'
complete -f -c git -n '__fish_git_using_command update-index' -l no-fsmonitor -d 'Disable files system monitor feature'
### worktree
set -l git_worktree_commands add list lock move prune remove unlock
complete -c git -n __fish_git_needs_command -a worktree -d 'Manage multiple working trees'
@@ -2103,8 +2172,13 @@ complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_usin
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command show' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -a '(__fish_git_files modified deleted modified-staged-deleted)'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s a -l all -d 'Stash ignored and untracked files'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s k -l keep-index -d 'Keep changes in index intact'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s p -l patch -d 'Interactively select hunks'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s m -l message -d 'Add a description'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -l no-keep-index -d 'Don\'t keep changes in index intact'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s S -l staged -d 'Stash only staged changes'
complete -f -c git -n '__fish_git_using_command stash' -n '__fish_git_stash_using_command push' -s u -l include-untracked -d 'Stash untracked files'
### config
complete -f -c git -n __fish_git_needs_command -a config -d 'Set and read git configuration variables'
@@ -2275,6 +2349,7 @@ complete -f -c git -n '__fish_git_using_command help' -a submodule -d 'Initializ
complete -f -c git -n '__fish_git_using_command help' -a stripspace -d 'Remove unnecessary whitespace'
complete -f -c git -n '__fish_git_using_command help' -a switch -d 'Switch to a branch'
complete -f -c git -n '__fish_git_using_command help' -a tag -d 'Create, list, delete or verify a tag object signed with GPG'
complete -f -c git -n '__fish_git_using_command help' -a update-index -d 'Register file contents in the working tree to the index'
complete -f -c git -n '__fish_git_using_command help' -a whatchanged -d 'Show logs with difference each commit introduces'
complete -f -c git -n '__fish_git_using_command help' -a worktree -d 'Manage multiple working trees'
@@ -2390,7 +2465,7 @@ for file in (path filter -xZ $PATH/git-* | path basename)
and continue
# Running `git foo` ends up running `git-foo`, so we need to ignore the `git-` here.
set -l cmd (string replace -r '^git-' '' -- $file)
set -l cmd (string replace -r '^git-' '' -- $file | string escape)
complete -c git -f -n "__fish_git_using_command $cmd" -a "(__fish_git_complete_custom_command $cmd)"
set -a __fish_git_custom_commands_completion $file
end

View File

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

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

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

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

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

View File

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

View File

@@ -25,7 +25,7 @@ complete -c killall -xa '(__fish_complete_proc | string replace -r -- "^-" "")'
if killall --version >/dev/null 2>/dev/null # GNU
complete -c killall -s e -l exact -d 'Require an exact match for very long names'
complete -c killall -s I -l ignore-case -d 'Do case insensitive process name match'
complete -c killall -s g -l process-group -d 'Kill the process group to which the process belongs with one signal'
complete -c killall -s g -l process-group -d 'Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belonging to the same process group were found'
complete -c killall -s i -l interactive -d 'Interactively ask for confirmation before killing'
complete -c killall -s u -l user -x -a "(__fish_complete_users)" -d 'Kill only processes the specified user owns. Command names are optional'
complete -c killall -s w -l wait -d 'Wait for all killed processes to die'

View File

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

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

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

View File

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

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