Commit Graph

563 Commits

Author SHA1 Message Date
Aaron Gyes
36691df6fe Stringify many completions and functions, with --invert stringification.
I believe apm must have been buggy - example output that I found online
showed `tr` was mangling paths with spaces in it. Should be fixed.

Also, use dscl on OS X in __fish_complete_users.fish like
__fish_print_users.fish already does.
2016-04-08 10:49:29 +08:00
Josef Gajdusek
0eb3fd6b3f Make modprobe completion more precise
Only match loaded modules when -r is specified.

Also adds /lib/modules/(uname -r)/misc to the search path.
This directory is used by Gentoo for package-provided modules
(such as the app-emulation/virtualbox-modules)
2016-03-28 14:38:19 +02:00
Josef Gajdusek
6663c73eb0 Fix typos: ingnore->ignore 2016-03-28 14:38:19 +02:00
Bogdan Sinitsyn
516695ff21 add yaourt completions 2016-03-24 16:17:10 +01:00
Cody Frazer
1828def866 Add --no-index option completion for git diff 2016-03-20 10:10:51 -05:00
lordlycastle
540bdfcb02 date and uniq completions for OS X. 2016-03-12 13:57:37 +01:00
David Adam
f4c14b69a2 Update dpkg completions to complete commonly used options
Closes #2798.
2016-03-06 21:29:09 +08:00
Fabian Homborg
5446841069 Ditch __fish_sgrep in obnam completions 2016-02-28 18:07:57 +01:00
Fabian Weisshaar
a805d401b8 add completions for diskutil (osx) 2016-02-23 13:54:46 +01:00
Sunguk Lee
c4f702b7c4 Fix No command 'dscl' found error of killall command
`dscl` command have OSX system, to change `__fish_print_users`
2016-02-15 19:30:58 +09:00
Fabian Homborg
b6e058985b Fix "replacement string too large" error in pacman completion
Turns out we can skip using string altogether, thanks to the magic of
the cartesian product.
2016-02-10 15:35:01 +01:00
Fabian Homborg
adc3b0e122 eselect completion: Silence eselect php output
The version with the features we use isn't in gentoo stable yet and
older versions print a very ugly warning.
2016-02-04 23:31:32 +01:00
Elis Axelsson
29d06760bc Update eselect completions to work for the php-module
refs #1131
2016-02-04 23:30:06 +01:00
Fabian Homborg
cadb5d51ea Replace tr invocations 2016-02-03 23:47:46 +01:00
Fabian Homborg
158ea98189 Replace uses of expr with math/string 2016-02-03 23:23:59 +01:00
Fabian Homborg
1688b2384f pacman: Stringify 2016-02-02 09:48:55 +01:00
Fabian Homborg
0c94c2b9e8 pacman: Remove outdated "$argument" hack
This doesn't seem to speed up anything.
2016-02-02 09:48:26 +01:00
Fabian Homborg
d3f6c8a694 pacman: Improve --files completion
Missed one option and the option-as-command-hack
2016-02-02 09:47:44 +01:00
Fabian Homborg
e086e27f98 Update pacman/makepkg completions for pacman 5
Some new options, one new operation - "--files".
2016-02-02 09:23:23 +01:00
Dan Martinez
c7ba446c23 Add support for brew's desc subcommand 2016-01-21 15:01:18 -08:00
Fabian Homborg
68fcb790b0 Add all boolean values to pacmd completion
PA accepts "0", "false" and "off" (among others) for false also for suspend-*.
2016-01-14 23:33:31 +01:00
Fabian Homborg
8db1a5fae7 Add completions for Pulseaudio's pacmd
To implement this mostly as a wrapper around pactl, we add the list of
commands for this to that. It's 90% the same anyway. (This means that
`pactl suspend ` will complete files instead of commands like `pactl
banana ` would, but neither is correct)
2016-01-14 23:31:17 +01:00
Fabian Homborg
6bf70c86d2 Only complete unloaded modules for pactl load-module
This now officially does more than the official bash completion!
2016-01-14 22:36:50 +01:00
Fabian Homborg
b7d98fa873 Add profiles and ports completion to pactl
This is now on par with the official bash completions.
2016-01-14 22:21:50 +01:00
Fabian Homborg
daafe4ef37 Add completion for pulseaudio's pactl 2016-01-14 21:21:54 +01:00
Fabian Homborg
8e79da3b2d Fix typos
Fixes #2673.
2016-01-12 00:08:41 +01:00
Fabian Homborg
c56df11128 Add completions for kcmshell5
A tool to open KDE Plasma settings menus.
2016-01-09 18:58:03 +01:00
Fabian Homborg
6027eae1a1 Add completions for asp
A package information and build tool for archlinux, replacement for the
ageing "abs".
2016-01-09 18:58:03 +01:00
Fabian Homborg
bd482898d4 Simplify and stringify valgrind completions
These used _eval_ when a simple variable capturing would have sufficed.
2016-01-09 18:58:03 +01:00
Aurélien Deharbe
2a4f21cc92 Add completions for the haskell 'stack' build tool 2016-01-08 21:50:41 +01:00
Fabian Homborg
b7fb11cb7f git completion: Complete commits for all branches 2015-12-30 16:26:28 +01:00
Botond Erdos
bb932a0a0a adds dnf completions for package installs
Since dnf accepts the same arguments as yum, just inherit.
2015-12-29 14:48:09 +01:00
lordlycastle
f23c2beb61 Fixed kill-signals completion. Added completions for OS X kill command.
Don't generate killall completions when running on Solaris OS - `killall` there literally kills all processes.
2015-12-28 12:54:13 +01:00
Bogdan Sinitsyn
1a3bcf63bc Add database completion for pacman 2015-12-23 20:33:57 +01:00
Fabian Homborg
836b6bea73 git completions: Add commit hashes for show
That's probably the part where commit hashes are most used, we can add
the other subcommands later.

