-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature suggestion] Add support for Fig #9
Comments
Hello, thank you for the suggestion. Unfortunately, I am not familiar with the tool you mentioned and do not have experience integrating it. If you are willing, I would be grateful if you could set up the integration and send me a pull request. Thank you for your help and understanding. |
Coming back to this a year later, I followed this guide https://fig.io/docs/getting-started and made simple spec myself. It only supports use command and "--help", "--config" flags and uses generator for "use" command |
anyway here is the spec: const profiles: Fig.Generator = {
script: "git-profile list",
postProcess: (output) => {
return Array.from(output.matchAll(/^\[(.+?)\]$/gm)).map((result) => ({
name: result[1],
description: `Use profile "${result[1]}"`,
}));
},
};
const completionSpec: Fig.Spec = {
name: "git-profile",
description: "Switch profiles",
subcommands: [
{
name: "use",
description: "Use a profile",
args: {
name: "profile",
description: "Profile you want to apply in this repository",
generators: profiles,
},
},
],
options: [
{
name: ["--help", "-h"],
description: "Help for git-profile script",
},
{
name: ["--config", "-c"],
description: 'Config file (default "~/.gitprofile")',
},
],
};
export default completionSpec; |
Hi! I love your tool!
Can you add integration with fig? It would greatly help to see all commands and visualize existing profiles :)
The text was updated successfully, but these errors were encountered: