11507 Commits

Author SHA1 Message Date
ridiculousfish
09baecce5d Add self-insert-notfirst readline command
This adds a new readline command self-insert-notfirst, which is
analogous to self-insert, except that it does nothing if the cursor
is at the beginning. This will serve as a higher-performance implementation
for stripping leading spaces on paste.
2020-03-07 13:38:42 -08:00
ridiculousfish
e333f90c07 Place bind.rst readline function docs in more alphabetical order 2020-03-07 13:38:10 -08:00
Johannes Altmanninger
a4c92ecd2e Docs: add missing backticks
(cherry picked from commit 0bb3efb1ad3c50f960bc6d6e885fc015b61897af)
2020-03-07 18:39:31 +01:00
Johannes Altmanninger
6d907a9346 Make default hg prompt leaner
The default hg prompt is slow on large repositories (hg status takes
2-3 seconds on mozilla-central) which is unacceptable as a default.

Mimick our git prompt: by default, only show the current branch.
If the new variable $fish_prompt_hg_show_informative_status is set,
then use the old behavior.

[ci skip]

(cherry picked from commit da7b762f4adb0341cea53e759965cac9c3b2e375)
2020-03-07 13:04:43 +01:00
Fabian Homborg
c37a425887 Disable svn prompt by default
This is apparently quite slow on large svn repos (like 40 seconds
slow), and we don't have a good thing to display other than the full
file information.

So we'll have to disable it for now.

Fixes #6681.

[ci skip]
2020-03-05 17:11:51 +01:00
Fabian Homborg
f272d58557 Update CHANGELOG 2020-03-03 18:29:36 +01:00
Fabian Homborg
90a780b57d fish_print_hostnames: Fix multiple host aliases
Fixes #6698.

[ci skip]
2020-03-03 18:28:27 +01:00
Jason Nader
33f55e05d0 Prevent prompt from spewing errors if cwd has disappeared 2020-03-03 18:12:19 +01:00
Sacha Delanoue
e0645c9473 Fix 256 color detection on xterm-like
bbc3fecbe introduced a regression where support for 256 color was not
detected on xterm-like terminals that did not define the TERM_PROGRAM
env variable. Almost no terminal on linux define this variable.
2020-03-03 18:04:44 +01:00
ridiculousfish
f776c4ed88 Fix interactive --on-signal INT handlers
f8ba0ac5bf4b introduced a bug where INT handlers would themselves be
cancelled, due to the signal. Defer processing handlers until the
parser is ready to execute more fish script.

Fixes the interactive case of #6649.
2020-03-02 12:41:46 -08:00
ridiculousfish
eec90e379e Do not remove jobs that need to print a status message
55e3270 introduced a regression where we would remove all completed
jobs. But jobs that want to print a status message get skipped, so
the status message (and associated event handlers) might not get run.

Fix this by making it explicit which jobs are safe to process, and which
should be skipped.

Fixes #6679.
2020-03-02 12:38:05 -08:00
Johannes Altmanninger
3bf11be491 Fix tests for 0c74ff4209b9685de6fda593d391cae1687a6788 2020-02-29 10:54:53 +01:00
Johannes Altmanninger
0c74ff4209 Revert "read: discard IFS delimiters before the last token"
See #6650.

This reverts commit 1410f938aad04216d824aec747bc7919849d7005.

