From 309899168a086de88acf97fd6683387a7af7078c Mon Sep 17 00:00:00 2001 From: Max Audron Date: Fri, 22 Oct 2021 19:08:59 +0200 Subject: write tons of documentation and reorganize some modules --- src/hooks/sed/mod.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/hooks/sed/mod.rs') diff --git a/src/hooks/sed/mod.rs b/src/hooks/sed/mod.rs index 3128372..7b7906c 100644 --- a/src/hooks/sed/mod.rs +++ b/src/hooks/sed/mod.rs @@ -1,3 +1,22 @@ +//! sed for irc. replace text in past messages +//! +//! Perform sed replaces on single messages in the buffers history, up to 10k messages old. +//! +//! ```text +//! <+basso> crystalmett: welcome back +//! <%audron> s/wel/whale/ +//! <\__{^-_-^}> crystalmett: whalecome back +//! ``` +//! +//! # Supported flags +//! ```text +//! g global: match every occurrence of the regex in a line +//! i case-insensitive: letters match both upper and lower case +//! s allow . to match \n +//! U swap the meaning of x* and x*? +//! x ignore whitespace and allow line comments (starting with `#`) +//! ``` + use anyhow::{anyhow, bail, Context, Result}; use irc::client::prelude::*; -- cgit v1.2.3