cl-grep

Simple implementation of grep
Log | Files | Refs

commit 6c6de902436994d936b9929a1549572d2095ef9c
parent b7be5964b64783d21d4e1933cdff638c90a95926
Author: ChanderG <[email protected]>
Date:   Sat,  6 Dec 2025 20:10:17 +0530

bugfix: error when match occurs just at the very end

due to wrong subseq calc for the very last portion

Diffstat:
Mgrep.lisp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grep.lisp b/grep.lisp @@ -42,7 +42,7 @@ (write-string (color-red (subseq line m (+ m lm))) stream) (setf s (+ m lm))) finally - (format stream "~a~%" (subseq line s (- (length line) 1)))))) + (format stream "~a~%" (subseq line s (length line)))))) (format stream "~%")) ;; ;; alternative grep like format to easily test parity