Commit Graph

12309 Commits

Author SHA1 Message Date
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
Fabian Homborg
6990c44443 Shorten set --show output
Changes it from

```
$fish_color_user: not set in local scope
$fish_color_user: set in global scope, unexported, with 1 elements
$fish_color_user[1]: length=3 value=|080|
$fish_color_user: set in universal scope, unexported, with 1 elements
$fish_color_user[1]: length=7 value=|brgreen|

```

(with the trailing empty line - not just a newline)

to

```
$fish_color_user: set in global scope, unexported, with 1 elements
$fish_color_user[1]: |080|
$fish_color_user: set in universal scope, unexported, with 1 elements
$fish_color_user[1]: |brgreen|
```
2020-04-26 08:49:01 +02:00
ridiculousfish
feb40f0cd6 Make io_file_t::print more useful 2020-04-25 20:25:28 -07:00
Fabian Homborg
713ceddf0b Add another test for Konsole
For some reason my current version doesn't have $KONSOLE_PROFILE_NAME
anymore, it has $KONSOLE_VERSION.

Urgh
2020-04-25 18:01:43 +02:00
Jouke Witteveen
1643cf40fb systemctl completions: Use --plain where appropriate
The --plain flag drops the '●'-glyph and generally makes the output more
suitable for automated processing.

(cherry picked from commit 93b86bbe63)
2020-04-25 23:48:10 +08:00
David Adam
0cdf3648f0 CHANGELOG: additional work on 3.1.1 2020-04-25 23:32:57 +08:00
fcd
b37209b235 docs: Fix repeated word in argparse documentation
(cherry picked from commit 3246f736b8)
2020-04-25 23:30:30 +08:00
Weisi Dai
c8caaf5d56 Doc: Fix dead link to POSIX man page "test".
(cherry picked from commit 6ab2d78936)
2020-04-25 23:29:34 +08:00
Fabian Homborg
d9cf1be4b7 fish_clipboard_copy: Stop adding newlines
When this switched over from directly piping commandline to storing
its output and using printf, I inadvertently always added a trailing
newline. That's probably annoying.

Note that this will now always *remove* a trailing newline (because
the command substitution does). That will barely make a
difference (because trailing newlines are quite unusual in the
commandline) and will probably feel better than keeping it - we could
even make a point of removing trailing whitespace in general.

Fixes #6927

(cherry picked from commit 6ebbe5a450)
2020-04-25 23:27:14 +08:00
Jason
5f6e43df6a Stringify ssh completions (#6529)
* Stringify ssh completions

* Fix completions for `-b` option

* Fix completions for `-b` option

(cherry picked from commit 2a247c7fe5)
2020-04-25 23:25:51 +08:00
David Adam
3b9edc27c7 CHANGELOG: work on 3.1.1 2020-04-25 23:22:52 +08:00
Fabian Homborg
fd90482c19 create_manpage_completions: Output "-d", not "--description"
We typically use "-d" because it's shorter.
2020-04-25 11:34:52 +02:00
Fabian Homborg
5ca527b2fe create_manpage_completions: Remove trailing period
Turns out this was on purpose, but we've been telling people to do
away with them for quite a while.
2020-04-25 11:34:40 +02:00
exploide
c0542727c4 added completions for metasploit commands
- msfconsole
- msfdb
- msfvenom
2020-04-25 09:30:09 +02:00
Jason
bd44c3a5cb Shorten descriptions 2020-04-25 09:29:42 +02:00