Commit Graph

2074 Commits

Author SHA1 Message Date
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
Tom Rijnbeek
a56fc622ae Replace single quotes with double quotes in terraform completions to allow for interpolation 2022-04-13 11:10:50 +02:00
Budiman Jojo
b475878df6
feat(completions): add sops completions (#8821)
* feat(completions): add sops completions

* fix: start descriptions with uppercase letter

* fix: shorten descriptions

* fix: use spaces instead of ;

* fix: typo

* feat: better option than __fish_is_first_token

* feat: improve __fish_sops_commands function

* fix: remove useless code

* fix: fix the second argument is not called
2022-04-13 10:44:58 +02:00
Johannes Altmanninger
446f4efa65 completions/mpv: speed up loading
Goes from 200 ms to 100 ms. Probably there is some overhead when calling
complete in a loop; we might be able to fix that.
2022-04-09 22:33:23 +02:00
Paul Kasemir
380c555842
completions/lxc: parse container names with numbers and other commands (#8860)
* completions/lxc: parse container names with numbers and other commands

* Revert CHANGELOG.rst

* Code Review: use multiple subcommands ability of __fish_seen_subcommand_from
2022-04-06 22:16:37 +02:00
Johannes Altmanninger
d87bbf9433 completions/status: fix wrong completion for test-feature
Reported in
5f94dfd094/.config/fish/README/bug.md (wrong-tab-completion-for-status-test-feature)
2022-04-03 15:54:08 +02:00
Johannes Altmanninger
ff72e3f154 completions/git: speed up loading git.fish when "git-foo" completions already exists
git.fish loads git-foo.fish completions.
As reported in #8831, this can be slow when the user has run something like

    complete git-foo -w 'git diff'

because git.fish runs 'complete -C "git-autofixup "' at load time.
Commit 09161761c (Complete custom "git-foo" commands from "git foo",
2021-01-24) did that to avoid adding filename completions for "git foo".
Drop that check.

This means that users who don't want filename completion for "git foo",
need to define at least one custom completion for "git-foo", like

    complete git-foo -f
2022-04-02 12:52:57 +02:00
Aaron Gyes
cd23fdac2e killall completions: fix '-procname' procs, -help, -t description 2022-03-31 20:28:25 -07:00
Johannes Altmanninger
bb055c7c81 completions/code: also complete paths for --install--extension
The docs state:
code --install-extension <ext-id | path> Installs or updates an extension. The
argument is either an extension id or a path to a VSIX.
2022-03-31 17:25:15 +02:00
Kid
90d52ee669
Complete /dev/fd in isatty (#8840)
* Complete `/dev/fd` in `isatty`

* Check `/dev/fd` existence first
2022-03-30 18:29:59 +02:00