Skip to content

nu-complete: unkown flag causes an error #5294

Closed

Description

@rsteube

Describe the bug

A flag unkown to nushell causes an error when trying to invoke a command with an extern config.

How to reproduce

  export extern "git push" [
  ]
git push --set-upstream origin branch

Expected behavior

Should be able to invoke the command even if the flag is unknown to nushell.

Screenshots

No response

Configuration

key value
version 0.61.1
branch
tag
short_commit 2a18206
commit_hash 2a18206
commit_date 2022-04-21 11:50:32 +00:00
build_os linux-x86_64
rust_version rustc 1.59.0 (9d1b2106e 2022-02-23)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.59.0 (49d8809dc 2022-02-10)
pkg_version 0.61.1
build_time 2022-04-22 10:47:11 +02:00
build_rust_channel debug
features default, trash, which, zip
installed_plugins

Additional context

git push --set-upstream origin branch
Error: nu::parser::unknown_flag (https://docs.rs/nu-parser/0.61.1/nu_parser/enum.ParseError.html#variant.UnknownFlag)

  × The `git` command doesn't have flag `set-upstream`.
   ╭─[entry #12:1:1]
 1 │ git push --set-upstream origin branch
   ·          ───────┬──────
   ·                 ╰── unknown flag
   ╰────
  help: use git --help for a list of flags

Activity

  1. added
    category:enhancement
    on Apr 22, 2022
  2. added
    A:completions
    on Jul 24, 2022
  3. added a commit that references this issue on Dec 21, 2022
  4. added this to the v0.74 milestone on Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:completionscategory:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions