[PATCH] fish shell: use $fish_pid instead of deprecated %self
Johannes Altmanninger via mc-devel <mc-devel-+hD5IHI5XseWCegYutOAJTiNl0CLU6MPYPYVAmT7z5s@public.gmane.org> Mon, 29 Jul 2024 22:32:39 +0200
| Newsgroups | gmane.comp.gnome.apps.mc.devel |
|---|---|
| Message-ID | <[email protected]> |
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-+hD5IHI5XseWCegYutOAJTiNl0CLU6MPYPYVAmT7z5s@public.gmane.org
https://lists.midnight-commander.org/mailman/listinfo/mc-devel