Closed triplejam closed 5 years ago
Not sure i understand what you want to do, open all files in a directory?
That could be one use of it. But it would be a generic way of selecting a directory. For example, setting a folder to use for a project. As I understand select_file only lets you select a file, not a directory. There isn't a lot of immediate uses for Textadept itself but would be a useful for custom functions using fs.lua.
I see, that could indeed be useful. Are you interested in making a PR? Could be a modifed version of select_file
which returns the path instead of changing to it.
@triplejam I'm currently using your function in a module and was wondering if you could add the "." (current directory) entry to the list to more quickly select the current directory when using your list?
@loomer #44 Still need to normalize the path. But it should work for now.
@triplejam I fixed some minor things in #46 Let me know what you think.
Closing since there's not anything left to do.
@triplejam Thanks for checking!
Would be useful to be able to select and return a directory itself. Like select_file but to make the selection a separate keybinding would be need to be used since enter is already for navigating. Perhaps Ctrl+d. Should be able to pass a function that receives the path. I'm not sure if all non-directories should be filtered, but it should be an option.