oclif / oclif/plugin-autocomplete
plugin-autocomplete does not support bundling
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 95
- Forks
- 35
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
I tried to modify https://github.com/oclif/plugin-test-esbuild to use https://github.com/oclif/plugin-autocomplete to be able to generate completion for bundled scripts.
The example already uses https://github.com/oclif/plugin-plugins in the following way (https://github.com/oclif/plugin-test-esbuild/blob/main/src/index.ts#L13-L15):
import * as PluginPlugins from '@oclif/plugin-plugins'
export const COMMANDS: Record<string, Command.Class> = {
...PluginPlugins.commands,
...
However this doesn't work with plug-autocomplete because it doesn't export any commands, as can be seen here: https://github.com/oclif/plugin-autocomplete/blob/main/src/index.ts.
Wondering if it's done on purpose, or we can change it something like
import Index from './commands/autocomplete'
import Create from './commands/autocomplete/create'
import Script from './commands/autocomplete/script'
export const commands = {
autocomplete: Index,
'autocomplete:create': Create,
'autocomplete:script': Script,
}
export {default as hook} from './hooks/refresh-cache'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/index.ts and the command files under src/commands/autocomplete, including create and script, then compare their exports with the plugin-plugins pattern shown in plugin-test-esbuild. Verify that a bundled plugin exposes the autocomplete commands and retains the refresh-cache hook; the issue does not name a test file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100