[mc-devel] [PATCH] fish shell: use $fish_pid instead of deprecated %self
Johannes Altmanninger
aclopte at gmail.com
Mon Jul 29 20:32:39 UTC 2024
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
More information about the mc-devel
mailing list