Eyal Posener
8724aaf183
V2
2019-11-18 01:05:47 +02:00
Eyal Posener
7ee9623f2b
Filter matches as a final stage
...
This simplifies the prediction logic writing, the predictor
doesn't need to filter our according to line matching, instead
it returns everything and the filtering is done at the end.
This does not break current behavior.
2017-11-04 10:51:40 +02:00
Eyal Posener
91e5b1f44a
lint: fix typo
2017-08-25 09:41:42 +03:00
Alex Dadgar
97340ccc21
Default to hiding flags that start with hyphen unless last arg has a hyphen
2017-08-24 17:35:36 -07:00
Alex Dadgar
59e6151c5b
Allow restricting completion of flags
...
This PR allows a command to specify that flags should only be completed
when a prefix is present. The motivation behind this is to have the
initial complation to prefer displaying argument completions and only
display flag completions when the user enters "hyphen <tab>".
2017-08-24 17:35:36 -07:00
Alex Dadgar
1c43d25e35
Avoid unnecessary if statement
2017-08-24 11:08:51 -07:00
Alex Dadgar
d3c10410d6
Fix a subcommand matching
...
This PR fixes an issue where a subcommand matches the current set of
commands being examined. Fixes issue
https://github.com/posener/complete/issues/46
2017-08-23 13:58:31 -07:00
Eyal Posener
096b79324e
Add global flags for command
...
Fixes #24
2017-05-15 19:32:59 +03:00
Eyal Posener
66d7d8c670
Add Predict method to Flags and Commands
2017-05-12 15:08:36 +03:00
Eyal Posener
ba23c350c7
Fix comment
2017-05-11 20:51:33 +03:00
Eyal Posener
115e175c3d
Change Match to be a function
2017-05-11 20:48:40 +03:00
Eyal Posener
967bae76f3
Add Predictor interface
2017-05-11 20:33:29 +03:00
Eyal Posener
a28594d28e
Add args struct
2017-05-11 18:50:12 +03:00
Eyal Posener
72dfe017e9
Improve files and directories completion
2017-05-11 02:16:39 +03:00
Eyal Posener
6fb4875efa
Move match to a separate package
2017-05-07 19:57:41 +03:00
Eyal Posener
fd5c13f7ed
Remove Name from Command struct
2017-05-07 07:59:42 +03:00
Eyal Posener
703dd6ebc3
improve docs
2017-05-06 22:15:15 +03:00
Eyal Posener
f46c5f8a28
Change Predicate to be of function type
2017-05-06 20:24:53 +03:00
Eyal Posener
dc4c327ae8
Use local completion files and directories according to typed command
2017-05-06 19:51:33 +03:00
Eyal Posener
07b98cb912
Use pointers to predicates
2017-05-06 19:08:47 +03:00
Eyal Posener
4f47fe9246
Add easy way to install the bash completion
2017-05-06 18:55:54 +03:00
Eyal Posener
1af7c0b3b7
Roughly add all go commands
2017-05-06 00:25:27 +03:00
Eyal Posener
c8263230e1
Add additional args
...
add predition of directories
add ability for prediction union
2017-05-05 23:07:18 +03:00
Eyal Posener
04d16f6064
Renamings
2017-05-05 22:15:23 +03:00
Eyal Posener
5e07cbd4c2
Add file completion flag
2017-05-05 21:57:21 +03:00
Eyal Posener
6311b602ab
Add plural forms for less verbose declarations
2017-05-05 18:06:31 +03:00
Eyal Posener
04e78e42ab
Initial commit
2017-05-05 18:01:08 +03:00