English 中文(简体)
cygwin file path tab completion not working
原标题:
  • 时间:2009-11-26 13:35:11
  •  标签:
  • bash
  • cygwin

How can I set up Cygwin to have tab completion?

Actually, I do have it automatically, but it does not seem to complete paths. How do I set it up to complete paths?

最佳回答

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 .

问题回答

I m answering this question because the answer seems to have changed since the previous accepted answer. I just installed Cygwin, and found that the bash completion is in fact a distinct and separate installation module, "bash-completion". It is not selected in the default installation, so you need to install/update it explicitly.

bash-completion as distinct installation module

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?

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.

Every time I install Cygwin on a new system, I have trouble getting tab completion to work the way I want it to, which is to scroll through the completion results with each TAB stroke rather than listing potential results and requiring that I continue until typing until finding a unique one that will actually complete with a TAB press.

The way to get it to scroll through valid results is to place the following command string in your ~/.bashrc file:

bind TAB:menu-complete




相关问题
cygwin file path tab completion not working

How can I set up Cygwin to have tab completion? Actually, I do have it automatically, but it does not seem to complete paths. How do I set it up to complete paths?

cygwin version of idle has erroneous I/O handling

I am using idle (python 2.5) via cygwin on a windows vista machine and when I try to open an already existing .py file I see the full file path /home/aaron/C:/cygwin/home/aaron/script.py on the ...

Trying to get a terminal to work in Emacs

I ve been having a lot of problems with emacs and trying to get the terminal to work with: M-x term I installed cygwin and I fixed up my .emacs to include the paths: (setenv "PATH" (concat "...

Piping Cygwin into a Python program

As a i m new to the whole Piping thing and Python I had recently encountered a problem trying to pipe Cygwin s stdin & stdout into a python program usin Python s subprocess moudle. for example I ...

Unable to chdir() on Git/Cygwin

I installed Git via Cygwin on Windows Server. It works out very well. However there s a small issue that when I clone a repo use the command as following: $git clone git@myserver:project.git I ...

Linux Development C/C++/bash/python on windows-7

Before resorting to stackoverflow, i have spend a lot of times looking for the solutions. I have been a linux-user/developer for few years, now shifting to windows-7. I am looking for seting-up a ...

Cygwin/Git/Gitosis unable to push new repository

I ve recently set up cygwin, git, and gitosis on my Windows Server 2003 box and am having troubles. I ve followed just about every tutorial I can find to the letter, and have confirmed that my git ...

热门标签