| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.2 required=5.0 tests=AWL,BAYES_40 |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <379923.22782.qm@web25508.mail.ukl.yahoo.com> |
| Date: | Tue, 29 Sep 2009 21:20:44 +0000 (GMT) |
| From: | Marco Atzeri <marco_atzeri AT yahoo DOT it> |
| Subject: | R: querying cygwin version |
| To: | cygwin users <cygwin AT cygwin DOT com> |
| In-Reply-To: | <4AC27673.2030407@panix.com> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
--- Mar 29/9/09, David M. Besonen ha scritto:
> Da: David M. Besonen=20
> Oggetto: querying cygwin version
> A: "cygwin users"=20
> Data: Marted=EC 29 settembre 2009, 23:04
> assuming i have both 1.5 and 1.7
> installed, is there a way
> for me to determine from a cygwin bash shell which version
> of
> cygwin i'm using?
>=20
there are different ways.
To avoid confusion I decided to implement in my=20
.bash_profile a different prompt for the two versions
using "cygpath -w /" , the cygwin root location,
as parameter for the selelction
*************************************
# To differentiate cygwin version on prompt
if [ $(cygpath -w /) =3D "C:\\cygwin2" ] ; then
PS1=3D'\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n-2 \$ '
fi
*************************************
of course, you should adapt to your specific=20
directory name.
=20
> thanks,
> david
>=20
Regards
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |