yargs 18.0.0-candidate.4 → 18.0.0-candidate.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -8
- package/build/lib/command.js +1 -1
- package/build/lib/completion-templates.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
[![js-standard-style][standard-image]][standard-url]
|
|
14
14
|
[![Coverage][coverage-image]][coverage-url]
|
|
15
15
|
[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
|
|
16
|
-
[![Slack][slack-image]][slack-url]
|
|
17
16
|
|
|
18
17
|
## Description
|
|
19
18
|
Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
|
|
@@ -38,7 +37,7 @@ Rules & Behavior
|
|
|
38
37
|
return a Promise [boolean]
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
*
|
|
40
|
+
* generate completion scripts for Bash and Zsh for your command
|
|
42
41
|
* and [tons more](/docs/api.md).
|
|
43
42
|
|
|
44
43
|
## Installation
|
|
@@ -147,10 +146,6 @@ yargs(Deno.args)
|
|
|
147
146
|
|
|
148
147
|
See examples of using yargs in the browser in [docs](/docs/browser.md).
|
|
149
148
|
|
|
150
|
-
## Community
|
|
151
|
-
|
|
152
|
-
Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
|
|
153
|
-
|
|
154
149
|
## Documentation
|
|
155
150
|
|
|
156
151
|
### Table of Contents
|
|
@@ -182,8 +177,6 @@ post on why we think this is important](https://medium.com/the-node-js-collectio
|
|
|
182
177
|
[standard-url]: http://standardjs.com/
|
|
183
178
|
[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
|
|
184
179
|
[conventional-commits-url]: https://conventionalcommits.org/
|
|
185
|
-
[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
|
|
186
|
-
[slack-url]: http://devtoolscommunity.herokuapp.com
|
|
187
180
|
[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
|
|
188
181
|
[coverage-image]: https://img.shields.io/nycrc/yargs/yargs
|
|
189
182
|
[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc
|
package/build/lib/command.js
CHANGED
|
@@ -19,7 +19,7 @@ export class CommandInstance {
|
|
|
19
19
|
addDirectory(dir, req, callerFile, opts) {
|
|
20
20
|
opts = opts || {};
|
|
21
21
|
this.requireCache.add(callerFile);
|
|
22
|
-
const fullDirPath = this.shim.path.
|
|
22
|
+
const fullDirPath = this.shim.path.resolve(this.shim.path.dirname(callerFile), dir);
|
|
23
23
|
const files = this.shim.readdirSync(fullDirPath, {
|
|
24
24
|
recursive: opts.recurse ? true : false,
|
|
25
25
|
});
|
|
@@ -48,6 +48,10 @@ _{{app_name}}_yargs_completions()
|
|
|
48
48
|
_default
|
|
49
49
|
fi
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
if [[ "'\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
|
|
52
|
+
_{{app_name}}_yargs_completions "$@"
|
|
53
|
+
else
|
|
54
|
+
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
55
|
+
fi
|
|
52
56
|
###-end-{{app_name}}-completions-###
|
|
53
57
|
`;
|