2

Is there any way to make find-name-dired to only show filenames that I can move through and select? I have a lot of files that are buried in subdirectories, and I don't want it to print out the entire subdirectory every time it finds a file.

Drew
  • 29,895
  • 7
  • 74
  • 104
user886596
  • 2,380
  • 5
  • 31
  • 53
  • Miserable Variable has assumed you are wanting `find` to omit directory lines from the list of paths. I assumed you wanted the path shown on each line to contain only the filename component without any ancestor directories. Perhaps you could clarify the question? – phils Mar 30 '12 at 02:21
  • @phils indeed I misunderstood. The question is quite clear, I think I got distracted by "print out the entire subdirectory" and thought OP was referring to `dired` listing all files in dir. I am deleted my answer. – Miserable Variable Mar 30 '12 at 02:52

1 Answers1

1

Two problems with this:

  1. How would you distinguish between two files with the same file name in different directories?

  2. Dired needs the full path in order to be able to do anything with that file.

You could deal with (2) by using text properties or overlays to hide the directories, but due to (1) I really couldn't recommend that.

Edit: to otherwise customise the output of dired to reduce unwanted noise you can use Dired Details (optionally with Dired Details Plus)

Community
  • 1
  • 1
phils
  • 71,335
  • 11
  • 153
  • 198
  • That's a good point...maybe just asking for it to trim the username/timestamp sections would be more reasonable? – user886596 Mar 30 '12 at 02:20