Stefan Hirschmann wrote:
> Steps to reproduce the bug:

Thank you for your bug report and for showing us the steps to
reproduce it.  However what you are seeing is not a bug but expected
behavior.

> 1. make a pdf begining with "-p", eg. "-pfoobar.pdf" in Konquerror 
> (touch won?t work)
> 2. start a console and change to the directory where the file is
> 3. type ls -a *.pdf
> 4. Notice that the file starting with "-p" is not listet.

Here is a simpler way to show what is happening.

  $ touch ./-p ./xxx ./zzz
  $ ls *
  xxx zzz

This is actually an FAQ.  See this document for more information.
Look for "How do I remove files that start with a dash?" and the next
few entries there.  They all cover files starting with a dash.

  http://www.gnu.org/software/coreutils/faq/

In summary the shell is expanding the '*' file glob and the command
and to the command it is looking like an option.  You can verify this
with the echo command.

  $ touch ./-p ./xxx ./zzz
  $ echo ls *
  ls -p xxx zzz

Whenever you use the shell to expand file globs you must be aware of
potential expansion into characters that might appear as options.
This is expected.  (If this were perl it would fail the taint check.)
Therefore you must instruct the command that it is done with options.
Or you must make sure that the file glob will not start with a dash.

  $ ls -- *
  ls -p xxx zzz

Or

  $ ls -- ./*
  ls ./-p ./xxx ./zzz

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to