X-Spam-Check-By: sourceware.org
Date: Mon, 19 Mar 2007 15:20:33 -0700
From: Gary Johnson <garyjohn@spk.agilent.com>
To: cygwin@cygwin.com
Subject: Re: Tab Completion and Typical Behavior
Message-ID: <20070319222033.GC12851@suncomp1.spk.agilent.com>
Mail-Followup-To: cygwin@cygwin.com
References: <f8utv294jjjninbskuj5csfh2kq0hag8d6@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <f8utv294jjjninbskuj5csfh2kq0hag8d6@4ax.com>
User-Agent: Mutt/1.5.12 (2006-07-14)
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 2007-03-19, robert_neville310@yahoo.com wrote:
> I have a question about tab completion in the console window. The
> .bash_profile exports the right paths and the console performs tab
> completion. My scripts can be found in ~/bin. I can tab out
> myscript.sh, but can not tab complete ./myscript.sh; or sh
> myscript.sh. Is this behavior normal? Can I change the console
> behavior to tab out ./myscript.sh?

Larry didn't address the case of

    sh myscript.sh

which doesn't seem to work by default.  However, you can tell bash 
to expand the arguments to sh as commands by executing

    complete -c sh

and then

    sh mysc<Tab>

should work.  For more on this, see the bash(1) man page, search for 
the section on "SHELL BUILTIN COMMANDS" and search from there for 
"complete".

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
garyjohn@spk.agilent.com     | Mobile Broadband Division
                             | Spokane, Washington, USA

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

