Skip to content

Add option for comma separated lists - #30

Open
bon wants to merge 1 commit into
dnaeon:masterfrom
bon:option-csv
Open

Add option for comma separated lists#30
bon wants to merge 1 commit into
dnaeon:masterfrom
bon:option-csv

Conversation

@bon

@bon bon commented Jul 4, 2025

Copy link
Copy Markdown

Useful, for example, for --extensions md,org,txt

Useful, for example, for --extensions md,org,txt
Comment thread src/options.lisp
@dnaeon

dnaeon commented Jul 4, 2025

Copy link
Copy Markdown
Owner

Hey @bon ,

Thanks for the PR! I've added a comment to the PR, let me know what you think, thanks again!

Comment thread src/options.lisp
(apply #'make-instance 'option-csv rest))

(defmethod finalize-option ((o option-csv) &key)
(setf (option-value o) (cl-ppcre:split "," (option-value o))))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cl-ppcre system is not a direct or indirect dependency for clingon and this won't work.

Since clingon already depends on split-sequence we should probably use that instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, makes sense.

@dnaeon

dnaeon commented Jul 5, 2025

Copy link
Copy Markdown
Owner

One more thing -- could you please also add tests for the new option? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants