scel: improved guessing of help topics
use `find' and avoid asRelativePath and removeExtension as suggested by Jonatan Liljedahl. Signed-off-by: Tim Blechmann <tim@klingt.org>
This commit is contained in:
parent
1f339518ab
commit
4597ee238c
1 changed files with 3 additions and 6 deletions
|
@ -204,12 +204,9 @@ EmacsInterface {
|
|||
dt = {
|
||||
result = IdentitySet.new(16384);
|
||||
SCDoc.helpSourceDirs.do {|dir|
|
||||
var list = ("%/*/*.schelp").format(dir).pathMatch;
|
||||
list = list ++ ("%/*/*/*.schelp").format(dir).pathMatch;
|
||||
list = list ++ ("%/*/*/*/*.schelp").format(dir).pathMatch;
|
||||
list = list.collect {|path| path.asRelativePath(dir).removeExtension};
|
||||
list.do {|topic|
|
||||
result.add(topic)
|
||||
("find -L"+dir.escapeChar($ )+"-type f -name '*.schelp' -not -name '*.ext.schelp'")
|
||||
.unixCmdGetStdOutLines.do {|file|
|
||||
result.add(file[dir.size+1 ..].drop(-7))
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue