Skip to content

Define an argument with default options and a completing-read-multiple reader, which retains selections between readings (using :always-read)? #194

Answered by tarsius
Hugo-Heagren asked this question in Q&A
Discussion options

You must be logged in to vote

Obviously I could write a lamba wrapper over crm which includes the choices, but I'm guessing there's a more elegant way?

Well, maybe make it a named function but other than that this is what you are expected to do. And why not? The place where the completion happens seems like the prefect place to specify the details of how the completion should be performed. Putting the information in the slots of an object/class just spreads the relevant information further.

Of course transient already does the latter but that is done to reduce the amount of boilerplate. So the things that are very similar between all or most infix arguments are controlled by setting the values of certain slots, but …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Hugo-Heagren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants