Closed triplejam closed 5 years ago
If this is good so far, could possibly remove './' from the filter so the currently opened directory could be selected.
Great! Do you have a usage example?
Just for testing I used:
local function show_dir_name(path, exists, list)
local function impl()
local output_str = ' The directory is ' .. path
local show_dir_impl = ui.dialogs.msgbox {
title = 'Directory name',
text = output_str,
button1 = 'Ok'
}
end
if exists then
impl()
else
if lfs.mkdir(path) then
impl()
end
end
list:close()
end
keys['amm'] = function() --Change keybinding if you want
textredux.fs.select_directory(show_dir_name, _USERHOME)
end
Also perhaps if ../ is selected while in folder './foo/bar', then './foo/bar/..' should be changed to just './foo'
That works great! What about using Ctrl-Right-Arrow as a default shortcut for going into a directory? Ctrl-d closes a buffer in the buffer-list.
Awesome, is this ready to be merged?
Yes. I think this is good for now. Will implement anything else for it at a later point.
Great, thanks!
May need some small changes. Ctrl+d is for when some navigating is still needed. Not sure if using that could cause problems in combination with snapopen.