Commit graph

1325 commits

Author SHA1 Message Date
Deniz Kızılırmak
c7cbf6dad0 Make 'git checkout' complete recent commits 2019-05-05 11:52:18 +02:00
Fabian Homborg
0784b76570 completions/env: Inhibit files
(Also remove annoying "commmand" description)

[ci skip]
2019-05-03 16:35:25 +02:00
Fabian Homborg
411b4aea9d share/completions/env: Fix
This completed the commandline with options removed, which looked like

    env VAR=VAL command option

Which didn't really actually work.

Fixes #5856.

[ci skip]
2019-05-02 16:29:11 +02:00
Wilke Schwiedop
95346770d3 Update emaint.fish 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
78e6631e53 formatting 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
05f79335cc completions/emerge: add verbose-conflicts 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
1b3643270d completions/epkginfo: add completion 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
d0c3a4f33f completions/equery: shorten descriptions 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
34f50883a4 completions/ebuild: add pretend command 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
52450dc864 completions/emaint: fix logs command 2019-04-29 18:33:37 +02:00
puenka
30f040ed36 Add speedtest-cli/speedtest completion (#5840)
* Add speedtest-cli/speedtest completion

Added a completion file for speedtest-cli utility (https://github.com/sivel/speedtest-cli) as shipped from various package repositories.

* added no-files parameter

* Remove inheritance to speedtest

* Create speedtest.fish
2019-04-27 09:34:28 +02:00
Mahmoud Al-Qudsi
ae11bf4dcb Add completions for git show $rev:$path
This command can be used to "`cat`" the contents of `$path` as of `$rev`.

These are "silent" completions, e.g. while this adds a completion for
`git show master:foo`, the completions for `git show <TAB>` are not
affected; these "advanced" completions kick in only after at least
`git show master:<TAB>` to prevent completion pollution or slowing down
tab completions in the typical case (as this would cause each valid and
possibly unique $rev completion result to complete to `n*$rev`
completions for *n* files.

[ci skip]
2019-04-23 21:54:09 -05:00
Mahmoud Al-Qudsi
4bdab33a00 Add dynamic cipher completion to ssh -c ...
[ci skip]
2019-04-22 15:17:38 -05:00
Mahmoud Al-Qudsi
32ad1a6e62 Add basic completions for FreeBSD's camcontrol 2019-04-19 20:57:27 -05:00
Wilke Schwiedop
76306c4582 completions/usermod: various fixes
* -a does not take arguments
* -e more helpful description
* -g add arguments
* -G fix arguments
* add -r to various options
2019-04-20 08:43:43 +08:00
Mahmoud Al-Qudsi
d66ec08819 Add partial aws and ~full aws s3 completions
[ci skip]
2019-04-17 22:37:19 -05:00
Aaron Gyes
65bc94c493 Revert "set completions: complete __ variables"
This reverts commit f4e40f2f4b.
2019-04-15 12:57:59 -07:00
Aaron Gyes
89b6b05f88 Fix builtin completions
Command substitution needs parenthesis
2019-04-15 12:24:54 -07:00
Aaron Gyes
f4e40f2f4b set completions: complete __ variables
Now that __ stuff is sorted after a-z, we should not completely
omit them from completions.
2019-04-14 20:35:02 -07:00
Mahmoud Al-Qudsi
5989a92dae Add completions for rg (ripgrep)
[ci skip]
2019-04-12 15:20:45 -05:00
Fabian Homborg
898ed12a6c
Merge pull request #5795 from cstyles/git-completions
Add git completions
2019-04-12 09:42:52 +02:00
Collin Styles
502efb0f3e Improve descriptions 2019-04-10 19:11:52 -07:00
Aaron Gyes
f086064d72 add --print-rusage-self to completions 2019-04-10 16:41:26 -07:00
Artur Juraszek
cece4d81c1 completions/pinky: Prompt with users list 2019-04-10 12:46:36 +02:00
Collin Styles
3cfa5d422e Remove string match; use string replace's --filter option 2019-04-09 20:59:48 -07:00
Mahmoud Al-Qudsi
49935f13df Add completions for git bisect
[ci skip]
2019-04-09 20:36:42 -05:00
Collin Styles
724dd06c62 Add completions for git-help 2019-04-06 14:04:28 -07:00
Fabian Homborg
78931d78bd completions/git: Handle diff --cached
Fixes #5785.

[ci skip]
2019-04-06 21:45:17 +02:00
Collin Styles
2226a87b59 Add completions for git-worktree 2019-04-06 12:24:24 -07:00
Collin Styles
82596465b2 Add completions for git-describe 2019-04-06 12:24:24 -07:00
Collin Styles
0bd8c61e7e Add completions for git-ls-files 2019-04-06 12:24:24 -07:00
Collin Styles
6e3c87f4c3 Add completions for git-merge-base 2019-04-06 12:24:24 -07:00
Aaron Gyes
469a8880aa correct 'bind' completions
--new-mode isn't even an option `bind` takes, and it
-m for -M.
2019-03-31 21:38:23 -07:00
Fabian Homborg
1937e409f7 completions/find: Fix typo 2019-03-29 17:46:01 -05:00
Mahmoud Al-Qudsi
93b02dcec4 Don't use camcontrol in FreeBSD zpool completions
It requires root/su privileges to list devices, and we have a great
alternative that already produces the desired results.
2019-03-29 17:43:03 -05:00
Fabian Homborg
fc7d11d7b8 Update zpool completions to use string instead of grep 2019-03-29 17:37:26 -05:00
Fabian Homborg
77e71cfcb1 completions/git: Handle AM files
Fixes #5763.

[ci skip]
2019-03-24 17:12:36 +01:00
Fabian Homborg
22d9382646 completions/service: Remove useless helper function
[ci skip]
2019-03-24 16:59:49 +01:00
SanskritFritz
aea4062906 cower doesn't exist anymore, completions dropped 2019-03-17 10:55:01 +01:00
Fabian Homborg
0b6d6a29eb completions/git: Fix broken conditions for git config
Classic case of not seeing `and` as a new command:

`__fish_git_using_command config and anotherthing`

causes `and anotherthing` to be passed as arguments to
`__fish_git_using_command` instead of being executed.

[ci skip]
2019-03-15 20:09:55 +01:00
Fabian Homborg
a7ab8c6a4b Remove __fish_test_arg helper function
This was a remnant from before `string` existed, and was only used by
the xterm completions.

Part of #5279

[ci skip]
2019-03-15 19:58:01 +01:00
Fabian Homborg
2de3f7c686 Move ninja functions into ninja completions
Part of #5279

[ci skip]
2019-03-15 19:57:56 +01:00
Fabian Homborg
1c3c76165e Move xrandr functions into randr completions
Part of #5279.

[ci skip]
2019-03-15 19:57:51 +01:00
Fabian Homborg
a1380a736b Move __fish_print_make_targets into make completions
A function file for a function used only by one completion (and
unlikely to be used anywhere else).

If another user shows up, we can move it out again.

Part of #5279

[ci skip]
2019-03-15 19:57:46 +01:00
Fabian Homborg
86e9e60ae7 completions/set: Fix set -eU
This had a typo where it completed `-u` variables. Only `-u` means
unexported, `-U` means universal.

[ci skip]
2019-03-15 15:22:59 +01:00
Fabian Homborg
9dcb5abaf1 completions/pandoc: Stringify
This should be the last call to `grep` outside of a script
specifically related to `grep`.

(With the exception of `zpool`, which I've already written, but which
will probably be merged later)
2019-03-14 17:16:47 +01:00
Fabian Homborg
7766d0a7d0 Remove outdated comment
[ci skip]
2019-03-14 13:23:48 +01:00
Fabian Homborg
05038fc865 completions/zfs: Stringify 2019-03-14 13:23:47 +01:00
Fabian Homborg
aa08504fe3 completions/zpool: Stringify a bit
These are the simple bits - replace useless helper functions and uses
of grep/sed with string or other appropriate tools.
2019-03-14 13:23:47 +01:00
Fabian Homborg
a4d728c9de completions/ezjail-admin: Stringify
Specifically `grep`, these awks are still a bit too annoying to do
with `string`.
2019-03-14 13:23:47 +01:00
Fabian Homborg
3043d726bf completions/minikube: Stringify 2019-03-14 13:23:47 +01:00
Fabian Homborg
5859d205d8 completions/apt-file: Remove ls call 2019-03-14 13:23:47 +01:00
Fabian Homborg
29556efebd Drop rc.d completions
This was an arch utility that it used shortly before introducing
systemd.

It's been dropped upstream for years.
2019-03-14 13:23:47 +01:00
Aaron Gyes
3e8c05e32b cat, mv, rm completions: shorten descriptions 2019-03-09 15:02:25 -08:00
Aaron Gyes
c1859b5678 date completions: show correct options for different BSDs, macOS
Also prevents file completions where they are not approprite, and
additionally shortened the descriptions to fit in two pager columns
in an 80-wide terminal for some platforms.
2019-03-09 14:56:25 -08:00
Fabian Homborg
bf926fd6c4 completions/yarn: Don't offer files for yarn run
Pretty sure that, like npm, that's not valid.

[ci skip]
2019-03-09 18:04:21 +01:00
Fabian Homborg
b0e9405b11 Read json via python
Apparently that's actually faster than jq, and it's more likely to be
installed.

Also it should convince the arch packager to remove the jq dependency.

The indentation is weird, though.

[ci skip]
2019-03-09 18:04:21 +01:00
Aaron Gyes
3ac1c29f79 cp completions: shorten descriptions
Enough to fit two pager columns into a 80-wide terminal.
2019-03-09 07:55:46 -08:00
Aaron Gyes
7ececa4c69 dmesg completions for all the platforms
+ tweaks for Linux: shorter descriptions, suppress file completions
+ Add correct completions for macOS, NetBSD, FreeBSD, OpenBSD, DragonFly
+ Solaris dmesg has no options, so complete nothing there
2019-03-09 07:29:23 -08:00
Fabian Homborg
62526a3ac8 completions/git: Fix relative paths for older git
If the first file presented was in the current directory, this would
error out.

Fixes #5728.

[ci skip]
2019-03-08 16:03:57 +01:00
Fabian Homborg
eac9ec9093 Add vagrant completions
These aren't perfect, but the tool is pretty much hostile to proper
completions - it includes a "--machine-readable" option, but `vagrant
global-status --machine-readable` prints great output like

```
1551816037,,ui,info,id
1551816037,,ui,info,name
1551816037,,ui,info,provider
1551816037,,ui,info,state
1551816037,,ui,info,directory
1551816037,,ui,info,
1551816037,,ui,info,-------------------------------------------------------------------------
1551816037,,ui,info,d3ea265
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/oi-userland
1551816037,,ui,info,
1551816037,,ui,info,fdf42c4
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/vagrant/NetBSD
1551816037,,ui,info,
1551816037,,ui,info,f8f6eff
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/vagrant/fedora
1551816037,,ui,info,
1551816037,,ui,info, \nThe above shows information about all known Vagrant environments\non this machine. This data is cached and may not be completely\nup-to-date (use "vagrant global-status --prune" to prune invalid\nentries). To interact with any of the machines%!(VAGRANT_COMMA) you can go to that\ndirectory and run Vagrant%!(VAGRANT_COMMA) or you can use the ID directly with\nVagrant commands from any directory. For example:\n"vagrant destroy 1a2b3c4d"
```

and still takes 500ms to do so. The actual information is in a json
file, which we can't expect to read, and it doesn't have linebreaks or
such which we could use to hack-parse it.

So this is the best we can do for the most important bits (the
machineids), so let's just add this as-is.

[ci skip]
2019-03-05 21:02:32 +01:00
radek-sprta
261d48367d Add completions for Mariner (#5718)
* Add completions for Mariner

* Remove unnecessary characters
2019-03-03 20:25:31 +01:00
Fabian Homborg
8939a7ba7a completions/ipset: Don't error on loading
`ipset list --name` is a privileged operation, and it prints an
"Operation not permitted" error when done as a normal user.

What's worse, this did it on loading (the command substitution wasn't
quoted), so we'd print the error as soon as you did `ipset `.

Only do the operation when necessary, and don't print the error.

This'll effectively only make it work for root shells (not e.g. `sudo
ipset`), but I don't want to sprinkle `sudo` in the completion.

(Also why does listing stuff require root? That's not how it works
e.g. for ips. But I don't actually know what ipset is for, so maybe
there is a good reason.)

[ci skip]
2019-03-03 12:43:05 +01:00
Kevin Konrad
0f6b3fd9e4 add completions for cf and bosh 2019-02-25 09:00:42 -08:00
The0x539
e330dafd24 Improve completions for mkvextract
A key frustration with the prior version of mkvextract completions was
that even in a position where a filename would be expected, no
completions for a filename were offered. This update introduces more
rigorous argument handling, most importantly restricting
track/attachment completion to when both a mode and a file are
specified.
2019-02-24 21:17:10 -08:00
Collin Styles
195020ff89 screen: Add completions for -R and -RR options 2019-02-24 21:08:56 -08:00
Collin Styles
06f832aae1 Allow filename completion for screen
Screen commands can be passed an executable to run like:

$ screen -dR my_session /usr/bin/fish

This commit enables completion for that filename
2019-02-24 21:08:56 -08:00
Collin Styles
e475b1a375 Fix screen session name completion for non-Ubuntu distros
For some reason Ubuntu's version of screen includes timestamps in the
output of `screen -list`. The timestamps aren't present on other
distributions (tested on Fedora and Arch Linux), nor when building from
source. This commit fixes the regex so that with or without the
timestamp, fish will correctly show suggestions for screen sessions.
2019-02-24 21:08:56 -08:00
Fabian Homborg
f451499aa6 completions/valgrind: Fix option typo
Fixes #5688.

[ci skip]
2019-02-22 20:03:53 +01:00
Fabian Homborg
c6ec423513 completions/systemctl: Harden version comparison
Arch changed the version string to include the package rel, so it
looks like

    systemd 241 (241.7-2-arch)

which would break our simple `string replace` and `test`.

Fixes #5689.

[ci skip]
2019-02-22 20:00:08 +01:00
Fabian Homborg
50f6fa048e completions/sudo: Quote ?
This was treated as a glob where it was still enabled, most likely removing the "-E" option from argparse,
which caused `sudo -E` to not be parsed correctly, breaking completion.

(There was no error because the glob was used with `set`)

Fixes #5675.

[ci skip]
2019-02-20 22:30:29 +01:00
Fabian Homborg
59955391ad completions/yarn: Allow running scripts as subcommand
Fixes #5674.

[ci skip]
2019-02-19 14:24:02 +01:00
Collin Styles
8a0be93e50 Add completions for "git remote get-url" 2019-02-17 16:30:00 +01:00
Fabian Homborg
d48eb56aea Improve curl completions
Just a bunch of rewriting descriptions and some arguments.

Most arguments here are uncompleteable, and most of these options will
never be used.

[ci skip]
2019-02-16 17:01:02 +01:00
Fabian Homborg
dbeaa0c8de Add curl completion
Mostly copying the autogenerated stuff with some light description
cleanup.

Fixes #5664.

[ci skip]
2019-02-16 16:40:13 +01:00
Fabian Homborg
016d83c3fc completions/git: Handle MM files
These are files with staged modifications, and additional unstaged
ones.

In practice what happened was that you ran

   git add somefile

then editted it some more and tried to

   git add <TAB>

which didn't offer it anymore.

Now, we offer it if either modified or modified-staged is set.

Currently modified-staged isn't ever set alone, but through
all-staged, so we still need to keep offering the file then.

(This shows that the current switch/case might have some holes)

Fixes #5648.

[ci skip]
2019-02-12 16:59:44 +01:00
Aaron Gyes
0377198fc8 Drastically improve fish completions
* complete .fish files
* --debug -> --debug-level
* add --init-command/-C
* add --debug-stack-frames/-D
* add --private/-P
* add --features/-f: lists supported features, supports foo,<TAB>
* -c now completes commands
* -d requires argument, describes 0..5
* --profile: require argument, allow file completion
2019-02-09 22:48:15 -08:00
Aaron Gyes
1049bed5f8 string completions: add -e, -f, --no-empty, shorten -d's
I hope this is now complete.

Also, shorten enough descriptions to make `string match --<TAB>`
show a two column pager with 80 cols.

We really should have shown more retraint in the design of `string`,
not all of the flags required both a long and short option created.
2019-02-07 04:13:38 -08:00
Birger J. Nordølum
df375ea12d brew.fish: Add update-reset subcommand completion (#5608)
* brew.fish: Add `update-reset` subcommand

This command resets all tap's remotes to the latest available upstream.  Ideal for debugging before reporting bugs or just housekeeping.
 
Add missing newlines.

* Add `brew.fish` changes to CHANGELOG.md
2019-02-01 18:02:05 +01:00
raichoo
aebe040fdc document private mode in fish completion 2019-01-31 20:30:41 +01:00
Fabian Homborg
7eee158292 Don't test with one argument
[ci skip]
2019-01-27 15:38:03 +01:00
Fabian Homborg
1cad15b01f Stringify a few more completions
[ci skip]
2019-01-26 19:29:25 +01:00
Fabian Homborg
0640e7bae9 Move prt-get functions into the completion script
These were not used elsewhere.

Part of #5279.

[ci skip]
2019-01-26 19:16:25 +01:00
Fabian Homborg
882da75d29 Remove __fish_commandline_test function
This was only ever used in the commandline completions, and is
equivalent to (a weird example of) __fish_contains_opt.

Part of #5279.

[ci skip]
2019-01-26 19:16:12 +01:00
Fabian Homborg
1e3a46f423 Remove __fish_bind_test* functions
These were only used in the bind completions, so there's no need to
keep these two separate.

Part of #5279.

[ci skip]
2019-01-26 19:16:06 +01:00
wyahiro
e9f0a8cf2c Redo ant completions
Closes #5475
2019-01-23 18:00:21 -06:00
Fabian Homborg
432ed621fd completions/git: Don't sort tags or commits
Sorting these alphabetically just makes no sense, but takes time.

[ci skip]
2019-01-23 15:53:47 +01:00
Fabian Homborg
4af2a681b8 completions/git: Stop offering :/ files so much
Don't do it when the relative path is simple (purely descending),
unless the token starts with ":/".

Also stop offering directories - if they need to be disambiguated, the
normal completion logic will take care of that.

Fixes #5574.

[ci skip]
2019-01-23 14:03:38 +01:00
Aaron Gyes
23e94d8349 improve GNU patch completions
shorter descriptions that can fit in a terminal window, and option arguments added.

hide one option that is only functional on Cygwin unless we are on Cygwin
2019-01-21 22:37:45 -08:00
Aaron Gyes
3115446a07 string completions: add missing upper, lower, split0, join0, unescape
and --style=regex
2019-01-21 17:08:49 -08:00
takoyaki9n
db671e8518
Merge branch 'master' into ant_completion 2019-01-21 16:32:51 +09:00
Sam Yu
02c32c638f Fix completion of directories for configure 2019-01-17 10:13:27 +01:00
Aaron Gyes
fb74ccb1f2 set's color completions: remove Color description.
On `set fish_color_cwd <TAB>`, a bunch of named colors are
shown in the pager. Each and every one has a description of "Color".

These are all very obviously colors, and none are not colors,
the description does not tell us anything specific about the item.

Descriptions in situations like this are actually a hinderance
because of the way they cause less to fit into the pager. Remove it
2019-01-16 10:34:16 -08:00
Fabian Homborg
6d11e46428 completions/git: Also don't use files for porcelain=2
This was an oversight from the previous commit. Not that it matters
much, because we already removed $files.

Still, this would fail if someone defined a global $files, so let's fix it.

[ci skip]
2019-01-13 21:33:00 +01:00
Fabian Homborg
787f453ec2 completions/git: Skip "!" shell-aliases for wrapping
We can't complete these, and now the user can do

```
set -g __fish_git_alias_$alias $command
```

e.g.

```
set -g __fish_git_alias_co checkout
```

if the arguments in the alias end up going to `git alias`.

Fixes #5412.

[ci skip]
2019-01-13 17:20:10 +01:00
Fabian Homborg
73bae383e0 completions/git: Stop limiting to the token
This enables fuzzy-matching outside of the current directory again.

As it turns out, the performance impact here isn't as large as I
thought - it's massively dependent on caching.

Fixes #5476.
2019-01-13 17:05:05 +01:00
wyahiro
480e95147c use cache file for ant targets 2019-01-13 21:36:05 +09:00
Mahmoud Al-Qudsi
6ea7aa8a00 Share code between yarn and npm completions
I had previously introduced a lot of updates and fixes to npm registry
based completions for `yarn` but hadn't ported them to `npm` as well
(although they can be dropped in as-is). This patch shares the code
between the two, which resides in an explicitly sourced multi-function
fish script.
2019-01-10 23:12:49 -06:00
Mahmoud Al-Qudsi
56cedac3b5 Show info about all-the-package-names helper for yarn/npm completions
The informational message is only shown the first time an attempt at
completing `yarn add` is made per session. This should vastly improve
the discoverability of this feature as regular yarn/npm users would
never have `all-the-package-names` installed normally.
2019-01-10 23:12:49 -06:00
Mahmoud Al-Qudsi
848ca1c1cc Improve UX by not providing yarn completions if no input
Otherwise, the interface would hang while fish processed the output of
`all-the-package-names` and then would ultimately not show any results
anyhow.
2019-01-10 23:12:49 -06:00
Mahmoud Al-Qudsi
34e104ca35 Allow more flexibility with file completions for yarn
Closes #5502
2019-01-10 23:12:49 -06:00
Varun Arora
89d77df658 add missing tmux new-session flags to tmux completion script 2019-01-10 13:22:02 +01:00
Versus
9743cd77d3 yaourt: recognize *.pkg.tar as valid package extension 2019-01-10 13:13:59 +01:00
David Adam
b4365e972a status completions: tidy, add current-command, fish-path and aliases 2019-01-09 22:32:42 +08:00
wyahiro
a6062c4cdd improved completion for ant 2019-01-03 23:17:53 +09:00
Takuya Noguchi
7aca69780c Replace deprecated options with newly introduced options for gem.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-01-01 14:28:13 +01:00
Fabian Homborg
9dc79cd8d5 completions/screen: Replace eval with var-as-command
[ci skip]
2019-01-01 14:04:47 +01:00
Fabian Homborg
4b8da10215 completions/modinfo: Don't check uname
This checks if uname exists (we already call it elsewhere without
check, nobody has complained, uname is in POSIX), then calls to see if
it's "Linux", and only then offers any completions.

Since we don't have any other version to offer, the check is worse
than useless.
2019-01-01 13:57:32 +01:00
Curtis Jiang
f871951a87 fix OpenWrt and opkg support (#5454)
* add OpenWrt and opkg support

Signed-off-by: Curtis Jiang <jqqqqqqqqqq@qq.com>

* fix opkg list

Signed-off-by: Curtis Jiang <jqqqqqqqqqq@qq.com>
2018-12-31 16:48:03 +01:00
David Adam
05222a055a Merge branch 'Integration_3.0.0' 2018-12-28 22:10:49 +08:00
Mahmoud Al-Qudsi
fb679ac9c3 Add completions for pkg [info|show|list] 2018-12-23 20:06:25 -06:00
Fabian Homborg
e07b45f447 Revert "completions/git: Allow aliases with whitespace in the command"
This reverts commit 081e14fd21, which was bogus.
2018-12-15 11:13:38 +01:00
Fabian Homborg
081e14fd21 completions/git: Allow aliases with whitespace in the command
Fixes #5412.
2018-12-13 22:49:12 +01:00
Fabian Homborg
6d4eb96509 completions/git: Don't use status --ignored=something
Fixes it for git < 2.16.

Fixes #5396.

[ci skip]
2018-12-08 20:51:49 +01:00
Phuurl
46db332be5 Basic umask completion, and minor change to ulimit completion 2018-12-07 17:50:48 +01:00
ridiculousfish
6f33c0ccb5 Clean up some language and fix bogus escape in complete.fish 2018-12-03 23:14:01 -08:00
ridiculousfish
8521ce4cd2 Clean up complete completions
Closes #5381

Squashed commit of the following:

commit d70e3451ac
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 14:31:51 2018 -0500

    Update heading

commit ec44e8ed35
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 14:29:16 2018 -0500

    Update complete.fish

commit a7178ab163
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 00:46:42 2018 -0500

    Clean up completion descriptions

commit e6134ceeaa
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 00:26:42 2018 -0500

    Fix grammar

commit 0a805b1016
Author: TJ Rana <tj.rana@icloud.com>
Date:   Mon Dec 3 00:25:34 2018 -0500

    Add option descriptors

commit 608bb02e41
Author: TJ Rana <tj.rana@icloud.com>
Date:   Sun Dec 2 22:47:17 2018 -0500

    Fix spelling

commit 375593fef4
Author: TJ Rana <tj.rana@icloud.com>
Date:   Sun Dec 2 22:46:19 2018 -0500

    Add heading
2018-12-03 23:12:54 -08:00
Fabian Homborg
42ec4aa2dd completions/configure: Use first token ending in "configure"
Fixes #5376.

[ci skip]
2018-11-30 11:27:24 +01:00
Aaron Gyes
d065ff840d Fix switch statement 2018-11-25 07:50:10 -08:00
Aaron Gyes
4ceb21cf09 rm completions: update BSD options
lined up with {Open|Net|Free}BSD & Solaris manuals.
2018-11-25 06:08:24 -08:00
Aaron Gyes
a2212876a9 add a simple 'math' completion 2018-11-25 05:13:14 -08:00
Aaron Gyes
62c6a09f1c ls.fish: simplify the logic a little. 2018-11-25 03:43:53 -08:00
Aaron Gyes
c2ae163bfe ls completions: fix mistake. 2018-11-25 03:12:44 -08:00
Aaron Gyes
e89035d76c ls completions: Solaris too. BSD vs POSIX -o conflict fixes
- Solaris is super annoying
- Also, use ls not command ls:
  if I wrapped `gls` in a `ls` function, I'd want this.
2018-11-25 03:07:16 -08:00
Aaron Gyes
c1af29f641 __fish_config_interactive: tell complete that [ wraps test
We want to show our completions for the `[` (`test`) builtin, but
we don't want to create a [.fish.
2018-11-25 02:04:56 -08:00
Aaron Gyes
a4f27bea36 cp completions: Give not-GNU cp the floam treatment 2018-11-25 01:45:45 -08:00
Aaron Gyes
7d79d326b5 test completions: we accept floats now 2018-11-25 00:15:11 -08:00
Aaron Gyes
8d0e1f3bcc test completions: don't complete files for string tests, wrap [
also removed --help - test doesn't do that.
2018-11-25 00:08:59 -08:00
Aaron Gyes
cc3fd9cf8f mv completions: Correctness improvements and updates for GNU, BSD, Solaris mv
Reflect GNU mv from this decade,  and the options handled
by specific non-GNU OSes.
2018-11-24 23:32:44 -08:00
Aaron Gyes
ca46c556c3 ls completions: BSD fixes
`ls` was suggesting options that are are not valid for my system,
omitting options that are on my system. Different BSD OSes have
different option extensions, and some of them do conflict with eachother.

I carefully checked the manuals of netbsd, macos, freebsd, and openbsd
`ls` and made the completions show the right completions in full for them.

Some verbiage tweaks as well.
2018-11-23 10:31:51 -08:00
Mahmoud Al-Qudsi
31d17f4559 Rename string escape --style=pcre2 to string escape --style=regex 2018-11-16 20:22:06 -06:00
Mahmoud Al-Qudsi
ab0f1d33fe Make use of the new PCRE2 escaping feature
Fixes some potentially unsafe uses of direct substitution into regex
expressions and also switches some completions to regex-based now that
there is a safe way of using it.
2018-11-15 12:37:29 -06:00
Aaron Gyes
7437f82d92 obnam completions: use $hostname instead of (hostname) 2018-11-13 15:49:03 -08:00
Fabian Homborg
7257c69979 completions/string: Add escaping styles 2018-11-12 18:56:11 +01:00
Fabian Homborg
7a20e8d64d completions/busctl: Port to argparse
This is much faster!
2018-11-12 18:53:30 +01:00
Fabian Homborg
2d2f7c8fb1 completions/ip: Restyle
Just run `fish_indent` on the entire thing.
2018-11-12 16:28:24 +01:00
Fabian Homborg
15f089897d completions/ip: Add basic ip link set completions 2018-11-12 16:22:43 +01:00
David Adam
4b28e9d2e4 read: update completions to include --lines and --null
Does not include --all-lines pending discussion in #5332.
2018-11-12 23:13:41 +08:00
Mahmoud Al-Qudsi
34440165aa Add completions for openocd 2018-11-07 20:08:16 -06:00
Mahmoud Al-Qudsi
6b7501d715 Correct pandoc data directory path in completions
Incorrectly assumed that pandoc uses XDG_CONFIG_HOME, it turns out the
path is hard-coded as $HOME/.pandoc unless explicitly otherwise
specified in the command-line.
2018-11-07 18:34:50 +00:00
Fabian Homborg
4d4227e57f completions/git: Match files inside directories again
Fixes #5317.
2018-11-05 15:53:06 +01:00
Mahmoud Al-Qudsi
8ebf2b8f70 Improve pandoc completions
* Only suggest PDF engines that are currently installed
* Use XDG_CONFIG_HOME (after a fashion)
* Initialize lists as arrays instead of blind strings
2018-11-04 20:49:57 -06:00
Mahmoud Al-Qudsi
ffb4ab5ca8 Prevent pandoc completions from polluting global namespace 2018-11-04 20:38:59 -06:00
Mahmoud Al-Qudsi
11b0b23587 Add git remote remove completions 2018-11-04 14:36:51 -06:00
David Sanson
7926b69d15 Add completions for pandoc
Taken from https://github.com/dsanson/fish-completion-pandoc under the
GNU GPL as at 7195da6fc4bcbdd49ea63d47c27e4bfec2135660.

Closes #2937.
2018-11-04 21:22:58 +08:00
Mahmoud Al-Qudsi
b23bda8ed6 Only offer local branches for deletion in git completions 2018-10-30 05:14:20 +00:00
Mahmoud Al-Qudsi
1288877033 Update yarn completions
Don't attempt to complete against package names if the user is trying to
enter a switch to speed things up.

Also work around #5267 by not wrapping unfiltered `all-the-package-name`
calls in a function.
2018-10-29 13:56:40 -05:00
Clément Martinez
13c2b4cdc3 Improve virsh completions 2018-10-29 18:01:52 +01:00
Mahmoud Al-Qudsi
5ad292328a Add dynamic clang completions via clang --autocomplete
Use clang/clang++'s own autocompletion support to complete arguments. It
is rather convoluted as clang generates autocompletions for a portion of
the current token rather than the entire token, e.g. while `--st` will
autocomplete to `--std=` (which is fine by fish), `--std=g` will
autocomplete to `gnu...` without the leading `--std=` which breaks fish'
support for the completion.

Additionally, on systems where clang/clang++ is the system compiler
(such as FreeBSD), it is very often for users to invoke a newer version
of clang/clang++ installed as clang[++]-NN instead of clang. Using a
monkey-patched version of `complete -p` to support that without breaking
(future) completions for commands like `clang-format`.

Closes #4174.
2018-10-24 23:14:55 -05:00
Fabian Homborg
809998a9a5 completions/git: Use argparse
This is a tiny bit faster, but mostly it's more concise and extendable.
2018-10-24 12:26:01 +02:00
Fabian Homborg
381215ef07 completions/git: Let git glob files
Fixes #5229.
2018-10-24 12:22:31 +02:00
Mahmoud Al-Qudsi
ec2659c500 fixup! add makensis (#5242) 2018-10-16 13:50:42 -05:00
Mahmoud Al-Qudsi
c140b3c724 Add completions for git config
This includes dynamic completion of existing keys.
2018-10-14 18:17:23 -05:00
Mahmoud Al-Qudsi
9c6bd8b1b4 Add completions for kitty terminal
This is a wrapper that calls kitty to dynamically provide completions,
as generated by kitty itself, via `kitty + complete setup fish`.

ref: https://sw.kovidgoyal.net/kitty/#fish
2018-10-14 16:32:49 -05:00
Xuanwo
5e77689c5a completions: Add systemctl set-property support 2018-10-09 16:51:49 +02:00
Fabian Homborg
728dd25665 [completions/git] Add rebase --exec
Fixes #5236.
2018-10-08 15:43:45 +02:00
Fabian Homborg
0aedd47af2 [completions/env] Argparsify
This fixes subcommand completions by using argparse to get the
subcommand, just like we did for `sudo`.

Reported by @adregan on gitter
2018-10-02 19:31:30 +02:00
evuez
f3cee81338 Add --color completion for diff 2018-10-02 18:51:14 +02:00
Mahmoud Al-Qudsi
264d8270a7 Emit an error message on literal zero indices
Mostly resolves #4862, though there remains the lingering question of
whether or not to emit a warning to /dev/tty or stderr when a
non-literal-zero index evaluates to zero.
2018-10-01 20:58:26 -05:00
Mahmoud Al-Qudsi
5b696b5fb5 Update rsync completions
Closes #4863.
2018-10-01 20:37:53 -05:00
Fabian Homborg
3b3361685a [completions/git] Skip bare repositories
Otherwise this would print an unsightly error.
2018-09-27 13:18:26 +02:00
Digital
794b448c00 Add completions for openbsd's doas (#5196)
* Add completions for openbsd's doas

* Update CHANGELOG.md

* Implement requested changes
2018-09-25 12:31:46 +02:00
Mahmoud Al-Qudsi
deb6d477d4 Escape parameters in rustc completions
Closes #5057.
2018-09-20 18:59:57 -05:00
Sam Yu
17643ef12c Fix zypper completion
* complete installed packages only for `zypper rm`
* remove incorrect local file completion
2018-09-16 21:15:32 -07:00
Fabian Homborg
d44c21b580 Document/complete feature flags more 2018-09-16 10:39:15 +02:00
maxried
45a2ff4191 Update status.fish
Even though breakpoing sounds funnier, the completion should correctly be breakpoint.
2018-09-14 07:48:22 +08:00
Muttley
0f141b6ccf pacaur: recognize *.pkg.tar as valid package extension 2018-09-11 13:26:27 +02:00
Tang King Fai
0e6cc13d0d Update cargo completion (#5172)
* Update cargo completion

* Show sub-command's description for completion
2018-09-07 15:29:48 +02:00
Mo Zhou
add24f96a9 completions: ninja: "ninja -f" should be followed by a *.ninja file. 2018-09-07 08:00:37 +00:00
Curtis Jiang
06e5194092 add OpenWrt and opkg support
Signed-off-by: Curtis Jiang <jqqqqqqqqqq@qq.com>
2018-09-04 01:47:30 -07:00
Vicente Reyes
3e9453840f complete stack built binaries 2018-08-26 17:00:04 -07:00
Fabian Homborg
7606bfc2e5
Merge pull request #5145 from antonv6/hg-completion
[Ready] Update Mercurial completion
2018-08-17 16:34:35 +02:00
Anton Shestakov
1e58e00734 hg completion: complete directories for --cwd 2018-08-16 19:26:29 +08:00
Anton Shestakov
b3a00c5389 hg completion: add :forcedump and :tagmerge merge tools 2018-08-16 19:25:16 +08:00
Anton Shestakov
8aef4330f0 hg completion: complete hg convert, email 2018-08-15 14:13:16 +08:00
Anton Shestakov
af4da66515 hg completion: do a pass over mq 2018-08-15 12:21:16 +08:00
Anton Shestakov
fb6b4b9ae5 hg completion: revert can restore deleted files too 2018-08-15 12:20:12 +08:00
Anton Shestakov
cdf39ed660 hg completion: complete hg files, rebase, shelve, unshelve 2018-08-15 12:15:07 +08:00
Anton Shestakov
6223833130 hg completion: update command descriptions, add more 2018-08-15 12:14:11 +08:00
Anton Shestakov
a175aaa18a hg completion: new flags 2018-08-14 23:51:06 +08:00
Anton Shestakov
afff92c4b1 hg completion: update descriptions 2018-08-14 23:46:51 +08:00
Anton Shestakov
0ffbb657df hg completion: remove --style (deprecated for 4 years)
It still works, but is just an alias for -T/--template.
2018-08-14 23:42:16 +08:00
George Christou
b39651f1ad completions: [git] Silence various errors outside repo 2018-08-14 17:12:43 +02:00
Anton Shestakov
60e05d82c8 hg completion: fix -r and -x flags used for options
"Fixing" boils down to:

- removing -x from options that don't take arguments
- replacing -x with -r for options that want (any) file
2018-08-14 13:05:21 +08:00
Anton Shestakov
f95431362c hg completion: add more --subrepos 2018-08-14 12:47:18 +08:00
Anton Shestakov
27c06c997c hg completion: suggest files from hg st -amr for hg diff
Added and removed files are already suggested for hg commit, makes sense
to do the same for hg diff.
2018-08-13 14:58:03 +08:00
Anton Shestakov
a9c30b05af hg completion: complete abbreviations of hg archive (plus --type) 2018-08-13 14:53:17 +08:00
Anton Shestakov
99860c8294 hg completion: also complete hg blame (alias to annotate) 2018-08-13 14:52:38 +08:00
Anton Shestakov
c8c7fec48a hg completion: complete --color=debug too 2018-08-13 14:52:10 +08:00
Alexander Dalshov
00dcc2a12d add pstack completion 2018-08-06 23:20:55 -07:00
Clément Martinez
a536d2bc1f Add xclip completions 2018-08-04 12:00:18 -07:00
Birger J. Nordølum
c300e09e8c brew.fish: Fix brew casks search 2018-08-03 22:46:54 +08:00
Mahmoud Al-Qudsi
09541e9524 Add completions for hjson 2018-07-30 14:38:00 -05:00
Mahmoud Al-Qudsi
392cdd4338 Show a meaningful description of packages in __fish_print_packages
Use `apt-cache show` instead of `apt-cache packagenames` to efficiently
print package names and a brief description instead of the placeholder
(localized) "Package" text that was previously printed. This applies to
both available and installed packages (for inistall and remove operations,
respectively).

TODO: update `__fish_print_packages` for non-debian platforms to do the
same.
2018-07-28 17:44:17 -05:00
Clément Martinez
32ca6118a6 Add virsh completions 2018-07-28 14:44:11 -07:00
raichoo
d4f5689eaa modernize darcs completion
`darcs` has changed a lot in recent years. The completion is no longer
up to date.
2018-07-28 13:10:13 -07:00
raichoo
eb3541be86 add more options to set completion 2018-07-24 20:29:36 +08:00
Twinkle
8440d9ba86 Improve completions for serve 2018-07-24 00:22:13 -07:00
raichoo
b932522138 add more options to psub completion 2018-07-22 15:23:16 -07:00
James Lee
e26bdff487 Improve eopkg completions by using the --installed flag (#5089)
Utilized the `--install` flag added in commit #8c09d6e.

Limit `eopkg remove/autoremove/check ...` completions to installed packages.
Limit `eopkg install/upgrade/info ...` completions to available packages.
2018-07-09 23:21:44 -07:00