From 4162710f8750d46fb72a2d38891685ab5daeca32 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Date: Thu, 8 Oct 2020 17:24:08 +0200
Subject: [PATCH 3/7] fixup FISH subshell setup
move binding commands out of the fish_prompt function definition, use
consistent command separators, and remove excess backslashes from the
bindings.
amends ff0fc17a.
---
src/subshell/common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/subshell/common.c b/src/subshell/common.c
index 1d422999e..3e1a2f7ee 100644
a
|
b
|
init_subshell_precmd (char *precmd, size_t buff_size) |
1136 | 1136 | break; |
1137 | 1137 | case SHELL_FISH: |
1138 | 1138 | g_snprintf (precmd, buff_size, |
1139 | | " if not functions -q fish_prompt_mc;" |
| 1139 | " bind \\e" SHELL_BUFFER_KEYBINDING " 'echo (commandline)>&%d';" |
| 1140 | "bind \\e" SHELL_CURSOR_KEYBINDING " 'echo (commandline -C)>&%d';" |
| 1141 | "if not functions -q fish_prompt_mc;" |
1140 | 1142 | "functions -e fish_right_prompt;" |
1141 | 1143 | "functions -c fish_prompt fish_prompt_mc; end;" |
1142 | 1144 | "function fish_prompt;" |
1143 | | "bind \\e\\" SHELL_BUFFER_KEYBINDING " 'echo (commandline)>&%d'\n" |
1144 | | "bind \\e\\" SHELL_CURSOR_KEYBINDING " 'echo (commandline -C)>&%d'\n" |
1145 | 1145 | "echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP %%self; end\n", |
1146 | 1146 | command_buffer_pipe[WRITE], command_buffer_pipe[WRITE], subshell_pipe[WRITE]); |
1147 | 1147 | break; |