From 8c09fc7a3af2dbda1755c04628df7f7b5eadc5db Mon Sep 17 00:00:00 2001 From: Victor Diaz Date: Sun, 12 Sep 2021 14:42:16 +0200 Subject: [PATCH] Prepend command to cat *Problem:* edit_command_buffer uses `cat` to return the modified content. If a person has an alias for `cat` to a different command such `bat`** the editing will not be useful anymore since bat decorates the text with frames, line counts, etc *Solution* Appending command to cat, fish will ignore the alias and execute the real command according to this https://fishshell.com/docs/current/cmds/command.html ** https://github.com/sharkdp/bat --- share/functions/edit_command_buffer.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/edit_command_buffer.fish b/share/functions/edit_command_buffer.fish index d31155c8b..20ddc54ff 100644 --- a/share/functions/edit_command_buffer.fish +++ b/share/functions/edit_command_buffer.fish @@ -70,7 +70,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern if test $editor_status -eq 0 -a -s $f # Set the command to the output of the edited command and move the cursor to the # end of the edited command. - commandline -r -- (cat $f) + commandline -r -- (command cat $f) commandline -C 999999 else echo