fish-shell/doc_src
Fabian Homborg 0e1f5108ae
string: Allow collect --allow-empty to avoid empty ellision (#8054)
* string: Allow `collect --no-empty` to avoid empty ellision

Currently we still have that issue where

    test -n (thing | string collect)

can return true if `thing` doesn't print anything, because the
collected argument will still be removed.

So, what we do is allow `--no-empty` to be used, in which case we
print one empty argument.

This means

    test -n (thing | string collect -n)

can now be safely used.

"no-empty" isn't the best name for this flag, but string's design
really incentivizes reusing names, and it's not *terrible*.

* Switch to `--allow-empty`

`--no-empty` does the exact opposite for `string split` and split0.

Since `-a`/`--allow-empty` already exists, use it.
2021-07-09 21:20:58 +02:00
..
cmds string: Allow collect --allow-empty to avoid empty ellision (#8054) 2021-07-09 21:20:58 +02:00
python_docs_theme docs: Stop making code *smaller* 2021-07-01 17:50:25 +02:00
commands.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
completions.rst docs: Replace all internal links with :ref:s 2021-03-26 19:32:14 +01:00
conf.py docs: Unbreak sphinx' man directories 2021-05-13 18:20:47 +02:00
design.rst Make rationale spacing consistent 2020-10-12 20:25:35 +02:00
faq.rst docs: Made the abort/edit history feature more discoverable. 2021-07-03 16:39:32 +02:00
fish_for_bash_users.rst docs: Add a section on subshells to fish-for-bash-users 2021-05-22 17:30:45 +02:00
fish_indent_lexer.py Highlight keywords differently 2021-02-07 21:18:51 +01:00
index.rst docs: Don't speak of "initialization files" 2021-05-28 20:49:57 +02:00
interactive.rst docs: Made the abort/edit history feature more discoverable. 2021-07-03 16:39:32 +02:00
language.rst docs: fix a missing reference 2021-06-28 22:45:29 +08:00
license.rst Update copyright years 2021-05-03 13:12:11 +02:00
relnotes.rst docs: call the CHANGELOG "release notes" 2021-02-25 22:46:24 +08:00
tutorial.rst docs: Some rewording to the tutorial 2021-05-28 20:49:57 +02:00