+
Skip to content

Allow options to be combined in grep #152

@devth

Description

@devth

Currently -v and -C are separate commands:

!hep grep
grep <pattern> <list> # filters the items in <list> by <pattern>
grep -C <n> <pattern> <list> # filter items in <list> by <pattern> and include <n> items before and after each matched item
grep -v <pattern> <list> # filter items in <list> not matching <pattern>

But we should be able to combine flags in a single command, more like:

grep [-C n] [-v] <pattern> <list>

See here for an example of cli opts parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载