Commit Graph

15822 Commits

Author SHA1 Message Date
Fabian Homborg
25e02ea07f fish_config: Use the same body fonts as the doc theme
Otherwise this was 100% monospace.

But since we have a specific list of fonts that we have checked, let's
use the same list instead of just adding "Helvetica" again.
2022-03-26 21:57:11 +01:00
Fabian Homborg
ff6a12e9c6 Revert "fish_config: use system-ui/sans serif for non-shell/code text"
Like the comment says: List explained in pydoctheme.css.

This also removed a number of other fonts.

This reverts commit f3cf32a085.
2022-03-26 21:53:23 +01:00
Aaron Gyes
f3cf32a085 fish_config: use system-ui/sans serif for non-shell/code text
This is nicer. It was actually using monospace fonts across
the board before.

Tweak tab rendering.
2022-03-26 13:48:23 -07:00
Aaron Gyes
776fc0b7f3 fish_config: HTML5 doctype 2022-03-26 13:27:22 -07:00
Aaron Gyes
492f9bb046 web config: buttons are <buttons> instead of <span>s.
This is exactly what <button> is for, and we can remove
some CSS.
2022-03-26 13:27:22 -07:00
Fabian Homborg
5af2ead85a README: Remove ul dependency
No longer used
2022-03-26 20:41:45 +01:00
David Adam
970a963896 cmake: disable frameworks when searching for libintl
This is a less-intrusive version of 95845b1, and only disables the
search for frameworks for libintil (sometimes shipped with Mono, but not
usable for compilation).

Closes #5244.
2022-03-26 22:00:44 +08:00
David Adam
73cade558a Revert "cmake: disable use of frameworks on macOS"
This reverts commit 95845b16c9.
2022-03-26 21:49:44 +08:00
David Adam
95845b16c9 cmake: disable use of frameworks on macOS
Prevents an issue where libintl from Mono gets picked up.

Closes #5244.
2022-03-26 21:38:12 +08:00
David Adam
31a02c55b7 Merge branch 'Integration_3.4.1' 2022-03-26 00:46:30 +08:00
David Adam
7489ab9d5b Release 3.4.1 2022-03-26 00:22:53 +08:00
Fabian Homborg
625d9e05d8 completions/nmcli: Exit if networkmanager isn't running
These printed an error on load if networkmanager isn't running.

Since at that point it's not useful to complete anything, just try the
first call and if that fails exit.

(cherry picked from commit b6f47f76f0)
2022-03-25 16:19:25 +01:00
Fabian Homborg
8f11ebb9d4 completions/csharp: Fix syntax error
(cherry picked from commit 4c40283d00)
2022-03-25 16:19:25 +01:00
Fabian Homborg
7469495459 complete: Stop wcslen just to figure out if string is not empty 2022-03-25 16:15:28 +01:00
Fabian Homborg
b6f47f76f0 completions/nmcli: Exit if networkmanager isn't running
These printed an error on load if networkmanager isn't running.

Since at that point it's not useful to complete anything, just try the
first call and if that fails exit.
2022-03-25 16:13:43 +01:00
Fabian Homborg
4c40283d00 completions/csharp: Fix syntax error 2022-03-25 16:10:21 +01:00
Fabian Homborg
351cd5bd4b set: Skip a wcslen 2022-03-25 16:06:10 +01:00
Fabian Homborg
bac2eef496 Remove useless use of wcslen 2022-03-25 16:06:10 +01:00
Fabian Homborg
42ea2758b6 Overload fish_wcstod for wcstring and length
This lets us skip wcslen a bunch
2022-03-25 16:06:10 +01:00
Fabian Homborg
fa1ecb8c67 reader: Some light stringification 2022-03-25 16:06:10 +01:00
Fabian Homborg
f98398b418 event: Pass name as wcstring
This passed a wchar_t, only to then construct a wcstring out of it.
Instead let's just pass it directly and move it.
2022-03-25 16:06:10 +01:00
ridiculousfish
ac888ac6af Migrate 'within_fish_init' to a parser-local variable
We need special handling when reporting backtraces for commands run
during startup, i.e. config.fish. Previously we had a global variable;
make it local to the parser to eliminate a global.

No functional change here.
2022-03-24 21:43:58 -07:00
Fabian Homborg
27c41ba74a CHANGELOG 3.4.1 2022-03-24 20:19:41 +01:00
Fabian Homborg
12cfaec0c9 Put funcsave long option back
This reverts ed8c78c0ea, emphatically.

Fixes #8830

(cherry picked from commit 2c702de52c)
2022-03-24 20:12:44 +01:00
Fabian Homborg
2c702de52c Put funcsave long option back
This reverts ed8c78c0ea, emphatically.

Fixes #8830
2022-03-24 20:11:39 +01:00
Kid
4ef6a41cc4 Rename fzf --phony completion to --disabled 2022-03-24 11:03:53 +01:00
David Adam
6a8efa3f15 ulimit: add basic tests 2022-03-24 10:23:04 +08:00
David Adam
a7eebff916 ulimit: return a specific error if option is not supported by the OS 2022-03-24 10:23:04 +08:00
David Adam
8c4c526698 ulimit: add new limits from FreeBSD/NetBSD
Short option names are taken from sh for those platforms where possible.
2022-03-24 10:23:04 +08:00
David Adam
2c2b87af07 ulimit: add new limits from Linux
Short options are taken from prlimit(1) where appropriate.

Closes #8786.
2022-03-24 10:23:04 +08:00
David Adam
ee69a2467e ulimit: some corrections to descriptions and documentation 2022-03-24 10:23:04 +08:00
ys64
c92cda9bec Is this a typo?
I copied the code, and gave me the following error:

