I wrote some shell scripts using dialog prompting the user for directories and files. However, I don't know how to change the directory. When I press Space in a dselect, the directory gets added to the path displayed, but pressing Enter is like selecting OK.So, how to navigate through the directories?
How to navigate in dialog's file and directory selectors?
files;dialog
Actually dialog provides the ability to navigate around the file system, going up to parent directories or down to subdirectories.  Here is a brief description of how it works:starting with a --dselect widget, you see a screen with two panes and two buttons.One button is OK, the other is Cancel.The top (usually larger) pane has a title Directories.The other pane is unlabeled.  It is your work-area for the directory-path which the widget may print.You can always use the tab key (and depending on the terminal, shifttab) for moving the cursor to the next (or previous) item of those four, in a loop.Where the cursor lies, that is the active location.  An Enter always completes the dialog, but in the two panes, the spacebar has different meanings.If you press the spacebar while in the Directories pane, the widget append the currently-selected item into the work-area (if it is not already part of the path).You can use the up/down arrow-keys for moving the cursor up/down, to select a different item.If you type any printable character (including the spacebar which copies into the work area), the cursor moves to the work-area, as well as moving the selection in the Directories pane to the closest partial match of the name.While in the work-area, if you delete characters from the path, e.g., a trailing /, the Directories pane adjusts as necessary to show directories which might be selected.  For example, if the work-area holds /usr/bin, and you delete the /bin from the end, the Directories pane will show the /usr directory.The --fselect dialog works the same way (it is the same code), but shows two panes at the top, for Directories and Files.