From cd3a0aa66cf9ce47b1f7d3812acf6f0c01569dd5 Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Fri, 26 Apr 2019 19:50:30 -0400 Subject: Remove the regex feature from list-groups --- brisket.hy | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'brisket.hy') diff --git a/brisket.hy b/brisket.hy index e18732a..d018d2d 100644 --- a/brisket.hy +++ b/brisket.hy @@ -26,7 +26,6 @@ (import [os [getenv makedirs]]) (import [os.path [dirname expanduser]]) (import [sys [argv exit stderr]]) -(import [re [match]]) (import [nntplib [NNTP-SSL]]) (import [subprocess [Popen PIPE]]) @@ -71,17 +70,15 @@ usage: version" || ||" __version__))) (defn list-groups [session &rest args] - "List groups on the server, matching a pattern if one is given. + "List groups on the server. -usage: list-groups [pattern (optional)]" - (let [pattern (if (>= (len args) 1) (nth args 0)) - groups (second (.list session))] +usage: list-groups" + (let [groups (second (.list session))] (for [group groups] - (if (or (is pattern None) (match pattern group.group)) - (print group.group))))) + (print group.group)))) (defn describe-group [session &rest args] - "Describe the first group matching the pattern. + "Describe the first group whose name matches the pattern. usage: describe-groups [pattern]" (when (< (len args) 1) -- cgit v1.3