glocate

command module
v0.0.0-...-f35c456 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 8 Imported by: 0

README

Glocate

go report CI/CD

A simple cli tool for indexing/searching files in your filesystem gopher

glocate is an alternative to the locate/updatedb commands written in Go.

Installation

go install github.com/fedeztk/glocate@latest

Usage

Create the index database

glocate --index

Search for a pattern (regex are supported out of the box)

glocate "pattern"             # case sensitive
glocate --smartcase "pattern" # case insensitive if the pattern is all lowercase
glocate --color "pattern"     # colorize the output

For a full list of options and shortcuts see the help page

glocate --help
Configuration

The configuration can be done via environment variables, flags, and a config file.

The config file is in yaml format. It will be created automatically if it does not exist under $HOME/.config/glocate/glocate.yaml. Default values are shown below.

directories: # directories to index
  - "$HOME"

ignoredPatterns: # patterns to ignore
  - "$HOME/.cache"

ignoreSymlinks: true # do not follow symlinks
ignoreHidden: false # ignore hidden files
Acknowledgements

A special thanks to the creator of the walk implementation used to walk the filesystem (see here).

Acknowledgements also go to the creators of all the other libraries used in this project, see go.mod for a full list.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL