ugrep icon indicating copy to clipboard operation
ugrep copied to clipboard

List only directories in TUI mode?

Open raelb opened this issue 2 years ago • 2 comments

Hi, Is it possible to list only directories - in general, and also specifically in Query TUI mode? i.e. I want to search for a string in subfolder names recursively, but not in any files. Thanks

raelb avatar Mar 16 '22 13:03 raelb

To elaborate on motivation for this (if it is unclear): The TAB and SHIFT-TAB commands are very handy to move into or out of a directory, but you need to first locate a file in the directory in order to move into that directory. Often you want to first locate a directory so you can move into that, and then search for a file.

raelb avatar Mar 17 '22 18:03 raelb

Thanks for the feedback and suggestion.

Only listing the names of directories with -l (in TUI Alt-l) and -c (in TUI Alt-c) is not possible right now, but you can use Control-S to skip to the next directory and Control-W to jump back up.

Control-W and -S are quick ways to skip over the files displayed, or with options -l and -c the directories displayed.

Does that help?

genivia-inc avatar Mar 18 '22 20:03 genivia-inc

The new ugrep --tree option is a nice alternative view for option -l to list directory trees. In the TUI press ALT-l (ell) to activate list view. Then use CTRL-S and CTRL-W to jump forward/backward. Use TAB to jump into a directory and SHIFT-TAB to jump back. If you have a .ugrep configuration file then add tree to it to list directory trees like so: tree

genivia-inc avatar Mar 25 '23 17:03 genivia-inc