Skip to content

Commit 0a146b4

Browse files
committed
Improve docs
1 parent 5379169 commit 0a146b4

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ More examples can be found in the [examples](/examples/) directory.
111111
### Interactive options for the root command
112112

113113
Interactive options are not supported for the root command. However, you can
114-
mark a subcommand as the default command to achieve a similar effect.
114+
mark a subcommand as the default command to achieve a similar effect:
115115

116116
```typescript
117117
import { InteractiveCommand } from "interactive-commander";
@@ -135,8 +135,11 @@ await program.interactive().parseAsync(process.argv);
135135

136136
### Enable interactive mode by default
137137

138-
The interactive mode flags can be [negatable boolean options][3]
139-
(e.g. `--no-interactive`). Negatable boolean options are disabled by default.
138+
To enable interactive mode by default, you can define the interactive flags as
139+
[negatable boolean options][3] (e.g. `--no-interactive`):
140+
141+
````typescript
142+
negatable boolean options is set to true.
140143

141144
```typescript
142145
const program = new InteractiveCommand();
@@ -155,7 +158,7 @@ await program
155158
// Try the following commands:
156159
// no-interactive hello
157160
// no-interactive hello -I
158-
```
161+
````
159162
160163
[1]: https://github.com/tj/commander.js
161164
[2]: https://github.com/SBoudrias/Inquirer.js

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "interactive-commander",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Commander.js with integrated interactive prompts",
55
"keywords": [
66
"commander",

0 commit comments

Comments
 (0)