zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Peter Stephenson <pws@csr.com>,
	zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Calculator function
Date: Fri, 27 Jul 2001 12:10:30 -0700	[thread overview]
Message-ID: <010727121030.ZM24973@candle.brasslantern.com> (raw)
In-Reply-To: <Tc0a88d015500b00f08@mailsweeper01.cambridgesiliconradio.com>

On Jul 27, 11:59am, Peter Stephenson wrote:
> 
> I keep meaning to add this.  Maybe someone has a better one somewhere?

This is pretty nifty.  Questions as they pop into my head:

> +Each line typed is evaluated as an expression.  The prompt shows a number,
> +which corresponds to a positional parameter where the result of that
> +calculation is stored.  For example, the result of the calculation on the
> +line preceeded by `tt(4> )' is available as tt($4).

Why not have the prompt look like `$4= ' instead of `4> '?

> +# Line editing and history are available. A blank line or `q' quits.

Hrm, I'd rather that blank lines were just ignored ... I think ...

> +# To do:
> +# - separate zcalc history from shell history using arrays --- or allow
> +#   zsh to switch internally to and from array-based history.

I posted a function some while back that switches history contexts by
dumping the history to a file, then zeroing and restoring HISTSIZE.  I
can't seem to track it down just now ... there's something sort of like
it in zsh-users/3506.

What were you thinking of, here?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-07-27 19:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-27 10:59 Peter Stephenson
2001-07-27 19:10 ` Bart Schaefer [this message]
2001-07-27 23:17   ` Peter Stephenson
2001-07-27 23:26     ` Bart Schaefer
2001-07-29 21:52       ` Peter Stephenson
2001-07-30  0:58         ` Bart Schaefer
2001-07-30  9:47           ` Peter Stephenson

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=010727121030.ZM24973@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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