Commit graph

2083 commits

Author SHA1 Message Date
Akatsuki Rui
bb158880d5 Add efibootmgr completion 2022-06-09 18:51:59 +02:00
Arash Mousavi
88502ca49f Add uninstall command to rbenv.fish completion
`uninstall` is part of the ruby-build.
2022-06-08 17:34:25 +02:00
David Adam
219a15d1db ip completions: fix case statements for show/save/flush
An errant end prevented the relevant section of the switch statement from being evaluated.

Fixes #9008.

Thanks to caoczy@github for the diagnosis.
2022-06-08 21:44:39 +08:00
Fabian Boehm
0ea6703661 completions/git: Terminate pathspec magic
Git's pathspec system is kind of annoying:

>  A pathspec that begins with a colon : has special meaning. In the short form, the leading colon : is followed by zero or more "magic signature" letters (which optionally is terminated by another colon :), and the remainder is the pattern to match against the path. The "magic signature" consists of ASCII symbols that are neither alphanumeric, glob, regex special characters nor colon. The optional colon that terminates the "magic signature" can be omitted if the pattern begins with a character that does not belong to "magic signature" symbol set and is not a colon.

So if we complete `:/foo`, that "works" because "f" is alphanumeric
and so the "/" is the only magic character here.

If, however the filename starts with a magic character, that's used as
a magic signature.

So we do what the docs say and terminate the magic signature after the
"/" (which means "from the repo root").

Fixes #9004
2022-06-07 20:10:13 +02:00
Kid
9238bbde65 Update kitty completion 2022-06-07 16:26:09 +02:00
exploide
44205b188b completions 7z: allow to complete file names 2022-06-07 14:30:23 +02:00
Mike Lei
9d7e0b281b completions: include nologin in useradd/adduser shell options 2022-06-07 14:29:50 +02:00
SeekingBlues
025acfe45a Add -k completion for gzip and gunzip 2022-06-04 13:05:50 -07:00
Fabian Homborg
540aea5999 completions/dnf: Try to stop dnf reading from the terminal
Fixes #8984.
2022-06-01 21:45:50 +02:00
Fabian Homborg
905db80c28 Convert git completions to multi-condition 2022-05-30 20:47:14 +02:00
Fabian Homborg
f10deb124b completions/string: Use multiple conditions 2022-05-30 20:47:14 +02:00
Fabian Homborg
e6136f08fb completions/path: Add --reverse 2022-05-29 20:36:11 +02:00
Fabian Homborg
5d96f5d00b Update completions 2022-05-29 17:48:40 +02:00
Fabian Homborg
80e04a1e86 Rename real to resolve also in completions 2022-05-29 17:48:11 +02:00
Fabian Homborg
5c28473183 Update completions 2022-05-29 17:48:11 +02:00
Fabian Homborg
dca932eda4 Add completions for path 2022-05-29 17:48:11 +02:00
Fabian Homborg
f5b1063a8b completions/man: See if it exists before calling
Fixes #8977
2022-05-27 08:19:40 +02:00
Fabian Homborg
49d75ff689 completions/git: Print all known files for git log 2022-05-26 14:17:15 +02:00
mhmdanas
b3de630d40 Add signoff options to git commit completions
Fixes https://github.com/fish-shell/fish-shell/issues/8965.
2022-05-21 20:27:32 +02:00
Jacob Panek
8c44eb5dd3 fix completion, apk {add,manifest} accept files 2022-05-14 10:41:45 -07:00
NextAlone
ce2064d8b6 fix: completion git mv with ls-files 2022-05-14 17:55:39 +02:00
NextAlone
0f18a4f92b fix: git ls-files --stage 2022-05-14 17:11:07 +02:00
Dmitry Gerasimov
39df8f0b3f Add missing cp completions
All of the missing options were present in the GNU cp for more than 8
years, so it makes sense to add completions for them.
2022-05-13 20:55:36 +02:00
Dmitry Gerasimov
bb108435bb Fix wg-quick completion running from root
`wg show` command shows entire interfaces configuration, not just the
list. This breaks completion when running fish from root, because
command output looks like this:

    interface: wg0
      public key: fred2rX85AxpcTObLuiWTzkRPZaXjnhd1C4XOdZOGWs=
      private key: (hidden)
      listening port: 12345
      fwmark: 0xca6c

    peer: g2YHHDkxmgoT9EV0TxKtq556WLXpaOh4zgC5L7EAGTQ=
      endpoint: 192.168.88.50:54321
      allowed ips: 0.0.0.0/0, ::/0
      latest handshake: 1 minute, 37 seconds ago
      transfer: 1.83 MiB received, 927.19 KiB sent

