You are not logged in.

#1 2013-01-20 09:41:58

breed808
Member
From: Australia
Registered: 2012-10-27
Posts: 15

[SOLVED] Slight issue concerning pacman & bash completion

Hi all,

I've come across a small issue when using the -Rs option with pacman.

The auto completion doesn't appear to be working for the first package name passed after the -Rs option.

For example, when issuing the command

pacman -Rs firefox

and pressing tab twice, it will not show any options or auto-complete. However, if I add another package to be removed:

pacman -Rs firefox chr

and hit the tab key twice, autocomplete will work, and it'll autocomplete to chromium.

Bash-completion (2.0-3) is installed, and the rest of the system is up to date. Am I missing something here, or have I stumbled upon a bug?

Offline

#2 2013-01-22 12:38:18

gay
Member
Registered: 2012-12-16
Posts: 73

Re: [SOLVED] Slight issue concerning pacman & bash completion

I don't know so much about it, but I'm under the impression that bash-completion for pacman (once enabled in ~/.bashrc by adding "complete -cf pacman") works by default by checking the user's PATH variable, i.e. it will offer to complete pacman commands with the name of any executable in the user's PATH's () as well as the contents of the current directory. ... which means: if firefox isn't installed, it won't find it; if it is, it will offer this completion; if there's a file called firefox in the current directory, it will also offer it.

but as I said, I'm not an expert on bash-completion


We are exactly the people our parents always warned us about.

Offline

#3 2013-01-23 01:58:26

breed808
Member
From: Australia
Registered: 2012-10-27
Posts: 15

Re: [SOLVED] Slight issue concerning pacman & bash completion

gay wrote:

complete -cf pacman

Adding this to my .bashrc solves the problem, so I'm happy. What I'm curious about is why the rest of the pacman auto-completion was working except for the -Rs flag before adding this to my .bashrc

Offline

#4 2013-07-16 00:44:31

EvanPurkhiser
Member
From: Akron, Ohio
Registered: 2010-08-17
Posts: 225
Website

Re: [SOLVED] Slight issue concerning pacman & bash completion

I hate to necro an old thread, but in case anyone ends up on this thread after a google search, I solved this by removing the "shopt -s nocaseglob" command from my bashrc. See this thread.

Last edited by EvanPurkhiser (2013-07-16 00:44:49)

Offline

#5 2013-07-16 01:59:58

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,644
Website

Re: [SOLVED] Slight issue concerning pacman & bash completion

@EvanPurkhiser
Thanks for linking to the other solution.

closing

Offline

Board footer

Powered by FluxBB