The error occurs when it tries to display the error message.
❯ grename test-rename
status: Unknown option '-u'
~/.config/fish/functions/grename.fish (line 1):
in command substitution
called on line 4 of file ~/.config/fish/functions/grename.fish
in function 'grename' with arguments 'test-rename'
(Type 'help status' for related documentation)
Suggestion to change the argument of status command to current-command
echo "Usage: "(status current-command)" old_branch new_branch"