search-and-replace

command module
v0.0.0-...-4b52eb7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2017 License: MIT Imports: 12 Imported by: 0

README

Build Status Coverage

Search And Replace

Features

  • search and replace a string in the current directory
  • regular expressions
  • rename files and directories
  • interactive mode - confirm every replacement and rename
  • files ignored by a .gitignore in the working directory are ignorered

Installation

go get github.com/holgerk/search-and-replace
cd $GOPATH/src/github.com/holgerk/search-and-replace
go get
go install

Usage

Usage:
  search-and-replace [OPTIONS] Search Replace

Application Options:
  -d, --dry-run      Do not change anything
  -r, --regexp       Treat search string as regular expression
  -v, --verbose      Show verbose debug information
  -i, --interactive  Confirm every replacement

Help Options:
  -h, --help         Show this help message

Arguments:
  Search
  Replace

Examples

Regexp

match baarfooo and replace with fooobaar

search-and-replace -r "(ba+r)(fo+)" "${2}${1}"

Demo (Interactive Mode)

demo-interactive-mode

TODO

  • -ignore files from .gitignore-

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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