Mail Archives: cygwin/2003/05/05/12:44:06
On Mon, 5 May 2003, John Morrison wrote:
> > From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu]
> > John,
> >
> > Some notes below.
>
> Ta :)
>
> > On Mon, 5 May 2003, John Morrison wrote:
>
> > > MANPATH="/usr/man:/usr/local/man:/usr/autotool/devel/man:$MANPATH"
> > ^^^^^^^^^^^^^^^^^^^^^^^^
> > This should be "/usr/local/man:/usr/man:". This bug was in my
> > /etc/profile as well; I just fixed it.
>
> Fixed
>
> > > export MANPATH
> > > case "$0" in
> > > bash | -bash | */bash | \
> > > bash.exe | -bash.exe | */bash.exe )
> > > # Set a HOSTNAME variable
> > > HOSTNAME=`hostname`
> > > export HOSTNAME
> > ^^^^^^^^^^^^^^^^^^^
> > The two lines above should be outside of the "bash" case, as they are also
> > used in the "ksh" case.
>
> ksh uses typeset (I don't use ksh, what's typeset?) I assumed
> it was the equiv.
typeset is a ksh builtin for manipulating values of variables, really
cool -- wish bash had something similar.
> > > # Set a default prompt of: user AT host and current_directory
> > > PS1='\[\033]0;\w\007
> > > \033[32m\]\u@\h \[\033[33m\w\033[0m\]
> > > $ '
> > > ;;
> > > ksh* | -ksh* | */ksh* | \
> > > ksh*.exe | -ksh*.exe | */ksh*.exe )
> > > # Set a HOSTNAME variable
> > > typeset -l HOSTNAME
>
> What's this do?
"typeset -l" simply lowercases the contents of the variable, similar to
"|tr 'A-Z' 'a-z'", but faster, since done internally. But it needs a
value in HOSTNAME. The above is probably an artifact from the time
`hostname` returned an uppercase name, but it may still be necessary on
Win9x systems...
> > > # Set a default prompt of: user AT host and current_directory
> > > PS1='^[]0;${PWD}^G
> > > ^[[32m${USER}@${HOSTNAME} ^[[33m${PWD}^[[0m
> > > $ '
> > > ;;
> > > sh | -sh | */sh \
> > > sh.exe | -sh.exe | */sh.exe )
> > > # Set a simple prompt
> > > PS1='$ '
> > > ;;
> > > * )
> > > echo "Sorry, this shell has no default setup."
> > > echo "Please contact cygwin AT cygwin DOT com with the shell details"
> > > echo "and what you would like set as reasonable defaults."
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > I'm thinking, should /etc/csh.login and /etc/csh.cshrc live in this
> > package too? Also, does "zsh" use /etc/profile, or something else?
>
> I don't know, I only use bash, open for discussion :)
>
> J.
I'll let others comment on the tcsh/zsh bit, as I don't use it either.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Knowledge is an unending adventure at the edge of uncertainty.
-- Leto II
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -