Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: New to zsh: zle, regular expressions conditionals, printf, history across shells (Mac OS X, zsh-4.2.7)
- X-seq: zsh-users 13538
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "Webb Sprague" <webb.sprague@xxxxxxxxx>
- Subject: Re: New to zsh: zle, regular expressions conditionals, printf, history across shells (Mac OS X, zsh-4.2.7)
- Date: Fri, 5 Dec 2008 18:50:44 +0100
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=mDkgRGvK5glDjcaBftiSOOzG2kHkrf0aLUwfazHVhvE=; b=x5rx4NAPuMeL7clvlZifMxXNyBS9Hi6/k0QAEslpbLlNGBoSilKL7A7I0Vo/FuJmSC 7Wq++lBEHHsllOaOlS87lAYdyqC9l1/vBOJncdon6oMMyJZsfWsNZ3A5nUL5b+2z2g0O RVWUu/WuzkQbQS5rNYuigjDv7hmF2wVhVKPPE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hhtvpx4cYVAWVB1d8tVpvOyiNhdGcLHXVgCUi4/aRxZY+ByFXd9Gf9C06Nxj1wNkTH pJac6BIoMgcUfmSq0r7LO1GAcp2mnO7ZxBvGTYuD7/VQthOwsBoqjKuuYJSqJFTirwou CkI0f8gZ2Yqf1tM0CBbZKycO0JstnaeTABFSQ=
- In-reply-to: <b11ea23c0812050945i7b30b87m6b97ed42b0597eb6@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <b11ea23c0812050945i7b30b87m6b97ed42b0597eb6@xxxxxxxxxxxxxx>
2008/12/5 Webb Sprague <webb.sprague@xxxxxxxxx>:
> Just discovered zsh! Awesome!
>
> Here is are the first of many silly questions:
>
> 1. Is there a place where I can read some zle examples? I want to
> try to push some edits onto the buffer stack, but I can't figure out
> how... if I run % zle at the command line, I get a return code of 1
> (bad, I think). Also, if I run setopt, I get
The zle builtin command can only be used from bound widgets. Maybe you
want print -z?
> 2. Is there a way to test regular expressions in [[ ]]? Bash
> introduced a "=~" notation recently, and I was wondering if there is
> an equivalent thing. Maybe globbing is as powerful as RE's, but I
> would still like to be able to do [[ $x =~ '^header: ' ]] or some
> such.
Yes, =~
> 3. I can't figure out printf (or 'print -f'). If I type % printf
> "foobar" without any newline, the output disappears. If I type %
> printf 'foo: %s\n' bar, I get "[m' bar:~foo: bar" -- I don't
> understand why the special characters, nor where to look to find out
> about them.
No idea here.
> 4. Finally, is there a way to share my history across open shells?
setopt sharehistory histappend
should probably do it
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author