From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JgINQ-0001xJ-UN for garchives@archives.gentoo.org; Mon, 31 Mar 2008 11:40:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03B1BE0542; Mon, 31 Mar 2008 11:40:35 +0000 (UTC) Received: from 0815-web.localdomain (static.21.48.46.78.clients.your-server.de [78.46.48.21]) by pigeon.gentoo.org (Postfix) with ESMTP id ACA08E0542 for ; Mon, 31 Mar 2008 11:40:34 +0000 (UTC) Received: by 0815-web.localdomain (Postfix, from userid 1007) id 9B1CB9DC228; Mon, 31 Mar 2008 13:40:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on 0815-web.localdomain X-Spam-Level: X-Spam-Status: No, score=-100.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.2.1 Received: from [192.168.1.33] (ip-62-143-21-159.1411O-CUD12K-04.ish.de [62.143.21.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by 0815-web.localdomain (Postfix) with ESMTP id 389969DC019 for ; Mon, 31 Mar 2008 13:40:37 +0200 (CEST) Message-ID: <47F0CDAE.9000407@j-schmitz.net> Date: Mon, 31 Mar 2008 13:40:30 +0200 From: Justin User-Agent: Thunderbird 2.0.0.12 (X11/20080311) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] fast CLI package-Changelog viewer References: <200803302126.12634@goldspace.net> <200803311331.14308@goldspace.net> <200803311222.56161.shrdlu@unlimitedmail.org> <200803311535.27046@goldspace.net> In-Reply-To: <200803311535.27046@goldspace.net> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB1C239B9E24428156300566A" X-Archives-Salt: cfc7a98c-3e23-48f6-8a44-a1e4c5e73919 X-Archives-Hash: fd48e4e2c1f6c33b2a637e2e1c9138a3 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB1C239B9E24428156300566A Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: quoted-printable Andrew Gaydenko schrieb: > =3D=3D=3D=3D=3D=3D=3D On Monday 31 March 2008, Etaoin Shrdlu wrote: =3D= =3D=3D=3D=3D=3D=3D > =20 >> On Monday 31 March 2008, 11:31, Andrew Gaydenko wrote: >> =20 >>> I agree, my English is ugly. I'll try to explain. Saying "viewer" I >>> mean something like this: >>> >>> logviewer kdelibs >>> >>> will "produce" the same output as, say, >>> >>> less /usr/portage/kde-base/kdelibs/ChangeLog >>> >>> You see, it is impossible to remember all packages' dirs. Of >>> course, I can use 'q' or 'eix' to find a dir and then type in a >>> long 'less ...' command. But, well, why do all these 'eix' and 'q' >>> exist? I think to save some users' time. Is my intention more clear >>> now? :-) >>> =20 >> Neil will surely provide an adequate answer, however, if your needs >> aren't too sophisticated, you could put together something like >> >> $ cat logviewer.sh >> #!/bin/bash >> >> if [ -z "$1" ]; then >> echo "Must specify package name!" >&2 >> exit 1 >> fi >> >> p=3D`eix --only-names -e "$1"` >> >> if [ -z "$p" ]; then >> echo "$1: No matches found" >&2 >> exit 1 >> else >> howmany=3D`echo "$p" | wc -l` >> if [ "$howmany" -gt 1 ]; then >> echo "Many packages with the same name, refine search string:" >> =20 >>> &2 echo "$p" >&2 >>> =20 >> exit 1 >> fi >> fi >> >> c=3D"/usr/portage/${p}/ChangeLog" >> >> if [ -z "$EDITOR" ]; then >> EDITOR=3D`which vi` >> fi >> >> "$EDITOR" "$c" >> --------- >> >> You can also remove the "-e" from the eix line if you want >> approximate matching (that will require you to specify the category >> almost always though). >> Hope this helps. >> =20 > > Thanks! I definitely must read a bash documentaton :-) > =20 I think this will be your friend: http://tldp.org/LDP/abs/html/ --------------enigB1C239B9E24428156300566A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH8M2ugAnW8HDreRYRAoorAJ0SLgo+EfcQQ1iO9Cj9Xvs7goj+JgCeMpGd 7SZtZt4QlPffTAfFL5sM92Y= =D47d -----END PGP SIGNATURE----- --------------enigB1C239B9E24428156300566A-- -- gentoo-user@lists.gentoo.org mailing list