This generates a _lot_ of options, so hooking it up everywhere would be
unwise, though our pager helps quite nicely with filtering - typing
"Branch" will filter out the commits, and typing other things will
filter the subjects, which is quite cool.
2015-12-18 17:07:43 +01:00
Fabian Homborg
5306fce16e mount completions: Support spaces in mountpoints
This turns '\040' into a space. /etc/mtab also supports other
escapes ("\\" for backslash, "\011" for tab), but I can't find
documentation for those in fstab.
2015-12-17 12:35:16 +01:00
Fabian Homborg
f045d9b143 Improve mount completion (now with blockdevices!)
This adds blockdevices (and directories) and fixes the regexes to no
longer include comments but include UUID= and LABEL=, which at least
util-linux mount understands.

It also shouldn't fail on systems without fstab any longer (like default OSX).

Fixes #2606.
2015-12-13 20:38:38 +01:00
Fabian Homborg
346d918555 Delete upstreamed docker completions
A better version of these has been in an upstream release, so there's no
need to keep this around.
2015-12-12 12:13:05 +01:00
Fabian Homborg
8104854d5d Update makepkg completion
A few options were missing and --asroot has been removed
2015-12-11 12:19:30 +01:00
David Adam
a0eef2663a git completions: add missing description flags
Fixes syntax error introduced in 4280df3aa2.
2015-12-11 10:42:19 +08:00
Fabian Homborg
2b7ffca414 Merge pull request #2595 from lordlycastle/master
Added OS X completions for open, and seq.
2015-12-10 15:32:18 +01:00
lordlycastle
96b3e1ce1b Added OS X completions for open, and seq. Added missing stdout redirection to /dev/null when checking command's version. 2015-12-10 14:20:46 +00:00
mr.Shu
4280df3aa2 git: Add missing options to git clone
* Add missing options to `git clone` in order to make the suggestions as
  similar to the manual (https://git-scm.com/docs/git-clone) as
  possible.

Signed-off-by: mr.Shu <mr@shu.io>
2015-12-10 12:54:45 +01:00
mr.Shu
a8837f537f git: Add more options to git cherry-pick
* Add more options to `git cherry-pick` so that the suggested options
  mimic the man page (https://www.git-scm.com/docs/git-cherry-pick/).

Signed-off-by: mr.Shu <mr@shu.io>
2015-12-08 23:51:29 +01:00
Fabian Homborg
d325b4bf39 Add completion for pkg-config 2015-12-03 13:11:53 +01:00
Fabian Homborg
1d64c480c4 Add completion for systemd-nspawn 2015-12-03 12:53:10 +01:00
Fabian Homborg
9f7334deef Add completion for systemd-analyze 2015-12-03 12:52:59 +01:00
mr.Shu
1a5d0fc47f git: Improve completion for git remote
* Make sure that the `git remote` subcommands are not repeatedly
  suggested (that is do not suggest a subcommand if there already is one).

* Add both long and short options to `git remote` subcommands where
  appropriate.

Signed-off-by: mr.Shu <mr@shu.io>
2015-11-29 22:14:11 +01:00
Fabian Homborg
17b6936f53 Merge pull request #2573 from mrshu/mrshu/add-missing-git-remote-subcommands
git: Add missing remote subcommands completion
2015-11-28 14:41:37 +01:00
Fabian Homborg
c5bcc4567e Merge pull request #2572 from lordlycastle/master
Added completions for cat, cp, mktemp, stat, touch for OS X.
2015-11-28 14:41:03 +01:00
mr.Shu
7b3d93f4a1 git: Add missing remote subcommands completion
* Add completion for missing `git remote` subcommands.

* Should fix #2567

Signed-off-by: mr.Shu <mr@shu.io>
2015-11-28 03:24:59 +01:00
lordlycastle
3868203c76 Added completions for cat, cp, mktemp, stat, touch for OS X. 2015-11-28 00:35:26 +00:00
Daniel Matz
b7f13b4685 Complete bg and fg with job PIDs. 2015-11-27 16:07:16 -08:00
Fabian Homborg
a8a9ac0dae Add completion for OSX rm
As always, this not only doesn't support longopts, but also has some
options that GNU rm doesn't - in this case, an undelete function.
2015-11-27 11:28:41 +01:00
Daniel Matz
3b53abecd0 Update hg completion
This does a number of things:
- Removing trailing space from suggested repos for hg.
- Use the string builtin for hg completions.
- Add more internal merge tools to hg completion.
- Enable completions for abbreviated hg commands.
- Stop completing a deprecated hg branches option.
- Properly match the hg subcommand when preceeded by global switches.
- Stop completing deprecated hg glog.
- Complete hg config instead of showconfig.
- Properly complete when global switches are before the hg command.
- Properly handle the repository switch for hg completions.
- Properly handle the hg global switch cwd.
2015-11-23 19:39:58 +01:00
Fabian Homborg
3f12f75853 Add completions for OSX which 2015-11-23 13:37:53 +01:00
Fabian Homborg
917c727619 Add more sudo options 2015-11-23 13:32:29 +01:00
Fabian Homborg
6336288da1 Support the OSX versions of head/tail
See #2537.

These were written from the online versions of the manpages.
2015-11-19 21:32:21 +01:00
Fabian Homborg
e31a93040e Add completion for string
A bit simplistic since we can't complete e.g. regexes properly, but it
does the job.

Fixes #2543
2015-11-12 15:08:47 +01:00
maxried
0918ad6cee Improve apt-get completion
Added apt-get changelog sub-command completion.
2015-11-01 12:30:17 +01:00
Bheesham Persaud
46fbfaaa83 Add cargo and rustc completion.
rustc.fish makes heavy use of the `string` commands.
2015-10-26 21:39:16 -04:00
Fabian Homborg
3e7dfd7f5e Switch useradd and chsh to string 2015-10-21 12:38:45 +02:00
Jan Ernsting
8e3e286577 Update mix completion
Among others `mix escriptize` has not been supported since July 2014:
https://github.com/elixir-lang/elixir/issues/2468

Also explain what mix is.
2015-10-20 17:10:41 +02:00
Fabian Homborg
f4b4e5b41f git: Complete subcommands for git submodule foreach 2015-10-20 15:49:45 +02:00
Fabian Homborg
4a05d56337 git: Disable submodule subcommand completion if one is already given 2015-10-20 15:49:22 +02:00
Fabian Homborg
73708061fc Fix git submodule completions
Fixes #2494
2015-10-20 15:42:48 +02:00
Fabian Homborg
df3da55602 git completion: Allow branches with "/" in them as unique remote branches 2015-10-16 17:15:37 +02:00
buo
3472a39d07 Add BSD specific arguments for tr command completion 2015-10-13 15:52:14 +02:00
Fabian Homborg
98b33d7b6b Fix pushd completions in the -n case 2015-10-09 20:02:28 +02:00
Fabian Homborg
2ffb47eba2 Add missing \n to pushd completions 2015-10-07 10:26:27 +02:00
Fabian Homborg
b208d752e2 git completion: Complete files relative to repo-root
Not for _everything_ because that causes too many options to be
generated (which is an issue for git as it is), but for modified, staged
and added files - which is where it is most useful.

Fixes #901 as far as I'm concerned.
2015-10-06 14:05:08 +02:00
Fabian Homborg
ec74479d44 Add pushd -n to completions, use string
Also indent with fish_indent
2015-10-05 15:23:05 +02:00
Derek Harland
e75108fc4c Improve pushd completions
Add completions for rotating and swapping the stack.
2015-10-05 15:12:38 +02:00
Fabian Homborg
176e34cf73 Remove ls|__fish_sgrep from apt-proxy-import 2015-10-04 15:45:02 +02:00
Fabian Homborg
65415cb761 Move make completion to string
This also removes a hack that's not needed anymore
2015-10-04 15:41:20 +02:00
Fabian Homborg
45bf843b03 Move python comp away from eval and sed
I have no clue why this used eval.
2015-10-04 15:41:20 +02:00
Fabian Homborg
610a5926a8 Move apt-show-versions away from ls|__fish_sgrep
This is almost trivial to do with builtins.
2015-10-04 15:41:20 +02:00
Fabian Homborg
3b0f9911e2 Move setfacl completions to string 2015-10-04 15:41:20 +02:00
Fabian Homborg
55a2945449 Bring aura completions in line with pacman
Eliminates a bit of __fish_sgrep
2015-10-04 15:41:20 +02:00
Fabian Homborg
5f2feee680 git completion: Bring needs_command in line with git
git has options that can appear before commands, but not all of
them, and some of them need an argument. This means
`__fish_seen_subcommand_from`  will give too many false-positives, while
`[ (count $cmd) -eq 2 ]` will give too many false-negatives.

Instead go through all arguments and check if they are in that list of
options that can be before a command and skip the argument for them, if
any.
2015-09-30 15:14:09 +02:00
Dan Underwood
37f4cbe3d7 Fix of multiple synonyms for apm command
`__fish_apm_using_command` was incorrectly taking lists of commands, new function added to support multiple a command having synonyms.

Simplify switch statement

Also remove superfluous function.

Allow for multiple completions after a command

Useful for removing packages, will complete for more than one.

Code improvements
2015-09-28 18:30:08 +01:00
Fabian Homborg
126c8c14b8 machinectl: Add "shell" subcommand 2015-09-28 16:22:29 +02:00
Fabian Homborg
3992315505 Normalize cabal* completion 2015-09-28 16:08:01 +02:00
Fabian Homborg
eb4e4fa7ad Normalize aura completions
Also fixes bug related to repo listings
2015-09-28 15:39:51 +02:00
Jan Ernsting
7376639789 Fix completion for totem 2015-09-27 14:36:16 +02:00
Fabian Homborg
5bb81461f6 Normalize ls completions and bring them up-to-date
This adds the --group-directories-first option for GNU ls and fixes a
typo in --block-size (not --blocksize).

Fixes #2425.
2015-09-26 11:40:04 +02:00
Fabian Homborg
d591cebf44 Introduce __fish_print_pacman_repos helper
This is used in at least 4 places, all of which have a bug in that they
print "options" as a valid repo. It seems better to fix it once,
especially given that there are tons of AUR helpers and pacman wrappers,
all of which might need this info.
2015-09-25 13:37:39 +02:00
Fabian Homborg
be51fe944d Fix vi* completions
I forgot a "-c".
2015-09-23 19:01:34 +02:00
Fabian Homborg
6f92781992 Refactor *vi* completions, add nvim wrapper
This assumes `vim` is always vim (or close enough, nvim should also
work), while `vi` could be either.

Fixes #2416
2015-09-23 12:59:05 +02:00
Fabian Homborg
fb615843b3 git completion: Describe aliases with their definitions
I could have sworn we had this already.
2015-09-22 20:25:14 +02:00
Fabian Homborg
c6d808a0d8 git completions: Switch more to string 2015-09-22 20:24:54 +02:00
Fabian Homborg
4f12821ca8 git completion: Rewrite __fish_git_ranges with the string stuff
Cuts down on perl.

Also complete heads (i.e. tags and branches) always.
2015-09-22 18:21:09 +02:00
Fabian Homborg
4fcda28d9b git completions: Add remote branches with only one remote
Fixes #675
2015-09-22 16:46:43 +02:00
Johannes Schneider
054fb22854 Maven completion added 2015-09-19 22:27:04 +02:00
Fabian Homborg
be70ea7d49 Add completion for Arch's mkinitcpio 2015-09-17 18:23:37 +02:00
Fabian Homborg
1ef178c5e6 Add alsactl completions 2015-09-17 18:20:23 +02:00
Fabian Homborg
a79c7495c8 busctl completions: Fix usermode
Block-scope strikes again!
2015-09-17 18:12:00 +02:00
Fabian Homborg
f86ee20579 systemctl completions: Support systemd in /lib
Debian has not merged /usr/lib and /lib, so they install the `systemd`
binary at /lib/systemd/systemd.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790671
2015-09-16 23:18:04 +02:00
Dan Underwood
18a116394d Complete atom package manager or apmd
Completions for `apm` now support both the Advanced Power Management client and the Atom text editor.
2015-09-16 15:54:42 +01:00
Konrad Borowski
094948db51 Fix issue with pkg --jail=value completion 2015-09-16 13:58:48 +02:00