Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

Re: [PATCH] bash-completion: Print a useful error when called in a non-bash shell

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:13

On Thu, Jul 29, 2010 at 21:29, Andrew Sayers [off-list ref] wrote:
On 29/07/10 17:25, Junio C Hamano wrote:
quoted
This looks like a Linux-ism to me.
Caught red-flippered :)  I'll use `ps` next time.
That's also probably hard to get right on all the mutually
incompatible *nix ps(1) implementations out there.

As for this patch in general, I think solving this issue in Git's
bash-completion code isn't the right thing to do, I think the right
thing is to just ignore it and no nothing.

Any given *nix distribution will include lots of non-POSIX and
shell-specific initialization files throughout the system. Trying to
detect if the shell is running in POSIX compatibility mode in each of
these is going to be redundant and bug-prone.

Instead the user should make sure that he's invoking the shell in
non-POSIX mode before evaluating non-POSIX code.

Maybe this is a bigger potential problem than it seems, but it seems
like just a one-off error in Arch Linux. I'd be surprised if it didn't
also break dozens of other packages in Arch which included bash
extensions.

This is not a nack, if you want to pursue this and try to emit a
friendlier error message that's great. But maybe it's a bit *too* much
effort on our part.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help