This implements `status is-breakpoint` that returns true if the current
shell prompt is displayed in the context of a `breakpoint` command.
This also fixes several bugs. Most notably making `breakpoint` a no-op if
the shell isn't interactive. Also, typing `breakpoint` at an interactive
prompt should be an error rather than creating a new nested debugging
context.
Partial fix for #1310
This does several things. It fixes `builtin_function()` so that errors it
emits are displayed. As part of doing that I've removed the unnecessary
`out_err` parameter to make the interface like every other builtin.
This also fixes a regression introduced by #4000 which was attempting to
fix a bug introduced by #3649.
Fixes#4139
Running the tests on travis revealed that some compilers (or at least
with some options) call the wrong struct constructor if there is more
than one struct with the same name but differing definitions.
Hoist the code for parsing flags out of each individual subcommand and
into a function shared by all the subcommands. This reduces duplication
and potential for error. More importantly it makes the code that
actually implements the subcommand more prominent.
The Haiku stdio library has a bug. If we set stdout to unbuffered and it
is attached to a tty it discards wide output. Given how we interact with
the tty it should be safe to replace the problematic `fputwc()` calls
with simple `write()` calls. This does depend on the rest of the fish
code that writes to the tty to ultimately call write() which is true at
this time and should remain true in the future.
Fixes#4100
This came up in the context of issue #4068. This change makes it more
likely that the correct translation from english to another language
will be done for the "Job ... has {ended,stopped}" message.