-
Nov 20th, 2009, 03:59 PM
#1
FileConverter fix to add TAB driven file name completion
Could you guys pls add couple of lines into org.springframework.roo.shell.converters.FileConve rter.getAllPossibleValues() to implement file name completion?
Something like:
for (String file : new File(".").list()) {
if (existingData==null || file.toString().startsWith(existingData)) {
completions.add(file);
}
}
Helps a lot for commands like 'script --file <TAB>'. Just hate to replace your FileConverter with every release with our custom version.
And, btw, what is the hidden purpose of having:
// Present what they've typed, plus "*", to get the next level of completions
if (!existingData.endsWith("*")) {
existingData = existingData + "*";
}
change to existingData is not visible outside the method scope anyways, so what is the trick? :-)
-
Nov 20th, 2009, 06:53 PM
#2
Hi Roman
Thanks for the suggestion. We're absolutely happy to apply this patch, but would you mind submitting it as a Jira issue at https://jira.springsource.org/browse/ROO as a patch against the current SVN trunk? Cool enhancement BTW, please keep them coming... :-)
Cheers
Ben
-
Nov 20th, 2009, 11:08 PM
#3
-
Nov 21st, 2009, 06:19 PM
#4
Patch was applied within 10 minutes of logging the Jira issue. :-) So this will be available in Roo 1.0.0.RC4 for those interested. Thanks Roman!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules