Compare commits

..

69 Commits

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

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

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

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

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

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

* Change status to changes

* Remove grep/awk/sort

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

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

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

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

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

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

---------

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

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

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

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

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

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

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

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

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

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

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

Closes #9535.

---------

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

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

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

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

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

becomes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reverts changes to share/completions/git.fish from

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

Let's fix this by adding an explicit undo group (our first use of this
feature!).
2023-01-24 20:32:13 +01:00
Fabian Boehm
21f1eebd01 completions/git: Some rewordings
These are the longest subcommand descriptions, so it gives us more space
2023-01-23 21:18:03 +01:00
Fabian Boehm
3548aae552 completions/git: Don't leak submodule subcommands
Introduced in f5711ad5ed through an unclean edit.
2023-01-23 21:17:53 +01:00
Fabian Boehm
bd871c5372 Fix last PCRE2_UCHAR32
See #9502
2023-01-23 20:03:29 +01:00
Johannes Altmanninger
d055726ed7 CHANGELOG: fuzzy matching in history-pager 2023-01-22 16:14:14 +01:00
Johannes Altmanninger
610d19cec1 CHANGELOG: don't mention the overly-specific terraform fix 2023-01-22 16:14:00 +01:00
Eddie Lebow
00692bcdfe Include subsequence matches in history-pager
If a `contains` search yields no results, try again with `contains_subsequence`.
2023-01-22 16:11:46 +01:00
87 changed files with 2059 additions and 683 deletions

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
fish 3.6.1 (released ???)
fish 3.7.0 (released ???)
===================================
.. ignore: 9439 9440 9442 9452 9469 9480 9482
@@ -10,6 +10,7 @@ Notable improvements and fixes
can now be used to clean out all old abbreviations (:issue:`9468`).
- ``abbr --add --universal`` now warns about --universal being non-functional, to make it easier to detect old-style ``abbr`` calls (:issue:`9475`).
- ``functions --handlers-type caller-exit`` once again lists functions defined as ``function --on-job-exit caller``, rather than them being listed by ``functions --handlers-type process-exit``.
Deprecations and removed features
---------------------------------
@@ -18,14 +19,18 @@ Scripting improvements
----------------------
- ``abbr --list`` no longer escapes the abbr name, which is necessary to be able to pass it to ``abbr --erase`` (:issue:`9470`).
- ``read`` will now print an error if told to set a read-only variable instead of silently doing nothing (:issue:`9346`).
- ``functions`` and ``type`` now show where a function was copied and where it originally was instead of saying ``Defined interactively``.
- Stack trace now shows line numbers for copied functions.
Interactive improvements
------------------------
- Using ``fish_vi_key_bindings`` in combination with fish's ``--no-config`` mode works without locking up the shell (:issue:`9443`).
- The history pager now uses more screen space, usually half the screen (:issue:`9458`)
- The history pager now 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
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -36,10 +41,16 @@ Improved prompts
Completions
^^^^^^^^^^^
- Added completions for:
- ``otool``
- ``mix phx``
- ``neovim``
- ``stow``
- ``trash`` and helper utilities ``trash-empty``, ``trash-list``, ``trash-put``, ``trash-restore``
- ``apkanalyzer``
- git's completion for ``git-foo``-style commands was fixed (:issue:`9457`)
- File completion now offers ``../`` and ``./`` again (:issue:`9477`)
- Completion for ``terraform`` now asks for a parameter after ``terraform init -backend-config``. (:issue:`9498`)
Improved terminal support
^^^^^^^^^^^^^^^^^^^^^^^^^

2
debian/control vendored
View File

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

View File

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

View File

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

View File

