cl-grep

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ebb561c88d5570a0226b863c5227e0eb2f119282
parent 927295bda1a5744bf4e39c3d858758b4f09db754
Author: ChanderG <[email protected]>
Date:   Thu, 27 Nov 2025 11:31:33 +0530

add simple file walking

Diffstat:
Mgrep.asd | 3++-
Mgrep.lisp | 8+++++++-
Mpackage.lisp | 2+-
3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/grep.asd b/grep.asd @@ -3,7 +3,8 @@ :author "Chander Govindarajan" :components ((:file "package") (:file "grep")) - :depends-on (:uiop) + :depends-on (:uiop + :filesystem-utils) :build-operation "program-op" :build-pathname "cl-grep" :entry-point "cl-grep:main") diff --git a/grep.lisp b/grep.lisp @@ -1,8 +1,14 @@ (in-package cl-grep) +(defun queue-file (file match) + (format t "Visiting file: ~a~%" file)) + ;; Main entrypoint for the grep functionality (defun grep-launcher (str dir) - ()) + (map-directory (lambda (x) (queue-file x str)) + dir + :type ':file + :recursive t)) (defun main () (let* ((args (uiop:command-line-arguments)) diff --git a/package.lisp b/package.lisp @@ -1,3 +1,3 @@ (defpackage cl-grep - (:use :cl) + (:use :cl :org.shirakumo.filesystem-utils) (:export #:main))