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
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)
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.
This reverts commits:
2d9e51b43ed1d9f147ec346ce8081b
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.
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
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.
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).
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.
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
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.
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.
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`
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]
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.)
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).