home-services: shells: Use match-record-lambda instead of lambda with a single expression match-record
parent
bd7484f873
commit
e853d05dc1
|
@ -61,23 +61,22 @@
|
|||
|
||||
(define (serialize-fish-abbreviations field-name val)
|
||||
#~(string-append
|
||||
#$@(map (lambda (abbr)
|
||||
(match-record abbr <abbreviation>
|
||||
(name pattern position marker expansion)
|
||||
#~((@@ (ice-9 format) format) #f
|
||||
"~%abbr --add '~a' \\~%~
|
||||
~@[ --position ~a \\~%~]~
|
||||
~@[ --regex \"~a\" \\~%~]~
|
||||
~@[ --set-cursor=~a \\~%~]~
|
||||
~@[ ~a~]~%"
|
||||
'#$name
|
||||
'#$position
|
||||
#$pattern
|
||||
#$marker
|
||||
#$(if (fish-function? expansion)
|
||||
(format #f "--function ~a"
|
||||
(fish-function-name expansion))
|
||||
(format #f "\"~a\"" expansion)))))
|
||||
#$@(map (match-record-lambda <abbreviation>
|
||||
(name pattern position marker expansion)
|
||||
#~((@@ (ice-9 format) format) #f
|
||||
"~%abbr --add '~a' \\~%~
|
||||
~@[ --position ~a \\~%~]~
|
||||
~@[ --regex \"~a\" \\~%~]~
|
||||
~@[ --set-cursor=~a \\~%~]~
|
||||
~@[ ~a~]~%"
|
||||
'#$name
|
||||
'#$position
|
||||
#$pattern
|
||||
#$marker
|
||||
#$(if (fish-function? expansion)
|
||||
(format #f "--function ~a"
|
||||
(fish-function-name expansion))
|
||||
(format #f "\"~a\"" expansion))))
|
||||
val)))
|
||||
|
||||
(define (serialize-fish-env-vars field-name val)
|
||||
|
|
Loading…
Reference in New Issue