mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-10 23:20:06 +01:00
chore(patterns): add nix-log pattern
This commit is contained in:
parent
0ea17e1f68
commit
b1807d5013
2 changed files with 4 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ pub(super) const EXCLUDE_PATTERNS: [(&str, &str); 1] =
|
|||
///
|
||||
/// The email address was obtained at https://www.regular-expressions.info/email.html.
|
||||
/// Some others were obtained from Ferran Basora, the rest is by me.
|
||||
pub(super) const PATTERNS: [(&str, &str); 22] = [
|
||||
pub(super) const PATTERNS: [(&str, &str); 23] = [
|
||||
("markdown-url", r"\[[^]]*\]\(([^)]+)\)"),
|
||||
(
|
||||
"url",
|
||||
|
|
@ -49,6 +49,7 @@ pub(super) const PATTERNS: [(&str, &str); 22] = [
|
|||
r#"(?:--[a-z][0-9a-z\-_]+|-[a-z])(?: |=)([^-\s\n]\S+)"#,
|
||||
),
|
||||
("nix-shas", r#"((sha256|sha512)-[a-zA-Z0-9+/=]{44})"#),
|
||||
("nix-log", r#"(nix log \/nix\/store\/[a-z0-9]{32}-.+?\.drv)"#),
|
||||
];
|
||||
|
||||
/// Type-safe string Pattern Name (newtype).
|
||||
|
|
|
|||
|
|
@ -84,6 +84,8 @@ setup_pattern_binding "P" "--pattern-name pointer-address"
|
|||
setup_pattern_binding "q" "-x quoted-single -x quoted-double -x quoted-backtick"
|
||||
# prefix + t + s searches for nix shas
|
||||
setup_pattern_binding "s" "--pattern-name nix-shas"
|
||||
# prefix + t + l searches for "nix log .drv"
|
||||
setup_pattern_binding "l" "--pattern-name nix-log"
|
||||
# prefix + t + u searches for URLs
|
||||
setup_pattern_binding "u" "--pattern-name url"
|
||||
# prefix + t + U searches for UUIDs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue