Skip to content

-c argument handling #2314

@lloeki

Description

@lloeki

Typical of sh shells is to have a -c flag that takes all the remainder arguments as a command. This allows for stuff like bash -l -c foo "$@" to work and splat the arguments properly, including strings with spaces.

Fish does not do this:

$ fish -l -c ls -1
fish: invalid option -- 1
$ fish -l -c "ls -1"
foo
bar
baz

While this allows to put -c anywhere as an argument, this isn't quite as useful as passing actual arguments to the command to run within fish.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions