Added git-grep and git-diff
This commit is contained in:
@@ -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)))))
|
||||
|
||||
Reference in New Issue
Block a user