bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange compgen behaviour


From: Mathias Dahl
Subject: Re: Strange compgen behaviour
Date: Fri, 25 Sep 2009 04:30:29 -0700 (PDT)
User-agent: G2/1.0

> Hm, I can't see any problem here. My version lets you pick any file in
> any subdir by simply typing the name (or part of it) without the
> directory part. After all, 'find -name' matches names, not paths (if you
> want to match full paths, use 'find -path'). I'd also rather use printf
> "%P\n" (capital P) instead of %p, the results look nicer (IMHO).

When I try with %P it works (better). However, when I do that and use
the -o filenames option I see only the filenames of the sub folders
and sometimes that name does not reflect what it is as well as the
folder does (if for example I have a folder called Cool Movie 2 and in
it a file called thefile.avi). So, it seems I did not really want what
I thought I wanted from the beginning :) The output I get now looks
like this:

...
filie_in_root_folder.avi
Some sub folder/file_in_sub_folder.avi
...

The only annoyance now is the hardcoded quoting (to handle spaces and
other "bad" chars) I do using sed, but I guess I have to live with it.

This has been an interesting topic!

/Mathias


reply via email to

[Prev in Thread] Current Thread [Next in Thread]