Skip to content

Builtin wrapper functions produce a backtrace with invalid options #5434

@meain

Description

@meain

fish version: 2.7.1

If I pass in an unknown argument to a builtin, it produces some unnecessary output and not just the Unknown option message.

meain@plank ~> cd -r
cd: Unknown option '-r'
/usr/local/Cellar/fish/2.7.1/share/fish/functions/cd.fish (line 30):
    builtin cd $argv
    ^
in function 'cd'
        called on standard input
        with parameter list '-r'


       cdcd - change directory
        -

   Synopsis
       cd [DIRECTORY]

cd: Type 'help cd' for related documentation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions