-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(wasp): Add wasp autocomplete #2077
base: master
Are you sure you want to change the base?
Conversation
Overviewsrc/wasp.ts:Info:Script: function (out) {
try {
const regions = JSON.parse(out);
return regions.map((region) => ({
name: `${region["Code"]} - ${region["Name"]}${
region["RequiresPaidPlan"] ? "🤑" : ""
}`,
insertValue: region["Code"],
priority: region["RequiresPaidPlan"] ? 0 : 100,
}));
} catch (e) {
console.log(e);
return [];
}
} Single Functions:postProcess: function (out) {
try {
const templates = JSON.parse(out);
return templates.map((template) => ({
name: template.name,
description: template.description,
}));
} catch (e) {
console.log(e);
return [];
}
} URLs:
|
Hello @Zeko369,
Please add a 👍 as a reaction to this comment to show that you read this. |
(await executeShellCommand( | ||
`while [ ! -f "$PWD/main.wasp" ] && [ "$PWD" != "/" ]; do cd ..; done; [ -f "$PWD/main.wasp" ] && echo "true" || echo "false"` | ||
)) == "true"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a good thing for us to abstract into @withfig/autocomplete-tools.
subcommands: [ | ||
{ | ||
name: "generate", | ||
description: "Generates bash completion script", | ||
insertValue: `${"\b".repeat( | ||
COMPLETION.length + 1 | ||
)}${COMPLETION}:generate`, | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you trying to do here?
This PR adds support for Wasp CLI