@@ -90,6 +90,7 @@ More examples::
searches for lines ending in ``enabled)`` in ``foo.txt`` (the ``$`` is special to ``grep``: it matches the end of the line).
::
apt install "postgres-*"
installs all packages with a name starting with "postgres-", instead of looking through the current directory for files named "postgres-something".
@@ -692,10 +693,29 @@ 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
@@ -1079,12 +1099,13 @@ Here is an example of local vs function-scoped variables::
set gnu "In the beginning there was nothing, which exploded"
end
echo $pirate
# This will not output anything, since the pirate was local
echo $pirate
# This will output the good Captain's speech
# since $captain had function-scope.
echo $captain
# This will output the good Captain's speech since $captain had function-scope.
# This will output Sir Terry's wisdom.
echo $gnu
# Will output Sir Terry's wisdom.
end
When a function calls another, local variables aren't visible::
@@ -1121,7 +1142,8 @@ If you want to override a variable for a single command, you can use "var=val" s
Unlike other shells, fish will first set the variable and then perform other expansions on the line, so::
set foo banana
foo=gagaga echo $foo # prints gagaga, while in other shells it might print "banana"
foo=gagaga echo $foo
# prints gagaga, while in other shells it might print "banana"
Multiple elements can be given in a :ref:`brace expansion<expand-brace>`::
@@ -1298,10 +1320,14 @@ That covers the positional arguments, but commandline tools often get various op
A more robust approach to option handling is :doc:`argparse <cmds/argparse>`, which checks the defined options and puts them into various variables, leaving only the positional arguments in $argv. Here's a simple example::
function mybetterfunction
# We tell argparse about -h/--help and -s/--second - these are short and long forms of the same option.
# The "--" here is mandatory, it tells it from where to read the arguments.
# We tell argparse about -h/--help and -s/--second
# - these are short and long forms of the same option.
# The "--" here is mandatory,
# it tells it from where to read the arguments.
argparse h/help s/second -- $argv
# exit if argparse failed because it found an option it didn't recognize - it will print an error
# exit if argparse failed because
# it found an option it didn't recognize
# - it will print an error
or return
# If -h or --help is given, we print a little help text and return
@@ -1740,7 +1766,8 @@ Let's make up an example. This function will :ref:`glob <expand-wildcard>` the f
# If there are more than 5 files
if test (count $files) -gt 5
# and both stdin (for reading input) and stdout (for writing the prompt)
# and both stdin (for reading input)
# and stdout (for writing the prompt)
# are terminals
and isatty stdin
and isatty stdout

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,15 +1,19 @@
set -l commands flashall getvar oem flashing reboot update erase format devices flash get_staged help stage boot fetch
function __fish_fastboot_list_partition_or_file
if __fish_seen_subcommand_from (__fish_fastboot_list_partition){_a,_b,}
__fish_complete_path
else
__fish_fastboot_list_partition
set -l tokens (commandline -opc)
# if last 2 token is flash, then list file
if test (count $tokens) -gt 2
if test $tokens[-2] = flash
__fish_complete_path
return
end
end
__fish_fastboot_list_partition
end
function __fish_fastboot_list_partition
set -l partitions boot bootloader dtbo modem odm odm_dlkm oem product pvmfw radio recovery system vbmeta vendor vendor_dlkm cache userdata system_ext
set -l partitions boot bootloader cache cust dtbo metadata misc modem odm odm_dlkm oem product pvmfw radio recovery system system_ext userdata vbmeta vendor vendor_dlkm vmbeta_system
for i in $partitions
echo $i
end
@@ -73,4 +77,3 @@ complete -n '__fish_seen_subcommand_from reboot' -c fastboot -xa 'bootloader fas
# oem
complete -n '__fish_seen_subcommand_from oem' -c fastboot -xa 'device-info lock unlock edl'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ function fish_prompt
# Line 2
echo
if test -n "$VIRTUAL_ENV"
printf "(%s) " (set_color blue)(basename $VIRTUAL_ENV)(set_color normal)
printf "(%s) " (set_color blue)(path basename $VIRTUAL_ENV)(set_color normal)
end
printf '↪ '
set_color normal

View File

@@ -1508,6 +1508,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
"fish_pager_color_secondary_description",
)
)
output=""
for item in postvars.get("colors"):
what = item.get("what")
color = item.get("color")

View File

