You are not logged in.

#1 2011-03-23 21:02:36

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

[Workaround] Weird vim bash completion behaviour

Currently running bash-completion 1.2-2. Vim does not seems to auto-complete files when I am in the root of my home directory(i.e. just '~' and no subdirectories); only sub-directories are given as possible options. Resourcing /etc/bash_completion does not have any effect. Other current working directories work fine. Running this line from /etc/bash_completion does seem to fix it:

complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite

Resourcing /etc/bash_completion breaks it again, really weird.
I have no idea what's going on. Maybe bash-completion has trouble with the '~' character somehow?

EDIT: only the root of the user's home directory is affected (i.e. just '~' and no subdirectories)

Last edited by OutOfPhase (2011-03-24 16:02:41)

Offline

#2 2011-03-24 15:59:55

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [Workaround] Weird vim bash completion behaviour

Seems that some completion rules are being deleted in the lines 1632-1653 in /etc/bash_completion, which is the very file that adds the completion rules in the first place(!) This hardly makes any sense. Somewhere in that block things go wrong.
Commenting crucial lines from this block, for example line 1644, fixes it.

Offline

#3 2011-04-05 16:55:21

balta2ar
Member
From: Russia, Moscow
Registered: 2010-03-23
Posts: 25
Website

Re: [Workaround] Weird vim bash completion behaviour

I have the same problem. Your solution works, thank you so much.
Where did that change come from? It was working just fine a month ago.

Offline

#4 2011-04-05 18:34:49

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [Workaround] Weird vim bash completion behaviour

Beats me.

Offline

Board footer

Powered by FluxBB