[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 709 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 709 Bytes

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