rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: malte@techfak.uni-bielefeld.de
To: rc@archone.tamu.edu
Subject: alias function in rc
Date: Tue, 11 Feb 1992 11:10:15 -0600	[thread overview]
Message-ID: <9202111710.AA18988@dahlie.techfak.uni-bielefeld.de> (raw)

I as a nasty sytem administrator, I'm planning to let csh slowly die
( if the users let me, of course! ). I'd like to make rc the standart shell.
To make life easier for them I wrote a little rc function which provides
the functionality of the common alias definitions. I post it here hoping
you will benefit from it. Let me here of bugs and incompabilities!

fn alias {
	fn deffn {
		name = $^1; shift 1
		newfn = 'fn ' ^ $^name ^ ' { builtin ' ^ $^* ^ ' $* }'
		eval $newfn
	}
	switch( $#* ){
		case 0; whatis | grep '^fn ';
		case 1; whatis $^1;
		case 2; name=() newfn=() deffn $*;
		case 3; echo 'usage:' $0 '[alias_name [''definition'']]' >[1=2]
			return 1
	}
}

Malte.



                 reply	other threads:[~1992-02-11 17:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9202111710.AA18988@dahlie.techfak.uni-bielefeld.de \
    --to=malte@techfak.uni-bielefeld.de \
    --cc=rc@archone.tamu.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.
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).