Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

idx search for filesystem

Search indexed file contents.

Signature

> idx search {flags} ...rest

Flags

  • --regex, -r: Use regular-expression matching mode.
  • --fuzzy, -f: Use fuzzy line-matching mode.
  • --limit, -l {int}: Maximum number of matches to collect.

Parameters

  • ...rest: One or more search patterns.

Input/output types:

inputoutput
nothinglist<record>

Examples

Search indexed file contents for a plain text pattern

> idx search hello

Search using a regular expression

> idx search --regex 'fn \w+'

Search with multiple patterns simultaneously

> idx search TODO FIXME HACK

Notes

Mode selection: plain text is the default and treats each pattern literally, --regex evaluates the patterns as regular expressions, and --fuzzy performs approximate line matching.