[aws] Loadspec doesn't show autocomplete results when nested by 2 levels
I have a master CLI which wraps around all the CLIs like terraform, kubectl and aws using loadspec. I have had no issues with tf and k8s, but for aws since we have another level of nesting with loadspecs I am not seeing any autocomplete options.
mycli -- terraform plan works
mycli -- aws s3 does not
Had a quick chat with @mschrage and he was able to reproduce it. Here is my spec for reference
const completionSpec: Fig.Spec = {
name: "my",
description: "My CLI",
subcommands: [
{
name: "kube",
description: "Wrapper for kubectl CLI",
subcommands: [
{
name: "--",
description: "Kubectl command",
loadSpec: "kubectl",
},
],
},
{
name: "aws",
description: "Wrapper for aws CLI",
subcommands: [
{
name: "--",
description: "Aws command",
loadSpec: "aws",
},
],
},
{
name: "terraform",
description: "Wrapper for terraform CLI",
subcommands: [
{
name: "--",
description: "Terraform command",
loadSpec: "terraform",
},
],
},
],
};
export default completionSpec;
Thanks for reporting this @abhishekkh!
@fedeci can you look into what's going on here? My initial thought was that it had something to do with the "--" naming. However, I tried renaming the subcommand and could still reproduce.
The spec was successfully loaded. The error seems to be "Cannot consume subcommand arg."
This will be fixed with the next AE version!
This will be fixed with the next AE version!
Is this out yet? @fedeci Thanks for fixing it
It is!