Interactive command to let user change directory in bash

Posted by Rich on Super User See other posts from Super User or by Rich
Published on 2011-02-18T15:14:43Z Indexed on 2011/02/18 15:27 UTC
Read the original article Hit count: 218

Filed under:
|

I am looking for a CURSES-based way (bash, c, doesn't really matter) of letting a user choose a folder or even a file in roughly the same way that they would do using Midnight Commander.

I envisage using up/down for moving the cursor, esc to cancel, and enter to select the item under the cursor. If the item is a file, then return the full path to that file, if the item is a folder, change into that folder.

Does anyone know of one that exists?

If not, how would I go about writing one? I'm mainly a Java programmer, so I could use JavaCurses, but it feels a bit like overkill.

© Super User or respective owner

Related posts about midnight-commander

Related posts about ncurses