-
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? :-)
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