Ticket 3944: support user-defined prompt in the fish subshell.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrzej Pronobis 2018-10-21 19:51:20 +03:00 committed by Andrew Borodin
parent 5bb73ee1c8
commit c5aaeda39c

View File

@ -904,9 +904,9 @@ init_subshell_precmd (char *precmd, size_t buff_size)
*/ */
g_snprintf (precmd, buff_size, g_snprintf (precmd, buff_size,
" if not functions -q fish_prompt_mc;" " if not functions -q fish_prompt_mc;"
"functions -e fish_right_prompt;"
"functions -c fish_prompt fish_prompt_mc; end;" "functions -c fish_prompt fish_prompt_mc; end;"
"function fish_prompt;" "function fish_prompt;"
"echo (whoami)@(hostname -s):(set_color $fish_color_cwd)(pwd)(set_color normal)\\$\\ ; "
"echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP %%self; end\n", "echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP %%self; end\n",
subshell_pipe[WRITE]); subshell_pipe[WRITE]);
break; break;