censor-shell

command module
v0.0.0-...-36c67af Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 17 Imported by: 0

README

censor-shell

Installation

go install

Usage

Make the file ~/.censor-shell as an INI file with the following content:

[nameofmyreplacement]
pattern = badword
replacement = goodword

[anotherpattern]
pattern = abc([a-z]+)ghi
replacement = zyx${1}tsr

You can specify any amount of replacement rules as you like. Patterns and replacement follow standard Go regexp formats.

Now open a new shell and execute the censor-shell command. You'll be able to see that all outputs are replaced dynamically:

> echo badword
goodword
> echo abcdefghi
zyxdeftsr

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