Code Monkey home page Code Monkey logo

search's Introduction

search

Search your file system without having to remember how to string together complex find and grep commands with xargs.

$ search .
Directory: /Users/adrian/go/src/github.com/a-h/search
Include Names: []
Exclude Names: [.git]
Include Directories: true
Include Files: true
Include Text:
Exclude Text:
/Users/adrian/go/src/github.com/a-h/search
/Users/adrian/go/src/github.com/a-h/search/README.md
/Users/adrian/go/src/github.com/a-h/search/contains
/Users/adrian/go/src/github.com/a-h/search/contains/contains.go
/Users/adrian/go/src/github.com/a-h/search/main.go
/Users/adrian/go/src/github.com/a-h/search/searcher
/Users/adrian/go/src/github.com/a-h/search/searcher/matcher.go
/Users/adrian/go/src/github.com/a-h/search/searcher/searcher.go
/Users/adrian/go/src/github.com/a-h/search/searcher/searcher_test.go
/Users/adrian/go/src/github.com/a-h/search/searcher/settings.go
/Users/adrian/go/src/github.com/a-h/search/searcher/summary.go
Visited 32 directories and 46 files in 2.390197ms
$ search -text github.com .
Directory: /Users/adrian/go/src/github.com/a-h/search
Include Names: []
Exclude Names: [.git]
Include Directories: true
Include Files: true
Include Text: github.com
Exclude Text:
/Users/adrian/go/src/github.com/a-h/search/README.md
/Users/adrian/go/src/github.com/a-h/search/main.go
/Users/adrian/go/src/github.com/a-h/search/searcher/searcher_test.go
Visited 32 directories, 46 files and read 10.3K in 2.455713ms

Install

go get github.com/a-h/search
cd search
go install

Get help

search
usage: search [<args>] directory
  -directories
        set to true to include directories (default true)
  -exclude-names string
        path names to exclude (default ".git")
  -exclude-text string
        text to search for
  -files
        set to true to include files (default true)
  -names string
        path names to search for
  -print-settings
        prints out the settings during search (default true)
  -print-summary
        prints out a summary after search (default true)
  -text string
        text to search for

List all files and directories in the current subdirectory and lower

search .

Find text in all go files

search -names *.go -text github.com/a-h .
grep -l -r github.com/a-h --include=*.go .
# -l list files only (no surrounding context)
# -r recursive
# --include only includes paths which match the pattern

Find directories called search

search -names search -files=false .

Find directories that start with s

search -names "s*" -files=false .

search's People

Contributors

a-h avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.