Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

New to zsh: zle, regular expressions conditionals, printf, history across shells (Mac OS X, zsh-4.2.7)



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

(0) ~ [0]% setopt
         <197>
autocd
extendedglob
interactive
monitor
shinstdin
zle

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.

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.

4.  Finally, is there a way to share my history across open shells?

Thanks to the list, in advance, for your patience.  Looking forward to
playing with zsh!



Messages sorted by: Reverse Date, Date, Thread, Author