On Wed, Dec 26, 2018 at 11:35 AM Chet Ramey <chet.ra...@case.edu> wrote:
>
> On 12/24/18 10:35 PM, Peng Yu wrote:
> > dirname loadable gives the following error. I think the coreutils'
> > direname's convention is better. Should it be considered as a bug to
> > fix?
> >
> > $ dirname -- -a
> > dirname: usage: dirname string
> > $(type -P dirname) -- -a
> > .
>
> Yes, dirname should skip over a `--' denoting the end of options. Thanks
> for the report.

There is a similar problem in `basename`. Is it due to a common bug on
how loadables are programmed?

$ builtin basename -a
-bash: basename: -a: invalid option
basename: usage: basename string [suffix]
$ builtin basename -- -a
--

-- 
Regards,
Peng

Reply via email to