From: Andrew on
I have a Gnome Terminal question for you.
In windows I've always set up the cmd window to be able to accept tab to get
me to the closest thing I am typing in the dir structure... e.g. If I need
to go to the desktop I can type "cd\user\myusername\desk TAB" and it
autocompletes the command.
Is there a way to enable this autocomplete in the gnome terminal?
Running SuSE LED 11.
Thanks,

--
Andrew

From: J G Miller on
On Fri, 09 Apr 2010 21:01:15 +0200, Houghi wrote:

> It could be that if you use some other shell, it might not work,
> but then if you would run another, you would not ask the question.

Why would he not ask the question?

There is no auto-completion <TAB> feature in Bourne shell or C Shell,
but there is in tcsh and if the autolist shell variable is set,
the shell lists the remaining choices (if any) whenever completion fails.

As far as I am aware the auto-completion facility should be available
also in zsh and ksh, but for the latter my vague recollection is that
it may require the use of <ESC> rather than <TAB>.
From: J G Miller on
Op Vrijdag, 09 April, 2010 23:44:02 +0200, Houghi schreef:

> On openSUSE in Bash there is. I use it all the time.

That has never been in dispute.

As well as TAB completion of directory and filenames,
there is even the directory /etc/bash_completion.d/
with scripts from installed software to extend the
behavior of bash completions for those specific
commands.

As far as I recall this feature, which had been available
for many years previous in tcsh, was added to bash
in version 3.0.
From: David Bolt on
On Friday 09 Apr 2010 23:23, while playing with a tin of spray paint,
J G Miller painted this mural:

> Op Vrijdag, 09 April, 2010 23:44:02 +0200, Houghi schreef:
>
>> On openSUSE in Bash there is. I use it all the time.
>
> That has never been in dispute.
>
> As well as TAB completion of directory and filenames,
> there is even the directory /etc/bash_completion.d/
> with scripts from installed software to extend the
> behavior of bash completions for those specific
> commands.
>
> As far as I recall this feature, which had been available
> for many years previous in tcsh, was added to bash
> in version 3.0.

It was in bash 2.05, dating back to 2004. According to the description
of bash-completion, it's been there since bash 2.04.

davjam(a)thargon:~> bash --version
GNU bash, version 2.05b.0(1)-release (i586-suse-linux)
Copyright (C) 2002 Free Software Foundation, Inc.
davjam(a)thargon:~>
davjam(a)thargon:~> fr
frame franc2euro free freetype-config frink
franc2dm franc2lira freetemp fribidi
davjam(a)thargon:~>
davjam(a)thargon:~> cat /etc/SuSE-release
SuSE Linux 9.1 (i586)
VERSION = 9.1
davjam(a)thargon:~>
davjam(a)thargon:~> rpm -qa "*bash*"
bash-2.05b-305.1
bash-completion-20030721-122
davjam(a)thargon:~>
davjam(a)thargon:~> rpm -qi bash-completion
Name : bash-completion Relocations: (not relocatable)
Version : 20030721 Vendor: SuSE Linux AG, Nuernberg, Germany
Release : 122 Build Date: Tue 06 Apr 2004 02:16:11 BST
Install date: Mon 01 Nov 2004 18:29:35 GMT Build Host: Chabrol.suse.de
Group : System/Shells Source RPM: bash-completion-20030721-122.src.rpm
Size : 140918 License: GPL
Signature : DSA/SHA1, Tue 06 Apr 2004 02:22:22 BST, Key ID a84edae89c800aca
Packager : http://www.suse.de/feedback
URL : http://www.caliban.org/bash/index.shtml#completion
Summary : Programmable completion for bash
Description :
bash-completion is a collection of shell functions that take advantage
of the programmable completion feature of bash 2.04 and later.



Authors:
--------
Ian Macdonald <ian(a)caliban.org>
Distribution: SuSE Linux 9.1 (i586)
davjam(a)thargon:~>


Regards,
David Bolt

--
Team Acorn: www.distributed.net OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 11.0 32b | | | openSUSE 11.3M4 32b
openSUSE 11.0 64b | openSUSE 11.1 64b | openSUSE 11.2 64b |
TOS 4.02 | openSUSE 11.1 PPC | RISC OS 4.02 | RISC OS 3.11

From: J G Miller on
Op Zaterdag, 10 April 2010 01:14:21 +0200, Houghi schreef:

> J G Miller wrote:
>> Op Vrijdag, 09 April, 2010 23:44:02 +0200, Houghi schreef:
>>
>>> On openSUSE in Bash there is. I use it all the time.
>>
>> That has never been in dispute.
>
> Then I misunderstood the following:
> <q>
> There is no auto-completion <TAB> feature in Bourne shell or C Shell,
> </q>
>
> I understood that there was said that there was no auto-completion in
> bash. I re-read it now several times and I still think that is what it
> means. So that is the reason that I wrote what I wrote.

I think you are confusing the Bourne shell (sh) [no autocompletion] with the
Bourne-Again Shell (bash) [well developed autocompletion].

As it name implies, bash is based on the Bourne shell.

The Bourne shell was developed by Stephen Bourne, of AT&T Bell Laboratories,
and was released in 1977.

Bash was created in 1987 by Brian Fox.

Hope that helps to clear up any misunderstanding ;)