Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Bug] Strange Globing Behaviour when used with sudo



On Mon, Jun 04, 2018 at 01:30:14AM +0900, Jun T. wrote:
> 
> Do we need to fix (or workaround) this problem, given that
> very basic commands like "ls" are also broken on macOS?

Personally, I would say no.
I find that the workarounds make the code very ugly. Then there is the
resulting inconsistency with other commands. Moreover, as the
weirdness occurs only with sudo, it is also very difficult to make
sure that we fix all that could go wrong and don't introduce any
unwanted side effects since globbing with sudo will be rarely used.
So I wouldn't do anything, but would also be fine with something small
that addressed the original problem, like your previous patch.

> > Btw:
> > I noticed bash manages to trigger the ls error message when zsh
> > outputs "no matches found" 
> > $ bash -c 'ls */..'
> > ls: cannot access '*/..': No such file or directory
> 
> Try 'setopt no_nomatch'. See the option NOMATCH in zshoptions(1).

Thanks.

-- 
Best,
Daniel



Messages sorted by: Reverse Date, Date, Thread, Author