Pacman Yaourt * expansion

i am a debian dude i really love to do :

sudo apt-get install plasma-widget*


this thing on pacman \ yaourt doesn’t exist and i hate this , who cares of noobs that install bad packages i know what i am doing so i check and i click yes , fucking pacman i want every damned package that start with kdeplasma-addons*

so i have asked on #archlinux channel if there was a method and they answered me that it doens’t exist .

so here it is:

first all i hate type sudo pacman … do you really think that i have this to write to install every fucking package that i need ? how idiotic is this ?

so i have created alias for pacman and yaourt with autocomplete function : NOTE THAT THIS WILL ADD complete -F peacefun $filenames i so that will autocomplete the command “i” , this is very important!

kate ~./bashrc


vim ~/.bashrc

add this shit for pacman

alias u="sudo pacman -Syy"
 alias g="sudo pacman -Syu"
#  alias i="sudo pacman -Sy"
 alias pi="pacman -Qii"
 alias r="sudo pacman -Rs "
 alias p="sudo pacman -Rn"
 alias s="pacman -Ss"
 alias c="sudo pacman -Sc"
 alias h="echo \"
 u=sudo pacman -Syy
 g=sudo pacman -Syu
 i=sudo pacman -Sy
 pi=pacman -Qii
 r=sudo pacman -Rs
 p=sudo pacman -Rn
 s=pacman -Ss
 c=sudo pacman -Sc\"


  COMPREPLY=( $( pacman -Sl | cut -d " " -f 2 | grep ^$cur 2> /dev/null ) )

  return 0

 complete -F peacefun $filenames pi
 complete -F peacefun $filenames i
 complete -F peacefun $filenames s
 complete -F peacefun $filenames p
 complete -F peacefun $filenames r


add this shit for yaourt

 alias yu="sudo yaourt -Syy"
 alias yg="sudo yaourt -Syu"
#alias yi="sudo yaourt -Sy"
 alias ypi="yaourt -Qii"
 alias yr="sudo yaourt -Rs "
 alias yp="sudo yaourt -Rn"
 alias ys="yaourt -Ss"
 alias yc="sudo yaourt -Sc"
 alias yh="echo \"
 u=sudo yaourt -Syy
 g=sudo yaourt -Syu
 i=sudo yaourt -Sy
 pi=yaourt -Qii
 r=sudo yaourt -Rs
 p=sudo yaourt -Rn
 s=yaourt -Ss
 c=sudo yaourt -Sc\"
 COMPREPLY=( $( yaourt -Sl 2>&1 | cut -d "/" -f 2 |cut -d " " -f1| grep ^$cur 2> /dev/null ) )
 return 0
 complete -F peacefunyaourt $filenames ypi
 complete -F peacefunyaourt $filenames yi
 complete -F peacefunyaourt $filenames ys
 complete -F peacefunyaourt $filenames yp
 complete -F peacefunyaourt $filenames yr

i like to add this too so that i can do source my home file without problems :

 alias sourcehome="source ~/.bashrc" 

if you are an idiot do this by your hand
source ~/.bashrc

now it’s time to create the command “i” and “yi” with * expansion that are for : sudo pacman -Sy stuff and sudo yaourt -Sy stuff…so download these script and put them on your ~/bin ,if you have not that folder remember to add to your $PATH this folder $HOME/bin ,you can do it by writing in your bashrc this line

 export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl:~/bin/

Of course to load this in che current terminal you need to execute that line in your terminal


Now you nave everything and you should be able to do this kind of stuff


here there is a package with i yi and a bashrc example DOWNLOAD bashrc