[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash autocompletion



On Thursday 17 April 2003 12:28, Paul Johnson wrote:
> On Thu, Apr 17, 2003 at 10:59:44AM +0200, Michael Naumann wrote:
> > a) I start a commandline like
> > scp gemini:/tm
> > here I press tab (gemini is a valid hostname in my network).
> > The line becomes:
> > scp gemini:gemini\:/tmp
> > and is thus pretty useless.
> > What can I do to prevent this?
>
> Don't hit tab.  What exactly were you expecting?  Bash autocompletion
> only groks the filesystem it's running from.

At least I'd expect bash not to render the input useless.
My fingers often hit TAB without asking my brain.

>
> > b) If a file does not have the proposed extension the completion
> > will not work. Example:
> > I have a file called "Song of joy.mp2"
> > Now I start the commandline
> > xmms Song
> > Here I press tab, but due to the .mp2 (instead of .mp3) part
> > of the filename nothing gets expanded.
> > Can this clever autoindent feature be disabled temporarily?
>
> That's not what's causing it.  Bash does not care what the extention
> is, or even if it has one or twenty extentions.  My guess is you're
> also getting a bell when you hit tab.  This is bash's way of telling
> you to type a character or two and hit tab again to finish
> autocompletion.

Did you try it?

You can see what I mean with:

cd /tmp
mkdir test
cd test
touch abc.mp2
xmms a<TAB>

I'm referring to the bash-installation that comes with woody.

- Michael



Reply to: