Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: persistance in zcalc funct defs
- X-seq: zsh-users 23382
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-users@xxxxxxx>
- Subject: Re: persistance in zcalc funct defs
- Date: Thu, 3 May 2018 12:18:41 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180503111845euoutp029e3afd0e3352032be9b40fbc12171636~rHmbT2bM61973219732euoutp02U
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1525346325; bh=r4WTuaaOXr7U9eIhN7pDtgkx332pqTys3s2Gh/7LUCQ=; h=Date:From:To:Subject:In-Reply-To:References:From; b=nYnm0AQleq3dedYEBuf43UfeigvGDy/Afy3JkdWe0G3fr/9lXaOsrkUZgT/p1Vv2Q sPj1SJnRzl4IGBtOqie4lhkzSttPEdDM+x/qqhGO4rZ8cqwG7RBHcvgl8GBVvsh3D8 qALro7gi8hDpHNTLKuVvFvXP0iYHUMUjlHMU/mOE=
- In-reply-to: <20180503033801.5111@sparky>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180503103919epcas1p328bce3d32c6c002be49e49e10ff08ced@epcas1p3.samsung.com> <20180503033801.5111@sparky>
On Thu, 03 May 2018 03:38:01 -0700
"jdh" <dhenman@xxxxxxxxx> wrote:
> In zcalc I did the below (The constants are for 360/(2*pi) and it's
> inverse)
>
> ..> function dtor $1 * 0.0174533
> ..> function rtod $1 * 57.2958
>
>
>
> When I shut down and reboot on the morrow, I dought that these will
> persist.
>
> Do I need to, or can I put these functions in a zcalc read/init
> file ? This syntax will probably not work in the zsh startup files.
Just put the following in your .zshrc:
autoload -Uz zmathfuncdef
zmathfuncdef dtor '$1 * 0.0174533'
zmathfuncdef rtod '$1 * 57.2958'
See the zshcontrib manaul.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author