Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 1999 21:57:32 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        Randall Hopper <aa8vb@ipass.net>
Cc:        Mark Ovens <marko@uk.radan.com>, "Michael G." <mikegoe@ibm.net>, David Kelly <dkelly@hiwaay.net>, questions@FreeBSD.ORG
Subject:   Re: Deleting packages - a newbie question
Message-ID:  <19990418215732.A21582@dan.emsphone.com>
In-Reply-To: <19990418212520.A24218@ipass.net>; from "Randall Hopper" on Sun Apr 18 21:25:20 GMT 1999
References:  <marko@uk.radan.com> <199904190005.TAA41276@nospam.hiwaay.net> <19990418134728.A11854@ipass.net> <99041817400401.00341@Nikki.ibm.net> <19990418134728.A11854@ipass.net> <19990418192714.B252@marder-1> <19990418212520.A24218@ipass.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Apr 18), Randall Hopper said:
>     Thanks for the suggestions.  I realize I could write my own
> custom wrapper script or alias to do this, as I mentioned, or do it
> by hand each time.  But I thought I'd troll the waters and see if
> there was interest in this being the default behavior.  It would make
> the package commands just a little more accessible to new users.

New users don't even know about pkg_delete; they simply run sysinstall
and uncheck the little box in the "packages" section when they want to
uninstall something.
 
>     Here's a shell snippet that does what I want:
> 
> ( cd /var/db/pkg ; /bin/ls -1d mpeg_encode* ) | tr '\012' ' ' |
> /bin/sh -c 'read pkg1 junk ; if [ -z "junk"]; then echo ERROR:
> Multiple Matches ; echo $pkg1 $junk; else pkg_delete $pkg1; fi'

How about using zsh and adding this to your /etc/zcomplete:

compctl -g '/var/db/pkg/*(/:t)' pkg_delete pkg_info

This will let you type "pkg_delete mpeg<tab>"; if there is only one
match, it'll tab-complete it.  If there are more, it'll beep and list
your options (if you have menucomplete turned on)
 
	-Dan Nelson
	dnelson@emsphone.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990418215732.A21582>