Mercurial > hg > octave-nkf
diff src/help.cc @ 9261:95445f9f5976
omit file extensions from __list_functions__ output
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 May 2009 12:00:00 -0400 |
parents | c0cef1436788 |
children | 610bf90fce2a b59e304fe00a |
line wrap: on
line diff
--- a/src/help.cc +++ b/src/help.cc @@ -957,10 +957,17 @@ if (! error_state) { - string_vector fl = load_path::files (dir); + string_vector fl = load_path::files (dir, true); if (! error_state) - retval = Cell (fl); + { + // Return a sorted list with unique entries (in case of + // .m and .oct versions of the same function in a given + // directory, for example). + fl.sort (true); + + retval = Cell (fl); + } } else error ("__list_functions__: input must be a string");