Sorry for my late answer, and thanks for yours.
In this case when I type
ls ./*.log
the shell passes over the list of files, but all starting with ./ :) ah.
Thanks!
Bug can be closed.
Kalle Olavi Niemitalo wrote:
Simon Eugster <simon...@gmail.com> writes:
si...@sfreezer:~/test/sdfasdf$ ls
-CEl-.log
si...@sfreezer:~/test/sdfasdf$ ls *.log
ls: Ungültige Option -- E
„ls --help“ gibt weitere Informationen.
This is traditional Unix behaviour, I believe. The shell expands
the *.log pattern to -CEl-.log before giving it to ls, which then
does not know the argument came from a shell pattern originally.
The getopt() code in GNU libc is able to parse an environment
variable "_<PID>_GNU_nonoption_argv_flags_" that indicates which
of the arguments should not be treated as options. This code is
between #ifdef USE_NONOPTION_FLAGS ... #endif:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/posix/getopt.c?rev=1.57&content-type=text/x-cvsweb-markup&cvsroot=glibc
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/posix/getopt_init.c?rev=1.9&content-type=text/x-cvsweb-markup&cvsroot=glibc
According to bash/NEWS, support for this was disabled in
bash-2.01-alpha1 because it caused too many problems. However,
if you want to try it out, you can easily edit the bash sources
to reenable the feature, and recompile. I don't know how hard
it'd be to build glibc with USE_NONOPTION_FLAGS: perhaps you'd
just have to edit config.h after running configure, or perhaps
the code doesn't work any more.
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org