Commit graph

12173 commits

Author SHA1 Message Date
Fabian Homborg
3c6c8d5424 fish_vi_cursor: Add alacritty to the whitelist 2020-05-07 18:04:39 +02:00
Fabian Homborg
81ded4c0ab Don't default term size if it is too small
This is unlikely to achieve anything sensible.

Fixes #6980.
2020-05-07 17:42:02 +02:00
David Adam
ec74c739c8 bindings: expand abbreviations with all end-of-command characters
Closes #6970.
2020-05-07 09:13:33 +08:00
Charles Gould
ad020e84dd Exit key reader normally on help, version 2020-05-05 12:33:22 +08:00
Charles Gould
bd472ececc Add fish_trace to special variable completions 2020-05-03 21:20:24 +08:00
Fabian Homborg
3e29b0d916 fish_vi_cursor: Allow new Konsole
It removed $KONSOLE_PROFILE_NAME and added $KONSOLE_VERSION.

Let's assume if $KONSOLE_PROFILE_NAME is set we use the old sequences,
if not we use the new ones.
2020-05-02 17:42:42 +02:00
ridiculousfish
aa8c9df2d0 Stop copying a string in hash<const wcstring> 2020-05-01 13:30:56 -07:00
Rosen Penev
0668513138 Change C casts to C++ ones
Some were kept for compatibility.

Found with -Wold-style-cast

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-01 13:30:56 -07:00
David Adam
f36c82ce86 Reenable command descriptions on macOS 10.15.4+
Further work on #6270, as recommended in 611a6589ea.

[ci skip]
2020-05-01 21:28:43 +08:00
ridiculousfish
a1494c9c22 Revert "__fish_describe_command: print only exact match and exit"
This reverts commit 535845861a.

That commit introduced a bug where tab-completing commands no longer
prints their descriptions, unless there is an exact match.
2020-04-30 11:09:46 -07:00
ridiculousfish
4116829292 Do not issue clr_eos if we think the cursor will end up on its own line
If we output text and end up in the last column, the sticky right edge
will cause a clr_eos to erase the last character. Ensure this doesn't
happen by not issuing clr_eos in that case.

Fixes #6951
2020-04-29 14:22:54 -07:00
ridiculousfish
8c4c9d050d Clear cancellation signals after handling a readline command
If a readline command is bound to a key sequence which also sends a
signal, then fish will set the cancel flag in addition to handling the
command. But this cancel flag is then persistent. Ensure it gets cleared
after each command.

Fixes #6937
2020-04-29 13:38:15 -07:00
David Adam
8d43439640 wutil: add SMB2 file type to fd_check_is_remote
The manual page for statfs(2) only lists SMB_SUPER_MAGIC and
CIFS_MAGIC_NUMBER, but it turns out there's a third type of CIFS/SMB
mount, represented by SMB2_MAGIC_NUMBER.

Haunting me from #6609.
2020-04-29 23:34:13 +08:00
hyperfekt
31cb615671 __fish_config_interactive: use __fish_anypython 2020-04-29 14:17:16 +08:00
David Adam
4a6438f59a Merge branch 'Integration_3.1.2' 2020-04-29 12:16:24 +08:00
David Adam
0314b0f1d9 Release 3.1.2 2020-04-29 10:54:40 +08:00
ridiculousfish
b88b6ea504 Add CMake variable FISH_USE_SYSTEM_PCRE2
The CMake variable FISH_USE_SYSTEM_PCRE2 now controls whether fish uses
system PCRE2 or the bundled version. The default is to use the system
version, unless no such version is found, or unless it is a macOS build
with code signing. Note the default behavior has not changed.

Fixes #6952
2020-04-28 18:30:40 -07:00
ridiculousfish
2951c05934 Do not consider dumb terminals to have wrapping
For the purpose of cursor_is_wrapped_to_own_line, always return false
for dumb terminals. Fixes the tests.
2020-04-28 16:30:52 -07:00
ridiculousfish
4f103d74fb Do not emit newline when running commands if the cursor is on its own line
If the cursor has been wrapped to the last line, and is the only thing
on that line, do not emit a newline when executing a command.

Fixes #6826
2020-04-28 11:51:46 -07:00
ridiculousfish
81af389258 Modernize screen_t
Use inline initializers rather than the constructor, and adopt some
maybe_t.

Also move post_buff_1 and post_buff_2 to local variables instead of
member variables.
2020-04-28 11:26:06 -07:00
ridiculousfish
520c83cbbf Make screen_reset_mode_t an enum class instead of an enum
Improves type safety.
2020-04-28 11:00:26 -07:00
ridiculousfish
844ae48dc0 Apply code review from #6806 2020-04-28 10:54:48 -07:00
ridiculousfish
9aad39f89d Note fix for #6955 in changelog 2020-04-28 10:48:15 -07:00
ridiculousfish
eabe2e8855 Allow eval to see the tty if its output is not piped
Commit 5fccfd83ec, with the fix for #6806,
switched eval to buffer its output (like other builtins do). But this
prevents using eval with commands that wants to see the tty, especially
fzf. So only buffer the output if the output is piped to the next process.
2020-04-28 10:47:43 -07:00
ridiculousfish
f3d31f6ef6 Introduce out_is_piped and err_is_piped on io_streams_t
builtin_eval needs to know whether to set up bufferfills to capture its
output and/or errput; it should do this specifically if the output and
errput is piped (and not, say, directed to a file). In preparation for
this change, add bools to io_streams_t which track whether stdout and
stderr are specifically piped.
2020-04-28 10:47:39 -07:00
ridiculousfish
3a47db74b0 Disable Mac codesigning if MAC_CODESIGN_ID is falsey
Fixes #6952
2020-04-28 10:34:06 -07:00
ridiculousfish
84a2f32625 Note fix for #6955 in changelog 2020-04-28 10:26:15 -07:00
ridiculousfish
80e92581aa Allow eval to see the tty if its output is not piped
Commit 5fccfd83ec, with the fix for #6806,
switched eval to buffer its output (like other builtins do). But this
prevents using eval with commands that wants to see the tty, especially
fzf. So only buffer the output if the output is piped to the next process.

This will solve #6955 (which needs to go into a point release).
2020-04-28 10:08:00 -07:00
ridiculousfish
607779257c Introduce out_is_piped and err_is_piped on io_streams_t
builtin_eval needs to know whether to set up bufferfills to capture its
output and/or errput; it should do this specifically if the output and
errput is piped (and not, say, directed to a file). In preparation for
this change, add bools to io_streams_t which track whether stdout and
stderr are specifically piped.
2020-04-28 09:59:55 -07:00
David Adam
96b09a321d Merge branch 'Integration_3.1.1' 2020-04-28 19:35:46 +08:00
George Christou
2bc4228d42 edit_command_buffer: Add line:col support for Sublime Text 2020-04-28 08:48:31 +02:00
David Adam
b2fa5de54d Release 3.1.1 2020-04-27 21:57:43 +08:00
David Adam
3276d656cb CHANGELOG: errata for 3.1
Closes #6634.
2020-04-27 21:50:39 +08:00
ridiculousfish
9949c39d70 Relnote 3.1.1 fixes for #6624 and #6806 2020-04-26 15:54:18 -07:00
ridiculousfish
ed8e7b934f Merge branch 'cmdsub_inherit_pgroup_3.1.1' into Integration_3.1.1
This merges three fixes around propagating pgroups, and preventing pipe
deadlock. This is equivalent to the merge at
c034c2c99b, but for 3.1.1
2020-04-26 15:41:30 -07:00
ridiculousfish
5fccfd83ec builtin_eval to direct output to its iostreams
Prior to this fix, builtin_eval would direct output to the io_chain of the
job. The problem is with pipes: `builtin_eval` might happily attempt to
write unlimited output to the write end of a pipe, but the corresponding
reading process has not yet been launched. This results in deadlock.

The fix is to buffer all the output from `builtin_eval`. This is not fun
but the best that can be done until we have real concurrent processes.

cherry-pick of a1f1b9c2d9

Fixes #6806
2020-04-26 15:40:22 -07:00
ridiculousfish
de180689e4 Thread pgroups into builtin_eval
Ensure that if eval is invoked as part of a pipeline, any jobs spawned
by eval will have the same pgroup as the parent job.

cherry-pick of 82f2d86718

Partially fixes #6806
2020-04-26 15:40:22 -07:00
ridiculousfish
2d3c914a9d Thread pgroups into command substitutions
Give string expansion an (optional) parent pgroup. This is threaded all
the way into eval(). This ensures that in a mixed pipeline like:

   cmd | begin ; something (cmd2) ; end

that cmd2 and cmd have the same pgroup.

Add a test to ensure that command substitutions inherit pgroups
properly.

cherry-pick of 938b683895

Fixes #6624
2020-04-26 15:40:22 -07:00
Johannes Altmanninger
fe3d7ad002 Changelog nitpicks 2020-04-26 21:31:05 +02:00
Johannes Altmanninger
06658cd13b Changelog for some new features 2020-04-26 21:20:11 +02:00
ridiculousfish
c034c2c99b Merge branch 'cmdsub_inherit_pgroup'
This merges three fixes around propagating pgroups, and preventing pipe
deadlock. This fixes a class of hangs with fzf in particular.
2020-04-26 11:07:04 -07:00
ridiculousfish
a1f1b9c2d9 builtin_eval to direct output to its iostreams
Prior to this fix, builtin_eval would direct output to the io_chain of the
job. The problem is with pipes: `builtin_eval` might happily attempt to
write unlimited output to the write end of a pipe, but the corresponding
reading process has not yet been launched. This results in deadlock.

The fix is to buffer all the output from `builtin_eval`. This is not fun
but the best that can be done until we have real concurrent processes.

Fixes #6806
2020-04-26 11:05:50 -07:00
ridiculousfish
82f2d86718 Thread pgroups into builtin_eval
Ensure that if eval is invoked as part of a pipeline, any jobs spawned
by eval will have the same pgroup as the parent job.

Partially fixes #6806
2020-04-26 11:05:50 -07:00
ridiculousfish
938b683895 Thread pgroups into command substitutions
Give string expansion an (optional) parent pgroup. This is threaded all
the way into eval(). This ensures that in a mixed pipeline like:

   cmd | begin ; something (cmd2) ; end

that cmd2 and cmd have the same pgroup.

Add a test to ensure that command substitutions inherit pgroups
properly.

Fixes #6624
2020-04-26 11:05:50 -07:00
Fabian Homborg
389c5e7ece Update set --show docs
See #6944
2020-04-26 17:55:17 +02:00
Fabian Homborg
3f8d09b0e6 Update translations for set --show
See #6944
2020-04-26 17:52:24 +02:00
Fabian Homborg
6c4cf69110 completions/git: Only use first line of alias as the description
This was a weird one. We split the aliases correctly even with
multiple lines, but then broke it all again when we just printed the
description.

Note that it would be possible to use `string split0` here, but since
anything longer than a line is likely too long for a description
anyway we don't bother.

Fixes #6946.

(cherry picked from commit 1988bd2579)
2020-04-26 23:10:53 +08:00
Fabian Homborg
34a82dbff9 Update littlecheck to escape output 2020-04-26 14:39:46 +02:00
LawAbidingCactus
ad677d388c fix pushd 2020-04-26 14:39:15 +02:00
Fabian Homborg
1988bd2579 completions/git: Only use first line of alias as the description
This was a weird one. We split the aliases correctly even with
multiple lines, but then broke it all again when we just printed the
description.

Note that it would be possible to use `string split0` here, but since
anything longer than a line is likely too long for a description
anyway we don't bother.

Fixes #6946.
2020-04-26 08:49:01 +02:00