Tab Completion Problem

Jacob Jacobson news@biyani.org
Mon Jul 12 21:06:00 GMT 2010


On 7/9/2010 2:16 PM, Jacob Jacobson wrote:
> On 7/8/2010 9:08 AM, Jacob Jacobson wrote:
>> I recently updated my Cygwin installation and now I get,
>>
>> [~$:501] cd /c/home/bash: exclude: unbound variable
>> [~$:501]
>>
>> when I hit TAB.
>>
>> I have seen Eric's announcement & followed that.
>>
>> >> A new release of bash-completion, 1.2-1, is now available for
>> >> download, leaving 1.1-2 as previous.
>>
>> >> NEWS:
>> >> =====
>> >> This is a new upstream release.
>>
>> I put -
>> . /etc/bash_completion in my .bashrc file.
>>
>> The file /etc/bash_completion exists.
>>
>> Cygcheck output attached. Please help.
>>
>
> Worked on it some more to try & debug this. Here is what
> I get after "set -x" in bash.
>
> [home$:503] cd /c/home/ab+ local cur 'IFS=
> ' i j k
> + _get_comp_words_by_ref cur
> + local exclude flag i OPTIND=1
> + words=()
> + local cur cword words
> + upargs=()
> + upvars=()
> + local upargs upvars vcur vcword vprev vwords
> + getopts c:i:n:p:w: flag cur
> + [[ 1 -ge 1 ]]
> + case ${!OPTIND} in
> + vcur=cur
> + let 'OPTIND += 1'
> + [[ 1 -ge 2 ]]
> + __get_cword_at_cursor_by_ref '' words cword cur
> + words=()
> + local cword words
> + __reassemble_comp_words_by_ref '' words cword
> + local exclude i j ref
> + [[ -n '' ]]
> + eval cword=1
> ++ cword=1
> bash: exclude: unbound variable
> [home$:503]
>
>
>

I defined a new function -
md () { command cd "$@"; echo "$PWD" ; }

Now, tab completion works for "md". Previously, this function was "cd"
and tab-completion was giving me problems described above.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list