Closed Akendo closed 5 months ago
After reading your documentation, I stumbled across this:
{{{ ... }}}
is only allowed at the tail position within subwords to avoid ambiguities:
I guess my problem is using this more than once. Thank anyway.
Hi. Take a look at the Limitations section in the README. External commands can only appear at a tail position in a word to avoid ambiguities. If you're not getting any warnings, I should add one. I'm on mobile so it's awkward to type but you should be able to move -amd64/-arm64 suffix into to the shells command output and make it work.
Thanks, mate, I just learned that as well. But much appreciate that you take the time to write here!
Hope you made it work. Cheers!
A question though: didn't you get a warning/error from complgen? I thought I had added it.
Turns out there was a bug, and the .usage file above didn't generate an error message where it should have. I minimized it to:
build <PLATFORM>[-(amd64|arm64)];
<PLATFORM> ::= {{{ echo foo }}};
and now it produces:
% complgen check build.usage
0:6:error: External commands within subwords are only allowed at tail position to prevent ambiguities in matching
|
0 | build <PLATFORM>[-(amd64|arm64)];
| ^^^^^^^^^^
|
= help: try to include the suffix in the external command output itself
wow. Thanks a lot mate! Good thinking!
Hello :wave: ,
firstly, thank you very much for this project. I love it. Unfortunately, I'm working on an auto-completion for a more complicated build process to make more sense of it. For this, I though using complgen might be a great idea. My usage file looks like this:
The key problem I'm having is the following:
./build kvm- TAB
I want to mimic the following string, as an example:
./build kvm-python_readonly_dev-amd64-today
Currently, I autocomplete the platform, AWS or KVM here the options is working likewise, but I can't add anything that follows. I know that the dash is already breaking the fish completion, but I though building for bash first. I'm not sure what I'm doing wrong at the time, or does the dash break here more?
Not only that, but I think it should look like this later on:
I'm using Archlinux with the version
0.1.8-1
of comlgen from pacman. bash hasVersion 5.2.26(1)-release
and fish hasversion 3.7.1
.Any help is appreciated!
And once more thank you for the the great work here.