X-Recipient: archive-cygwin AT delorie DOT 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: <4B87D25B DOT 2060502 AT redhat DOT com> From: Tim Visher Date: Fri, 26 Feb 2010 09:56:46 -0500 Message-ID: Subject: Re: What does this bash line do? To: Eric Blake Cc: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, Feb 26, 2010 at 8:53 AM, Eric Blake 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