Missing end to balance this function definition
2022-03-23 15:04:25 +01:00
Fabian Homborg
e458bf5763 Let nextd-or-forward-word binding move like normal forward_word
Broken in #8358, this caused nextd-or-forward-word to actually be
nextd-or-forward-bigword.

See #8790.

(cherry picked from commit 2101dd4add)
2022-03-22 22:11:43 +01:00
Fabian Homborg
f184061c16 CHANGELOG 2022-03-22 22:10:28 +01:00
Fabian Homborg
2101dd4add Let nextd-or-forward-word binding move like normal forward_word
Broken in #8358, this caused nextd-or-forward-word to actually be
nextd-or-forward-bigword.

See #8790.
2022-03-22 22:09:42 +01:00
Fabian Homborg
1f997de8bf Fix job run flog
The arguments didn't match the format string.
2022-03-21 16:26:01 +01:00
ridiculousfish
d0d5c62ec7 Fix case-changing autosuggestions generated mid-token
This fixes a bug where a case-changing autosuggestion generated from the
middle of a token would append too much to the end of the token.

Fixes #8820
2022-03-20 20:16:01 -07:00
ridiculousfish
1763e7d3bc Remove some dead code
These functions were unused.
2022-03-20 14:48:44 -07:00
ridiculousfish
7b1321f9a1 Remove cancellation groups
Cancellation groups were meant to reflect the following idea: if you ran a
simple block:

    begin
        cmd1
        cmd2
    end

then under job control, cmd1 and cmd2 would get separate groups; however if
either exits due to SIGINT or SIGQUIT we also want to propagate that to the
outer block. So the outermost block and its interior jobs would share a
cancellation group. However this is more complex than necessary; it's
sufficient for the execution context to just store an int internally.

This ought not to affect anything user-visible.
2022-03-20 14:39:00 -07:00
Fabian Homborg
12862b11cf CHANGELOG: Reword escape sequence thing 2022-03-20 20:23:49 +01:00
Fabian Homborg
166d4846ee CHANGELOG 2022-03-20 17:08:01 +01:00
Fabian Homborg
edbd3baa59 fish_config: Set colors that aren't set in the theme to empty
This allows keeping it to the fallback value, making us independent
from the theme that was set before.
2022-03-20 17:04:28 +01:00
Fabian Homborg
751c7cbf9c fish_config CLI: Use color fallbacks 2022-03-20 17:04:28 +01:00
Fabian Homborg
5926a75cc5 highlight: Also use the fallback variable if the main is empty
Currently, when a variable like $fish_color_command is set but empty:

    set -g fish_color_command

what happens is that highlight parses it and ends up with a "normal"
color.

Change it so instead it sees that the variable is empty and goes
on to check the fallback variable, e.g. fish_color_normal.

That makes it easier to make themes that override variables.

This means that older themes that expect an empty variable to be
"normal" need to be updated to set it to "normal".

Following from this, we could make writing .theme files easier by no
longer requiring them to list all variables with specific values.
Either the theme reader could be updated to implicitly set known color
variables to empty, or the themes could feature empty values.

See #8787.
2022-03-20 17:04:28 +01:00
pagedown
f8163f5d22 CHANGELOG 2022-03-20 16:33:13 +01:00
pagedown
1f51274353 Add completion for rclone 2022-03-20 16:33:13 +01:00
ridiculousfish
3e5284aaf2 Stop restoring tty modes when run non-interactively
fish reads the tty modes at startup, and tries to restore them to the
original values on exit, to be polite. However this causes problems when
fish is run in a pipeline with another process which also messes with the
tty modes. Example:

    fish -c 'echo foo' | vim -

Here vim's manipulation of the tty would race with fish, and often vim
would end up with broken modes.

Only restore the tty if we are interactive. Fixes #8705.
2022-03-19 14:55:54 -07:00
ridiculousfish
df2cbe321c Refactor tty transfer to be more deliberate
This is a big cleanup to how tty transfer works. Recall that when job
control is active, we transfer the tty to jobs via tcsetpgrp().

Previously, transferring was done "as needed" in continue_job. That is, if
we are running a job, and the job wants the terminal and does not have it,
we will transfer the tty at that point.

This got pretty weird when running mixed pipelines. For example:

    cmd1 | func1 | cmd2

Here we would run `func1` before calling continue_job. Thus the tty
would be transferred by the nested function invocation, and also restored
by that invocation, potentially racing with tty manipulation from cmd1 or
cmd2.

In the new model, migrate the tty transfer responsibility outside of
continue_job. The caller of continue_job is then responsible for setting up
the tty. There's two places where this gets done:

1. In `exec_job`, where we run a job for the first time.

2. In `builtin_fg` where we continue a stopped job in the foreground.

Fixes #8699
2022-03-19 14:48:36 -07:00
ridiculousfish
3f585cddfc Refactor job pgroup assignment
This is a cleanup of job groups, rationalizing a bunch of stuff. Some
notable changes (none user-visible hopefully):

1. Previously, if a job group wanted a pgid, then we would assign it to the
   first process to run in the job group. Now we deliberately mark which
   process will own the pgroup, via a new `leads_pgrp` flag in process_t. This
   eliminates a source of ambiguity.

2. Previously, if a job were run inside fish's pgroup, we would set fish's
   pgroup as the group of the job. But this meant we had to check if the job
   had fish's pgroup in lots of places, for example when calling tcsetpgrp.
   Now a job group only has a pgrp if that pgrp is external (i.e. the job is
   under job control).
2022-03-19 14:06:18 -07:00
Matti Viljanen
5994e44877 Fix launching fish_config on SailfishOS 2022-03-18 15:56:22 +01:00