Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cshell tab completion , case insensitive

For C Shell is there a way to make tab completion for commands, files etc. case insensitive?

I saw the complete=enhance variable, but that is only for tcsh, not csh.

like image 214
Ratheesh Pai Avatar asked Jul 20 '10 08:07

Ratheesh Pai


People also ask

How do you make a bash completion case insensitive?

It can be enabled for all future bash sessions by putting set completion-ignore-case on into the users's ~/. inputrc file, or the system /etc/inputrc , to enable it for all users.

Are the tab commands case sensitive?

The command line in Linux is case sensitive. When you use tab completion to quickly change or list directories on the command line, you must match the case of the directory names.

What is shell tab completion?

One extremely time-saving feature built into the Bash Shell is the ability to "tab-complete" commands. Simply hit the tab key while you are typing a command, and the shell will automatically finish the command for you. Or, if it is ambiguous, it will provide options (you might have to type tab again).


1 Answers

Here's a more verbose answer for the uber newbs:

Ratheesh Pai's answer is correct, but if you want the settings to persist, you want to write the commands to your .cshrc file. This file is executed any time you open a shell (assuming the .cshrc file is in your home directory. Think of the .cshrc file as a settings file - you add whatever personal preferences you want into it...

Here's how to setup tab completion:

cd ~
vim .cshrc

Insert in the two lines below into .cshrc

set autolist = ambiguous 
set complete = enhance

Then quit VIM.

Last, either re-open your shell (or source the .cshrc file):

source ./.cshrc

Then give it a shot, you should be able to case-insensitive tab complete.

like image 139
Kellen Stuart Avatar answered Sep 30 '22 22:09

Kellen Stuart