fix(edit_command_buffer): ignore cat alias

Signed-off-by: Shigure Kurosaki <shigure@hqsy.net>

Closes #12007
This commit is contained in:
Shigure Kurosaki
2025-10-31 01:18:38 +08:00
committed by Johannes Altmanninger
parent 3f9d8db5b7
commit dad58ac20a

View File

@@ -97,7 +97,7 @@ function edit_command_buffer --description 'Edit the command buffer in an extern
echo (_ "or the file was empty")
end
if set -q cursor_from_editor[1]
eval set -l pos "$(cat $cursor_from_editor)"
eval set -l pos "$(command cat $cursor_from_editor)"
if set -q pos[1] && test $pos[1] = $f
set -l line $pos[2]
set -l indent (math (string length -- "$raw_lines[$line]") - (string length -- "$unindented_lines[$line]"))