Commit Graph

3179 Commits

Author SHA1 Message Date
Fabian Homborg
6c4cf69110 completions/git: Only use first line of alias as the description
This was a weird one. We split the aliases correctly even with
multiple lines, but then broke it all again when we just printed the
description.

Note that it would be possible to use `string split0` here, but since
anything longer than a line is likely too long for a description
anyway we don't bother.

Fixes #6946.

(cherry picked from commit 1988bd2579)
2020-04-26 23:10:53 +08:00
Jouke Witteveen
1643cf40fb systemctl completions: Use --plain where appropriate
The --plain flag drops the '●'-glyph and generally makes the output more
suitable for automated processing.

(cherry picked from commit 93b86bbe63)
2020-04-25 23:48:10 +08:00
Fabian Homborg
d9cf1be4b7 fish_clipboard_copy: Stop adding newlines
When this switched over from directly piping commandline to storing
its output and using printf, I inadvertently always added a trailing
newline. That's probably annoying.

Note that this will now always *remove* a trailing newline (because
the command substitution does). That will barely make a
difference (because trailing newlines are quite unusual in the
commandline) and will probably feel better than keeping it - we could
even make a point of removing trailing whitespace in general.

Fixes #6927

(cherry picked from commit 6ebbe5a450)
2020-04-25 23:27:14 +08:00
Jason
5f6e43df6a Stringify ssh completions (#6529)
* Stringify ssh completions

* Fix completions for `-b` option

* Fix completions for `-b` option

(cherry picked from commit 2a247c7fe5)
2020-04-25 23:25:51 +08:00
Johannes Altmanninger
d4462912e6 Restore directory completions for subcommands
Fixes #6798

This re-adds some false positives: functions, builtins and abbreviations
are suggested after commands like sudo but I don't think anyone had
complained about that.

(cherry picked from commit 2a89873e6d686fcff1d26d0914a8b9f90b7cc308)
2020-03-24 20:17:29 +01:00
Fabian Homborg
8c9b4d9000 completions/systemctl: Remove annoying marker
The output of

systemctl list-units

seems to include a marker of '●' or '*' for some units, even if the
output is not going to a terminal and "--no-legend" and "--no-pager"
are given. This appears
to be a recent development, and there does not appear to be a flag to
disable it.

So we simply filter it out in the completions to once again hopefully
offer the actual units.

Fixes #6740
2020-03-12 18:34:42 +01:00
Fabian Homborg
62525ab6b2 help: Always use xdg-open if available
Even if $DISPLAY is unset, xdg-open can be useful, and on systems that
have xdg-open, "open" is most likely some god awful outdated thing
called "openvt" elsewhere.

Fixes #6739

[ci skip]
2020-03-12 17:29:29 +01:00
Johannes Altmanninger
2488152f28 completions/zfs: finish renaming from 05038fc8
(cherry picked from commit 660182cfb3)
2020-03-08 10:02:05 +01:00
ridiculousfish
4522f5cacb Use self-insert-notfirst on spaces during paste
This changes a5a643f854 to use the new self-insert-notfirst binding.
It also adds a test.
2020-03-07 14:04:05 -08:00
Johannes Altmanninger
6d907a9346 Make default hg prompt leaner
The default hg prompt is slow on large repositories (hg status takes
2-3 seconds on mozilla-central) which is unacceptable as a default.

Mimick our git prompt: by default, only show the current branch.
If the new variable $fish_prompt_hg_show_informative_status is set,
then use the old behavior.

[ci skip]

(cherry picked from commit da7b762f4a)
2020-03-07 13:04:43 +01:00
Fabian Homborg
c37a425887 Disable svn prompt by default
This is apparently quite slow on large svn repos (like 40 seconds
slow), and we don't have a good thing to display other than the full
file information.

So we'll have to disable it for now.

Fixes #6681.

[ci skip]
2020-03-05 17:11:51 +01:00
Fabian Homborg
90a780b57d fish_print_hostnames: Fix multiple host aliases
Fixes #6698.

[ci skip]
2020-03-03 18:28:27 +01:00
Jason Nader
33f55e05d0 Prevent prompt from spewing errors if cwd has disappeared 2020-03-03 18:12:19 +01:00
Fabian Homborg
298f43b62e completions/git: Work around read trimming whitespace
Since #6406, read will trim whitespace before the last variable.

In this case there is only one variable, and the line looks like

 M CHANGELOG.md

so it does indeed start with whitespace, and the whitespace is quite
significant.

Fixes #6650.

[ci skip]
2020-02-25 19:08:07 +01:00
Fabian Homborg
118f5e4485 completions/optipng: Add missing quote
Oops!

This should be in 3.1.1!

cc @zanchey

(cherry picked from commit 63b4a891ff)
2020-02-22 17:22:35 +01:00
Daniel Zhang
fb84c137b5 Fix variable leaking in completion kill
(cherry picked from commit ff29d81532)
2020-02-22 23:33:31 +08:00
Fabian Homborg
ec07ad323c completions/npm: Allow files for "install"
Fixes #6596

[ci skip]

(cherry picked from commit 56040d2d7f)
2020-02-22 23:30:48 +08:00
David Adam
5c1cf0619a drop rg and bat completions
These are shipped upstream.

Closes #5822.

(cherry picked from commit f036d01961)
2020-02-22 23:30:48 +08:00
Ian Brunelli
6b723e0f2c Simplify flatversion extraction 2020-02-20 21:37:56 +01:00
Ian Brunelli
26a56277d8 Add description to flatpak remote completion 2020-02-20 21:24:04 +01:00
Ian Brunelli
f247bb8a14 Add completion for flatpak enter and kill 2020-02-20 21:24:04 +01:00
Ian Brunelli
cd2be9c22f Some cleanup as suggested 2020-02-20 21:24:04 +01:00
Ian Brunelli
ef715dd47a Add completion for new flatpak commands 2020-02-20 21:23:59 +01:00
Maksim Novikov
2e709dc58c Include special characters in conda env names
Allows completion for environments with names containing special
characters. For example: my-env, myenv.1, myenv+1
2020-02-11 18:28:55 +01:00
Collin Styles
3a5eb6151d Correct list-language to list-languages in bat completions 2020-02-10 21:39:27 +01:00
Geoff Nixon
6866f8e6b5 Avoid apropos on macOS 10.15 with man completion
Same issue occurs here, as in #6270 (and fixed in 611a658 for `__fish_describe_command.fish`). Same reason. I've just copied the same workaround and changed the function name to match.

(cherry picked from commit f7edfba5d7)
2020-02-07 20:53:09 +08:00
David Adam
ee3f0b19b4 config.fish: skip path modifications if tests running
Closes #6556.
2020-02-06 12:48:08 +08:00
239
3e08083d49 Add completions for loginctl and resolvectl (#6501)
* Add completions for loginctl and resolvectl

* Add #6501

* Fix optional arguments

* Remove placeholder arguments
Fix expected arguments
2020-01-24 18:27:47 +01:00
Aaron Bieber
903fe9de48 webconfig: Use tempfile instead of ~/.cache (#6522)
OpenBSD uses [unveil(2)](https://man.openbsd.org/unveil) in chromium and
firefox. This means that things outside of directories like ~/Downloads or /tmp are not visible to the
browsers.

Change webconfig so it uses tempfile.NamedTemporaryFile to create our temp file.
2020-01-23 19:52:26 +01:00
Jason Nader
a5d625d389 Stringify j.fish 2020-01-22 17:43:18 +01:00
Jason Nader
2323a5629c Stringify netctl completions 2020-01-22 17:41:43 +01:00
Jason Nader
1cafc4eff6 Amend comments incorrectly referring to sed 2020-01-22 17:40:31 +01:00
Aaron Bieber
0918b537ac Get the list of VMs in a less fragile way. 2020-01-22 16:48:02 +01:00
Fabian Homborg
d61c188c3c Fix xdg mimetype completion
This hung when no file existed, and failed to properly find the
directories if they didn't end in a "/".

Fixes #6525

[good for 3.1.0]
2020-01-22 16:33:56 +01:00
Jason Nader
6fb545cf9b Stringify gpg completions 2020-01-21 17:57:57 +01:00
Jason Nader
13a26a1c65 Remove dropbox completions 2020-01-21 16:57:27 +01:00
Jason Nader
103a26ffb1 Fix function output on FreeBSD/Cygwin systems 2020-01-21 16:55:37 +01:00
Fabian Homborg
4e931fd967 completions/kill: Offer -SIGNAME
E.g. "kill -HUP".
2020-01-20 17:51:59 +01:00
Fabian Homborg
1480865d52 Stringify make_completion_signals 2020-01-20 17:51:59 +01:00
Fabian Homborg
acefa61e8b Hardcode signal names/numbers on cygwin
Work around weirdness in Cygwin's kill implementation.

Fixes #6469.
2020-01-20 17:51:59 +01:00
Jason Nader
f63ae0fb4d Add missing comment to bower.fish
Same comment found in yarn.fish
2020-01-20 19:45:21 +08:00
Fabian Homborg
0e5846ee38 completions/fish: Rename debug-level
This was renamed to just "--debug", but missed in the completions.

See #5910

[ci skip]
2020-01-19 13:28:21 +01:00
Fabian Homborg
d972623191 Fix vendor paths without $XDG_DATA_DIRS
We'd use $__fish_data_dir, but that already had the "/fish" component,
and then we'd add it again later, so we would try to find vendor
functions in places like

/usr/share/fish/fish/vendor_functions.d

which obviously don't exist.

Instead let's add the "/fish" component to the xdg dirs early, which
also saves us from having to repeat it later.

Fixes #6428
See #6508

[ci skip]
2020-01-19 09:28:56 +01:00
Shun Sakai
f04536637d Add keepassxc-cli completions 2020-01-18 12:27:04 -08:00
Greg Anders
e143618aef Set base16 colors for operator, escape, and match 2020-01-18 12:16:19 -08:00
Greg Anders
1331b32cce Add Base16 color options to fish_config 2020-01-18 12:16:19 -08:00
Shun Sakai
8c725c7d54 Add chronyc completions 2020-01-14 17:17:28 +01:00
Shun Sakai
316bb88ee7 Add hwinfo completions 2020-01-14 17:17:28 +01:00
Fabian Homborg
69b464bc37 Run fish_indent on all our fish scripts
It's now good enough to do so.

We don't allow grid-alignment:

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z              -a '(something)'
```

becomes

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z -a '(something)'
```

It's just more trouble than it is worth.

The one part I'd change:

We align and/or'd parts of an if-condition with the in-block code:

```fish
if true
   and false
    dosomething
end
```

becomes

```fish
if true
    and false
    dosomething
end
```

but it's not used terribly much and if we ever fix it we can just
reindent.
2020-01-13 20:34:22 +01:00
239
56f52bc693 Add completions for cryptsetup (#6488) 2020-01-13 10:47:52 +01:00