Skip to content

Commit

Permalink
subshell: ensure compatibility with fish 3.8
Browse files Browse the repository at this point in the history
The upcoming fish 3.8 will add a feature flag to officially deprecate
"%self," see

fish-shell/fish-shell@8d71eef

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).

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
  • Loading branch information
krobelus authored and zyv committed Aug 7, 2024
1 parent b921ad3 commit c249980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/subshell/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c249980

Please sign in to comment.