rgieseke / textredux

Text-based interfaces for Textadept
http://rgieseke.github.io/textredux/
Other
59 stars 11 forks source link

Select a directory itself #38

Closed triplejam closed 5 years ago

triplejam commented 5 years ago

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.

rgieseke commented 5 years ago

Not sure i understand what you want to do, open all files in a directory?

triplejam commented 5 years ago

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.

rgieseke commented 5 years ago

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.

ghost commented 5 years ago

@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?

triplejam commented 5 years ago

@loomer #44 Still need to normalize the path. But it should work for now.

ghost commented 5 years ago

@triplejam I fixed some minor things in #46 Let me know what you think.

triplejam commented 5 years ago

Closing since there's not anything left to do.

rgieseke commented 5 years ago

@triplejam Thanks for checking!