This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

R: querying cygwin version


--- Mar 29/9/09, David M. Besonen  ha scritto:

> Da: David M. Besonen 
> Oggetto: querying cygwin version
> A: "cygwin users" 
> Data: Martedì 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?
> 

there are different ways.
To avoid confusion I decided to implement in my 
.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 /) = "C:\\cygwin2" ] ; then
        PS1='\[\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 
directory name.
 
> thanks,
> david
> 
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]