Commit Graph

12145 Commits

Author SHA1 Message Date
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
Fabian Homborg
47677dfe95
Merge #6788
Completions update
2020-04-25 09:29:01 +02:00
Fabian Homborg
1f459622cb docs: Add fish_posterror
Also remove the "event will be emitted even if the command is invalid"
because it's not the case anymore, AFAICT.

See #6880.
2020-04-25 09:25:03 +02:00
Per Bothner
a93ee3a4e9
Fire fish_posterror event on tokenization error (#6880)
* Fire fish_postexec event after tokenization error

This is a fix for issue #6816 "shell integration with tokenization error"

* Pass command-line to fish_postexec on tokenization error

* Rename and move event for tokenization error
2020-04-25 09:23:15 +02:00
Ron Gebauer
d256ff84f7
Improve gradle completion (#6864)
* Improve gradle completion a lot

Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>
2020-04-25 09:22:07 +02:00
Kid
6022d216cb
Update Yarn completions (#6821)
* Update `yarn global` command

* Add descriptions
2020-04-25 09:21:05 +02:00
Johannes Altmanninger
28d67c8f0f Show completion list on Tab also if a common prefix was inserted
Fixes #6924
2020-04-23 20:19:57 +02:00
Johannes Altmanninger
095614ac54 Do not insert a space after completions ending in a comma or dot
For the last 15 years the space was only skipped when the completion
ended in one of "/=@:". Add ".," since they are also sometimes used to
separate independent words within a token.

Fixes #6928
Improves on #6833
2020-04-23 20:11:55 +02:00
Fabian Homborg
1d57da7291 commandline: Don't complain if insert mode has nothing to insert
That's just, like, a normal thing to happen.

We can return false, but it's not an error worth complaining about.

See #6931.
2020-04-23 17:17:19 +02:00
239
4d596a8f1d
Merge branch 'master' into completions-update 2020-04-23 14:01:42 +02:00
Fabian Homborg
02baa321ae Restyle
More of that weird reflowing that clang-format loves to do
2020-04-21 21:11:26 +02:00
Fabian Homborg
c7c10c8b10 __fish_ps: Use builtin realpath
We might want to find a better home for that builtin.
2020-04-21 21:11:26 +02:00
Fabian Homborg
18b2a65fdc Remove unused --inherit-variable 2020-04-21 21:11:26 +02:00
Jason Nader
18efd7dd48 Fix string split docs 2020-04-21 18:36:56 +02:00
Fabian Homborg
6ebbe5a450 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
2020-04-21 07:26:27 +02:00