zsh-users
 help / color / mirror / code / Atom feed
From: Thomas Schafbauer <tosch@merlot.Stanford.EDU>
To: zsh-users@math.gatech.edu
Subject: Why does this not work in zsh?
Date: Tue, 12 Sep 95 20:58:16 PDT	[thread overview]
Message-ID: <199509130358.UAA13037@merlot.Stanford.EDU> (raw)

Below follows a nice script, which works with ksh, bash, csh and tcsh,
but not with zsh :-((((

The variable shname is set in .profile/.cshrc/.tcshrc etc.

I really like it (and it was a pain to comfort all shells), but zsh
is compatible to nothing in this respect :-)

Bye
   Thomas


# this works for ksh + csh shells, when the following variables are defined

if ( `test $shname = ksh -o $shname = bash -o $shname = zsh` ) then
   shfun=1			# K-Shells supports shell-functions
   Ali() { alias $1="$2" ; }
   alias endif=":"
else
   set shfun=0;			# C-Shell like do not support shell-funcs
   alias Ali        alias		
   alias fi         :
   alias setopt     set		# so we set options in Cshell like in ZShell
   alias unsetopt   unset
   setopt noglob		# do not allow filename expansion right now
endif
fi

if ( `test $shname = zsh` ) then
   setopt noglob		# do not allow filename expansion right now
   alias fi=:
endif ; fi

####### Regular Aliases #######

# Safety
Ali cp		'cp -i'		# prompt before overwriting file
Ali mv		'mv -i'		# prompt before overwriting file
Ali rm		'rm -i'		# prompt before removing file









             reply	other threads:[~1995-09-13  4:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-09-13  3:58 Thomas Schafbauer [this message]
1995-09-13  9:01 ` Zefram

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=199509130358.UAA13037@merlot.Stanford.EDU \
    --to=tosch@merlot.stanford.edu \
    --cc=zsh-users@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).