]> git.donarmstrong.com Git - zsh.git/blob - .zsh/func/TS
newline in TS prompt
[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="
18 %# " PS2= RPS1= script -c "zsh -f" -f -q "$filename"
19 ret=$?
20 echo "I: typescript is in $filename ."
21 return $ret
22 exit $ret