Commit Graph

1879 Commits

Author SHA1 Message Date
Johannes Altmanninger
7ccf001bc3 completions/git: simplify description of "git diff -R"
This is simpler, plus the old description is invalid when multiple
revisions are given.
2021-10-14 20:10:12 +02:00
zeertzjq
a4a48b38f7
Display local branches before unique remote branches in git completion (#8338)
Usually local branches have remote branches with the same name, and in
completion they are currently overshadowed by unique remote branches, making
local branches hard to find. Define local branch completion after unique
remote branch completion to show local branches before unique remote branches.
2021-10-14 19:36:14 +02:00
Fabian
72f55ab206
Fix ant completion (#8344)
If $xdg_chache_home is empty, this is not a valid fish expression:

    [ \( -z \) -o \( ! -d \) ]

and results into an error.

While at it, also use $XDG_CACHE_HOME if that directory does not exist.
This seems better than falling back to $HOME/.cache, which the user has
explicitly overridden via $XDG_CACHE_HOME.
2021-10-14 19:25:23 +02:00
takeokunn
d557445875 Add roswell completion 2021-10-06 14:51:26 -07:00
takeokunn
08b75d2358 Add sbcl completion 2021-10-06 14:51:26 -07:00
Johannes Altmanninger
cb5a3fd9a1 completions/man: offer file completions when appropriate
Suggest files to "man -l", but only if the "-l" option is supported
(so not on BSD). Technically we should accept multiple files but this
seems good enough.

Also suggest files when the token-at-cursor contains a slash, because
man will treat arguments as file paths if they contain a /.
2021-10-05 21:53:17 +02:00
zaleoth
df9f01dd50
completions/ip: Use command (#8334)
Add "command" directive in front of ip commands to prevent bug from a buggy aliased "ip"
2021-10-05 20:47:49 +02:00
Johannes Altmanninger
f674c4b010 completions/git: treat more T files as modified
git-status --porcelain prints status letter T when a file changed type
between either regular file, symlink or submodule.  It can occur in
exactly the same cases as M (modified), so extend the fix for #8311
accordingly.

For submodules, our completions are probably not always correct,
hopefully those cases are rare.
2021-10-04 21:45:14 +02:00
Noorhteen Raja NJ
3e345dccb9 Update ldapsearch.fish 2021-09-30 12:23:39 -07:00
Noorhteen Raja NJ
9b9a637e5c Update duply.fish 2021-09-30 12:21:20 -07:00
Jony
7df5efe317 completions/xbps-query: add missing -p completions 2021-09-30 12:13:42 -07:00
Aaron Gyes
ed8c78c0ea Update docs, completions for funcsave
Remove long opt for -q, funcsave does not have so many options that
it's any help.
2021-09-29 03:08:10 -07:00
takeokunn
d2ca6ed564 Add dart completion 2021-09-25 10:36:11 -07:00
Fabian Homborg
07e512ecd8 completions/git: Treat T files same as modified
This is weirdly undocumented (as of git 2.33.0), but `git status` prints a "T" state if
the file has its "T"ype changed, e.g. from a regular file to a symlink.

For our purposes that's just another kind of modification.

Fixes #8311.
2021-09-23 15:23:43 +02:00
Lia Lenckowski
1d7036d19f Add completions for cpupower 2021-09-20 17:46:15 +02:00
exploide
f32b887dba added completions for ethtool 2021-09-14 21:44:44 +02:00
mtoohey31
25b9568f2a completion: exif (#8246)
Adds completion support for the exif command line tool (upstream:
https://github.com/libexif/exif).
2021-08-29 11:35:08 +02:00
Akatsuki Rui
9022b9bef6 feat(completions/coredumpctl.fish): new complete for systemd 249 2021-08-28 19:36:23 +02:00
Akatsuki Rui
a113b3a755 fix(completions/coredumpctl.fish): missing --arguments 2021-08-28 19:36:23 +02:00
Takumi Kameyama
6bd25ed599
Fix completions/ls.fish (#8249)
* Fix ls.fish: add -l option to GNU ls

* Sort alphabetically and remove --lcontext and --scontext (what are these?) on shared and GNU part.

* Revert --lcontext and --scontext options.
2021-08-24 19:29:32 +02:00
Kid
48e4ce2f6d Add and fix completions for new options 2021-08-23 18:04:11 +02:00
Lars Lenckowski
284b7d8eb0 complete "mpc load" 2021-08-23 18:03:57 +02:00
Mahmoud Al-Qudsi
d27f477ba6 Fix truncated completions for pkg install <foo>
The same hack that is used for `pkg remove <foo>` is required here, too.
Due to the massive number of results, we use `head -n 250` to prevent
the completion from hanging or the shell from being overencumbered by
too many possibe completions. However, this would only generate matches
for any of the first 250 packages, rather than printing the first 250
packages that match.

[ci skip]
2021-08-18 00:20:08 -05:00
mtoohey31
703a717660 completion: support --no prefixes for mpv flag options 2021-08-14 10:56:23 +02:00
Johannes Altmanninger
7b55c0edb4 completions/git: finish completions for git bisect 2021-08-10 21:01:39 +02:00
exploide
60a9dcbf05 updated ping completions
support for ping from iputils (version 20210202)
support for ping from inetutils (version 2.1)
support for ping from busybox (version 1.33.1)
support for ping from FreeBSD and macOS (by @juntuu)
2021-08-06 17:08:50 +02:00
Fabian Homborg
3ed49304f2 Completions 2021-08-04 21:09:47 +02:00
Kid
c7c67755d3
Add --function to set completion (#8202)
* Add `--function` to `set` completion

* Resolve review

* Revert other changes
2021-08-04 08:49:51 +02:00
Branch Vincent
bb10cdbd77 add missing git commit completions 2021-07-30 19:39:53 -07:00
Sam Yu
ac6507776f
Add zypper subcommands completion (#8183)
* Add zypper subcommands completion

rename functions to avoid confusion

* Revert partial changes
2021-07-30 18:24:32 +02:00
exploide
ac81d370cd completion nmap: suppress warning when local scripts folder exists 2021-07-30 17:41:55 +02:00
Kevin Konrad
413fd2fc03 extract argcomplete completion mechanism into its own function 2021-07-28 18:10:59 +02:00
Kevin Konrad
336de2d9fa add completion for qmk 2021-07-28 18:10:59 +02:00
YAKSH BARIYA
0b8b535187
Add completions for gping (#8181) 2021-07-28 17:53:44 +02:00
Branch Vincent
d8465e0a86 document --no-config 2021-07-27 23:00:23 +02:00
Johannes Altmanninger
6c0af841e2 completions/set: fix quoting error 2021-07-23 22:02:01 +02:00
Aniruddh Agarwal
0445126c2e Undunder __fish_is_nth_token
We keep __fish_is_nth_token for compatibility and edit the
implementations of __fish_is_nth_token, __fish_is_first_token and
__fish_is_token_n to use fish_is_nth_token
2021-07-23 17:25:50 +02:00
Fabian Homborg
c35ffc58fc
Merge pull request #8134 from thunder-coding/complete-more-git-commands
Add missing completions for some git commands
2021-07-23 08:01:38 +02:00
Yaksh Bariya
e9a16ed7b5
Fix typos 2021-07-23 06:55:07 +05:30
Yaksh Bariya
692c6ae118 Add completions for git-sizer 2021-07-22 19:29:05 +02:00
Yaksh Bariya
29fc74bc6a
Remove -F supplied to complete
Using `complete -F -c git -n __fish_git_needs_subcommand -a $command -d
$description` causes file completions to be forced on entire git command
which is not a desired result. Morever without the `-F` flag file
completions work just as expected and is useless addition
2021-07-22 17:06:59 +05:30
Yaksh Bariya
6f52c017ba
Resolve all conversations 2021-07-22 13:26:38 +05:30
Yaksh Bariya
54476d583b
Add flag completions for git mv 2021-07-22 13:25:12 +05:30
Yaksh Bariya
9d0d0b81fd
Add completions for git apply 2021-07-22 13:25:12 +05:30
Yaksh Bariya
162c4ac789
Add completions for git mailsplit 2021-07-22 13:25:12 +05:30
Yaksh Bariya
4c5f41531d
Add completions for git am 2021-07-22 13:25:12 +05:30
Yaksh Bariya
2e34852ded
Add completions for git mailinfo 2021-07-22 13:25:12 +05:30
Yaksh Bariya
3f5f722e7a
Add completions for git stripspace 2021-07-22 13:25:11 +05:30
Yaksh Bariya
f976144b27
Add completions for git notes 2021-07-22 13:25:11 +05:30
Yaksh Bariya
1344b638d2
Add completions for git maintenance 2021-07-22 13:25:11 +05:30
Yaksh Bariya
55886943c1
Add missing completions for git daemon 2021-07-22 13:25:06 +05:30
Kevin F. Konrad
869c42d72a
Add completion for azure cli (az) (#8141)
* add completion for azure cli (az)

* alter az.fish to match faho's requests

Co-authored-by: Kevin Konrad <kevin.konrad@unicepta.com>
2021-07-21 17:57:59 +02:00
Fabian Homborg
8223e6f23e fish_config: Add CLI-based theme selector
`fish_config theme`:

- `list` to list all available themes (files in the two theme
directories - either the web_config/themes one or
~/.config/fish/themes!)
- `show` to show select (or all) themes right in the terminal - this
starts another fish that reads the theme file and prints the sample
text, manually colored
- `choose` to load a theme *now*, setting the variables globally
- `save` to load a theme and save the variables universally
- `dump` to write the current theme in .theme format (to stdout)
- `demo` to display the current theme
2021-07-14 18:56:19 +02:00
Fabian Homborg
fd35dc2aa1 completions/git: Describe more "log" options
And do this by reusing other entries - mostly range-diff's.
2021-07-14 18:24:08 +02:00
Johannes Altmanninger
6c22c0e30d completions/git: do not attempt to complete rev:file in option words
Fixes #8139
2021-07-14 00:01:20 +02:00
Johannes Altmanninger
e50805646e completions/git: define function before use 2021-07-12 23:42:01 +02:00
Siavash Askari Nasr
ab201f7590 Add completion for Rakudo
[Rakudo](https://rakudo.org/) is an implementation of the
[Raku](https://raku.org/) programming language.
2021-07-12 21:33:36 +02:00
Raman Gupta
ed7a64ea77 Replicate upstream git logic for alias commands 2021-07-12 16:39:44 +02:00
radiantly
55e60eeae2 Add completions for black (#8123) 2021-07-11 14:35:39 +02:00
Fabian Homborg
4ec06f025c Fix fish_config prompt completions
Oops
2021-07-11 10:13:34 +02:00
Siavash Askari Nasr
8d17f81d66 Add zef completion
[zef](https://github.com/ugexe/zef) is a module manager for
[Raku](https://raku.org/) programming language.
2021-07-11 09:26:21 +02:00
YAKSH BARIYA
46ae46b54e
Add initial completion for Angular CLI (#8111)
* Add initial completion for Angular CLI

* Remove completion for `ng completion`

The `ng completion` doesn't exist. The completiond were autogenerated
using a script. See angular/angular-cli#21085

* Use shorter wording

* Fix typos
2021-07-11 09:25:04 +02:00
Avindra Goolcharan
32826d3596 Node completion: add sparkplug option
Feature: https://v8.dev/blog/sparkplug
Tested: Node.js v16.4.0
2021-07-08 16:10:34 +02:00
Kid
727934c6b6 Fix duplicate -p flag in fish completion 2021-07-05 19:04:23 +02:00
Kid
1361a5f68c Add missing options for bind 2021-07-03 22:06:48 +02:00
Johannes Altmanninger
c18f293ae2 completions/git: offer arbitrary commits to "git switch -d"
Fixes #8101
2021-07-03 08:54:12 +02:00
Johannes Altmanninger
9f54c8d88b completions/git: don't offer deleted files to "git diff" unless we have a "--"
Fixes #8090
2021-06-29 23:31:05 +02:00
Johannes Altmanninger
6c460f643c completions/git: don't comlete commits after "git difftool -- " 2021-06-29 23:31:05 +02:00
Luca Weiss
b8e7b6bcb0 completions/git: suggest modified-staged-deleted files
Add those files to the completion of 'add', 'checkout', 'diff', 'difftool', 'restore' and 'stash
push'.
2021-06-29 23:12:06 +02:00
Johannes Altmanninger
73b13315de completions/dd: re-use built-in file completion for "dd if=the-file"
This allows to complete file arguments even if they contain variables.

Add similar logic for arguments to Maven's -D option.

See https://github.com/fish-shell/fish-shell/issues/5248#issuecomment-857614957
2021-06-19 20:31:46 +02:00
Johannes Altmanninger
48426d6285 Tweak git completion wording (review for #8062) 2021-06-19 10:10:59 +02:00
lelgenio
b8767cc803 completions/sv.fish: create completion for sv, a part of runit. 2021-06-19 08:17:53 +02:00
Collin Styles
a5e665cd81 Add completions for "empty" options to git-commit 2021-06-18 20:49:34 +02:00
Collin Styles
feec10f389 Add completions for different types of git resets 2021-06-18 20:49:34 +02:00
Collin Styles
0abbd2bc2f Add completions for git-revert sequencer subcommands 2021-06-18 20:49:34 +02:00
Collin Styles
15fdfb5afe Add completion for --abbrev-ref option to git-rev-parse 2021-06-18 20:49:34 +02:00
Collin Styles
c9f397b968 Remove invalid completion for git-describe
The `__fish_git_unique_remote_branches` function isn't applicable here
since `git describe` won't know what to do with a remote branch without
the remote prefix. For example, if there is a branch called
`origin/my-branch`, you can't execute `git describe my-branch` until the
branch is checked out locally. In other words:

Good: `git describe origin/my-branch`
Bad:  `git describe my-branch`
Good: `git switch my-branch; git describe my-branch`
2021-06-18 20:49:34 +02:00
Collin Styles
7d5c64a731 Fix completions to cargo's --example option on macOS
The completions for the `--example` option are generated using `find`.
The `find` utility on macOS will produce the following output when the
path argument has a trailing slash:

```
~/bat $ find ./examples/
./examples/
./examples//cat.rs
./examples//advanced.rs
./examples//simple.rs
./examples//list_syntaxes_and_themes.rs
./examples//yaml.rs
```

And will produce this output if the path does NOT have a trailing slash:

```
~/bat $ find ./examples
./examples
./examples/cat.rs
./examples/advanced.rs
./examples/simple.rs
./examples/list_syntaxes_and_themes.rs
./examples/yaml.rs
```

The extra slash after `examples` ends up in the completion suggestions
which is incorrect:

```
~/bat $ cargo run --example <TAB>
/advanced  /cat  /list_syntaxes_and_themes  /simple  /yaml
```

Unlike on my Linux box where `find` doesn't output the trailing slash:

```
~/bat $ cargo run --example <TAB>
advanced  cat  inputs  list_syntaxes_and_themes  simple  yaml
```

Importantly, I get the same (correct) output on Linux even without the
trailing slash in the path argument to `find`.
2021-06-15 21:22:44 +08:00
Johannes Altmanninger
f0de75ddd9 completions/git: complete normal files on "git restore -sHEAD "
A full "git ls-files" is slow on larger repositories; this makes the
common case (desired path exists on file system) faster.
2021-06-15 03:27:55 +02:00
Johannes Altmanninger
585dc16a66 completions/git: complete normal files on "git checkout -- "
This can give false positives but only if used on directories that
mix tracked and untracked files. The performance is better than
listing all tracked files, and in any case we're pretty far from a
correct solution that knows the target Git commit, so this seems like
good compromise.
2021-06-15 03:27:55 +02:00
Fabian Homborg
695027234b completions/git: Complete untracked files immediately
Fixes #8049
2021-06-08 08:53:49 +02:00
gurudarshan266
b5d48acd7c
Condensed descriptions for various commands (#8034)
* Shorten descriptions for tmux.fish

* Shorten descriptions for bundle.fish

* Fix description in dhclient.fish
2021-05-28 18:50:01 +02:00
exploide
34ededa644 updated hashcat completions to version 6.2.1 2021-05-26 13:04:36 +02:00
Jyry Hjelt
08a455d4f1 Fixed a typo in rc-update autocompletion 2021-05-18 13:55:27 +02:00
Johannes Altmanninger
e10cab8104 Tweak documentation wording to include non-option arguments 2021-05-16 20:48:53 +02:00
Kid
e714ce238e Add missing options for complete 2021-05-16 17:33:49 +08:00
Érico Nogueira
3ac2242c68 completions: fix pacmd completions when using pipewire-pulse.
In such cases, `pacmd help` prints

  No PulseAudio daemon running, or not running as session daemon.

to stderr, which ends up printed to the user terminal.
2021-05-14 21:19:06 +02:00
ridiculousfish
3f35012afb Fix openssl completions for LibreSSL
Fixes #7966
2021-05-05 14:42:36 -07:00
Cycatz
889ff25c75 Remove extra chars after -p and --load options 2021-05-05 21:45:16 +08:00
Fabian Homborg
2b74affaf0 Add prompt selector
It's a bit weird to *have* to fire up a browser to get fish_config to
choose a prompt.

So this adds a `prompt` subcommand to `fish_config`:

- `fish_config prompt list` shows all the available prompt names
- `fish_config prompt show` demos the available sample prompts
- `fish_config prompt choose` sources a prompt
- `fish_config prompt save` makes the choice permanent

A bare `fish_config` or `fish_config browse` opens the web UI.

Part of #3625.

TODO: This shows the right prompt on a new line. Showing it in-line is awkward
to do because we'd have to move it to the right.
2021-05-01 18:50:05 +02:00
Johannes Altmanninger
6b41227ff4 completions/dnf: minor addition to always show RPM files
See #7928
2021-04-18 13:09:36 +02:00
Johannes Altmanninger
db0fe92aaa completions/dnf: cautiously complete RPM files
Complete RPM files instead of pacakges if there is either
1. a slash in the token, which precludes package names
2. no matching package

To enable 2, pass the commandline token to the dnf query, instead of
an undefined variable. This allows SQL injection; not sure if we care.

We could always complete RPM files but maybe that's too noisy.
Also, isn't that what the "rpm" command is for?

Closes #7928
2021-04-17 22:53:34 +02:00
Collin Styles
42c11f1b6c Remove completion files for ls aliases; just use function --wraps 2021-04-16 17:40:55 +02:00
239
5e66722452 Update completions for resolvectl 2021-04-15 17:38:26 +02:00
239
4688a84398 Update completions for loginctl 2021-04-15 17:38:26 +02:00
239
9b85254717 Update completions for Keybase 2021-04-15 17:38:26 +02:00
239
975cd13108 Update completions for cryptsetup 2021-04-15 17:38:26 +02:00
exploide
89eeafe393 added completions for firewall-cmd (firewalld)
based on --help and man page of firewall-cmd 0.9.x
2021-04-05 18:59:58 -07:00
Phil Corbett
13439b399e Shortens RPM completions 2021-04-02 12:37:59 -07:00
Fabian Homborg
93ce805f32 help: Update completions
This is all of the sections in interactive, language and for_bash_users.

The faq names are so long that we're not adding them, also not all of
these have descriptions yet.
2021-03-30 17:40:38 +02:00