]> git.donarmstrong.com Git - zsh.git/blob - .zsh/func/TS
4ef0cb1e2c7516093fce8c92df52686f9171b129
[zsh.git] / .zsh / func / TS
1 #!/bin/sh
2 #
3 # func/TS
4 #
5 # a convenient way to create an environment for collaborative testing
6 #
7 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
8 # Released under the terms of the Artistic Licence 2.0
9 #
10 # Source repository: git://git.madduck.net/etc/zsh.git
11 #
12
13 local topic filename ret
14 topic="${(j:_:)@}"
15 filename="${TMPDIR:-/tmp}/script.${topic:-$LOGNAME}.$$.$(date +%Y%m%d.%H%M)"
16 echo "I: writing typescript to $filename ..." >&2
17 PS1="%# " PS2= RPS1= script -c "zsh -f" -f -q "$filename"
18 ret=$?
19 echo "I: typescript is in $filename ."
20 return $ret
21 exit $ret