X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.1 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4B87D25B.2060502@redhat.com>
References: <c115fd3c1002260546o5c1f2fdete38f22ffed35f988@mail.gmail.com>  	<4B87D25B.2060502@redhat.com>
From: Tim Visher <tim.visher@gmail.com>
Date: Fri, 26 Feb 2010 09:56:46 -0500
Message-ID: <c115fd3c1002260656p3cf527c7gf277532654890224@mail.gmail.com>
Subject: Re: What does this bash line do?
To: Eric Blake <eblake@redhat.com>
Cc: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Fri, Feb 26, 2010 at 8:53 AM, Eric Blake <eblake@redhat.com> wrote:
> According to Tim Visher on 2/26/2010 6:46 AM:
>> Hi All,
>>
>> I'm working on my bashrc and I found [this
>> line](http://pastie.org/844068)
>
> Pasting 3 lines to pastebin was a waste; just inline them in your email:
>
> case $- in
> =C2=A0*i*) [[ -f /etc/bash_completion ]] && . /etc/bash_completion ;;
> esac

Yeah. I hate GMail's text formatting so I was basically trying to
avoid that.  You're right, though.

>> My question then, is what exactly is this line doing?
>
> It is seeing if you have bash-completion installed, and if so, loading it,
> so that your tab-completion is more powerful. =C2=A0The check for an i wi=
thin
> $- is to make sure your shell is interactive, as it is a waste to start
> bash-completion in a non-interactive shell.

I had worked that much out.  My question was a little preemptive so I
apologize for clogging up the inboxes.  I was actually just being lazy
and not looking up bash case statements and syntax.

Thanks for your help!

--=20

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

