zsh alias apt with auto complete kde 4 kubuntu


if you use bash , the standard konsole environments, you need to read this

if you use zsh well that soluition doesn’t work cuz complete function is a bash function so in zsh there is not.

but there is another function called compctl so the code will be

 
alias u="sudo apt-get update"
alias g="sudo apt-get upgrade"
alias uf="echo sudo apt-get upgrade -f  && sudo apt-get upgrade -f"
alias gf="sudo apt-get dist-upgrade -f"
alias i="sudo apt-get install"
alias ai="apt-cache show"
alias r="sudo apt-get remove "
alias p="sudo apt-get --purge remove "
alias s="apt-cache search "
alias a="sudo apt-get autoremove"
alias h="echo \"
u==>sudo apt-get update
g==>sudo apt-get upgrade
uf==>sudo apt-get upgrade -f
gf==>sudo apt-get dist-upgrade -f
i==>sudo apt-get install 
ai==>apt-cache show  
r==>sudo apt-get remove 
p==>sudo apt-get --purge remove 
s==>apt-cache search 
a==>sudo apt-get autoremove\"
"
		
		
peacefun()
{
	cur=`_get_cword`
	COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
	return 0
	
} 

compctl -K peacefun $filenames ai 
compctl -K peacefun $filenames i 
compctl -K peacefun $filenames s 
compctl -K peacefun $filenames p 
compctl -K peacefun $filenames r 

One Response to zsh alias apt with auto complete kde 4 kubuntu

  1. Its a shame that only a single webcam seemed to return with safety software (scheduled snapshots or motion detection).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: