home-services: shells: Use match-record-lambda instead of lambda with a single expression match-record

pull/1/head
Luis Guilherme Coelho 2023-11-26 12:36:50 -03:00
parent bd7484f873
commit e853d05dc1
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 16 additions and 17 deletions

View File

@ -61,8 +61,7 @@
(define (serialize-fish-abbreviations field-name val) (define (serialize-fish-abbreviations field-name val)
#~(string-append #~(string-append
#$@(map (lambda (abbr) #$@(map (match-record-lambda <abbreviation>
(match-record abbr <abbreviation>
(name pattern position marker expansion) (name pattern position marker expansion)
#~((@@ (ice-9 format) format) #f #~((@@ (ice-9 format) format) #f
"~%abbr --add '~a' \\~%~ "~%abbr --add '~a' \\~%~
@ -77,7 +76,7 @@
#$(if (fish-function? expansion) #$(if (fish-function? expansion)
(format #f "--function ~a" (format #f "--function ~a"
(fish-function-name expansion)) (fish-function-name expansion))
(format #f "\"~a\"" expansion))))) (format #f "\"~a\"" expansion))))
val))) val)))
(define (serialize-fish-env-vars field-name val) (define (serialize-fish-env-vars field-name val)