Commit graph

3037 commits

Author SHA1 Message Date
Z. Grace Moreau
35bc811310 add completions for plutil 2019-11-10 22:19:15 +01:00
Sam Yu
ffb4f7a4ff Update zypper completion
- update options to the newest version
- re-format and align
2019-11-10 22:17:00 +01:00
Clément Martinez
82227b8854 Add apt install --reinstall completion 2019-11-09 22:40:20 +08:00
Johannes Altmanninger
270fd14b00 Fix typo
[ci skip]
2019-11-08 11:40:03 +01:00
Johannes Altmanninger
0e4a75c0b5 Do not print greeting with empty $fish_greeting and --private
Fixes #6299

[ci skip]
2019-11-08 11:09:33 +01:00
Johannes Altmanninger
5c3e43bc0c vi mode: make return key in replace mode insert a newline
Fixes #6298

[ci skip]
2019-11-08 10:51:58 +01:00
Johannes Altmanninger
d242ff1808 Add description for automatic fish_update_completions job
See #6269
2019-11-07 23:33:35 +01:00
Collin Styles
422e2dcbdd Add completions for rustup doc
[As of rustup 1.20][1], users can give a topic as an argument to `rustup
doc` to open the relevant documentation page in a browser. This commit
adds completions for these topics to assist users in finding what
they're looking for.

[1]: https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html#improvements-to-rustup-doc
2019-11-07 18:48:19 +01:00
Johannes Altmanninger
35115d3d54 __fish_print_help: do not read $LESS 2019-11-07 17:45:54 +01:00
Johannes Altmanninger
08eac28bd8 Add individual documentation pages for string's subcommands
This adds string-x.rst for each subcommand x of string. The main page
(string.rst) is not changed, except that examples are shown directly after
each subcommand.  The subcommand sections in string.rst are created by
textual inclusion of parts of the string-x.rst files.

Subcommand man pages can be viewed with either of:

```
man string collect
man string-collect
string collect <press F1 or Alt-h>
string collect -h
```

While `string -h ...` still prints the full help.

Closes #5968
2019-11-07 09:54:25 +01:00
Christopher Rogers
b089a579bd
Fix typo in git clean completion 2019-11-07 15:32:43 +09:00
Jakub Darul
3b4234a9de added d0 to vi keybindings 2019-11-06 18:18:43 +01:00
James Stidard
16bf98f928 Fix: equality vs identity
Changes identity `is` for equality `==` check. To remove python warnings when updating auto complete

```
/usr/local/Cellar/fish/3.0.2/share/fish/tools/deroff.py:770: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(comps) is 2:
/usr/local/Cellar/fish/3.0.2/share/fish/tools/deroff.py:954: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(comps) is 2:
Parsing man pages and writing completions to /Users/james/.local/share/fish/generated_completions/
  6155 / 6155 : zic.8
```
2019-11-06 14:13:21 +08:00
Johannes Altmanninger
04c912e0e3 Fix typo, closes #6289
[ci skip]
2019-11-05 13:32:41 +01:00
Johannes Altmanninger
4f1fa9513c Make most subcommand completions take external commands only
Also fix ssh completions which were broken by
277fca9c6a.
2019-11-05 11:47:05 +01:00
Johannes Altmanninger
36693e4391 Complete empty subcomands consistently
If the command is empty, try to complete starting from the empty command
instead of the whole commandline.
2019-11-05 09:05:46 +01:00
Johannes Altmanninger
afb56a007d Fix completions for env
Fixes #5306
2019-11-05 08:44:04 +01:00
Fabian Homborg
e893c8ca97 Revert "Set fish_clipboard_paste handler once on startup"
This reverts commit f620ddf03b.

Setting the paste handler isn't performance-sensitive.

On the other hand setting it this way makes things less transparent,
less flexible (if e.g. a paste handler is installed while the shell is running),
and causes #6286.

Fixes #6286.

[ci skip]
2019-11-04 20:47:58 +01:00
Johannes Altmanninger
6fb7f9b6b8 Fix completion for builtins (with subcommands)
Presently the completion engine ignores builtins that are part of the
fish syntax. This can be a problem when completing a string that was
based on the output of `commandline -p`.  This changes completions to
treat these builtins like any other command.

This also disables generic (filename) completion inside comments and
after strings that do not tokenize.

Additionally, comments are stripped off the output of `commandline -p`.

Fixes #5415
Fixes #2705
2019-11-04 16:44:51 +01:00
LawAbidingCactus
19b59fc54e minor fixes to version-specific completions 2019-11-03 21:37:57 +08:00
Z. Grace Moreau
dd1f8489a7 add -o/--old to __fish_seen_argument 2019-11-02 14:48:57 -07:00
Johannes Altmanninger
dfc1d1931d Add /usr/local/sbin to PATH for sudo completions
[ci skip]
2019-11-01 17:20:09 +01:00
Johannes Altmanninger
e0d4a1d78b Fix sudo/doas completions not using /sbin
Fixes #6259
[ci skip]
2019-11-01 21:24:03 +08:00
David Adam
713c8f2d32 gpg completions: add further options
Restores work from #6251 wiped out by merge.
2019-11-01 21:16:24 +08:00
Fabian Homborg
9380b7ff39 history: Use --contains by default for "delete"
This just makes more sense, as people don't want to enter exact
matches if they delete interactively.

