When I am typing in a path at the bash prompt I sometimes do not remember what the directories are so I cannot incrementally search for them.Is there a way in readline to cycle through the possibilities or list them?
View path options when using readline?
bash;command line;readline
Completion does this. Press Tab to list the files starting with the part of the word containing the cursor up to the cursor. That is, if the cursor is at | in xdg-open fo|.pdf, then pressing Tab lists all the files beginning with fo, whether they have the .pdf extension or not. This makes completion most useful when you've only typed a prefix of the file you want.What exactly happens when you press Tab depends on your completion settings. By default, you need to press it twice to list all the possibilities unless the word at the cursor is an unambiguous prefix. You may want to tweak the readline settings in ~/.inputrc, in particular set show-all-if-ambiguous on to get a list of completions immediately instead of having to press Tab twice.By default bash's completion is fairly dumb and only ever completes file names as arguments of commands. Install the bash-completion package (provided by most distributions) and put . /etc/bash_completion in your ~/.bashrc to get context-aware completion.If you don't find bash's completion mechanism fully satisfactory, try zsh, which has a much fancier system, including the possibility to complete based on parts of words (and not just a prefix) or on wildcard patterns, to select completions in a menu, etc.