(cherry-picked from commmit 91fcb8c42c7e995517cd2b476366b5c4f6c74b6f)
2020-02-29 09:54:46 +01:00
Johannes Altmanninger
e6248cf7be Fix selection going out of bounds
Which happened when starting the selection at the end of the commandline.
In this case, selections still interact weirdly with autosuggestions (the
first character of the suggestion appears to be part of the selection
when it's not).

Fixes #6680

(cherry-picked from commit 99851c09b31f5e5478b9c1a2197606f9676dcfc2)
2020-02-29 09:51:51 +01:00
Delapouite
764420f272 doc(ulimit): add missing backquotes around -H, -S and -a options
(cherry picked from commit a53405a7be09d4325106383395a7afc782641e83)
2020-02-28 21:18:15 +08:00
Fabian Homborg
0cbb130156 Draft releasenotes for 3.1.1 2020-02-26 20:00:56 +01:00
Delapouite
7f3d51da81 doc: fix 404 error for set_color command 2020-02-26 19:31:17 +01:00
Fabian Homborg
3e689f1f58 test: Reject nan/inf instead of crashing
I really don't want to get into the business of explaining to people
how nan != nan.

Fixes #6655.
2020-02-26 16:43:27 +01:00
Fabian Homborg
298f43b62e completions/git: Work around read trimming whitespace
Since #6406, read will trim whitespace before the last variable.

In this case there is only one variable, and the line looks like

 M CHANGELOG.md

so it does indeed start with whitespace, and the whitespace is quite
significant.

Fixes #6650.

[ci skip]
2020-02-25 19:08:07 +01:00
Johannes Altmanninger
1ca529a3d4 fixup test
only works interactively

(cherry picked from commit ccd3ac4f188aacd3c676b1981b9a5451aeed0ba0)
2020-02-24 21:44:23 +08:00
Johannes Altmanninger
6b6dc7ad20 move variable_assignment_equal_pos to tokenizer
we'll need it for tok_command

(cherry picked from commit ebde9a6a44520f16b5eb1686415fcf20f2a632bc)
2020-02-24 21:14:37 +08:00
Johannes Altmanninger
676a97cf0b Skip variable assignments in status current command
Fixes #6635

(cherry picked from commit aa0e16b1a556798d6d276531e80fa5fc392bf1a8)
2020-02-24 20:57:43 +08:00
Johannes Altmanninger
26949fa865 List time as builtin, support time --help
`a=b time foo` will no longer call an external `time` command
(like it does in bash).

Fixes #6598

(cherry picked from commit 7ef7f93a90f4dbc0df0c05b3852b264395d40409)
2020-02-24 20:08:44 +08:00
Delapouite
f3eb996b45 doc: add interlinks between true ←→ false and and ←→ or cmds
(cherry picked from commit dce0fda2cc76e38dc4179754326c0898d221b854)
2020-02-24 20:05:21 +08:00
Delapouite
3f33576225 doc(abbr): adjust token names
(cherry picked from commit 4fba8022a91827abe9974955f3cdcb99333c1269)
2020-02-23 21:48:47 +08:00
Collin Styles
afabea76a1 Fix link in documentation 2020-02-23 09:38:22 +01:00
Fabian Homborg
cb34efe897 docs/tutorial: Fix < typo
See #6640
2020-02-23 09:35:24 +01:00
Fabian Homborg
62f53e300a docs/tutorial: Replace coloring markup
This used to use doxygen's html blocks, which don't have a *direct*
equivalent in sphinx in code blocks.

Instead of adding this to the pygments highlighter, let's just use
some roles.

It's a teensy bit awkward as we then use block styling, but we want to
add more of our own styling anyway, so we can presumably get this
somehow, and these html tags look awkward and confuse people.

Fix #6640

[ci skip]
2020-02-22 18:03:04 +01:00
Fabian Homborg
904d16f517 Ignore unreadable cwd error harder
Should fix the tests on macOS.

(cherry picked from commit 0d2c11249ea377c7d1ba5327e05a5159d209e2fe)
2020-02-22 17:34:25 +01:00
Fabian Homborg
0d18fec890 Let test for unreadable cwd work on macos
It has a different error. We don't care, we expect an error.

(cherry picked from commit 7c879ed3568238f06e0f3e90692aaf56c442df3e)
2020-02-22 17:34:25 +01:00
Fabian Homborg
118f5e4485 completions/optipng: Add missing quote
Oops!

This should be in 3.1.1!

cc @zanchey

(cherry picked from commit 63b4a891ff3559a14b13124ea3bbca19fae98b9d)
2020-02-22 17:22:35 +01:00
Fabian Homborg
f1c4fbaad8 docs: Correct bind docs on escape delay
We never updated that after we changed the default.

[ci skip]

(cherry picked from commit b28b14b67c826309edfdc3fda5309c7f5d8e4b85)
2020-02-22 23:33:31 +08:00
Daniel Zhang
fb84c137b5 Fix variable leaking in completion kill
(cherry picked from commit ff29d815328f737a1034ab1cf37b3b7d1d90f037)
2020-02-22 23:33:31 +08:00
Alexandre Badez
6ec62e3934 Correction link in doc.
(cherry picked from commit 7172bd38b3048b376c108978bd35557a3637435f)
2020-02-22 23:33:30 +08:00
Fabian Homborg
2af174513e Reallow "2>>&1" as a redirection
Appending to an fd doesn't really make sense, but we allowed the
syntax previously and it was actually used.

It's not too harmful to allow it, so let's just do that again.

For the record: Zsh also allows it, bash doesn't.

Fixes #6614

(cherry picked from commit aba900a71f5313990f96ccf20e6751e4a70b8fde)
2020-02-22 23:33:30 +08:00
Johannes Altmanninger
971a837031 Update exports when an exported universal variable changes
Fixes #6612

(cherry picked from commit 7517128b68a99dd24060caad649a21fea48e1c9e)
2020-02-22 23:33:06 +08:00
Lily Ballard
3882a2ffb3 Work around compilation failure with old Apple SDKs
When building fish-shell with the macOS 10.12 SDK, <sys/proc.h> does not
include <sys/time.h> but references `struct itimerval`. This causes a
compilation failure if we don't import <sys/time.h> ourselves.

This was previously masked by an import of <sys/sysctl.h>, which was
removed in fc0c39b6fdb6.

(cherry picked from commit 47aeaa15350b49c4b86a84b3c49e8ba9064b788b)
2020-02-22 23:31:29 +08:00
Fabian Homborg
0c905e8121 Fix build on 32-bit systems
This was a weird case of the integer converseys.

Fixes #6609.

(cherry picked from commit 399a71645e76ec103c32dae4caa0778b4bf57eaa)
2020-02-22 23:31:29 +08:00
Fabian Homborg
74ee866239 iothread: include cstdint, correctly
Yeah, this was needed in the *header*.

God I hate headers.

Fixes #6604, for real this time

(cherry picked from commit f79ff7209627cc12e55cadf8b275a00ed4a378e7)
2020-02-22 23:31:29 +08:00
Fabian Homborg
6a3b7d719a iothread: Include cstdint
For uint64_t.

Needed for some configurations with glibc.

Fixes #6604.

(cherry picked from commit d80d39dd6a0576e5923184815832b0938356530c)
2020-02-22 23:31:29 +08:00
Fabian Homborg
eea919f97e Readd ^&1 redirection
This was lost in 35671dd9f094cf8c643c9cf224c27a2b55578937.

Even tho we plan to drop caret redirection, while it's there it should
fully work.

Fixes #6591.

(cherry picked from commit 13b470af0756dcdacaeee8a69426e1ac8c26ebbb)
2020-02-22 23:31:29 +08:00
Fabian Homborg
cecb0ebbbc Return glob ordering to pre-3.1 state
Glob ordering is used in a variety of places, including figuring out
conf.d and really needs to be stable.

Other ordering, like completions, is really just cosmetic and can
change if it makes for a nicer experience.

So we uncouple it by copying the wcsfilecmp from 3.0.2, which will
return the ordering to what it was in that release.

Fixes #6593

(cherry picked from commit f053cd27c61c687c19b80b18dd0ee9331effb890)
2020-02-22 23:31:17 +08:00
Fabian Homborg
fdda090aa1 parser: Stop crashing when cwd isn't readable
Everything seems to be working, so instead of crashing just print an
error and return.

Fixes #6597

(cherry picked from commit ceba851d44dea68b9e1b2b551e37fd6834767357)
2020-02-22 23:30:48 +08:00
Fabian Homborg
ec07ad323c completions/npm: Allow files for "install"
Fixes #6596

[ci skip]

(cherry picked from commit 56040d2d7fb20ff739eaf1d34fe75c1d8721e381)
2020-02-22 23:30:48 +08:00
David Adam
5c1cf0619a drop rg and bat completions
These are shipped upstream.

Closes #5822.

(cherry picked from commit f036d019618ff1f0508c539dc88d64a194cd2034)
2020-02-22 23:30:48 +08:00
Ian Brunelli
6b723e0f2c Simplify flatversion extraction 2020-02-20 21:37:56 +01:00
Ian Brunelli
26a56277d8 Add description to flatpak remote completion 2020-02-20 21:24:04 +01:00
Ian Brunelli
f247bb8a14 Add completion for flatpak enter and kill 2020-02-20 21:24:04 +01:00
Ian Brunelli
cd2be9c22f Some cleanup as suggested 2020-02-20 21:24:04 +01:00
Ian Brunelli
ef715dd47a Add completion for new flatpak commands 2020-02-20 21:23:59 +01:00