From: Micah Stetson <micah@cnm-vra.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] 9term customization
Date: Thu, 9 Dec 2004 16:46:25 -0800 [thread overview]
Message-ID: <20041210004625.GA19541@epaphras> (raw)
In-Reply-To: <Pine.BSI.4.58.0412091150270.11573@malasada.lava.net> <2814F26DA6908F41927A81C410C4991A02079BE6@siamun.server.bl.corp.intranet>
On Thu, Dec 09, 2004 at 04:46:38PM -0200, Gabriel Cosentino de Barros wrote:
> > fn cd { builtin cd $1; prompt=(`{pwd}^'% ' ' ') }
>
> I don't quite understand that.
> I tryied simply entering it into rcsh and it did nothing.
Unlike in bash and such, $prompt doesn't get special
evaluation whenever a prompt is displayed. There is no
special support for dynamic prompt strings. Simply
setting $prompt to a value including the current working
directory will make it always display that value,
irregardless of changes to the working directory.
The above function definition uses the more general
facilities of rc to get the job done without needing
special backslash escapes and other such nonsense. We
replace the 'cd' command with a version that first calls
the original cd command and then sets the prompt with
the new working directory. You shouldn't see the prompt
change until after you run cd.
> then i entered
> just "prompt=(`{pwd}^'% ' ' ')" and then rcsh crashed.
This should have made the prompt indicate which directory
you ran that command in for the rest of the session.
But 9pm is old and unmaintained, and I've seen it behave
strangely and/or crash under some newer versions of
Windows. You may be out of luck, unless you want to try
to fix it.
Micah
next prev parent reply other threads:[~2004-12-10 0:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 23:13 Gabriel Cosentino de Barros
2004-12-09 18:24 ` Micah Stetson
2004-12-09 21:52 ` Tim Newsham
2004-12-09 18:46 ` Gabriel Cosentino de Barros
[not found] ` <2814F26DA6908F41927A81C410C4991A02079BE6@siamun.server.bl. corp.intranet>
2004-12-09 21:13 ` Andrew Simmons
2004-12-10 0:46 ` Micah Stetson [this message]
2004-12-09 21:21 Gabriel Cosentino de Barros
[not found] ` <2814F26DA6908F41927A81C410C4991A02079BE7@siamun.server.bl. corp.intranet>
2004-12-09 23:48 ` Andrew Simmons
2004-12-10 15:51 Richard C Bilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041210004625.GA19541@epaphras \
--to=micah@cnm-vra.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).