git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bash completion broken on ubuntu 10.10?
@ 2010-10-20 23:04 SZEDER Gábor
  2010-10-20 23:33 ` Brian Gernhardt
  2010-10-21  2:50 ` Peter van der Does
  0 siblings, 2 replies; 5+ messages in thread
From: SZEDER Gábor @ 2010-10-20 23:04 UTC (permalink / raw)
  To: git

Hi,

Git's bash completion script offers possible arguments to some
options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',
merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit
--reuse-message=<TAB>', etc.

On a three day old ubuntu 10.10 install these don't work anymore; the
completion script offers the list of files in all those cases.

After a bit of investigation I found that when I press TAB after 'git
log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'
and ${COMP_WORDS[COMP_CWORD]} contains "=".  Weird.

Then I remembered that we had some COMP_WORDBREAKS issues in the past
(db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:
portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't
see anything suspicious (it contains "'><=;|&(: ).  Removing the '='
makes the listing after 'git log --pretty=' work, but breaks many
other things badly.

I don't have any ideas what could possibly be wrong here (but it's too
late here for any bright ideas anyway...).  Could someone confirm or
deny this behaviour on ubuntu 10.10?


Thanks,
Gábor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bash completion broken on ubuntu 10.10?
  2010-10-20 23:04 bash completion broken on ubuntu 10.10? SZEDER Gábor
@ 2010-10-20 23:33 ` Brian Gernhardt
  2010-10-21  2:50 ` Peter van der Does
  1 sibling, 0 replies; 5+ messages in thread
From: Brian Gernhardt @ 2010-10-20 23:33 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: git


On Oct 20, 2010, at 7:04 PM, SZEDER Gábor wrote:

> Hi,
> 
> Git's bash completion script offers possible arguments to some
> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',
> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit
> --reuse-message=<TAB>', etc.
> 
> On a three day old ubuntu 10.10 install these don't work anymore; the
> completion script offers the list of files in all those cases.

> I don't have any ideas what could possibly be wrong here (but it's too
> late here for any bright ideas anyway...).  Could someone confirm or
> deny this behaviour on ubuntu 10.10?

Confirmed.  Completion works properly on OS X, but fails on Ubuntu 10.10

OS X 10.6.4:
  bash: 3.2.48
  git:  1.7.3.1.209.g52408 (next + my t/gitweb-lib patch)
  output:
$ git log --pretty=<tab><tab>
email     full      medium    raw       
format:   fuller    oneline   short  

Ubuntu 10.10:
  bash: 4.1.5
  git:  1.7.1 (from apt)
  output:
$ git log --pretty=<tab><tab>
.bash/               .irbrc
.bash_history        .less
.bash_logout         .local/
.bash_profile        Music/
--More--

~~ Brian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bash completion broken on ubuntu 10.10?
  2010-10-20 23:04 bash completion broken on ubuntu 10.10? SZEDER Gábor
  2010-10-20 23:33 ` Brian Gernhardt
@ 2010-10-21  2:50 ` Peter van der Does
  2010-10-21  4:44   ` Kevin Ballard
  2010-10-21 10:35   ` Mathias Lafeldt
  1 sibling, 2 replies; 5+ messages in thread
From: Peter van der Does @ 2010-10-21  2:50 UTC (permalink / raw)
  To: git

On Thu, 21 Oct 2010 01:04:09 +0200
SZEDER Gábor <szeder@ira.uka.de> wrote:

> Hi,
> 
> Git's bash completion script offers possible arguments to some
> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',
> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit
> --reuse-message=<TAB>', etc.
> 
> On a three day old ubuntu 10.10 install these don't work anymore; the
> completion script offers the list of files in all those cases.
> 
> After a bit of investigation I found that when I press TAB after 'git
> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'
> and ${COMP_WORDS[COMP_CWORD]} contains "=".  Weird.
> 
> Then I remembered that we had some COMP_WORDBREAKS issues in the past
> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:
> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't
> see anything suspicious (it contains "'><=;|&(: ).  Removing the '='
> makes the listing after 'git log --pretty=' work, but breaks many
> other things badly.
> 
> I don't have any ideas what could possibly be wrong here (but it's too
> late here for any bright ideas anyway...).  Could someone confirm or
> deny this behaviour on ubuntu 10.10?
> 
> 
> Thanks,
> Gábor
> 

My guess is that it has to do with Bash 4, the equal sign must be seen
as a new word. I'm running Ubuntu 10.04 and have the same problem.
I fixed the problem locally, I just don't know if that works on Bash 3
and I doubt it will work on Bash 3.

I changed the script only for git log, not other commands yet, like 
git am --whitespace=<tab><tab>


-- 
Peter van der Does

GPG key: E77E8E98

IRC: Ganseki on irc.freenode.net
Twitter: @petervanderdoes

