Commit graph

7561 commits

Author SHA1 Message Date
discosultan
67e937acf7 Fix typo in 07_option_args.rs 2018-01-18 14:21:02 +01:00
discosultan
8aa3c57351 Fix typo in 07_option_args.rs 2018-01-18 14:16:15 +01:00
Jaanus Varus
354cefd274
Fix typos in 03_args.rs 2018-01-18 13:20:02 +01:00
Kevin K
b6f36f55a0
Merge pull request #1150 from kbknapp/v2.29.2
chore: increase version
2018-01-16 15:03:01 -05:00
Kevin K
df996822c8 chore: increase version 2018-01-16 15:01:53 -05:00
Kevin K
04d97c4cc7
Merge pull request #1149 from discosultan/patch-1
Fix doc typo in 14_groups.rs
2018-01-16 14:56:45 -05:00
Kevin K
288a777eca
Merge branch 'master' into patch-1 2018-01-16 14:56:34 -05:00
Kevin K
cfb94706d1
Merge pull request #1147 from segevfiner/zsh-completion-improvements
Zsh completion improvements
2018-01-16 14:56:14 -05:00
Jaanus Varus
eb9269a23b
Fix doc typo in 14_groups.rs 2018-01-16 19:54:14 +01:00
Kevin K
fc8cf97b94
Merge branch 'master' into zsh-completion-improvements 2018-01-16 00:23:34 -05:00
Kevin K
ff22cd98ba
Merge pull request #1148 from kbknapp/add-messense
chore(SPONSORS.md): adds the latest sponsor! Yay
2018-01-15 23:31:09 -05:00
Kevin K
0abcb80694
chore(SPONSORS.md): adds the latest sponsor! Yay 2018-01-15 23:29:55 -05:00
Segev Finer
25561decf1 feat(completions/zsh.rs): Escape possible values for options 2018-01-16 01:55:48 +02:00
Segev Finer
2cbbfa8ce9 style(completions/zsh.rs): Cleanup documentation and naming 2018-01-16 01:52:44 +02:00
Segev Finer
f3b0afd2be feat(completions/zsh.rs): Implement postional argument possible values completion 2018-01-16 01:52:44 +02:00
Segev Finer
a652260795 fix(completions/zsh.rs): Add missing autoload for is-at-least 2018-01-15 20:41:08 +02:00
Kevin K
e077e0c930
Merge branch 'master' into zsh-completion-improvements 2018-01-15 11:53:25 -05:00
Kevin K
e078a5893b
Merge pull request #1146 from kraai/patch-2
fix: Fix typos
2018-01-15 11:53:08 -05:00
Kevin K
4fec24a6ac
Merge branch 'master' into patch-2 2018-01-15 11:52:53 -05:00
Kevin K
55ea76cd99
Merge pull request #1145 from kraai/patch-1
Fix typo
2018-01-15 11:52:26 -05:00
Kevin K
a46ff132f1
Merge branch 'master' into patch-1 2018-01-15 11:52:21 -05:00
Kevin K
d548e546ef
Merge pull request #1144 from segevfiner/zsh-redundant-code
fix(completions/zsh.zsh): Remove redundant code from output
2018-01-15 11:51:55 -05:00
Segev Finer
16b4f143ff fix(completions/zsh.rs): Don't pass -S to _arguments if Zsh is too old
If you do pass it than _arguments considers -C as a possible option in
the completions.
2018-01-14 07:13:27 +02:00
Segev Finer
1146f0da15 fix(completions/zsh.rs): Maybe fix completions with mixed positionals and subcommands
Optional positionals mixed with subcommands will still break this, since
I can't see how to tell which element of $line is the command than.
Mixing optional positionals with subcommands is a bit weird and awkward
though...
2018-01-14 07:13:23 +02:00
Segev Finer
e39aeab848 feat(completions/zsh.rs): Complete positional arguments properly
This changes the way we complete positionals to complete them using
_arguments, as should be done, instead of completing their uppercase name
as a string.

