You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to provide a way to generate dynamically multiple descriptions.
Why do I need it? I created completions for taskwarrior (console task management tool). It uses IDs to minimize typing. Of course you will not remember meanings of tens IDs, so I added completion that looks like this:
ID (task description)
In this case I have to add all completions for IDs separately, providing unique description for any ID. The problem is that when user adds new task, he don't see it in IDs completion, because it was generated once on a shell execution.
What I propose is 2 things:
Allow call subshells for descriptions (like for arguments).
Add argument to switch between modes "one description for everything" and "mapping descriptions to arguments". It could be -m --multiple-descriptions.
In my case adding completions for IDs would look like (task _zshids generates lines of a format ID:DESCRIPTION, _extract_id and _extract_description filter those lines, saving required part of line).
You can already do this. Just have your task _zshids command print out an ID, a tab character, and then the description. And separate each ID and description pair with a newline of course.
I propose to provide a way to generate dynamically multiple descriptions.
Why do I need it? I created completions for taskwarrior (console task management tool). It uses IDs to minimize typing. Of course you will not remember meanings of tens IDs, so I added completion that looks like this:
In this case I have to add all completions for IDs separately, providing unique description for any ID. The problem is that when user adds new task, he don't see it in IDs completion, because it was generated once on a shell execution.
What I propose is 2 things:
-m --multiple-descriptions
.In my case adding completions for IDs would look like (
task _zshids
generates lines of a formatID:DESCRIPTION
,_extract_id
and_extract_description
filter those lines, saving required part of line).In case argument count and description count not match, only first arguments that have mapped descriptions should be completed.
You can see the code here: https://git.tasktools.org/projects/TM/repos/task/browse/scripts/fish/task.fish?at=refs%2Fheads%2F2.4.0
I found a workaround, which almost works. I say "almost" due #380.
The text was updated successfully, but these errors were encountered: