Commit graph

132 commits

Author SHA1 Message Date
Tshepang Lekhonkhobe
2ebde60d5a doc: some formatting fixes 2016-11-14 20:18:44 +02:00
Richard Petrie
bc2552f505 Corrected name of tests folder
Unsure why these are wrong, but simple fixes
2016-11-12 01:08:54 -06:00
Kevin K
ee6e987acd
refactor(Completions): moves completing functions into their own modules 2016-10-23 19:31:24 -04:00
Kevin K
2d2ec03995
chore: clippy run 2016-10-21 09:52:16 -04:00
Kevin K
dc906398fb Merge branch 'master' into stabilize_clap_app! 2016-10-18 10:45:36 -04:00
tormol
cd516006e3 imp: Stabilize clap_app!
It was de-stabilized in 2.0.0 but hasn't been changed since.

This commit also updates docs to reflect that the "unstable" feature does nothing now.
2016-10-16 21:33:52 +02:00
tormol
816b0d49c4 style: dis-allow() untriggered lints 2016-10-16 13:04:11 +02:00
tormol
4ee85b95d2 docs: Improve documentation around features
* Clap has dependencies even with all features disabled.
* The "nightly" feature does nothing, so don't mention it.
* Explain the difference between "unstable" and "nightly" better.
* Split features into groups (default, opt-in, clap-development).
* For contributors: update what tests should be run, and remove make command.
* Removes a repeated word and splits up some long markdown lines.

Also groups features by category and dependencies by feature in Cargo.toml.
2016-10-16 11:31:12 +02:00
tormol
835f75e3ba fix(features): Make lints not enable other nightly-requiring features 2016-10-16 11:31:12 +02:00
tormol
0ba9f4b123 docs: tag non-rust code blocks as such instead of ignoring them 2016-10-16 11:31:12 +02:00
tormol
330a376a46 tests: run or compile some currently ignored doc-tests 2016-10-16 11:31:12 +02:00
Kevin K
b246be1a4b style: rustfmt run 2016-09-05 17:03:45 -04:00
nabijaczleweli
fc7327e9dc
imp(help): use term_size instead of home-grown solution 2016-08-29 07:36:06 +02:00
nabijaczleweli
0d93d9b953
feat(help): support wrapping help at console width on windows
Closes #455
2016-08-26 17:18:24 +02:00
Kevin K
57690b2af1 chore: allows wrapping help on windows 2016-08-24 22:04:19 -04:00
Kevin K
763a5c920e fix(Unicode): fixes two bugs where non-English characters were stripped or caused a panic with help wrapping
Closes #626
2016-08-24 21:50:27 -04:00
Tshepang Lekhonkhobe
13233d7f2f doc: small fixes (#609) 2016-07-28 21:15:10 -04:00
Kevin K
ccdd0571c2 Merge branch 'fish-completion' of https://github.com/wdv4758h/clap-rs into wdv4758h-fish-completion 2016-07-27 21:15:39 -04:00
Chiu-Hsiang Hsu
1979d2f2f3 feat(Completions): one can generate a basic fish completions script at compile time
The following completion would happen (using example 17_yaml.rs):

```
$ prog <tab>
help subcmd
```

```
$ prog -<tab><tab>
--help  -h                            (Prints help information)
--max-vals      (you can only supply a max of 3 values for me!)
--min-vals  (you must supply at least two values to satisfy me)
--mode                   (shows an option with specific values)
--mult-vals        (demos an option which has two named values)
--option  -o                (example option argument from yaml)
--version  -V                      (Prints version information)
-F                                         (demo flag argument)
```

```
$ prog --<tab><tab>
--help  -h                            (Prints help information)
--max-vals      (you can only supply a max of 3 values for me!)
--min-vals  (you must supply at least two values to satisfy me)
--mode                   (shows an option with specific values)
--mult-vals        (demos an option which has two named values)
--option  -o                (example option argument from yaml)
--version  -V                      (Prints version information)
```

```
$ prog --mode <tab>
emacs  (shows an option with specific values)  vi  (shows an option with specific values)
```

```
$ prog subcmd -<tab>
--help  -h        (Prints help information)  -B  (example subcommand option)
--version  -V  (Prints version information)
```

```
$ prog subcmd --<tab>
--help  (Prints help information)  --version  (Prints version information)
```

Close #578
2016-07-26 10:15:37 +08:00
Kevin K
7bf76b889b chore: clippy run 2016-07-25 20:56:22 -04:00
Bence Szigeti
8d7bea823f Fix: extra space typo removed 2016-07-05 22:01:04 +02:00
Kevin K
e75b6c7b75 feat(Completions): one can now generate a bash completions script at compile time
By using a build.rs "build script" one can now generate a bash completions script which allows tab
completions for the entire program, to include, subcommands, options, everything!

See the documentation for full examples and details.

Closes #376
2016-06-30 23:50:49 -04:00
Kevin K
ceddee9157 refactor(term.rs): moved term.rs into it's own crate so others can pull in just that portion
The functionality can now be found in https://crates.io/crates/term_size

Closes #549
2016-06-29 23:19:08 -04:00
Kevin K
01e7dfd6c0 fix(Windows): fixes a failing windows build 2016-06-07 20:49:18 -04:00
Kevin K
3312893dda docs: inter-links all types and pages
All doc pages should now be inter-linked between other doc pages and
Rust documentation.

Closes #505
2016-05-15 14:23:37 -04:00
Kevin K
52ca6505b4 docs: makes all publicly available types viewable in docs
Some types weren't viewable in the docs, such as `Values`, `OsValues`,
and `ArgSettings`. All these types should now be browsable in the
docs page.

Relates to #505
2016-05-13 18:52:29 -04:00
Kevin K
2efd81ebbc chore: clippy update and run 2016-05-06 17:59:52 -04:00
Kevin K
ffde90f2ba style: rustfmt run 2016-05-06 17:52:23 -04:00
Kevin K
05365ddcc2 fix(Help Message): fixes bug with wrapping in the middle of a unicode sequence
Closes #456
2016-03-27 16:01:17 -04:00
Kevin K
144e7e29d6 chore: clippy run 2016-03-22 21:16:53 -04:00
Kevin K
e36af02666 feat(Help Message): can auto wrap and aligning help text to term width
By default `clap` now automatically wraps and aligns help strings to the
term width. i.e.

```
    -o, --option <opt>    some really long help
text that should be auto aligned but isn't righ
t now
```

Now looks like this:

```
    -o, --option <opt>    some really long help
                          text that should be
                          auto aligned but isn't
                          right now
```

The wrapping also respects words, and wraps at spaces so as to not cut
words in the middle.

This requires the `libc` dep which is enabled (by default) with the
`wrap_help` cargo feature flag.

Closes #428
2016-03-13 22:07:28 -04:00
Kevin K
deace34ad2 chore: clippy run 2016-03-08 10:39:43 -05:00
Kevin K
ab41be700b imp(arg_enum): enum declared with arg_enum returns [&'static str; #] instead of Vec 2016-01-31 08:23:34 -05:00
Kevin K
90542747ac chore: fixes doc and style mistakes 2016-01-28 21:58:40 -05:00
Kevin K
2031682193 chore: updates additional files for 2x release 2016-01-28 11:46:12 -05:00
Kevin K
f1876388a7 docs: updating docs for 2x release 2016-01-28 11:45:31 -05:00
Kevin K
eb4de9215f imp(From Usage): vastly improves the usage parser
Closes #350
2016-01-28 11:45:31 -05:00
Kevin K
0410873d8d chore: clippy run 2016-01-28 11:45:31 -05:00
Kevin K
c3e96232c9 tests(v2): fixing more tests on the new v2 base 2016-01-28 11:45:31 -05:00
Kevin K
20de5c6e76 feat(v2): implementing the base of 2.x
This commit implements the base changes for clap 2.x
2016-01-28 11:45:31 -05:00
Kevin K
55041bc878 chore: updates clippy 2015-12-19 05:35:44 -05:00
Kevin K
1b69ca4bee refactor: moves code for ergonomics 2015-11-09 03:48:49 -05:00
Kevin K
bf4d8417b8 style: rustfmt run 2015-11-09 02:22:12 -05:00
Kevin K
bc4495b32e perf(App): more BTreeMap->Vec, Opts and SubCmds 2015-11-08 03:48:13 -05:00
Kevin K
d357640fab perf(App): changes flags BTreeMap->Vec 2015-11-08 01:50:12 -05:00
Kevin K
64b921d087 perf(App): changes BTreeMap to VecMap in some instances 2015-11-08 01:01:11 -05:00
Kevin K
19538b9c22 chore: fixes features declarations 2015-11-03 01:59:08 -05:00
Ben S
00b61ae226 Fix a bunch of typos in comments 2015-11-01 14:02:37 +00:00
Kevin K
1a8bf31e7a docs: adds comparison in readme
Closes #325
2015-10-29 01:07:43 -04:00
Kevin K
d0c13d2960 style: rustfmt run 2015-10-28 10:56:10 -04:00