Eyal Posener
a1f9ea005b
Merge branch 'master' into split-last-equal
2017-11-04 11:52:49 +02:00
Eyal Posener
aae7e1e39f
Add logic to complete when last flag uses the equal sign
...
If the last flag is of the form -flag=value, complete the value according to -flag.
2017-11-04 11:32:33 +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
Alex Dadgar
2b9ace50d6
Fix tests from rebase
2017-08-24 17:37:26 -07: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
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
61d9904ba1
Fix './' prefix for file completion
2017-05-18 23:29:55 +03:00
Eyal Posener
096b79324e
Add global flags for command
...
Fixes #24
2017-05-15 19:32:59 +03:00
Eyal Posener
bc5d682221
fix nested files
2017-05-13 00:40:26 +03:00
Eyal Posener
d6cbc0e969
predict: when searching for files, show also directories
2017-05-11 21:57:44 +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
9de57bdcf5
Enable completion and executable be the same command
...
Fixes #6
2017-05-10 19:21:35 +03:00
Eyal Posener
d33bac720b
Remove Complete struct
2017-05-06 09:27:51 +03:00
Eyal Posener
5dbf53eec0
nicer signature for PredictSet
2017-05-06 00:53:03 +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
04e78e42ab
Initial commit
2017-05-05 18:01:08 +03:00