I am developing a non-GUI application for Linux. At some point I ask the user to input a directory path, which will be used to store files.
It there a way to have behaviour similar to the console (eg. when pressing TAB, the path is automatically filled for you, or available directory paths are printed)?

What is the usual solution for this kind of problem, in case what I am looking for doesn’t exist?
The usual solution is to use readline’s completion facility, just like the shell does.