cl-grep

Simple implementation of grep
Log | Files | Refs

commit 8368c15fb5036701e43639f01196af31c94b7044
parent 6eb2dfa20a332dc6530f59a78e7df499069749ad
Author: ChanderG <[email protected]>
Date:   Mon,  8 Dec 2025 17:10:52 +0530

expose convenient func to use from lisp repl

takes string input for dir, instead of path

Diffstat:
Mgrep.lisp | 4++++
Mpackage.lisp | 2+-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/grep.lisp b/grep.lisp @@ -186,6 +186,10 @@ (lq:push-queue :done *print-queue*) (bt:join-thread print-worker))) +(defun grep-func (str dirstr) + (let ((dir (car (directory dirstr)))) + (grep-launcher str dir))) + (defun main () (let* ((args (uiop:command-line-arguments)) (nargs (length args))) diff --git a/package.lisp b/package.lisp @@ -3,4 +3,4 @@ (:local-nicknames (:fsu :org.shirakumo.filesystem-utils) (:pu :org.shirakumo.pathname-utils) (:lq :lparallel.queue)) - (:export #:main #:grep-launcher)) + (:export #:main #:grep-func))