Skip to content

exec command steals option flags from its subcommand #4005

Closed

Description

@jkozak

Describe the bug

$ exec ls -l
error: exec unexpected -l
  ┌─ shell:1:10
  │
1 │ exec ls -l
  │          ^ unexpected flag (try exec -h)

(this works without the -l)

How to reproduce

as above

Expected behavior

subcommand should be executed, replacing shell,

Screenshots

No response

Configuration

key value
version 0.36.0
build_os linux-x86_64
rust_version rustc 1.53.0
cargo_version cargo 1.53.0
pkg_version 0.36.0
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
features clipboard-cli, ctrlc, dataframe, default, rustyline, term, trash, uuid, which, zip
installed_plugins binaryview, chart bar, chart line, fetch, from bson, from sqlite, inc, match, post, ps, query json, s3, selector, start, sys, textview, to bson, to sqlite, tree, xpath

Additional context

I believe this breaks emacs's tramp functionality when attempt to access remote files as root via /ssh:host|sudo:root@host: if the remote user user is using nu as a logon shell.

This is running on a NixOS system hence the implausible date in Configuration above.

Activity

  1. kubouch commented on Sep 15, 2021

    @kubouch
    Contributor

    Seems similar to #2675 .

    You can run it by wrapping the flag into quotes: exec ls "-l".

  2. added
    category:bug
    on Sep 15, 2021
  3. kubouch commented on Oct 27, 2021

    @kubouch
    Contributor

    I'll close this issue since there is an older one open already on this topic.

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

    category:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions