From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9109 invoked from network); 22 Jul 1997 22:45:45 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 22 Jul 1997 22:45:45 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id SAA12747; Tue, 22 Jul 1997 18:40:47 -0400 (EDT) Resent-Date: Tue, 22 Jul 1997 18:40:15 -0400 (EDT) From: "Bart Schaefer" Message-Id: <970722153943.ZM16000@candle.brasslantern.com> Date: Tue, 22 Jul 1997 15:39:43 -0700 In-Reply-To: <19970722164216.39892@panix.com> Comments: In reply to Russell Hoover "Re: Can I put a newline in an alias?" (Jul 22, 4:42pm) References: <19970719215133.24332@panix.com> <970719210256.ZM1345@candle.brasslantern.com> <19970720114142.29384@panix.com> <970720100730.ZM4687@candle.brasslantern.com> <19970722164216.39892@panix.com> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.820 20aug96) To: Russell Hoover Subject: Re: Can I put a newline in an alias? Cc: Zsh-users MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"msiHm1.0.-53.FRJrp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/967 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 22, 4:42pm, Russell Hoover wrote: > Subject: Re: Can I put a newline in an alias? > > There isn't any special syntax for that. You just have to put the control > > characters in as themselves. > > I'm not sure I understand. I know it would be very useful to be > able to put into aliases things like: > > 1) a return at the end of the alias (so that I can type, say, a one-letter > alias and have the command, or series of commands, executed without having > to hit after I type the alias. This wouldn't work anyway. Aliases aren't interpreted until command execution, which doesn't happen until you hit return. What you want is "bindkey -s". > 2) a control sequence, like, say, I don't know what you would > put in an alias to make a control sequence. What would be an example? What > would one look like? What it looks like would depend on what editor you were using. If it's the zsh line editor, it "looks" like ^L, but you type to insert one. You can't type the two characters `^' and `L' and have them be interpreted as . The means "intepret the next thing I type as simple input, even if it would otherwise be an editor command." That's what I mean by "put the characters in as themselves." Characters entered in this way normally should be part of a quoted string. > 3) what would be the representation of any control character -- , > , , -- how is any of these put into an alias? Same way. > Maybe if one wants to use such things that means it's time to start using > small scripts. Shell functions. > i guess I'm looking for a sort of QuicKeys for zsh . . . You definitely want "bindkey -s".