To show just the list of active interfaces, `wg show interfaces` should
be used instead.
2022-05-13 20:55:24 +02:00
Dmitry Gerasimov
4e19bfb5ed Add --no-patch option to git show completion 2022-05-12 20:31:44 +02:00
NextAlone
bd1e07de23 fix: complete git rebase with commits first and keep-order
Because TAGs are easy to type and complete, but commits with its SHA are
difficult to complete manualy. Keep commits and TAGs order to show more recent
commits first.
2022-05-12 20:30:33 +02:00
merelymyself
ed8148233e completions/git: add options for grep, init, prune, revert, rm, status
Closes #8906
2022-05-01 17:08:00 +02:00
mhmdanas
838fd5f85e Add --unset-upstream to git branch completions 2022-05-01 17:07:36 +02:00
Johannes Altmanninger
ad9b4290e5 completions/git: cache subcommand computation
Whenever completing any git commandline, we invoke __fish_git_using_command
173 times*. Every invocation calls "commandline" and "argparse"
to the same effect. Let's parse the command line once, and reuse the results
later.

I'm observing a speed-up from 200ms to 120ms with

    perf stat -r 10 buildrel/fish -c 'complete -C "git checkout ">/dev/null'

Alternative solutions:
1. teach fish to cache such things automatically.
2. rewrite git completions to compute most completions in a single function,
   which will naturally avoid redundant work. This sounds viable but it's
   a lot of work.

* we have a thousand uses of __fish_git_using_command, so I'm not sure why
it's only 173.

See the discussion in #8266
2022-05-01 16:37:55 +02:00
NextAlone
9ce09fb26b
feat: base completion for fastboot (#8904)
* feat: completion for fastboot

* docs: update CHANGELOG.rst

* fix
2022-04-26 23:40:12 +02:00
NextAlone
d8398dbe30 fix: only complete remotes when seen command 2022-04-26 22:18:10 +02:00
NextAlone
867d69258d feat: completion for optimus-manager 2022-04-26 22:16:25 +02:00
NextAlone
9a2b0dc275 fix: wrong completion in git merge 2022-04-26 22:14:55 +02:00
NextAlone
7ffb9359f6
feat: completion for archlinux-java (#8911)
* feat: completion for archlinux-java

* docs: update CHANGELOG.rst
2022-04-26 22:13:22 +02:00
NextAlone
b032354a9f
feat: completion for adb push and pull (#8901) 2022-04-26 21:14:02 +02:00
NextAlone
8a4ee02d24
feat: more completion for umount (#8908)
* feat: more completion for umount

* feat: add btrfs to known filesystems
2022-04-26 21:11:54 +02:00
ridiculousfish
b94600d181 Correct depth/deepen completions for git fetch 2022-04-23 16:13:50 -07:00
NextAlone
a6277f0c72 feat: complete git fetch options 2022-04-23 16:10:01 -07:00
ridiculousfish
939ce10616 Fix test error in localectl completion
localectl may emit an error for whatever reason. The localectl
completion runs localectl in a command substitution so our stderr
redirect doesn't apply. Just redirect to null. Hopefully this fixes the
tests.
2022-04-21 20:53:59 -07:00
ridiculousfish
4e1b5e733f Supress stderr on kubectl completions
This suppresses 'Unsupported shell type "fish"' on presumably older
kubectls.
2022-04-21 14:26:30 -07:00
Fabian Homborg
10785ba814 completions/rustc: SILENCE
Otherwise this might print

> error: no override and no default toolchain set
2022-04-21 17:35:00 +02:00
Fabian Homborg
e358ec0ce2 Silence debconf error
I *think* this is printing

> debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied

On Github Actions?

Might need to adjust the test to store the output.
2022-04-21 17:25:17 +02:00
Fabian Homborg
c0fc80cb59 completions/timeout: Stop spewing
GNU timeout prints the version to stdout. Just silence both.
2022-04-21 17:15:20 +02:00
Fabian Boehm
be828b50e3
completions/adduser: Fix quoting
This used single-quotes inside single-quotes, so it ended up running a glob.

Fixes #8896.
2022-04-21 12:57:35 +02:00
Jason Nader
2a22a91544
completions: add wg-quick (#8687)
* completions: add wg-quick

* fixup
2022-04-18 11:41:14 +02:00
Peter Stolz
4116a9cc11 Improove completions for ip netns 2022-04-18 11:40:23 +02:00
Fabian Homborg
eb468ea744 Fix env completions
Our old friend, local variable inside a block.

Also account for the fact that the current token is often empty.

Fixes #8881
2022-04-16 08:36:58 +02:00
Tom Rijnbeek
2bf9b97ab7 Address review comments
* Add workspace completions
* Fix missing file completions
2022-04-13 11:10:50 +02:00
Tom Rijnbeek
3b2fb23bca Update terraform completions 2022-04-13 11:10:50 +02:00
Tom Rijnbeek
26c982ac8f Extract common completions for apply, destroy, and plan 2022-04-13 11:10:50 +02:00