Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37E5412D.A9E0E0C0@earthlink.net> Date: Sun, 19 Sep 1999 13:01:49 -0700 From: "Kevin L. McWhirter" X-Mailer: Mozilla 4.61 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Leonardo Pedrosa , cygwin list Subject: Re: prompt problem References: <37E536EC DOT D3138B17 AT sti DOT com DOT br> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The only TRULY foolish question is the one that was not asked! Most UNIX shells have the concept of multiple prompts. Most notable of those are: (1) At the command line (2) When at an extended line from the command line These are represented by the environment variables PS1 and PS2 respectively. With ksh and bash these *can* be evaluated when they are displayed to give them a dynamic feel. Bash has extensions to the functionality that ksh provides. The bash man page/info file will provide the full documentation. But the short answer to your question is: MSDOS 'prompt $p$g' is equivalent to export PS1='\w >' A more typical setting would be '\h \w >' . The \h provides the host name. I usually use something like: export PS1=$(uname -n)'-$PWD->' Note that the $(uname -n) is eval-ed when the variable is assigned whereas the hard-quoted '$PWD' is evaluated when displayed. This way I figure out what machine I am on only once. And it is compatible with ksh (under different platforms). I hope that helps! Kevin Leonardo Pedrosa wrote: > Hello, I'm starting with the cygwin recently and due my lack of > knowledge I have this basic/fool question: > When a I run Cygnus form Windows98 the prompt stay fixed at > BASH.EXE-2.02$ > How can I set it like the "prompt $p$g" command of MS-DOS ? > > Thank you. > Leonard > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com