Parse quoted strings for ckan prompt
#3889
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problems
ckan prompt
, if you typeinstall --
and tab,--ckanfiles
and the common options like--instance
aren't included in the completion optionsckan prompt
, if you typeinstall -
and tab, there are no completion optionsCause
That module's version has a space in it, which ends up in the
.ckan
filename. This can already be handled from the raw command line by using your shell's quoting abilities, but the metadata validator does its work in ackan prompt
session, which doesn't do quoting.https://github.com/KSP-CKAN/xKAN-meta_testing/blob/master/ckan_meta_tester/ckan_install_template.txt
After parsing, the code to execute the
install
command just sees the filename up to the first space.Changes
ckan prompt
, it will not be split on spaces, which will allow us to solve the original problem in a future pull request toxKAN-meta_testing
by adding spaces around the filenameinstall --ckanfiles
option can be tab-completed--
options like--instance
are included in tab-completion rather than just the verb-specific ones-c
can be tab-completed as wellMeta.cs
Meta.cs.in
is deleted. This was added in Use Cake for build and overhaul/cleanup build #1589, I think as an intermediate stage of those changes in which version info would be populated intoMeta.cs
at compile time by the build system, but subsequently made unnecessary by retrieving those changes from the assembly attributes instead. As far as I can tell from examining the commit log, this file has never actually been used.