Re: Shell prompt
On Mon, Dec 10, 2012 at 12:12:05AM -0700, Bob Proulx wrote:
> Chris Bannister wrote:
> > Asking on list, as others may be interested also.
> >
> > Martin Steigerwald wrote:
> > > martin@merkaba:~#1>
> > > martin@merkaba:~#130>
> > ^^^^^^^^^^^^^^^^^^^^^^^
> >
> > I am wondering what is the significance of the "#1>" and the "#130>" in
> > your shell prompt, is that a function of the shell you are using or is
> > it a custom prompt?
>
> What? You have never used a paper terminal or teletype? :-)
You mean like on that movie "The falcon and the snowman"?
> I am not Martin but let me guess since those used to be quite common
> in prompts. At one time almost everyone had a numbered prompt.
>
> In the old days of csh and paper printing terminals it was very common
I'm running zsh, and get a "%" as a prompt, but I haven't spent a lot of
time digging in to the documentation. So to get the command number is
just a matter of creating a custom prompt? (I see you have answered this
below[1] thanks!)
man zsh is a comprehensive document, and when I get a few spare hours,
I'll sit down and read it. As with most documentation, *actually*
understanding it then getting something usable from it can take
considerably longer.
> ... we can refer to previous events by event number ‘!11’,
> relatively as in ‘!-2’ (referring to the same event), by a prefix
> of a command word as in ‘!d’ for event 12 or ‘!wri’ for event 9,
> or by a string contained in a word in the command as in ‘!?mic?’
> also referring to event 9. These forms, without further change,
> simply reintroduce the words of the specified events, each
> separated by a single blank. As a special case, ‘!!’ refers to
> the previous command; thus ‘!!’ alone is a redo.
Just tried that in zsh, and it works exactly the same. I won't need to
read any documents if this keeps up. :D
[1]
> The commands are shown with their event numbers. It is not
> usually necessary to use event numbers, but the current event
> number can be made part of the prompt by placing a ‘!’ in the
> prompt string.
[snip lots of useful info]
> P.S. What I find most surprising is that you can still buy green bar
> tractor feed continuous computer paper. There must still be some of
> those in use! Wow.
More reliable than friction feed?
Is it double sheeted with a carbon paper arrangement so the second sheet
is a carbon copy of the original?
It is still handy to have a network of teletypes so information can be
sent from a central point and distributed to other centers. Watch "The
Falcon and the Snowman" to see a true story of its (mis)use.
--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X
Reply to: