diff

    diff command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.4
    License
    Apache-2.0
    Last updated
    4 days ago
    Downloads
    123

    #diff

    Compare files and directories for MoonX.

    moonx cli/diff@0.2.4 [-qsauciwbBZrN] [-U LINES | -C LINES] [--label LABEL] FILE1 FILE2

    #Supported scope

    Produce normal, unified or context differences. One input may be stdin. Exit 0 for equal inputs, 1 for differences and 2 for errors.

    Default edit alignment follows GNU's repeated-line anchor heuristic. Sparse repetitions inside unmatched regions need not produce a globally minimal script; small-input reconstruction and minimality remain separately tested.

    #Options

    OptionDescription
    -q / -sReport differences briefly / report equal files.
    -u, -U LINES / -c, -C LINESSelect unified / context output.
    --label LABELOverride a header label.
    -aTreat binary data as text.
    -i / -w / -b / -Z / -BIgnore ASCII case / whitespace / whitespace amount / trailing whitespace / blank-only changes.
    --strip-trailing-crRemove one CR before each LF.
    -r / -NRecurse / treat missing files as empty.
    --unidirectional-new-fileTreat missing files as empty on the left only.
    --help / --versionShow help / package version.

    #Limitations

    • Locale collation and comparing symbolic-link target text are unsupported.
    • Large comparisons retain complete inputs in memory.

    #Examples

    moonx cli/diff@0.2.4 -u old.txt new.txt moonx cli/diff@0.2.4 -r old-dir new-dir