Re: 'full qualified port name'

Oliver Fromme <[email protected]>
Newsgroups gmane.os.freebsd.questions.german
Message-ID <[email protected]>
Harold Gutch wrote:
 > On Thu, Feb 23, 2017 at 11:07:23AM +0100, Heino Tiedemann wrote:
 > > wenn ich pkg info aufrufe bekomme ich immer die namen der derzeit
 > > installierten Pakete mit voller Version. Zum Beispiel so:
 > > 
 > > firefox-51.0.1_2,1
 > > qt4-gui-4.8.7_1
 > > 
 > > Mir ist es total unklar, WO dieser Port in der ports collection liegt
 > > (Okay, beim firefox weiß ich es zufällig).
 > 
 >   pkg info -oa
 > 
 > oder alternativ auch
 > 
 >   pkg query %o 

Da ich ein fauler Sack bin, habe ich mir u.a. folgende Aliase
in meine ~/.zshrc geschrieben:

alias ppd='pkg info -d'		# depends on
alias ppi='pkg info'		# info
alias ppl='pkg list'		# file list
alias ppo='pkg origin'		# port category / origin
alias ppr='pkg info -r'		# required by
alias ppt='pkg time'		# installation date / time
alias ppu='pkg updating | less'	# local updating information
alias ppw='pkg which'		# which package a file comes from

Damit kann ich einfach "ppo zsh-5.3.1" oder sogar nur "ppo zsh"
tippen, und er antwortet mir mit "shells/zsh".  Obige Aliase
funktionieren auch mit der "bösen" Shell (bash) sowie /bin/sh.

Noch ein kleiner Tip für zsh-Nutzer:

pkg_command_list=($(pkg -l))
compctl -s '$(pkg info -aq)' -x 'p[1]' -k pkg_command_list -- pkg

Dann werden mit der <TAB>-Taste bei pkg als erstes Kommandos
expandiert, danach die Namen installierter Pakete.  Beispiel:
    pkg d<TAB>hel<TAB>gho<TAB>
wird zu:
    pkg delete help2man-1.47.4 ghostscript9-base-9.06_13

Gruß
   Olli


-- 
Oliver Fromme, München   --   FreeBSD + DragonFly BSD

``We are all but compressed light'' - Albert Einstein


To Unsubscribe: send mail to [email protected]
with "unsubscribe de-bsd-questions" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.