WordPress Plugin Developer
Blog: http://blog.avirtualhome.com
Forums: http://forums.avirtualhome.com
Twitter: @avhsoftware

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bash completion broken on ubuntu 10.10?
  2010-10-21  2:50 ` Peter van der Does
@ 2010-10-21  4:44   ` Kevin Ballard
  2010-10-21 10:35   ` Mathias Lafeldt
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Ballard @ 2010-10-21  4:44 UTC (permalink / raw)
  To: Peter van der Does; +Cc: git

On Oct 20, 2010, at 7:50 PM, Peter van der Does wrote:

> On Thu, 21 Oct 2010 01:04:09 +0200
> SZEDER Gábor <szeder@ira.uka.de> wrote:
> 
>> Hi,
>> 
>> Git's bash completion script offers possible arguments to some
>> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',
>> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit
>> --reuse-message=<TAB>', etc.
>> 
>> On a three day old ubuntu 10.10 install these don't work anymore; the
>> completion script offers the list of files in all those cases.
>> 
>> After a bit of investigation I found that when I press TAB after 'git
>> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'
>> and ${COMP_WORDS[COMP_CWORD]} contains "=".  Weird.
>> 
>> Then I remembered that we had some COMP_WORDBREAKS issues in the past
>> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:
>> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't
>> see anything suspicious (it contains "'><=;|&(: ).  Removing the '='
>> makes the listing after 'git log --pretty=' work, but breaks many
>> other things badly.
>> 
>> I don't have any ideas what could possibly be wrong here (but it's too
>> late here for any bright ideas anyway...).  Could someone confirm or
>> deny this behaviour on ubuntu 10.10?
>> 
>> 
>> Thanks,
>> Gábor
>> 
> 
> My guess is that it has to do with Bash 4, the equal sign must be seen
> as a new word. I'm running Ubuntu 10.04 and have the same problem.
> I fixed the problem locally, I just don't know if that works on Bash 3
> and I doubt it will work on Bash 3.
> 
> I changed the script only for git log, not other commands yet, like 
> git am --whitespace=<tab><tab>

Looks like you're right. I'm running bash 4.1.7 on OS X and it's broken here.

-Kevin Ballard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bash completion broken on ubuntu 10.10?
  2010-10-21  2:50 ` Peter van der Does
  2010-10-21  4:44   ` Kevin Ballard
@ 2010-10-21 10:35   ` Mathias Lafeldt
  1 sibling, 0 replies; 5+ messages in thread
From: Mathias Lafeldt @ 2010-10-21 10:35 UTC (permalink / raw)
  To: Peter van der Does; +Cc: git

On 10/21/2010 04:50 AM, Peter van der Does wrote:
> On Thu, 21 Oct 2010 01:04:09 +0200
> SZEDER Gábor <szeder@ira.uka.de> wrote:
> 
>> Hi,
>>
>> Git's bash completion script offers possible arguments to some
>> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',
>> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit
>> --reuse-message=<TAB>', etc.
>>
>> On a three day old ubuntu 10.10 install these don't work anymore; the
>> completion script offers the list of files in all those cases.
>>
>> After a bit of investigation I found that when I press TAB after 'git
>> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'
>> and ${COMP_WORDS[COMP_CWORD]} contains "=".  Weird.
>>
>> Then I remembered that we had some COMP_WORDBREAKS issues in the past
>> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:
>> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't
>> see anything suspicious (it contains "'><=;|&(: ).  Removing the '='
>> makes the listing after 'git log --pretty=' work, but breaks many
>> other things badly.
>>
>> I don't have any ideas what could possibly be wrong here (but it's too
>> late here for any bright ideas anyway...).  Could someone confirm or
>> deny this behaviour on ubuntu 10.10?
>>
>>
>> Thanks,
>> Gábor
>>
> 
> My guess is that it has to do with Bash 4, the equal sign must be seen
> as a new word. I'm running Ubuntu 10.04 and have the same problem.
> I fixed the problem locally, I just don't know if that works on Bash 3
> and I doubt it will work on Bash 3.
> 
> I changed the script only for git log, not other commands yet, like 
> git am --whitespace=<tab><tab>
> 
> 

Same problem here.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04.1 LTS
Release:	10.04
Codename:	lucid

$ bash --version 
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)

$ shopt
autocd         	off
cdable_vars    	off
cdspell        	off
checkhash      	off
checkjobs      	off
checkwinsize   	on
cmdhist        	on
compat31       	off
compat32       	off
compat40       	off
dirspell       	off
dotglob        	off
execfail       	off
expand_aliases 	on
extdebug       	off
extglob        	on
extquote       	on
failglob       	off
force_fignore  	on
globstar       	off
gnu_errfmt     	off
histappend     	on
histreedit     	off
histverify     	off
hostcomplete   	off
huponexit      	off
interactive_comments	on
lithist        	off
login_shell    	off
mailwarn       	off
no_empty_cmd_completion	off
nocaseglob     	off
nocasematch    	off
nullglob       	off
progcomp       	on
promptvars     	on
restricted_shell	off
shift_verbose  	off
sourcepath     	on
xpg_echo       	off

-Mathias

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-21 10:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20 23:04 bash completion broken on ubuntu 10.10? SZEDER Gábor
2010-10-20 23:33 ` Brian Gernhardt
2010-10-21  2:50 ` Peter van der Does
2010-10-21  4:44   ` Kevin Ballard
2010-10-21 10:35   ` Mathias Lafeldt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).