It also brings it in line with "search".

Fixes #6142
Rejects #6070
2019-11-01 08:53:24 +01:00
Roman Beranek
c2dbe36e4a scp completions: remove inappropriate opt '-q' from string match -eq cmd 2019-10-31 18:32:28 +01:00
Fabian Homborg
8acff328e0 svn_prompt: Check for svnversion
MacOS Catalina apparently ships a stripped down svn that doesn't have
`svnversion`, which we use to print the revision.

For now skip the entire step to remove error spam.

Fixes #6267.

[ci skip]
2019-10-30 21:45:50 +01:00
Johannes Altmanninger
20314c5b3d completions/git: improve diff completions
Offer commit ranges only if left of a --.
Suggest added files in git diff --cached (or the --staged synonym)
Fixes #6262
2019-10-30 12:09:38 +01:00
Johannes Altmanninger
deefdaec57 Use the new &| in __fish_paginate 2019-10-29 20:48:10 +01:00
Johannes Altmanninger
f4b4ff63b9 completions/git: honor global git arguments like --git-dir
Fixes #6219
2019-10-29 19:15:35 +01:00
Johannes Altmanninger
4095247deb completions/git: some improvements 2019-10-29 19:13:31 +01:00
Amy Grace
ba56a2ec0e Add completions for irb (#6260) 2019-10-29 19:11:25 +01:00
LawAbidingCactus
21a6a192ae refactor gpg.fish completions
refactor gpg completions into functions
comment changes; improve gpg version detection

[ci skip]
2019-10-29 19:07:35 +01:00
Johannes Altmanninger
97d031e20c reformat 2019-10-28 18:36:07 +01:00
Johannes Altmanninger
61486954bc Use a pager to view long outputs of builtin --help
Every builtin or function shipped with fish supports flag -h or --help to
print a slightly condensed version of its manpage.
Some of those help messages are longer than a typical screen;
this commit pipes the help to a pager to make it easier to read.

As in other places in fish we assume that either $PAGER or "less" is a
valid pager and use that.

In three places (error messages for bg, break and continue) the help is
printed to stderr instead of stdout.  To make sure the error message is
visible in the pager, we pass it to builtin_print_help, every call of which
needs to be updated.

Fixes #6227
2019-10-28 18:36:07 +01:00
Akatsuki
446735af07 completions/btrfs.fish: Format options list
Format the list of completion per command
Easier to read and edit at next time if need
2019-10-27 16:47:48 -07:00
Akatsuki
b43f80e2d9 completions/btrfs.fish: Add detailed options completions
Add completion for options in option groups
Remove myself author information
2019-10-27 16:47:48 -07:00
Clément Martinez
756e9826bc Improve gpg completions 2019-10-27 13:22:24 -07:00
Mahmoud Al-Qudsi
f620ddf03b Set fish_clipboard_paste handler once on startup
Instead of searching each time.
2019-10-27 12:40:53 -05:00
Mahmoud Al-Qudsi
ae6bdfa37c Handle empty clipboard for all providers
Closes #6254
2019-10-27 12:38:52 -05:00
Johannes Altmanninger
56b4763c67 Fix file completion for builtins "set" and "test -f" and others 2019-10-27 08:07:54 +01:00
Johannes Altmanninger
40c553db29 Fix completion scripts for builtins "exec" and "not" 2019-10-27 06:58:20 +01:00
Johannes Altmanninger
4a1edbd3cb make completions for ninja aware of the build directory passed by -C 2019-10-27 06:58:20 +01:00
Jan Tojnar
9d1ccf8110 Fix composer completions on Python 3
Some distros (Arch) use python command for Python 3, so we need to update the scripts to work with it. We cannot just switch to python3 command because MacOS does not ship it.
2019-10-26 18:19:44 +02:00
Akatsuki
b89a6451a3 functions/__fish_print_hostnames: Fix ssh_configs no values return (#6236)
* functions/__fish_print_hostnames: Fix ssh_configs no values return
`string replace` not working with mutlilines variable.
So split per line first.

* functions/__fish_print_hostnames: remove quotes at `split '\n'`
"\n with quotes" will cause `string split` weird issues.

* functions/__fish_print_hostnames: using `read -alz -d \n`
Fix `$contents` issues together
2019-10-26 18:17:52 +02:00
Lior Stern
5b2250883a Add termux support for fish_config. 2019-10-26 18:16:54 +02:00
Akatsuki
0ef6a136e8 completions: add btrfs (#6243)
* completions: add btrfs
Completion definitions for the btrfs-progs.

* completes/btrfs.fish: using `not set -q argv[1]` instead of `test -z $argv`

* CHANGELOG: add btrfs completions
2019-10-26 18:15:42 +02:00
Shun Sakai
3e28ab454f Rename long option of bzip2
From `--bzip` to `--bzip2`
2019-10-26 18:13:54 +02:00
Shun Sakai
7ce38a1ee6 Add supported compression algo to completions for tar
- lzip (--lzip)
- LZMA (--lzma)
- lzop (--lzop)
- Zstandard (--zstd)
2019-10-26 18:13:54 +02:00
Z. Grace Moreau
4be30a872a add completion for nethack 2019-10-26 18:13:15 +02:00