Re: [PATCH] shell: Enable fnmatch/glob by default

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

 



Hello,

on Debian testing dash eats trailing slashes of parameters that happen
to be regular files when expanding "$@".  Example:

   $ rm -f foo bar
   $ touch foo
   $ dash -c 'echo "$0" "$@"' baz foo/ bar/ ./
   baz foo bar/ ./

So slashes after non-existing files and directories are kept.

This behavior was introduced by 7638476 (shell: Enable fnmatch/glob by
default, 2020-05-28).  Before this commit trailing slashes were kept
also for regular files:

   $ dash -c 'echo "$0" "$@"' baz foo/ bar/ ./
   baz foo/ bar/ ./

This feels like a bug to me: Intuitively, foo/ should not match a
regular file foo, so such a string should be kept as-is.

I noticed it today because Debian testing imported the current version
of dash and some tests of Git's internal test suite rely on trailing
slashes to be retained.

René




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux