This reverts commit 7a74198aa3.
Believe it or not this commit actually increased copying. When accepting
a value you know you're going to take ownership of, just accept it by
value; then temporaries can invoke the move ctor and blah blah blah.
We really need a lightweight refcounted pass-by-value string to make this
less error prone.
If we switch the bind mode, we add a "force-repaint" there just to
redraw the mode indicator.
That's quite wasteful and annoying, considering that sometimes the prompt can take
half a second.
So we add a "repaint-mode" function that just reexecutes the
mode-prompt and uses the cached values for the others.
Fixes#5783.
As it turns out it didn't work much better, and it fell behind in
support when it comes to things that wcwidth traditionally can't
express like variation selectors and hangul combining characters, but
also simply $fish_*_width.
I've had to tell a few people now to rebuild with widecharwidth after
sending them on a fool's errand to set X variable.
So keeping this option is doing our users a disservice.
* Add "expand-abbr" bind function
This can be used to explictly allow expanding abbreviations.
* Make expanding abbr explicit
NOTE: This accepts them for space only, we currently also do it for \n
and \r.
* Remove now dead code
We no longer trigger an abbr implicitly, so we can remove the code
that does it.
* Fix comment
[ci skip]
This isn't officially supported (yet?), and it's currently broken.
It doesn't include ssl certificates,
and I can't see a way to add them or disable verification before it attempts to clone the git repo.
Ironically:
[ci skip]
Apparently an anonymous hyperlink looks like `__something__`.
I had to find this by deleting parts of the document and building to
narrow it down until I had the line, because sphinx wouldn't give a
line number.
See #5696.
[ci skip]
This was:
- Some `` mismatches - it's "``something``", not "``something`".
- Some "explicit targets", which IMHO are quite a misfeature - `word
<link>`_ has to be unique, which I don't see a usecase for. Instead
use `word <link>`__, with a double-underscore at the end.
- One case of `||` which I just removed
See #5696.
[ci skip]
This both formats it as a code-block, and adds the synopsis of each
subcommand to the corresponding section again so you don't need to
scroll back-and-forth so much.
[ci skip]
Apparently there must indeed be a toctree somewhere in the document to
get the links to the other docs to show up.
Even a ":hidden:" toctree doesn't help - that just leads to an empty
toc in the sidebar (no idea yet where that's defined!).
I've added it to the end so it's not that weird "Commands" section in
the middle.
[ci skip]
The final test in `realpath.in` was based on the no-longer-valid
assumption that $PWD cannot be a symlink. Since the recent changes in
fish 3.0 to allow `cd`ing into "virtual" directories preserving symlinks
as-is, when `make test` was run from a path that contained a symlink
component, this test would fail the `pwd-resolved-to-itself` check.
As the test is not designed to initialize then cd into an absolute path
guaranteed to not be symbolic, so this final check is just wrong.