Currently I made it offer _files completion for all positional arguments.
This can be improved to complete actual possible values of the arguments
and only complete files if the argument truly takes them. But this will
require further changes in clap to actually have the required
functionality to get this information.
2018-01-14 07:12:14 +02:00
Will Murphy
dc0d8ba89c note-to-self comments 2018-01-13 16:32:45 -05:00
Matt Kraai
cc341243f3
Fix typos 2018-01-10 21:49:40 -08:00
Matt Kraai
b83f387b80
Fix typo 2018-01-10 21:01:21 -08:00
Segev Finer
0e185b922e fix(completions/zsh.zsh): Remove redundant code from output
Fixes #1142
2018-01-10 20:29:01 +02:00
William Murphy
1ab5c2d316
Merge branch 'master' into issue-1135 2018-01-10 06:28:58 -05:00
Kevin K
d78341f640
Merge pull request #1143 from kbknapp/trim-fat
Trim fat
2018-01-09 16:52:05 -05:00
Kevin K
3fef176543 docs: fixes typo in docs version 2018-01-09 12:07:19 -05:00
Kevin K
3e97085e58 chore: udpates html doc root 2018-01-09 12:02:35 -05:00
Kevin K
92caafaf51 chore: increase version 2018-01-09 11:08:47 -05:00
Kevin K
e1313a5a0f docs: updates contributors list 2018-01-09 11:04:56 -05:00
Kevin K
eb8d919e6f perf: further debloating by removing generics from error cases 2018-01-09 10:53:20 -05:00
Kevin K
7ac5a5af9f tests: cleans up certain test cases litle by little 2018-01-09 10:53:20 -05:00
Kevin K
03e413d717 perf: debloats clap by deduplicating logic and refactors
This commit removes heavy use of macros in certain functions which
drastically increased code size. Some of the macros could be turned
into functions, while others could be removed entirely.

Examples were removing arg_post_processing! which did things like
checked overrides, requirements, groups, etc. This would happen
after every argument was parsed. This macro also had several other
macros inside it, and would expand to several tens or hundreds of
lines of code.

Then add that due to borrowck and branch issues, this macro may be
included in multiple parts of a function. Unlike traditional functions
each of these uses expanded into TONS of code (just like agressive
inlining).

This commit primarily removes those arg_post_processing! calls and
breaks up the functionality into two types. The first must happen at
ever new argument (not new value, but new argument). This is pretty
cheap. The next type was moved to the end of parsing validation section
which is more expensive, but only happens once.

i.e. clap was validating each argument/value as it saw them, now it's
lazy and validates them all at once at the end. This MUCH more
efficient!
2018-01-09 10:53:20 -05:00
Kevin K
d26ab2b97c fix: fixes the ripgrep benchmark by adding a value to a flag that expects it 2018-01-09 10:53:20 -05:00
Kevin K
79c36396db tests: adds a check_output2 function to compare output to one of two possible solutions 2018-01-09 10:53:20 -05:00
Kevin K
6f25b2830a chore: adds .idea project folder to ignore list 2018-01-09 10:53:20 -05:00
Kevin K
28a55f28a2
Merge pull request #1141 from segevfiner/zsh-long-options-completion-fix
Fix completion of long option values in Zsh
2018-01-09 10:53:03 -05:00
Kevin K
eac4ca7898
Merge branch 'master' into zsh-long-options-completion-fix 2018-01-09 10:50:40 -05:00
Kevin K
f3cd07bf6a
Merge pull request #1138 from cldershem/fixDocLinks
docs: fixes broken links.
2018-01-09 10:49:28 -05:00
Kevin K
a23135a46a
Merge branch 'master' into fixDocLinks 2018-01-09 10:49:21 -05:00
Kevin K
666c5184d5
Merge pull request #1130 from fluffysquirrels/master
Fix for issue #1129: "Bug: Bash completion is broken when sub-commands have hyphens"
2018-01-09 10:48:24 -05:00
Segev Finer
46365cf8be fix(completions/zsh.rs): Fix completion of long option values
Long options take their argument either in the next word or after an
equals sign, but the Zsh completion specified that they take it either
in the same word with no separator or in the next word. See the
documentation of the Zsh _arguments function for more information.
2018-01-06 14:43:15 +02:00
Cameron Dershem
56e734b839 docs: fixes broken links.
Small correction to add a link to the source in the documentation, previously
it was a placeholder.

`rustdoc` does not appear to package assets with the docs, therefore
relative links looking for static files do not work. The links are
consistent enough on github that the static files can be directly linked
to on the master branch.
2017-12-27 00:00:06 -05:00
Will Murphy
63cc4bc6a7 Test for Issue 1135
It looks like required_unless_one has incorrect behavior if the
argument it applies to also has a short form.
2017-12-26 11:16:18 -05:00
Alex Helfet
ba7f1d18eb fix(bash completion): Change the bash completion script code generation to support hyphens. 2017-12-16 12:44:57 +00:00