Add commands auto completion to Cygwin

2

2

I'm looking for a 'modernized' cmd.exe and I find myself quite comfortable with Cygwin. However, I can't make Cygwin auto complete some "commands" I need (programs in SysInternal Suite like contig...).

I already added the programs path in PATH variables. It does work since I can use the programs regardless of current folder. But auto completion still ain't work.

A google search bring not much information. So I ask for your helps. Any ideas will be appreciated.

Tiana987642

Posted 2013-12-01T15:58:43.887

Reputation: 263

Answers

1

Cygwin bash prompt does allow SysInternal Suite command names to be completed, as it does any other program in the PATH.

However, here are two possible gotchas for a new cygwin user (I am not implying that you are you are one ;) ):

  1. PATH variable must contain the path to the commands, in the 'cygwin format' (mounted under /cygdrive and using forward slashes)

    For example: If the Sysinternals Suite is installed under "c:\Program Files (x86)\SysinternalsSuite":

    export PATH="$PATH:/cygdrive/c/Program Files (x86)/SysinternalsSuite"
    

    Note: Cygwin automatically converts the Windows %PATH% environment variable to the proper format in the bash $PATH variable. So if you have extended the PATH in the Windows GUI, then you are most probably good.

    Double check content of PATH variable at cygwin bash prompt with:

    echo $PATH
    
  2. Completion is case-sensitive. So in the case of your example, you must start typing Contig.exe ... with a capital 'C'.

Ceredig

Posted 2013-12-01T15:58:43.887

Reputation: 11

Why SU ain't notify the answer? I'll try your suggestion and feedback later :) – Tiana987642 – 2014-11-23T07:52:32.613

@Tiana987642, did it work? – Shervin Shahrdar – 2017-12-20T14:23:01.687

Welcome to SU and thanks for your first contribution. I only improved some minor formatting issues in your post. -- +1 for your second point! – mpy – 2014-01-06T15:13:34.257