Re: name completion in terminal?

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

 



Cameron Simpson <cs@xxxxxxxxxx> wrote:

On 28Apr2007 22:24, David G. Miller <dave@xxxxxxxxxxxxx> wrote:
| Peter Gordon <peter@xxxxxxxxxxxxxxxx> wrote:
| >On Sat, 2007-04-28 at 22:07 -0400, Michael Klinosky wrote:
| >>> Does Fedora have file/directory name completion (when using a terminal)?
| >
| >Yes, install the 'bash-completion' package then restart your terminal
| >(or open a new one) and then you can use the Tab key to automagically
| >complete commands, filenames and directories. Some commands even have
| >associated completion-capable switches, too; but that's dependent on the
| >program's packaging.
| >
| >Hope that helps.
| Unless you use c-shell instead of bash (one of my dirty little | secrets). File completion is built into the c-shell but you have to | turn it on with "set filec".

Actually, it's built into tcsh. Csh predated the patches that
constituted tcsh (tcsh is just csh with the interaction patches,
including the file completion stuff).

| Alas, no command switch completion | though. No idea on korn shell, zsh, etc. if you're running one of those.

Bash and zsh do file completion out of the box. I somewhat prefer zsh's
style myself.
Thanks. I started using c-shell in about 1988 when the alternatives were sh (note, not bash) and ksh. I couldn't remember whether it did file completion then or not. I switched to tcsh probably in the mid 1990s when I was doing a lot of shell programming and started running into the limitation of csh of that era. Now that bash has the features that tcsh had back when I should probably switch but I still like the logic control syntax of tcsh over bash for scripting (e.g., endif instead of fi).

Cheers,
Dave

--
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux