Commit Graph

3155 Commits

Author SHA1 Message Date
Jason Nader
b2969f4dfb Fix typo in mplayer completions 2020-01-25 08:36:15 +01:00
Jason Nader
5bfb6fef76 Stringify __fish_pwd.fish 2020-01-24 19:05:08 +01:00
Jason
2a247c7fe5 Stringify ssh completions (#6529)
* Stringify ssh completions

* Fix completions for `-b` option

* Fix completions for `-b` option
2020-01-24 18:29:17 +01: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
Johannes Altmanninger
0c92c7d8ac Fix remote path escaping for rsync and scp completions
They need to be escaped twice, for the local and the remote shell.
Also don't suggest local files as rsync remote paths (-a -> -xa) and
fix completion for remote paths containing multiple consecutive spaces.

Fixes #1872
[ci skip]
2020-01-13 10:30:57 +01:00
Johannes Altmanninger
e3782603ec Load vendor configuration from $XDG_DATA_DIRS/vendor_*.d
$XDG_DATA_DIRS/vendor_{completions,conf,functions}.d
Additionally, CMake variables extra_{completions,conf,functions}dir are
appended, if they are not already contained in $XDG_DATA_DIRS.

If XDG_DATA_DIRS is not defined, we fall back to

$__fish_datadir/vendor_completions.d:${extra_completionsdir}

for completions. Same for conf and functions.
2020-01-12 16:12:41 +01:00
239
0acaf766a2 Update Keybase completions (#6479)
* Update Keybase completions

* Apply suggested change for filtering options
2020-01-10 17:12:12 +01:00
Fabian Homborg
f637b81fb6 sample_prompts/acidhub: Use prompt_pwd
This removes a call to `sed` and allows the user to specify shortening
via the variable.

We still default to disabling shortening because this prompt never
did.

[ci skip]
2020-01-06 18:41:50 +01:00
Guilhem Saurel
9910ee26cd disable virtualenv prompt update in nim prompt
As this information is already wrapped into a _nim_prompt_wrapper
2020-01-06 17:06:24 +01:00
Fabian Homborg
611a6589ea Disable command descriptions on macOS 10.15.X
We just do a cheesy version check and hope it works out.

If this is fixed in 10.15.4, we have to reenable it. If it still isn't
fixed in 10.16, we need to adjust it.

Fixes #6270
2020-01-05 18:35:59 +01:00
Aaron Gyes
c1140bc436 Improve kill completions
Use string split instead of cut - which we'd fork for 2*signal
count times in a loop when tab was first pressed. Noticably faster

If giving a signal num, what works everywhere is -NUM, if giving
a signal name, what works everywhere is -s NAME - don't show -sNUM
or -NAME completions; that only works on GNU and it's redundant
anyhow as we show the signal number in the description field for -s
or the signal name for the -NUM case in the pager.

Sort -sNAME completions by the signal number not alphabetical

Shorten descriptions
2020-01-02 22:53:28 -08:00
Fabian Homborg
4a47e212f8 Color the default prompt host if running via SSH
This is part of our (well, my) quest to spice up the default prompt.

In this case we color the host if $SSH_TTY is set, which is easy to
detect and helps draw attention to the host.

See #6398.
See #6375.
2019-12-30 14:03:36 +01:00
Johannes Altmanninger
0afc5258cf Unify detection of fish version upgrade with $__fish_initialized
This variable holds an integer that resembles the fish version up to
that initializations were performed. It should be incremented whenever
some new initialization is required after upgrading fish.  This should
not change the behavior for existing fish installations, except for a
minor message on installations that upgrade from fish<2.3.0.

[ci skip]
2019-12-30 14:00:22 +01:00
Fabian Homborg
d0edd984d5 Let pacman-derived tools complete zst as well
Arch is switching to zst as the default compression method
2019-12-28 17:10:23 +01:00
Fabian Homborg
b0e3cc4b5c __fish_complete_suffix: Remove eval
This use of eval is unsafe, not really all that useful and can spew
errors that can't be suppressed. So let's remove it, and in future add
a thing that can do expansions in a safe manner

Fixes #6456.
2019-12-28 17:10:23 +01:00
Fabian Homborg
0866013280 Stop using __fish_complete_suffix with a braced argument
__fish_complete_suffix accepts a first argument containing a
brace-expansion, like

    __fish_complete_suffix '.{c,cpp,py}'

We're gonna be removing the `eval` that does that shortly, so let's
remove all uses in our code.
2019-12-28 17:10:23 +01:00
Fabian Homborg
0e0d63c0df completions/pipenv: Really force it to print fish completions
"To assume" and such.

It doesn't check $SHELL, so it might have some other automagic that
can fail (probably still because of the login shell, but I have no
idea).

Override the special variable that
click-completion (https://github.com/click-contrib/click-completion)
uses to force it instead.

Really fixes #6454.

[ci skip]
2019-12-25 16:29:10 +01:00
Fabian Homborg
aba5beaeb4 completions/pipenv: Force it to print fish completions
This checks $SHELL to determine which completions to print, and $SHELL
is typically set by your login program.

So if the login shell isn't fish, this will print the wrong
completions.

Fixes #6454

[ci skip]
2019-12-25 16:16:08 +01:00
Sergei Morozov
624e76ae89 Added the --cleanup option completion for the git commit command 2019-12-21 20:03:54 +01:00
Johannes Altmanninger
6dd9e50f82 time: complete external time options only if available 2019-12-21 11:56:06 +01:00
Johannes Altmanninger
feb87bbda8 __fish_man_page: ignore prefixing variable assignments 2019-12-19 23:44:58 +01:00
Fabian Homborg
22b2dbd97d functions/history: X is incompatible with SDMV, not C
"-C" is short for "--case-sensitive", which is entirely okay with "--delete".

The one that isn't okay is "-X", which is short for "--Clear".

Seen on gitter.im
2019-12-19 20:59:17 +01:00
Mahmoud Al-Qudsi
364929e46e Disown first-run python completions generation
Closes #6269.
2019-12-18 14:12:49 -06:00
Jason
48bf3a4907 Delete __fish_sgrep.fish 2019-12-18 13:17:54 -06:00
Mahmoud Al-Qudsi
6dc8a1d3a7 Partially address #6340 (escape files starting with -)
This prefixes files beginning with `-` with a `./` when generating
completions *in fish code*. Standard completions for directory listings
generated by the C++ directory traversal code are not afected by this
patch.

Most fish completions defer to `__fish_complete_suffix` to generate the
file/directory completions, these *will* be corrected.
2019-12-18 13:13:23 -06:00
Collin Styles
012773436e Suggest unique remote branches for git-switch
From the `git-switch` documentation:

If <branch> is not found but there does exist a tracking branch in
exactly one remote (call it <remote>) with a matching name, treat as
equivalent to

   $ git switch -c <branch> --track <remote>/<branch>
2019-12-14 09:50:48 +01:00
Collin Styles
afd8fc3cdf Correctly suggest files for git-restore when --staged is present
Previously we would include all modified, deleted, and unmerged files
regardless of what options are present.
2019-12-14 09:50:48 +01:00
Collin Styles
48bf689358 Add completions for git-cherry-pick sequencer subcommands 2019-12-14 09:50:48 +01:00