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?
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.
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
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)