Commit Graph

15353 Commits

Author SHA1 Message Date
Missu
ff882d8326 Add asd completion
This is `anything-sync-daemon`
2022-03-05 20:49:43 +01:00
Missu
1da25fd916
Add completion for rc-status (#8757)
`rc-status` is part of OpenRC
2022-03-05 20:49:21 +01:00
Fabian Homborg
c1900ed41c Disable history race test on Github Actions
Same as ever: Flaky test, makes reviews more annoying. It should be
fixed, but until that happens it's better not to have it fail in
unrelated PRs.
2022-03-05 18:36:26 +01:00
Fabian Homborg
456359f78d CHANGELOGGE 2022-03-03 12:20:03 +01:00
Ilan Cosman
6c846cc256 Changelog for 3.4 2022-03-03 12:18:45 +01:00
Fabian Homborg
f284cdce5b Make byte/unicode escapes with no digits a tokenizer error
This is the simple fix - if we have no valid digit, we have nothing to
return. So instead of returning a NULL, we return an error.

This is already the case for invalid octal escapes (like `\777`).

Fixes #8545
2022-03-03 12:18:13 +01:00
lelgenio
02c34a30eb completions/sv.fish: update completion for sv, a part of runit.
This should fix finding the correct active svdir in most cases.

Search for services in the following order:

$SVDIR                      - User defined override
/run/runit/runsvdir/current - Value patched in by Void[1]
/run/runit/service          - Value patched in by Artix[2]
/etc/service                - Value patched in by Debian[3]
/services                   - Default value for runit[4]

Also don't use /etc for searching since it is not guaranteed that there
is an instance of runsvdir running in that directory.

Finally return quietly if there is no svdir.

[1] 75403cef76/srcpkgs/runit/template (L29)
[2] c9d691ce86/x86_64/core/PKGBUILD (L9)
[3] https://sources.debian.org/src/runit/2.1.2-41/debian/patches/0001-default-directory-for-services-on-Debian-is-etc-servi.diff/
[4] hard-coded in sv.c

Closes #8738
2022-03-02 22:14:50 +01:00
Martin Pool
c0be74c55a Better documentation of forward-char and friends
This makes it match the code in reader.cpp, and explains why the default
binding of `right` accepts the complete line.

Closes #8748
2022-03-02 21:18:29 +01:00
Fabian Homborg
7555391790 Make a bit wider with less padding 2022-02-27 18:01:29 +01:00
Fabian Homborg
68f099d804 Webconfig: Go to small-screen mode earlier
Since the color previews are now wider, we had quite a wide range
where there would only be one. Remove the border around the content
earlier so windows with 1000px width still get two previews in a row.

(making the text shorter would also be an option here)
2022-02-25 18:27:17 +01:00
Fabian Homborg
0614f507ff Webconfig: Make colorscheme samples nicer to read
This makes the container fit the content, otherwise we'd be cutting
off the "> quack &" part of the first line.

Also while we're here increase the line-height a bit to give it more
breathing room, and increase the font size juuust a smidge.

Reduce margins and increase padding to make it less cramped.
2022-02-25 18:18:43 +01:00
Fabian Homborg
615ea22387 Doc theme: Use code font for in-line commands as well
This makes them stand out a bit more
2022-02-24 18:12:22 +01:00
Fabian Homborg
05ac24006e Doc theme: Rationalize line-height/margin
Now all based on multiples of 1em.
2022-02-24 18:01:25 +01:00
Fabian Homborg
6fcb6f77be Revert changes to time formatting
This reverts commits:

2d9e51b43e
d1d9f147ec
346ce8081b

The box drawing because it's entangled with the rest and we don't
currently use this anywhere I know of. Nor was it gated on terminfo,
so it could have broken things, for subjectively little gain.

Fixes #8727.
2022-02-21 22:48:43 +01:00
exploide
e0bc944d5c added kubectl completion 2022-02-19 20:03:45 +01:00
Johannes Altmanninger
2f5edfd617 Call pthread_attr_destroy even if pthread_create failed
As suggested in
63bfab9975 (commitcomment-66542462)

Also, check for errors.
2022-02-19 14:15:22 +01:00
Spenser Black
63d7386a36 completions/gpg: list only secret for gpg options that manage secret keys
Some GPG options work only with private keys but our completions suggest all
keys.  Modify `__fish_complete_gpg_user_id and __fish_complete_gpg_key_id`
to take an optional argument for the "key type" to override `--list-keys`
with like `--list-secret-keys` for the appropriate options.

Closes #8712
2022-02-19 13:48:20 +01:00
Fabian Homborg
5af1e64441 Explain the issues of setting fish as login shell
Also stop explaining this in three places. In particular this removes
an FAQ entry.

Fixes #8078
2022-02-18 15:30:57 +01:00
Marcin Zajączkowski
d485ed3d87 Add gnome-extensions completion 2022-02-17 20:47:14 +01:00
Fabian Homborg
d0667e9e88
disco prompt: Use $hostname 2022-02-16 15:07:06 +01:00
Spenser Black
1b7a43877b Disabled line length limit in share/
Many of the lines in `share/functions` and `share/completions` violate the max
line length, and it can be annoying to try to maintain consistency while
fighting against the editor trying to wrap lines.
2022-02-15 21:27:27 +01:00
Jose Riha
9d6b8266f4 Fix typo (fist -> first) 2022-02-15 14:20:05 +01:00
Aaron Gyes
d1600211e5 Docs: Posix -> POSIX 2022-02-14 16:18:16 -08:00
Fabian Homborg
b48d8188b9 Change our test emoji
The emoji we used wasn't actually widened-in-9, so we now switch to
one that does.
2022-02-14 22:31:30 +01:00
Fabian Homborg
34f4be1149 Update widecharwidth
This updates widechar_width.h to one generated from
15e782aa3df9dfef436516f66f745a90b421329.

The change here is a rationalization of doublewide vs widened-in-9.

Many emoji have been moved to widened-in-9 because we now use the
correct version (this uses the *emoji* version, and emoji version 3.0
corresponds to Unicode 9).
2022-02-14 22:19:28 +01:00
Kevin F. Konrad
707c7a7f1e replace helm completions with autogenerated script
Helm 3 provides an autogenerated completion since version 3.4.0.

The previous implementation is replaced by this because it was specific to the
now-deprecated helm 2.

The completions appear to be fully featured including descriptions and
completion for dynamic arguments such as namespaces and releases.
2022-02-13 16:52:30 +01:00
Johannes Altmanninger
47b0d0c293 Make __fish_is_nth_token and __fish_nth_token private again
Their names are not perfect, so let's keep them as internal functions,
until we figure out how/if we want to expose this.

This reverts 0445126c2 (Undunder __fish_is_nth_token, 2021-06-29) (but I
did it without "git revert").

Closes #8008
2022-02-13 10:45:38 +01:00
ridiculousfish
a7102f179b stdin_nonblocking.py test to not leave background processes
fish_test_helper was sometimes left running.
2022-02-12 11:48:55 -08:00
ridiculousfish
133e359d70 Add a test that stdin is always handed-off as blocking
No functional change here, just closing a gap in our coverage.
2022-02-12 11:41:03 -08:00
Pierrick Guillaume
2164d40b73
Allow better completion for git submodules (#8716)
* Allow better completion for git submodules

* Add change for git completion in changelog

* Fix git submodule absobgitdirs description
2022-02-11 15:56:14 +01:00
Marius Müller
920e89e2ac Extend dnf completions
to include syntax for the dnf-plugin system-upgrade
2022-02-11 09:23:01 +01:00
Mahmoud Al-Qudsi
6c81e2a627 zfs: Complete values for all properties
This patch adds completions for the values of properties, emitted once the
current token matches the name of a zfs property in full, for the various places
where such a property can be assigned.

e.g.

zfs set canmoun<TAB> continues to only provide "canmount" as a completion, but
zfs set canmount<TAB> will provide a list of all valid values for the property.

The existing code made an attempt to complete the values for the specific case
of `zfs set PROP=` but I could never get it to work for me under FreeBSD, so I
presume it was Linux-specific. This patch should be cross-platform and extends
the completions to anywhere where a property may be set.
2022-02-09 14:24:06 -06:00
Johannes Altmanninger
210e7a9cc9 Correct error on when complete -C is used without argument
The new --escape option means that -C is not necessarily the last option;
We have this scenario where we produce a bogus error

    $ fish -c 'complete -C --escape'
    complete: --escape: option requires an argument

--escape doesn't take arguments, so let the error message say -C.
2022-02-09 08:57:05 +01:00
Nadav Zingerman
9e0f74eb6c Add --escape option to complete -C
An example use case is an external completion pager:

    bind \cg "commandline -rt (complete -C --escape|fzf|cut -d\t -f1)\ "

Fixes #3469
2022-02-09 08:34:03 +01:00
Aaron Gyes
d1d9f147ec Update tests for time output. 2022-02-08 16:57:01 -08:00
Aaron Gyes
63bfab9975 Start threads detached. 2022-02-08 16:44:20 -08:00
Aaron Gyes
e0c8e1cd70 iothread: Remove most of a comment
Remove the narrative here that can set a reader up for confusion.

018e51c935
2022-02-08 16:44:20 -08:00
Aaron Gyes
346ce8081b time: use box drawing characterts for the separator
This spruces up output slightly to render a solid
line instead of a bunch of dashes for the horizontal
rule shown in time output.
2022-02-08 16:44:20 -08:00
Aaron Gyes
2d9e51b43e builtin time: Use more familiar time unit abbreviations
Use ms, μs as opposed to "millis", etc.
2022-02-08 16:44:20 -08:00
Mahmoud Al-Qudsi
4ea5a8a5c6 CHANGELOG.rst: Add vim text width override
If you have vim set up to recognize `.editorconfig` files, the 80-char limit
from ours causes vim to keep chopping lines. This makes it ignore that limit
when editing `CHANGELOG.rst`
2022-02-08 14:37:23 -06:00
Mahmoud Al-Qudsi
ddc4d8ba9b Changelog: fish_is_nth_token + fish_nth_token
See re-opened issue #8008 for discussion regarding the name of these functions -
this might need to be revisited pending a decision there.
2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
497cebab64 Changelog: OpenZFS completion improvements 2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
b3142a29e7 Fix zfs add completions 2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
5b7dd5e806 Fix zpool attach completions
The previous behavior vs the current (hopefully ideal) behavior:

* zpool attach [lists pools and devices - should list only pools]
* zpool attach tank [lists pools and devices - should list only devices already
    part of pool "tank"]
* zpool attach tank da1 [lists pools and devices - should list only devices not
    already part of pool "tank" or any pool, depending on -f flag to attach]
2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
b06a8a2e0c Add public function fish_nth_token to mirror fish_is_nth_token
Completions may benefit from using these in tandem to dynamically generate
completions predicated on the value of an earlier token in a cleaner fashion.
(Currently, most of called completion helper functions introspect the command
line to get the value of an earlier argument, making them less reusable for
different expressions that need completions of the same type. This way, the
completion can provide the function with the argument value explicitly.)
2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
99e0aa3c64 Clarify fish_is_nth_token description
Yes, this does make it longer but it's a very important point.
2022-02-08 14:17:00 -06:00
Mahmoud Al-Qudsi
8d386a27f3 zfs completions: Factor out OpenZFS features and support
As of FreeBSD 13 (released April 2021), FreeBSD has rebased its zfs support on
top of the OpenZFS distribution previously used only/chiefly by Linux;
accordingly, it has gained support for some previously Linux-only completions.
This patch changes some completions previously predicated on a Linux ZFS
installation to the presence of an OpenZFS installation. Note that there
continue to be (and probably always will be) separate Linux-only and
FreeBSD-only completions (and not just when it comes to interacting with the
device subsystem, etc).
2022-02-08 14:17:00 -06:00
Tristan McLain
06c474da2e
Shortened quilt definitions (#8667)
* shortened quilt function definitions

* fixed some changes with quilt definitions

Co-authored-by: Tristan McLain <tristan@Tristans-Laptop.localdomain>
2022-02-08 20:19:03 +01:00
Shay Aviv
2ef12af60e Fix comment parsing inside command substitutions and brackets 2022-02-08 16:20:31 +01:00
ridiculousfish
627033f447 fish_wcswidth_visible to use int instead of size_t
Credit to lilyball for spotting this.
2022-02-07 22:17:47 -08:00