8000 passing invalid long option to `function` silently causes function definition to fail · Issue #2827 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

passing invalid long option to function silently causes function definition to fail #2827

@krader1961

Description

@krader1961

While responding to this comment I noticed that passing an invalid long option to the function command causes the function definition to silently fail.

Reproduction Steps:

  1. Type
function wtf --on-function-return
    echo wtf called
end

The $status var is set to one but no error message is emitted.

  1. type wtf and notice you get this error: fish: Unknown command 'wtf'
  2. type functions and notice wtf isn't present.

Expected behavior:

The function definition fails with an explicit error message.


Fish version: git head

Metadata

Metadata

Assignees

Labels

bugSomething that's not working as intendedregressionSomething that used to work, but was broken, especially between releasesrelease notesSomething that is or should be mentioned in the release notes

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0