From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Geoff Wing <mason@primenet.com.au>, zsh-workers@math.gatech.edu
Subject: Re: Startup-file patch and some tcsh emulations
Date: Mon, 30 Sep 1996 14:34:14 -0700 [thread overview]
Message-ID: <960930143414.ZM21164@candle.brasslantern.com> (raw)
In-Reply-To: Geoff Wing <mason@primenet.com.au> "Startup-file patch and some tcsh emulations" (Sep 30, 12:32pm)
On Sep 30, 12:32pm, Geoff Wing wrote:
> Subject: Startup-file patch and some tcsh emulations
> Heyla,
> just a small patch to provide some emulations for csh/tcsh functions:
> glob, printenv, setenv, unsetenv, and a sample filetest
What's wrong with:
alias glob='print -N'
??
> *** Functions/unsetenv.~1~ Mon Sep 30 12:01:27 1996
> --- Functions/unsetenv Mon Sep 30 12:00:21 1996
> ***************
> *** 0 ****
> --- 1,11 ----
> + #! /usr/local/bin/zsh
> + if [ $# -eq 0 ]
> + then
> + echo "unsetenv: Too few arguments."
> + else
> + repeat $#
> + do
> + unset $1
> + shift
> + done
> + fi
I usually use `typeset +x' rather than `unset' for unsetenv because in
{t}csh the environment and non-environment settings are independent;
you can have `set FOO=bar' and `setenv FOO blat', and if in that case
you do `unsetenv FOO; echo $FOO' you will still get "bar". On the
argument that `unsetenv FOO' shouldn't do anything surprising if FOO
was never exported in the first place, `unset FOO' is bad.
I suppose you could do
for var
do
export | grep \^$var\= >& /dev/null && unset $var
done
but that seems overkill.
next prev parent reply other threads:[~1996-09-30 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-30 2:32 Geoff Wing
1996-09-30 4:05 ` Richard Coleman
1996-09-30 21:34 ` Bart Schaefer [this message]
1996-10-01 17:52 ` Geoff Wing
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=960930143414.ZM21164@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=mason@primenet.com.au \
--cc=schaefer@nbn.com \
--cc=zsh-workers@math.gatech.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.
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).