Sign in

    rg

    Recursive text search for MoonX.

    Download zip
    Author
    Version
    0.1.0
    License
    MIT AND Apache-2.0
    Last updated
    8 hours ago
    Downloads
    4

    #rg

    Search files recursively for MoonX.

    Install cli/rg@0.1.0, using cli/core@0.9.0. The repository's release inventory records accepted coordinates and their independent expected cases.

    moonx cli/rg@0.1.0 [OPTIONS] PATTERN PATH...

    #Supported scope

    Search explicit paths or stdin (-) with regex/Unicode matching, glob/ignore rules, encodings, context, replacement, counts, multiline and JSON output. --files lists paths; --pre runs a user-selected preprocessor. Exit 0 for a match, 1 for no match and 2 for errors.

    #Options

    OptionDescription
    -e PATTERN / -f FILE / -FAdd patterns / read patterns / fixed-string search.
    -i / -s / -SIgnore case / respect case / smart case.
    -w / -x / -vWhole word / whole line / inverted matches.
    -n / -N / --column / -bLine numbers / no line numbers / columns / byte offsets.
    -A N / -B N / -C NAfter / before / surrounding context.
    -o / -r TEXTOnly matches / replace matched text.
    -c / --count-matches / -l / --files-without-matchCount lines / count matches / matching paths / nonmatching paths.
    -g GLOB / --iglob GLOB / --hidden / --no-ignoreFilter paths and control hidden/ignored entries.
    -t TYPE / -T TYPE / --type-listInclude / exclude file types / list types.
    -L / --max-depth=NFollow links / limit traversal depth.
    -a / --binary / -0 / --null-dataText / binary search / NUL path separators / NUL records.
    -U / --multiline-dotall / --encoding=NAMEMultiline patterns / dot across lines / input encoding.
    --json / --files / --sort=KEY / --sortr=KEYJSON / list files / ascending or descending sorting.
    --color=WHEN / --heading / -H / -IColor / headings / include or suppress path labels.
    --pre=COMMAND / --pre-glob=GLOBRun an explicit preprocessor / select its inputs.
    -q / --no-messages / --statsQuiet / suppress diagnostics / statistics.
    --help / --versionShow help / package version.

    #Limitations

    • Search requires explicit paths or -; no-path searches are rejected. --files can default to the current directory.
    • Compressed search (-z/--search-zip), PCRE2, --one-file-system and creation-time sorting are unsupported.
    • --dfa-size-limit is rejected: the engine has a fixed state-count limit, not a configurable byte budget. Indexing options (-X/--index, --x-crud, --x-force, --x-path) are also rejected.
    • Automatic terminal color/headings are off. Raw non-UTF-8 paths and redirected-output same-file exclusion are unsupported.
    • Searches are single-threaded; --threads does not start workers, and mmap options use streaming reads.
    • Long records may require record-sized buffers. Multiline and sorted modes may retain whole input or path lists.

    #Examples

    moonx cli/rg@0.1.0 -n 'pattern' notes.txt moonx cli/rg@0.1.0 --hidden -g '*.mbt' 'pattern' . printf 'one\ntwo\n' | moonx cli/rg@0.1.0 -i 'ONE' - moonx cli/rg@0.1.0 --files --sort path

    Source Files