Skip to content

Consider using an external argument parser #97

@oSoMoN

Description

@oSoMoN

Argument parsing in the diff command (and in the WIP cmp command) is implemented manually. The rationale for not using a general-purpose parser like clap is that it does not offer the flexibility we need to replicate the GNU diffutils arguments. We'd lose in compatibility what we would gain in code simplicity.

While researching how it's done in uutils/coreutils, I came across uutils/coreutils#4254, which looks especially relevant. Perhaps we should consider giving uutils-args a test run to understand if it fits the needs of the diffutils applications, and provide constructive feedback and contributions in case it doesn't.

There are currently only two CLI applications (out of a total of 4) to migrate, so the advantage over uutils/coreutils is that the effort would be rather limited.

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