9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] 9term customization
@ 2004-12-10 15:51 Richard C Bilson
  0 siblings, 0 replies; 9+ messages in thread
From: Richard C Bilson @ 2004-12-10 15:51 UTC (permalink / raw)
  To: 9fans

> 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.

I can confirm that -- on XP I can't get shell functions to work
at all.  I tried poking at it a while back, but it was before
the free release of the MS C compiler, so I was trying to make
it compile under gcc, which begat more problems, which led me
to give up in the end.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] 9term customization
  2004-12-09 18:46     ` Gabriel Cosentino de Barros
       [not found]       ` <2814F26DA6908F41927A81C410C4991A02079BE6@siamun.server.bl. corp.intranet>
@ 2004-12-10  0:46       ` Micah Stetson
  1 sibling, 0 replies; 9+ messages in thread
From: Micah Stetson @ 2004-12-10  0:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [9fans] 9term customization
       [not found] ` <2814F26DA6908F41927A81C410C4991A02079BE7@siamun.server.bl. corp.intranet>
@ 2004-12-09 23:48   ` Andrew Simmons
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Simmons @ 2004-12-09 23:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


>
>yeah, that way is not all that bad. I was snarfing, pasting, clicking on 
>the end, pressing return. but i still think that that taking the hands off 
>the keyboard is pointless here. maybe something like csh's !! and history 
>would do the trick...

If 9term doesn't suit the way you want to work, you could look at Uwin 
(Boyd reaches for ...):

http://www.research.att.com/sw/tools/uwin/

This has the Korn shell, which includes all of the history editing a person 
could want and then some. Local and network drives appear as directories 
under /, which could solve your problems with bash/Cygwin.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] 9term customization
  2004-12-09 18:24 ` Micah Stetson
@ 2004-12-09 21:52   ` Tim Newsham
  2004-12-09 18:46     ` Gabriel Cosentino de Barros
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Newsham @ 2004-12-09 21:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> > Seccond, i fell nude without my current path :)
> > I have no clue how to change prompt enviroment var to show it.
>
> I think you want something like this:
>
> fn cd { builtin cd $1; prompt=(`{pwd}^'% ' '	') }

I'm not sure why this isnt setup by default (actually, it seems
to be in plan9port stuff) but acme is much more useful with:

  fn cd { builtin cd $1 && awd $sysname }

(as mentioned in the acme man page).  This provides the benefits
of seeing the path (in the acme title bar) as well as providing
path context for the clicks.

I'm sure this is old hat for most people, but I just came across
this recently and I imagine that means there are other people who
are using acme without it (ack!).

> Micah

Tim N.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [9fans] 9term customization
@ 2004-12-09 21:21 Gabriel Cosentino de Barros
       [not found] ` <2814F26DA6908F41927A81C410C4991A02079BE7@siamun.server.bl. corp.intranet>
  0 siblings, 1 reply; 9+ messages in thread
From: Gabriel Cosentino de Barros @ 2004-12-09 21:21 UTC (permalink / raw)
  To: 'Fans of the OS Plan 9 from Bell Labs'

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

> From: Andrew Simmons [mailto:andrew.simmons@monitorbm.co.nz]
> >To be honest, i got this some months ago, just before i installed plan9 
> >distro at home. And only now i'm back to using it. so i don't realy 
> >remember where i got it :) Here's the readme.txt:
> That would be the port of the second edition tools, which as far as I know

> doesn't include acme.

hum.. true... what's the acme thingy i'm running here? maybe it's inferno
indeed. It's just that after i instaled those things the workload just got
high.

> On the up-arrow thing, I used to find it disconcerting at first, but now I

> wouldn't want to go back. It's really liberating to be able to use the 
> whole area of the 9term window as a scratchpad in which to assemble 
> commands, highlight them, and execute using the right mouse button and 
> "send" command. Try it a bit more, and you might get to love it.

yeah, that way is not all that bad. I was snarfing, pasting, clicking on the
end, pressing return. but i still think that that taking the hands off the
keyboard is pointless here. maybe something like csh's !! and history would
do the trick... 

 
> I don't know about the prompt - I prefer it without the path, which takes 
> up most of the line these days, especially if, which God forbid, you're in


but if you really need to know the path, not having it in the prompt (or how
i set my xterms, in the window title) is a little dangerous while doing ten
things at a time... specialy if you have memory like mine :)


Gabriel

[-- Attachment #2: Type: text/html, Size: 2421 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [9fans] 9term customization
       [not found]       ` <2814F26DA6908F41927A81C410C4991A02079BE6@siamun.server.bl. corp.intranet>
@ 2004-12-09 21:13         ` Andrew Simmons
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Simmons @ 2004-12-09 21:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


>
>To be honest, i got this some months ago, just before i installed plan9 
>distro at home. And only now i'm back to using it. so i don't realy 
>remember where i got it :) Here's the readme.txt:
That would be the port of the second edition tools, which as far as I know 
doesn't include acme.

On the up-arrow thing, I used to find it disconcerting at first, but now I 
wouldn't want to go back. It's really liberating to be able to use the 
whole area of the 9term window as a scratchpad in which to assemble 
commands, highlight them, and execute using the right mouse button and 
"send" command. Try it a bit more, and you might get to love it.

I don't know about the prompt - I prefer it without the path, which takes 
up most of the line these days, especially if, which God forbid, you're in 
a directory called "c:\documents and settings\myaccountwithaverylongname\my 
recent documents\sod this for a game of soldiers".



^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [9fans] 9term customization
@ 2004-12-09 18:46     ` Gabriel Cosentino de Barros
       [not found]       ` <2814F26DA6908F41927A81C410C4991A02079BE6@siamun.server.bl. corp.intranet>
  2004-12-10  0:46       ` Micah Stetson
  0 siblings, 2 replies; 9+ messages in thread
From: Gabriel Cosentino de Barros @ 2004-12-09 18:46 UTC (permalink / raw)
  To: 'Fans of the OS Plan 9 from Bell Labs'

[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]

> From: Micah Stetson [mailto:micah@cnm-vra.com]
> > trying out the plan9 for w32 (that i got just to toy with acme) i found
out
> Where is this?  I thought the only acme for Windows was
> in Inferno.  Has somebody ported plan9ports?  That would
> be great.

To be honest, i got this some months ago, just before i installed plan9
distro at home. And only now i'm back to using it. so i don't realy remember
where i got it :) Here's the readme.txt:

------------------------
This directory contains a Windows port of a number of plan 9 utilities,
including an updated version of the sam text editor. This version of
sam supports the -r option using ssh as the remote execution protocol.

Source is included.  It should be possible to rebuild the
tools from the source, but it will probably require some work.
In particular, the source is mostly built using version 4.2 of
Visual C++. The source was ported using a plan 9 emulation
library called 9pm, which completely replaces the standard
libc library included with the compilers.

The remote execution command srx and the libraries mp and libsec
are compiled with Version 6.0.  This source does not use the 9pm library.

Most of these tools are rather out of date.  Only a small number of changes
have been made since 1997.  Maintenance and updating of these tools is
left as an exercise to the reader.

Note: this code is released under the Plan 9 open source license agreement.

Enjoy
Sean Quinlan
----------------------------


> 
> 
> > Seccond, i fell nude without my current path :)
> > I have no clue how to change prompt enviroment var to show it.
> 
> I think you want something like this:
> 
> fn cd { builtin cd $1; prompt=(`{pwd}^'% ' '	') }

I don't quite understand that.
I tryied simply entering it into rcsh and it did nothing. then i entered
just "prompt=(`{pwd}^'% ' '	')" and then rcsh crashed.

> 
> Micah

Thanks
Gabriel

[-- Attachment #2: Type: text/html, Size: 3403 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] 9term customization
  2004-12-08 23:13 Gabriel Cosentino de Barros
@ 2004-12-09 18:24 ` Micah Stetson
  2004-12-09 21:52   ` Tim Newsham
  0 siblings, 1 reply; 9+ messages in thread
From: Micah Stetson @ 2004-12-09 18:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> trying out the plan9 for w32 (that i got just to toy with acme) i found out

Where is this?  I thought the only acme for Windows was
in Inferno.  Has somebody ported plan9ports?  That would
be great.

> First, i'm afraid i'm to spoiled by bash to like the just-a-text-flow thing
> for now... mainly, i like to browse previous commands when i press the up
> arrow. Is it possible?

I don't think so.  Most of us edit/reuse old commands
using the mouse in the 9term window.  Under Plan 9, you
can grep for things in /dev/text, and several scripts
have been posted here before to do just that.  I don't
think that works under the ports, though.

> Seccond, i fell nude without my current path :)
> I have no clue how to change prompt enviroment var to show it.

I think you want something like this:

fn cd { builtin cd $1; prompt=(`{pwd}^'% ' '	') }

Micah




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [9fans] 9term customization
@ 2004-12-08 23:13 Gabriel Cosentino de Barros
  2004-12-09 18:24 ` Micah Stetson
  0 siblings, 1 reply; 9+ messages in thread
From: Gabriel Cosentino de Barros @ 2004-12-08 23:13 UTC (permalink / raw)
  To: Plan 9 Mailing list (E-mail)

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

Hi,

I'm new to plan9 and i'm using the 9term for w32 to do some automation at
work.

Neither Bash for w32 or cygwin allowed me to work with files on several
network shares/local drives in my scripts easily. But for my surprise, while
trying out the plan9 for w32 (that i got just to toy with acme) i found out
that it behaves very well.

Now, i just need to tweak some things, if possible.

First, i'm afraid i'm to spoiled by bash to like the just-a-text-flow thing
for now... mainly, i like to browse previous commands when i press the up
arrow. Is it possible?

Seccond, i fell nude without my current path :)
I have no clue how to change prompt enviroment var to show it.

Any hints?

Thanks!
Gabriel


[-- Attachment #2: Type: text/html, Size: 1287 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-12-10 15:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-10 15:51 [9fans] 9term customization Richard C Bilson
  -- strict thread matches above, loose matches on Subject: below --
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-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 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).