Handbook
Glossary
parse-gitignore ( obj -- gitignore )
Vocabulary
gitignore
Inputs
obj
an
object
Outputs
gitignore
an
object
Definition
IN:
gitignore
GENERIC:
parse-gitignore
( obj -- gitignore )
Methods
USING:
gitignore
globs
kernel
sequences
splitting
unicode
;
M:
object
parse-gitignore
[
[
blank?
]
trim
]
map
harvest
[
"#"
head?
]
reject
[
"!"
?head
[
"\\#"
?head
[
"#"
prepend
]
when
"\\!"
?head
[
"!"
prepend
]
when
47
over
but-last-slice
index
[
"**/"
prepend
]
unless
<glob>
]
dip
<gitignore>
]
map
;
USING:
gitignore
splitting
strings
;
M:
string
parse-gitignore
split-lines
parse-gitignore
;