This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: What does this bash line do?
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
> Â*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. ÂThe check for an i within
> $- 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!
--
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