@@ -135,6 +135,9 @@ static int report_function_metadata(const wcstring &funcname, bool verbose, io_s
const wchar_t *shadows_scope = L"n/a";
wcstring description = L"n/a";
int line_number = 0;
bool is_copy = false;
wcstring copy_path = L"n/a";
int copy_line_number = 0;
if (auto props = function_get_props_autoload(funcname, parser)) {
if (props->definition_file) {
@@ -144,6 +147,16 @@ static int report_function_metadata(const wcstring &funcname, bool verbose, io_s
} else {
path = L"stdin";
}
is_copy = props->is_copy;
if (props->copy_definition_file) {
copy_path = *props->copy_definition_file;
copy_line_number = props->copy_definition_lineno;
} else {
copy_path = L"stdin";
}
shadows_scope = props->shadow_scope ? L"scope-shadowing" : L"no-scope-shadowing";
description = escape_string(props->description, ESCAPE_NO_PRINTABLES | ESCAPE_NO_QUOTED);
}
@@ -152,12 +165,26 @@ static int report_function_metadata(const wcstring &funcname, bool verbose, io_s
// "stdin" means it was defined interactively, "-" means it was defined via `source`.
// Neither is useful information.
wcstring comment;
if (path == L"stdin") {
append_format(comment, L"# Defined interactively\n");
append_format(comment, L"# Defined interactively");
} else if (path == L"-") {
append_format(comment, L"# Defined via `source`\n");
append_format(comment, L"# Defined via `source`");
} else {
append_format(comment, L"# Defined in %ls @ line %d\n", path.c_str(), line_number);
append_format(comment, L"# Defined in %ls @ line %d", path.c_str(), line_number);
}
if (is_copy) {
if (copy_path == L"stdin") {
append_format(comment, L", copied interactively\n");
} else if (copy_path == L"-") {
append_format(comment, L", copied via `source`\n");
} else {
append_format(comment, L", copied in %ls @ line %d\n", copy_path.c_str(),
copy_line_number);
}
} else {
append_format(comment, L"\n");
}
if (!streams.out_is_redirected && isatty(STDOUT_FILENO)) {
@@ -168,9 +195,10 @@ static int report_function_metadata(const wcstring &funcname, bool verbose, io_s
streams.out.append(comment);
}
} else {
streams.out.append_format(L"%ls\n", path.c_str());
streams.out.append_format(L"%ls\n", is_copy ? copy_path.c_str() : path.c_str());
if (verbose) {
streams.out.append_format(L"%ls\n", autoloaded);
streams.out.append_format(L"%ls\n", is_copy ? path.c_str() : autoloaded);
streams.out.append_format(L"%d\n", line_number);
streams.out.append_format(L"%ls\n", shadows_scope);
streams.out.append_format(L"%ls\n", description.c_str());
@@ -331,7 +359,7 @@ maybe_t<int> builtin_functions(parser_t &parser, io_streams_t &streams, const wc
return STATUS_CMD_ERROR;
}
if (function_copy(current_func, new_func)) return STATUS_CMD_OK;
if (function_copy(current_func, new_func, parser)) return STATUS_CMD_OK;
return STATUS_CMD_ERROR;
}

View File

@@ -133,32 +133,44 @@ maybe_t<int> builtin_type(parser_t &parser, io_streams_t &streams, const wchar_t
res = true;
if (!opts.query && !opts.type) {
auto path = func->definition_file;
auto copy_path = func->copy_definition_file;
auto final_path = func->is_copy ? copy_path : path;
wcstring comment;
if (!path) {
append_format(comment, _(L"Defined interactively"));
} else if (*path == L"-") {
append_format(comment, _(L"Defined via `source`"));
} else {
append_format(comment, _(L"Defined in %ls @ line %d"), path->c_str(),
func->definition_lineno());
}
if (func->is_copy) {
if (!copy_path) {
append_format(comment, _(L", copied interactively"));
} else if (*copy_path == L"-") {
append_format(comment, _(L", copied via `source`"));
} else {
append_format(comment, _(L", copied in %ls @ line %d"), copy_path->c_str(),
func->copy_definition_lineno);
}
}
if (opts.path) {
if (path) {
streams.out.append(*path);
if (final_path) {
streams.out.append(*final_path);
streams.out.append(L"\n");
}
} else if (!opts.short_output) {
streams.out.append_format(_(L"%ls is a function"), name);
streams.out.append(_(L" with definition"));
streams.out.append(L"\n");
// Function path
wcstring def = func->annotated_definition(name);
if (path) {
int line_number = func->definition_lineno();
wcstring comment;
if (*path != L"-") {
append_format(comment, L"# Defined in %ls @ line %d\n", path->c_str(),
line_number);
} else {
append_format(comment, L"# Defined via `source`\n");
}
def = comment.append(def);
} else {
wcstring comment;
append_format(comment, L"# Defined interactively\n");
def = comment.append(def);
}
wcstring def;
append_format(def, L"# %ls\n%ls", comment.c_str(),
func->annotated_definition(name).c_str());
if (!streams.out_is_redirected && isatty(STDOUT_FILENO)) {
std::vector<highlight_spec_t> colors;
highlight_shell(def, colors, parser.context());
@@ -168,11 +180,7 @@ maybe_t<int> builtin_type(parser_t &parser, io_streams_t &streams, const wchar_t
}
} else {
streams.out.append_format(_(L"%ls is a function"), name);
auto path = func->definition_file;
if (path) {
streams.out.append_format(_(L" (defined in %ls)"), path->c_str());
}
streams.out.append(L"\n");
streams.out.append_format(_(L" (%ls)\n"), comment.c_str());
}
} else if (opts.type) {
streams.out.append(L"function\n");

View File

@@ -366,7 +366,8 @@ class completer_t {
bool conditions_test(const wcstring_list_t &conditions);
void complete_strings(const wcstring &wc_escaped, const description_func_t &desc_func,
const completion_list_t &possible_comp, complete_flags_t flags);
const completion_list_t &possible_comp, complete_flags_t flags,
expand_flags_t extra_expand_flags = {});
expand_flags_t expand_flags() const {
expand_flags_t result{};
@@ -510,12 +511,16 @@ static void parse_cmd_string(const wcstring &str, wcstring *path, wcstring *cmd,
/// @param possible_comp
/// the list of possible completions to iterate over
/// @param flags
/// The flags
/// The flags controlling completion
/// @param extra_expand_flags
/// Additional flags controlling expansion.
void completer_t::complete_strings(const wcstring &wc_escaped, const description_func_t &desc_func,
const completion_list_t &possible_comp, complete_flags_t flags) {
const completion_list_t &possible_comp, complete_flags_t flags,
expand_flags_t extra_expand_flags) {
wcstring tmp = wc_escaped;
if (!expand_one(tmp,
this->expand_flags() | expand_flag::skip_cmdsubst | expand_flag::skip_wildcards,
this->expand_flags() | extra_expand_flags | expand_flag::skip_cmdsubst |
expand_flag::skip_wildcards,
ctx))
return;
@@ -525,7 +530,7 @@ void completer_t::complete_strings(const wcstring &wc_escaped, const description
const wcstring &comp_str = comp.completion;
if (!comp_str.empty()) {
wildcard_complete(comp_str, wc.c_str(), desc_func, &this->completions,
this->expand_flags(), flags);
this->expand_flags() | extra_expand_flags, flags);
}
}
}
@@ -730,7 +735,9 @@ void completer_t::complete_from_args(const wcstring &str, const wcstring &args,
ctx.parser->set_last_statuses(status);
}
this->complete_strings(escape_string(str), const_desc(desc), possible_comp, flags);
// Allow leading dots - see #3707.
this->complete_strings(escape_string(str), const_desc(desc), possible_comp, flags,
expand_flag::allow_nonliteral_leading_dot);
}
static size_t leading_dash_count(const wchar_t *str) {

View File

@@ -484,6 +484,14 @@ static void initialize_curses_using_fallbacks(const environment_t &vars) {
// Apply any platform-specific hacks to cur_term/
static void apply_term_hacks(const environment_t &vars) {
UNUSED(vars);
// Midnight Commander tries to extract the last line of the prompt,
// and does so in a way that is broken if you do `\r` after it,
// like we normally do.
// See https://midnight-commander.org/ticket/4258.
if (auto var = vars.get(L"MC_SID")) {
screen_set_midnight_commander_hack();
}
// Be careful, variables like "enter_italics_mode" are #defined to dereference through cur_term.
// See #8876.
if (!cur_term) {

View File

@@ -418,7 +418,7 @@ static bool filter_matches_event(const wcstring &filter, event_type_t type) {
case event_type_t::job_exit:
return filter == L"job-exit" || filter == L"exit";
case event_type_t::caller_exit:
return filter == L"process-exit" || filter == L"exit";
return filter == L"caller-exit" || filter == L"exit";
case event_type_t::generic:
return filter == L"generic";
}

View File

@@ -45,6 +45,10 @@ enum class expand_flag {
/// Disallow directory abbreviations like /u/l/b for /usr/local/bin. Only applicable if
/// fuzzy_match is set.
no_fuzzy_directories,
/// Allows matching a leading dot even if the wildcard does not contain one.
/// By default, wildcards only match a leading dot literally; this is why e.g. '*' does not
/// match hidden files.
allow_nonliteral_leading_dot,
/// Do expansions specifically to support cd. This means using CDPATH as a list of potential
/// working directories, and to use logical instead of physical paths.
special_for_cd,

View File

@@ -36,8 +36,8 @@
struct config_paths_t determine_config_directory_paths(const char *argv0);
static const wchar_t *ctrl_symbolic_names[] = {
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, L"\\a",
L"\\b", L"\\t", L"\\n", L"\\v", L"\\f", L"\\r", nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
L"\\b", L"\\t", L"\\n", nullptr, nullptr, L"\\r", nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, L"\\e", L"\\x1c", nullptr, nullptr, nullptr};

View File

@@ -231,7 +231,10 @@ void function_set_desc(const wcstring &name, const wcstring &desc, parser_t &par
}
}
bool function_copy(const wcstring &name, const wcstring &new_name) {
bool function_copy(const wcstring &name, const wcstring &new_name, parser_t &parser) {
auto filename = parser.current_filename();
auto lineno = parser.get_lineno();
auto funcset = function_set.acquire();
auto props = funcset->get_props(name);
if (!props) {
@@ -239,11 +242,11 @@ bool function_copy(const wcstring &name, const wcstring &new_name) {
return false;
}
// Copy the function's props.
// This new instance of the function shouldn't be tied to the definition file of the
// original, so clear the filename, etc.
auto new_props = copy_props(props);
new_props->is_autoload = false;
new_props->definition_file = nullptr;
new_props->is_copy = true;
new_props->copy_definition_file = filename;
new_props->copy_definition_lineno = lineno;
// Note this will NOT overwrite an existing function with the new name.
// TODO: rationalize if this behavior is desired.

View File

@@ -46,6 +46,15 @@ struct function_properties_t {
/// The file from which the function was created, or nullptr if not from a file.
filename_ref_t definition_file{};
/// Whether the function was copied.
bool is_copy{false};
/// The file from which the function was copied, or nullptr if not from a file.
filename_ref_t copy_definition_file{};
/// The line number where the specified function was copied.
int copy_definition_lineno{};
/// \return the description, localized via _.
const wchar_t *localized_description() const;
@@ -95,7 +104,7 @@ wcstring_list_t function_get_names(bool get_hidden);
/// Creates a new function using the same definition as the specified function. Returns true if copy
/// is successful.
bool function_copy(const wcstring &name, const wcstring &new_name);
bool function_copy(const wcstring &name, const wcstring &new_name, parser_t &parser);
/// Observes that fish_function_path has changed.
void function_invalidate_path();

View File

@@ -195,6 +195,9 @@ bool history_item_t::matches_search(const wcstring &term, enum history_search_ty
if (wcpattern2.back() != ANY_STRING) wcpattern2.push_back(ANY_STRING);
return wildcard_match(content_to_match, wcpattern2);
}
case history_search_type_t::contains_subsequence: {
return subsequence_in_string(term, content_to_match);
}
case history_search_type_t::match_everything: {
return true;
}

View File

@@ -57,6 +57,8 @@ enum class history_search_type_t {
contains_glob,
/// Search for commands starting with the given glob pattern.
prefix_glob,
/// Search for commands containing the given string as a subsequence
contains_subsequence,
/// Matches everything.
match_everything,
};

View File

@@ -1288,11 +1288,21 @@ static history_pager_result_t history_pager_search(const std::shared_ptr<history
completion_list_t completions;
history_search_t search{history, search_string, history_search_type_t::contains,
smartcase_flags(search_string), history_index};
while (completions.size() < page_size && search.go_to_next_match(direction)) {
bool next_match_found = search.go_to_next_match(direction);
if (!next_match_found) {
// If there were no matches, try again with subsequence search
search =
history_search_t{history, search_string, history_search_type_t::contains_subsequence,
smartcase_flags(search_string), history_index};
next_match_found = search.go_to_next_match(direction);
}
while (completions.size() < page_size && next_match_found) {
const history_item_t &item = search.current_item();
completions.push_back(completion_t{
item.str(), L"", string_fuzzy_match_t::exact_match(),
COMPLETE_REPLACES_COMMANDLINE | COMPLETE_DONT_ESCAPE | COMPLETE_DONT_SORT});
next_match_found = search.go_to_next_match(direction);
}
size_t last_index = search.current_index();
if (direction == history_search_direction_t::forward)

View File

@@ -75,6 +75,12 @@ static size_t try_sequence(const char *seq, const wchar_t *str) {
return 0; // this should never be executed
}
static bool midnight_commander_hack = false;
void screen_set_midnight_commander_hack() {
midnight_commander_hack = true;
}
/// Returns the number of columns left until the next tab stop, given the current cursor position.
static size_t next_tab_stop(size_t current_line_width) {
// Assume tab stops every 8 characters if undefined.
@@ -905,7 +911,11 @@ void screen_t::update(const wcstring &left_prompt, const wcstring &right_prompt,
// Also move the cursor to the beginning of the line here,
// in case we're wrong about the width anywhere.
this->move(0, 0);
// Don't do it when running in midnight_commander because of
// https://midnight-commander.org/ticket/4258.
if (!midnight_commander_hack) {
this->move(0, 0);
}
// Clear remaining lines (if any) if we haven't cleared the screen.
if (!has_cleared_screen && need_clear_screen && clr_eol) {

View File

@@ -330,4 +330,6 @@ class layout_cache_t : noncopyable_t {
};
maybe_t<size_t> escape_code_length(const wchar_t *code);
void screen_set_midnight_commander_hack();
#endif

View File

@@ -119,7 +119,7 @@ bool string_suffixes_string_case_insensitive(const wcstring &proposed_suffix,
/// Returns true if needle, represented as a subsequence, is contained within haystack.
/// Note subsequence is not substring: "foo" is a subsequence of "follow" for example.
static bool subsequence_in_string(const wcstring &needle, const wcstring &haystack) {
bool subsequence_in_string(const wcstring &needle, const wcstring &haystack) {
// Impossible if needle is larger than haystack.
if (needle.size() > haystack.size()) {
return false;

View File

@@ -34,6 +34,9 @@ bool string_suffixes_string_case_insensitive(const wcstring &proposed_suffix,
bool string_prefixes_string_case_insensitive(const wcstring &proposed_prefix,
const wcstring &value);
/// Test if a string matches a subsequence of another.
bool subsequence_in_string(const wcstring &needle, const wcstring &haystack);
/// Case-insensitive string search, modeled after std::string::find().
/// \param fuzzy indicates this is being used for fuzzy matching and case insensitivity is
/// expanded to include symbolic characters (#3584).

View File

@@ -191,7 +191,8 @@ static wildcard_result_t wildcard_complete_internal(const wchar_t *const str, si
// Maybe early out for hidden files. We require that the wildcard match these exactly (i.e. a
// dot); ANY_STRING not allowed.
if (is_first_call && str[0] == L'.' && wc[0] != L'.') {
if (is_first_call && !params.expand_flags.get(expand_flag::allow_nonliteral_leading_dot) &&
str[0] == L'.' && wc[0] != L'.') {
return wildcard_result_t::no_match;
}

View File

@@ -161,6 +161,7 @@ void dir_iter_t::entry_t::do_stat() const {
case ENOENT:
case ENOTDIR:
case ENAMETOOLONG:
case ENODEV:
// These are "expected" errors.
this->type_ = none();
break;

View File

@@ -0,0 +1,4 @@
#RUN: %fish %s
echo (function foo1 --on-job-exit caller; end; functions --handlers-type caller-exit | grep foo)
# CHECK: caller-exit foo1
echo (function foo2 --on-job-exit caller; end; functions --handlers-type process-exit | grep foo)

View File

@@ -46,6 +46,10 @@ complete -c t -l fileoption -rF
complete -C't --fileoption ' | string match test.fish
# CHECK: test.fish
# See that an empty command gets files
complete -C'"" t' | string match test.fish
# CHECK: test.fish
# Make sure bare `complete` is reasonable,
complete -p '/complete test/beta1' -d 'desc, desc' -sZ
complete -c 'complete test beta2' -r -d 'desc \' desc2 [' -a 'foo bar'
@@ -527,4 +531,20 @@ begin
# CHECK: Empty completions
end
rm -$f $tmpdir/*
# Leading dots are not completed for default file completion,
# but may be for custom command (e.g. git add).
function dotty
end
function notty
end
complete -c dotty --no-files -a '(echo .a*)'
touch .abc .def
complete -C'notty '
echo "Should be nothing"
# CHECK: Should be nothing
complete -C'dotty '
# CHECK: .abc
rm -r $tmpdir

View File

@@ -99,12 +99,26 @@ set -l name1 (functions name1)
set -l name1a (functions name1a)
set -l name3 (functions name3)
set -l name3a (functions name3a)
# First line for the non-copied function is "# Defined in checks/function.fish" - skip it to work around #6575.
# First two lines for the copied and non-copied functions are different. Skip it for now.
test "$name1[3..-1]" = "$name1a[3..-1]"; and echo "1 = 1a"
#CHECK: 1 = 1a
test "$name3[3..-1]" = "$name3a[3..-1]"; and echo "3 = 3a"
#CHECK: 3 = 3a
# Test the first two lines.
string join \n -- $name1[1..2]
#CHECK: # Defined in {{(?:(?!, copied).)*}}
#CHECK: function name1 --argument arg1 arg2
string join \n -- $name1a[1..2]
#CHECK: # Defined in {{.*}}, copied in {{.*}}
#CHECK: function name1a --argument arg1 arg2
string join \n -- $name3[1..2]
#CHECK: # Defined in {{(?:(?!, copied).)*}}
#CHECK: function name3 --argument arg1 arg2
string join \n -- $name3a[1..2]
#CHECK: # Defined in {{.*}}, copied in {{.*}}
#CHECK: function name3a --argument arg1 arg2
function test
echo banana
end

View File

@@ -54,6 +54,28 @@ if test $x[5] != 'line 1\\\\n\\nline 2 & more; way more'
echo "Unexpected output for 'functions -v -D multiline_descr': $x" >&2
end
# ==========
# Verify that `functions --details` works as expected when given the name of a
# function that is copied. (Prints the filename where it was copied.)
functions -c f1 f1a
functions -D f1a
#CHECK: {{.*}}checks/functions.fish
functions -Dv f1a
#CHECK: {{.*}}checks/functions.fish
#CHECK: {{.*}}checks/functions.fish
#CHECK: {{\d+}}
#CHECK: scope-shadowing
#CHECK:
echo "functions -c f1 f1b" | source
functions -D f1b
#CHECK: -
functions -Dv f1b
#CHECK: -
#CHECK: {{.*}}checks/functions.fish
#CHECK: {{\d+}}
#CHECK: scope-shadowing
#CHECK:
# ==========
# Verify function description setting
function test_func_desc
@@ -106,6 +128,41 @@ functions --no-details t
# CHECK: echo tttt;
# CHECK: end
functions -c t t2
functions t2
# CHECK: # Defined via `source`, copied in {{.*}}checks/functions.fish @ line {{\d+}}
# CHECK: function t2
# CHECK: echo tttt;
# CHECK: end
functions -D t2
#CHECK: {{.*}}checks/functions.fish
functions -Dv t2
#CHECK: {{.*}}checks/functions.fish
#CHECK: -
#CHECK: {{\d+}}
#CHECK: scope-shadowing
#CHECK:
echo "functions -c t t3" | source
functions t3
# CHECK: # Defined via `source`, copied via `source`
# CHECK: function t3
# CHECK: echo tttt;
# CHECK: end
functions -D t3
#CHECK: -
functions -Dv t3
#CHECK: -
#CHECK: -
#CHECK: {{\d+}}
#CHECK: scope-shadowing
#CHECK:
functions --no-details t2
# CHECK: function t2
# CHECK: echo tttt;
# CHECK: end
functions --no-details --details t
# CHECKERR: functions: invalid option combination
# CHECKERR:

View File

@@ -146,6 +146,34 @@ fish_git_prompt
echo
#CHECK: (newbranch +)
set -e __fish_git_prompt_showdirtystate
# Test displaying only stash count
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_showstashstate 1
set -g __fish_git_prompt_status_order stashstate
set -g ___fish_git_prompt_char_stashstate ''
set -g ___fish_git_prompt_char_cleanstate ''
set -l identity -c user.email=banana@example.com -c user.name=banana
git $identity commit -m Init >/dev/null
echo 'changed' > foo
# (some git versions don't allow stash without giving an email)
git $identity stash >/dev/null
fish_git_prompt
echo
#CHECK: (newbranch|1)
git $identity stash pop >/dev/null
fish_git_prompt
echo
#CHECK: (newbranch)
set -e __fish_git_prompt_show_informative_status
set -e __fish_git_prompt_showstashstate
set -e __fish_git_prompt_status_order
set -e ___fish_git_prompt_char_stashstate
set -e ___fish_git_prompt_char_cleanstate
# Turn on everything and verify we correctly ignore sus config files.

View File

@@ -105,3 +105,24 @@ end
# CHECK: Failed write tests {{finished|skipped}}
# CHECKERR: write: {{.*}}
# CHECKERR: write: {{.*}}
function test-stack-trace-main
status stack-trace
end
function test-stack-trace-other
test-stack-trace-main
end
printf "%s\n" (test-stack-trace-other | string replace \t '<TAB>')[1..4]
# CHECK: in function 'test-stack-trace-main'
# CHECK: <TAB>called on line {{\d+}} of file {{.*}}/status.fish
# CHECK: in function 'test-stack-trace-other'
# CHECK: <TAB>called on line {{\d+}} of file {{.*}}/status.fish
functions -c test-stack-trace-other test-stack-trace-copy
printf "%s\n" (test-stack-trace-copy | string replace \t '<TAB>')[1..4]
# CHECK: in function 'test-stack-trace-main'
# CHECK: <TAB>called on line {{\d+}} of file {{.*}}/status.fish
# CHECK: in function 'test-stack-trace-copy'
# CHECK: <TAB>called on line {{\d+}} of file {{.*}}/status.fish

View File

@@ -61,7 +61,7 @@ type -p alias
# CHECK: {{.*}}/alias.fish
type -s alias
# CHECK: alias is a function (defined in {{.*}}/alias.fish)
# CHECK: alias is a function (Defined in {{.*}}/alias.fish @ line {{\d+}})
function test-type
echo this is a type test
@@ -76,3 +76,61 @@ type test-type
type -p test-type
# CHECK: {{.*}}/type.fish
functions -c test-type test-type2
type test-type2
# CHECK: test-type2 is a function with definition
# CHECK: # Defined in {{.*}}/type.fish @ line {{\d+}}, copied in {{.*}}/type.fish @ line {{\d+}}
# CHECK: function test-type2
# CHECK: echo this is a type test
# CHECK: end
type -p test-type2
# CHECK: {{.*}}/type.fish
type -s test-type2
# CHECK: test-type2 is a function (Defined in {{.*}}/type.fish @ line {{\d+}}, copied in {{.*}}/type.fish @ line {{\d+}})
echo "functions -c test-type test-type3" | source
type test-type3
# CHECK: test-type3 is a function with definition
# CHECK: # Defined in {{.*}}/type.fish @ line {{\d+}}, copied via `source`
# CHECK: function test-type3
# CHECK: echo this is a type test
# CHECK: end
type -p test-type3
# CHECK: -
type -s test-type3
# CHECK: test-type3 is a function (Defined in {{.*}}/type.fish @ line {{\d+}}, copied via `source`)
echo "function other-test-type; echo this is a type test; end" | source
functions -c other-test-type other-test-type2
type other-test-type2
# CHECK: other-test-type2 is a function with definition
# CHECK: # Defined via `source`, copied in {{.*}}/type.fish @ line {{\d+}}
# CHECK: function other-test-type2
# CHECK: echo this is a type test;
# CHECK: end
type -p other-test-type2
# CHECK: {{.*}}/type.fish
type -s other-test-type2
# CHECK: other-test-type2 is a function (Defined via `source`, copied in {{.*}}/type.fish @ line {{\d+}})
echo "functions -c other-test-type other-test-type3" | source
type other-test-type3
# CHECK: other-test-type3 is a function with definition
# CHECK: # Defined via `source`, copied via `source`
# CHECK: function other-test-type3
# CHECK: echo this is a type test;
# CHECK: end
type -p other-test-type3
# CHECK: -
type -s other-test-type3
# CHECK: other-test-type3 is a function (Defined via `source`, copied via `source`)

View File

@@ -25,7 +25,7 @@ expect_str("Press a key:")
# Is a single control char echoed correctly?
send("\x07")
expect_str("char: \\cG (or \\a)\r\nbind \\a 'do something'\r\n")
expect_str("char: \\cG\r\nbind \\cG 'do something'\r\n")
# Is a non-ASCII UTF-8 sequence prefaced by an escape char handled correctly?
sleep(0.020)