Closed rajyraman closed 7 months ago
Hey @rajyraman, I don't see dotnet package
as a command that's been implemented by fig (dotnet's base spec & dotnet's subcommand specs. If I try something like git add
in pwsh, I'm able to see generator suggestions for the git commands.
I do see some issues with git branch
, I'll investigate that
@cpendery - I am getting a different behaviour with add.
const completionSpec: Fig.Spec = {
name: "abc",
description: "",
subcommands: [
{
name: "my_subcommand",
description: "Example subcommand",
subcommands: [
{
name: "my_nested_subcommand",
description:
"Nested subcommand, example usage: 'abc my_subcommand my_nested_subcommand'",
},
],
},
],
options: [
{
name: ["--branch", "-b"],
description: "Show help for abc",
args: {
name: "branch",
isScript: true,
generators: [
{
script: ["git", "branch", "-l"],
postProcess: function (out) {
return out.split("\n").map((branch) => {
return { name: branch, description: "branch" };
});
},
},
],
},
},
],
// Only uncomment if abc takes an argument
// args: {}
};
export default completionSpec;
I don't any completions for this generator.
@rajyraman where are you putting this generator? Right now, inshellisense
doesn't support fig's dev mode for testing new specs.
Can you run git --no-optional-locks status --short
in the same repository and provide the output?
@cpendery - I build my autocomplete module with yarn dev and copied the js to inshellisense withfig's build folder. I also added the module to index.js
Below is the output of the git command.
You'd need to update the index.js
file as well to get that to work
@cpendery - Yes. I was already doing that.
@cpendery - I already have pac working locally. Just need to add the generator bits.
I tried to get the most basic generator working in pwsh but no suggestions are being shown. Since dotnet package add is also using generator, I thought I will test that but no dynamic suggestions for package is being shown. So, it does not appear to work at all.
inshellisense: 0.0.1-rc.3 node: v18.18.0