Added git-grep and git-diff

This commit is contained in:
2026-08-12 22:28:27 +02:00
parent e4e37d2214
commit aebd420c3c
5 changed files with 179 additions and 40 deletions
+6 -6
View File
@@ -80,11 +80,8 @@
#f
#f
(git-exe)
(map (lambda (arg)
(if (symbol? arg)
(symbol->string arg)
arg))
args))))
(map (λ (arg) (format "~a" arg)) args)
)))
(close-output-port stdin)
(let ((output-channel (make-channel)))
(define (read-output source port)
@@ -154,9 +151,12 @@
)
)
(define re-a #px"~+")
(define (git-displ out)
(let ((str (if (string? out) out (string-join out "\n"))))
(unless (string=? (string-trim str) "")
(info-git str)
(let ((s (regexp-replace* re-a str "~~")))
(info-git s))
(when (cfg-get 'git 'display-output #t)
(displayln str)))))