[mc-devel] [PATCH] fish shell: use $fish_pid instead of deprecated %self
Yury V. Zaytsev
yury at shurup.com
Tue Jul 30 11:33:58 UTC 2024
Hi Johannes,
Thank you for reaching out to us! I’ve added the patch to the ticket:
https://midnight-commander.org/ticket/4524#comment:60
We’ll take it in the next release. Still no exact timeline on that, but we might be able to get it out by the end of summer.
All the best,
Yury
> On 29. Jul 2024, at 22:32, Johannes Altmanninger via mc-devel <mc-devel at lists.midnight-commander.org> wrote:
>
> The upcoming fish 3.8 will add a feature flag to officially deprecate
> "%self," see
> https://github.com/fish-shell/fish-shell/commit/8d71eef1da7108b37eb50150d2511f576de9fc44
>
> Unfortunately this can cause mc+fish to break for users who configured
> fish with "set -U fish_features all" which opts into any new feature
> flag, thus disabling %self expansion.
>
> Prevent this potential breakage by using the recommended "$fish_pid",
> which was introduced in fish 3.0.0 (December 2018).
> ---
> src/subshell/common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/subshell/common.c b/src/subshell/common.c
> index dbc32afc2..72f001569 100644
> --- a/src/subshell/common.c
> +++ b/src/subshell/common.c
> @@ -1176,7 +1176,7 @@ init_subshell_precmd (char *precmd, size_t buff_size)
> "functions -e fish_right_prompt;"
> "functions -c fish_prompt fish_prompt_mc; end;"
> "function fish_prompt;"
> - "echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP %%self; end\n",
> + "echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP $fish_pid; end\n",
> command_buffer_pipe[WRITE], command_buffer_pipe[WRITE], subshell_pipe[WRITE]);
> break;
>
> --
> 2.45.1.204.gd8ab1d464d
>
> --
> mc-devel mailing list
> mc-devel at lists.midnight-commander.org
> https://lists.midnight-commander.org/mailman/listinfo/mc-devel
More information about the mc-devel
mailing list