mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 15:05:27 +08:00
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
This commit is contained in:
parent
29413665c5
commit
8c09fc7a3a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user