tags:

views:

156

answers:

3

how can a complete novice such as myself set up her cygwin to have tab completion?

edit: I do have it automatically. but It does not seem to complete paths. how do I set it up to complete paths?

thanks!

+2  A: 

It's not cygwin per se that "has" tab completion; it's the shell you're using. By default, the cygwin shell is bash, which does indeed provide basic tab completion for executables on your path and files in the current directory. Does it not work for you?

Jonathan Feinberg
As a quick test, if you type whoam at your bash prompt and press TAB, does it complete to whoami.exe? It should, without any additional configuration on your part.
Emerick Rogul
interesting! I does complete.. then maybe it just doesn't complete paths.. I've tried that for sure. any ideas on that?
michelle
A: 

Cygwin is just an environment; the program you're interacting with is called the shell. There are many shells - bash, zsh, and others.

For bash, I've found this set of instructions to modify your .inputrc file.

MaxVT
I guess I'm bash, since I read that's the default. In the instructions you specify it says it should be working automatically. and it doesn't. it mentions changing specific details at $HOME/.inputrc which I checked and I just don't have that file there. have any ideas? should I just find a file like that somewhere on the internet and place it there?thanks!
michelle
Hi Michelle, you should create an empty file and add commands to it as instructed. When there is no such file in your home directory, default settings are used. You will find that this is a common pattern in UNIX -- using hidden (starting with .) configuration files placed in your home dir.
MaxVT
+3  A: 

Cygwin paths typically start with /cygdrive/c (substitute whatever drive letter you happen to be using, of course). So to complete c:\Program Files, you must type (for instance) /cygdrive/c/Prog and then press TAB.

Also, note that Cygwin is case-sensitive, so /cygdrive/c/prog would not complete to c:\Program Files due to the lowercase 'p'.

Emerick Rogul
Ahhhhh it was the case sensitivity thing all along :)
michelle
Yes, that's difficult to get used to with Cygwin.
Emerick Rogul