@heroku-cli/command
Version:
base class for Heroku CLI commands
24 lines (23 loc) • 795 B
JavaScript
export const completions = {
// Define your custom completions here
// Example for a command that takes an app name:
async app() {
// You can implement dynamic completion logic here
// For example, fetching apps from Heroku API
return ['app1', 'app2', 'app3'];
},
// Example for a command that takes a pipeline name:
async pipeline() {
// Implement pipeline name completion logic
return ['pipeline1', 'pipeline2'];
},
// Example for a command that takes a team name:
async team() {
// Implement team name completion logic
return ['team1', 'team2'];
},
};
// Export a function to get completions for a specific command
export function getCompletions(command) {
return completions[command]?.();
}