Warning: this is a htmlized version!
The original is across this link.
#######
#
# E-scripts on the Z shell.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/a/e/zsh.e>
#           or at <http://angg.twu.net/e/zsh.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/a/.emacs[.html]>,
#                 <http://angg.twu.net/a/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######



#####
#
# zsh source
#
#####

pdsc /big/slinks2/dists/slink/main/source/shells/zsh_3.1.2-10.dsc

# (find-zshfile "Src/exec.c" "here document ")

print -l $(<<'==='
 a
  b
   c
===)






############
#
# Yodl 1.22
#
############

cd /usr/src/
rm -Rv yodl-1.22/
tar -xvzf /snarf/ftp/ftp.icce.rug.nl/pub/unix/yodl-1.22.tar.gz
cd /usr/src/yodl-1.22/
# (find-fline "/usr/src/yodl-1.22/INSTALL")
# (find-fline "/usr/src/yodl-1.22/Makefile")
make CFLAGS='-c -Wall' install |& tee om




############
#
# zsh 3.1.4
#
############

cd /usr/src/
rm -Rv zsh-3.1.4/
tar -xvzf /snarf/ftp/ftp.zsh.org/pub/zsh-3.1.4.tar.gz
cd /usr/src/zsh-3.1.4/
./configure |& tee oc
make |& tee om
make prefix=/usr install |& tee omi

cd /usr/src/zsh-3.1.4/
etags $(find * -name '*.[ch]')

cp -v /usr/src/zsh-3.1.4/Doc/zsh.info* /usr/info/
rm -v /usr/info/zsh*gz

cd /bin/
[ -f zsh-3.0.2 ] || mv -iv zsh zsh-3.0.2
ln /usr/bin/zsh .

cd /snarf/http/www.ifh.de/~pws/computing/zsh_fns/
agrep zle *


# (find-zshnode "Top")
# (find-zshnode "Command Substitution")
# (find-zshnode "Editor Functions Index")
# (find-zshnode "Shell Builtin Commands")
# (find-zshnode "Completion")
# (find-zshnode "Zsh Line Editor" "User-Defined Widgets\n")
# (find-zshnode "Concept Index" "* widgets")
# (find-zshnode "The zle Module" "`zle' `-N'")

# (find-fline "/usr/src/zsh-3.1.4/Makefile")
# (find-zshfile "Src/Modules/example.c")
# (find-zshfile "Src/Modules/example.mdd")
# (find-zshfile "Src/Zle/iwidgets.list")
# (find-zshfile "Functions/zed")

# (find-zshfile "Src/builtin.c")
# (find-zshtag "bin_print")

function fooo() {
  echo a
  print -z 'Rum'
}

zle -N foo fooo
bindkey "^[[[E" foo


# (find-fline "/snarf/http/sunsite.auc.dk/zsh/FAQ/zshfaq.yo")
# (find-fline "/snarf/http/sunsite.auc.dk/zsh/FAQ/zshfaq.yo" "label(44)")

# Some examples:

i=0
while [ $i -le 100000 ]
do
   echo ':'$i':'
   i=$[$i+1024]
done




######
#
# zsh help
#
######

#  «zsh_help»

# (find-fline "/usr/doc/zsh/")
# (find-fline "/usr/doc/zsh/FEATURES")
# (find-fline "/usr/doc/zsh/examples/Util/")
# (find-fline "/usr/doc/zsh/examples/Util/helpfiles" "<Esc>-h")

# Only the "builtins" are covered, the ones in:

# (find-zshnode "Shell Builtin Commands")

cd ~
rm -Rv $ZSHHELPDIR
mkdir $ZSHHELPDIR &&
cd $ZSHHELPDIR && {
  man zshbuiltins | colcrt - | perl /usr/doc/zsh/examples/Util/helpfiles
}

# (find-fline "~/.zshrc" "function run-help")




###########
#
# zsh ref card
#
###########

xdvi -paper 30x21cm $S/http/www.ifh.de/~pws/computing/refcard.dvi

cd ~/LATEX/
cp -v $S/http/www.ifh.de/~pws/computing/refcard.dvi .
make refcard.zip




#####
#
# heredoc
#
#####

#  «heredoc»

# (find-node "(zsh)Shell Builtin Commands" "`getopts")
# (find-zshfile "Src/builtin.c" "to start a new option parse")
# (find-fline "/usr/doc/zsh/examples/Functions/zls" "getopts")
# (find-fline "~/.zshrc" "heredoc")

heredoc /tmp/bar  -o edrx:edrx -m 0333 <<'---'
foo bar
---
laf /tmp




#####
#
# Running as other users
#
#####

# (find-node "(zsh)Parameters Set By The Shell" "EUID")
# (find-node "(zsh)Parameters Set By The Shell" "USERNAME")
# (find-node "(sh-utils)User information")
# (find-fline "/etc/passwd")
# (find-fline "/etc/groups")
cat /etc/passwd /etc/groups | sort

# (find-k2tag "sys_setgroups")

id
id -g
id -G
id -u
id -ng
id -nu
id -nG
id -rg
id -ru
id -rG
id -nrg
id -nru
id -nrG

(UID=$(id -u edrx); id)
(EUID=$(id -u edrx); id)
(UID=$(id -u edrx); EUID=$UID; id)
(UID=$(id -u edrx); EUID=$UID; GID=$UID; id)
(UID=$(id -u edrx); GID=$UID; EUID=$UID; id)
(GID=$(id -u edrx); EUID=$GID; UID=$GID; id)
(GID=$(id -u edrx); UID=$GID; EUID=$GID; id)

USERNAME=edrx id
(USERNAME=edrx; id)




#####
#
# Recompiling zsh at twu
# 99dec05
#
#####

# (find-fline "$SDEBIAN/ls-lR.i")

mkdir ~/dl
cd ~/dl
export FDEBIAN_UTK=ftp://ftp.sunsite.utk.edu/pub/linux/Debian
export FDEBIAN=$FDEBIAN_UTK
echo $FDEBIAN

wget $FDEBIAN/dists/slink/main/source/shells/zsh_3.1.2-10.diff.gz
wget $FDEBIAN/dists/slink/main/source/shells/zsh_3.1.2-10.dsc
wget $FDEBIAN/dists/slink/main/source/shells/zsh_3.1.2.orig.tar.gz

cd ~/dl/
'rm' -R zsh-3.1.2 zsh-3.1.2.orig

cd ~/dl
tar -xvzf zsh_3.1.2.orig.tar.gz
ln -s zsh-3.1.2 zsh-3.1.2.orig
zcat zsh_3.1.2-10.diff.gz | patch -p0	2>&1 | tee op

cd ~/dl/zsh-3.1.2/
./configure	2>&1 | tee ../oc
cd ~/dl/zsh-3.1.2/Src/
make		2>&1 | tee ../om
cd ~/dl/zsh-3.1.2/Src/
cp -v zsh ~/bin/




# ifdef LOCAL
#
mkdir ~/dl
cd /big/slinks2/dists/slink/main/source/shells/
cp -v zsh* ~/dl
#
# endif


# Lixos:

# (find-node "(bash)Redirections")
# (find-node "(bash)Pipelines")

cp -v /big/slinkb1/dists/slink/main/binary-i386/shells/zsh_3.1.2-10.deb ~/dl/
cd ~/dl/
# ar p zsh_3.1.2-10.deb data.tar.gz | tar -tvzf -
ar p zsh_3.1.2-10.deb data.tar.gz | tar -xvzf - usr/bin/zsh
mv -v usr/bin/zsh ~/bin/

cd ~/dl/
wget $FDEBIAN/dists/slink/main/binary-i386/shells/zsh_3.1.2-10.deb
ar p zsh_3.1.2-10.deb data.tar.gz | tar -xvzf - usr/bin/zsh
mv -v usr/bin/zsh ~/bin/