Re: [PATCH] Simplest update to bash completions to prevent unbounded variable errors

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn O. Pearce
Date: Tuesday, January 13, 2009 - 8:20 am

Ted Pavlic <ted@tedpavlic.com> wrote:

I agree with Junio; setting -u in your interactive shell is as bad
as export CDPATH.  Its crazy.


These are orthogonal to the -u corrections.  They should be in a
different patch.  The comments are wecome.  The '#!bash' looks like
a good idea.  But a vim specific modeline, I don't like, for the
reasons Junio has already stated.


This is one of those places where [ -z "${1-}" ] is likely easier
to read then the || usage you have introduced.  We don't care if
we got no args, or we got one that is the empty string, either way
the $1 cannot be a gitdir and we need to guess it.


Eh, I'd rather see [ -n "${1-}" ] over the && test.


Why are we switching to bashdefault?  Is this an unrelated change
from the -u stuff and should go into its own commit, with its own
justification?

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Simplest update to bash completions to prevent ..., Shawn O. Pearce, (Tue Jan 13, 8:20 am)