Skip to content

Commit

Permalink
Improve terminology: regexp
Browse files Browse the repository at this point in the history
In the Racket world it's called 'regexp' not 'regex'
  • Loading branch information
BostX committed Jun 27, 2022
1 parent ecc3e64 commit 3a6b0bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

(define case-sensitive "i")
(define case-insensitive "-i")
;; passed directly to the regex as a flag for case-sensitivity flag
;; passed directly to the regexp as a flag for case-sensitivity flag
(define case-sensitivity (make-parameter case-sensitive))
(define case-sensitivity-help-text
(format "case-sensitive `~a`~a or case-insensitive `~a`~a search."
Expand Down Expand Up @@ -81,10 +81,10 @@ racket main.rkt -f \"shells|linux\" -p title
;; TODO check if the case-sensitivity value is allowed
;; TODO crp: read /home/bost/dev/notes/org-roam/*utf8.org
;; see also .spacemacs definition
[("-f" "--files") REGEX
[("-f" "--files") REGEXP
"Regexp matching a list of file-names in the org-roam
directory to search in."
(matching-files REGEX)]
(matching-files REGEXP)]
[("-c" "--case-sensitivity") CS
(case-sensitivity-help-text)
(case-sensitivity CS)]
Expand Down Expand Up @@ -172,7 +172,7 @@ directory to search in."
(let ([all-files (for/list ([f (in-directory dir)])
(path->string f))])
(filter filter-fun all-files)))
(lambda (regex)
(lambda (regexp)
"Return a predicate function."
(lambda (f) (regexp-match (format ".*(~a).*\\.(org|scrbl)" regex) f))))
(lambda (f) (regexp-match (format ".*(~a).*\\.(org|scrbl)" regexp) f))))
(matching-files)))

0 comments on commit 3a6b0bd

Please sign in to comment.