summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/complete.py
Commit message (Collapse)AuthorAgeFilesLines
* Use collections.abc for Mapping, IterableThomas Coldrick2019-01-031-2/+2
| | | | | | | In _yaml.py and _frontend/complete.py we were getting pylint warnings for using collections.Mapping and collections.Iterable, which are abstract classes now provided from collections.abc. This patch just uses the classes from the right place.
* _frontend/complete.py: Fixing new (simplifiable-if-expression) linter errorTristan Van Berkom2018-12-261-1/+1
|
* Introduce new "source" command groupChandan Singh2018-12-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the message thread https://mail.gnome.org/archives/buildstream-list/2018-November/msg00106.html, implement a new command group called `source`. Move existing `track`, `fetch`, and the recently added `source-checkout` commands under this group. For `track` and `fetch`, this is a BREAKING change, as the old commands have been marked as obsolete. Using them will result in an error message that refers people to use the new versions, like `bst source fetch` instead of old `bst fetch`. `source-checkout` will now become `source checkout` (the dash has turned into a space), and is not a breaking change as it was added in the current development cycle. Note that the functionality to hide commands from help output was added only recently in Click, so the minimum version of Click that we now require is 7.0. Summary of changes: * _frontend/cli.py: Add `source` command group, mark previous versions as obsolete and hide them from the help output. * _frontend/complete.py: Fix completion for hidden commands. * setup.py: Bump Click minimum version to 7.0. * tests: Update to cope with the new command names. Fixes #814.
* buildstream/_frontend/complete.py: Added missing click license complianceTristan Van Berkom2018-09-161-2/+17
| | | | | | Somehow I missed this when originally forking the file from the click library, now noticing that we should have followed what was written in: https://github.com/pallets/click/blob/master/LICENSE
* complete.py: Ensure paths get completed from 'element-path'mablanch/448-autocompletion-broken-defaultsMartin Blanchard2018-08-011-3/+4
| | | | | | | | Element paths should always be completed from the root element folder defined by the element-path key in project.conf. Fix complete_path() to always search into its given base_directory argument. See issue BuildStream/buildstream#448
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* _frontend/cli.py: Allow specifying commands in `bst help`Tristan Van Berkom2018-06-071-4/+5
| | | | | | o This supports deeply nested commands as well as shallow commands o Automated support for bash completions included
* _frontend: remove unused 'ctx' param from overrideAngelos Evripiotis2018-01-311-7/+5
| | | | | The 'ctx' parameter is carefully threaded through to 'complete_target', but it doesn't actually use it. Remove the parameter from unused places.
* _frontend: more doc on parametersAngelos Evripiotis2018-01-311-5/+11
|
* Remove unused importsGökçen Nurlu2017-12-071-5/+2
|
* _frontend/complete.py: Fixing completions of subdirectory trees in element ↵Tristan Van Berkom2017-09-051-4/+17
| | | | | | | | | | | subdirs When completing .bst files in subdirectories of an 'element-path', we need to take the element path into consideration when testing the results of os.listdir() for os.path.isdir(). This makes directories behave like directories when completing subdirs of project element paths.
* _frontend/complete.py: Return whether completions were handled instead of ↵Tristan Van Berkom2017-09-051-34/+6
| | | | | | | | | | exiting Leave that choice to the calling code. Also some additional cleanup. Removed some bits of code borrowed from click but unused in this context, just because it's futzing up the coverage reports.
* _frontend: Fixed yesterdays build breakage.Tristan Van Berkom2017-08-281-69/+46
| | | | | | | | | | | The click completions code was written based on my branch of click master, which I had been running locally. Yesterday it worked but only against master, this patch adds some extra customizations so that we can handle specific arguments (like bst file targets) specially, and now it works with stable releases of click, which means buildstream is no longer broken also.
* complete.py: Enhanced to complete bst filesTristan Van Berkom2017-08-281-24/+72
| | | | | Now we complete bst files in the project's element directory when completions are available.
* _frontend/complete.py: Added new custom bash completions modulesTristan Van Berkom2017-08-281-0/+308
This is based on my branch of the click library where I was unable to land a patch for this. We should use an upstream solution once this issue is solved: https://github.com/pallets/click/issues/780