UNPKG

2.14 kBMarkdownView Raw
1# @oclif/plugin-autocomplete
2
3autocomplete plugin for oclif (bash, zsh and powershell)
4
5[![Version](https://img.shields.io/npm/v/@oclif/plugin-autocomplete.svg)](https://npmjs.org/package/@oclif/plugin-autocomplete)
6[![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-autocomplete.svg)](https://npmjs.org/package/@oclif/plugin-autocomplete)
7[![License](https://img.shields.io/npm/l/@oclif/plugin-autocomplete.svg)](https://github.com/oclif/plugin-autocomplete/blob/main/package.json)
8
9<!-- toc -->
10* [@oclif/plugin-autocomplete](#oclifplugin-autocomplete)
11* [Usage](#usage)
12* [Commands](#commands)
13* [Contributing](#contributing)
14<!-- tocstop -->
15
16# Usage
17
18Run `<cli> autocomplete` to generate the autocomplete files for your current shell.
19
20## Topic separator
21
22Since oclif v2 it's possible to use spaces as a topic separator in addition to colons.
23
24For bash and zsh each topic separator has different autocomplete implementations, if the CLI supports using a space as the separator, plugin-autocomplete will generate completion for that topic.
25
26If you still want to use the colon-separated autocomplete you can set `OCLIF_AUTOCOMPLETE_TOPIC_SEPARATOR` to `colon` and re-generate the autocomplete files.
27
28Docs: https://oclif.io/docs/topic_separator
29
30# Commands
31
32<!-- commands -->
33* [`oclif-example autocomplete [SHELL]`](#oclif-example-autocomplete-shell)
34
35## `oclif-example autocomplete [SHELL]`
36
37Display autocomplete installation instructions.
38
39```
40USAGE
41 $ oclif-example autocomplete [SHELL] [-r]
42
43ARGUMENTS
44 SHELL (zsh|bash|powershell) Shell type
45
46FLAGS
47 -r, --refresh-cache Refresh cache (ignores displaying instructions)
48
49DESCRIPTION
50 Display autocomplete installation instructions.
51
52EXAMPLES
53 $ oclif-example autocomplete
54
55 $ oclif-example autocomplete bash
56
57 $ oclif-example autocomplete zsh
58
59 $ oclif-example autocomplete powershell
60
61 $ oclif-example autocomplete --refresh-cache
62```
63
64_See code: [src/commands/autocomplete/index.ts](https://github.com/oclif/plugin-autocomplete/blob/v3.2.7/src/commands/autocomplete/index.ts)_
65<!-- commandsstop -->
66
67# Contributing
68
69See [contributing guide](./CONRTIBUTING.md)