Eschargo
Escape regex characters easily with this simple binary - for copy/pasting into code projects, Splunk, and more. Pronounced as "escargot"!
Install / Use
/learn @p-rs/EschargoREADME

Installation
# brew
brew tap p-rs/homebrew-eschargo
brew install eschargo
# scoop
scoop bucket add eschargo https://github.com/p-rs/scoop-eschargo.git
scoop install eschargo
# via go build
go build -o ecg github.com/p-rs/eschargo
# or via releases
tar xzf release-file.tgz /usr/local/bin/ecg
Usage
Run any standard in/out through ecg:
# output: \[02/Nov/2020:21:50:22 \+0000\]
ecg '[02/Nov/2020:21:50:22 +0000]'
# outputs \[02/Nov/2020:21:50:22 \+0000\] to MacOS clipboard
ecg '[02/Nov/2020:21:50:22 +0000]' | pbcopy
# output: escapes characters in example.txt
cat example.txt | ecg
# outputs escapes characters in example.txt and outputs to MacOS clipboard
cat example.txt | tr -d '\n' | ecg | pbcopy
Limitation
ecg does not account for bash/history escaping, so make sure to use single quotes.
License
MIT. See LICENSE for more details.
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
