about summary refs log tree commit diff
path: root/Functions/TCP/tcp_output
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-07-04 16:27:36 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-07-04 16:27:36 +0000
commit554605ee04946160e360354c4aee9102c877ac19 (patch)
tree0488e3d86aefe4a93707e44a5b267a5379cb4393 /Functions/TCP/tcp_output
parente50b688cd5d246a6134fe614ae4efdf9e7dd649e (diff)
downloadzsh-554605ee04946160e360354c4aee9102c877ac19.tar.gz
zsh-554605ee04946160e360354c4aee9102c877ac19.tar.xz
zsh-554605ee04946160e360354c4aee9102c877ac19.zip
18810: Various enhancements and bug fixes for the TCP function suite
Diffstat (limited to 'Functions/TCP/tcp_output')
-rw-r--r--Functions/TCP/tcp_output9
1 files changed, 7 insertions, 2 deletions
diff --git a/Functions/TCP/tcp_output b/Functions/TCP/tcp_output
index 69177bae0..781c46c33 100644
--- a/Functions/TCP/tcp_output
+++ b/Functions/TCP/tcp_output
@@ -1,7 +1,7 @@
 emulate -L zsh
 setopt extendedglob
 
-local opt tprompt sess read_fd tpat quiet
+local opt tprompt sess read_fd tpat quiet cursess
 
 while getopts "F:P:qS:" opt; do
   case $opt in
@@ -29,7 +29,12 @@ fi
 # where data is coming from; also, it allows more predictable
 # behaviour in tcp_expect.
 if [[ -n $tprompt ]]; then
-  zformat -f REPLY $tprompt "s:$sess" "f:$read_fd"
+  if [[ $sess = $TCP_SESS ]]; then
+      cursess="c:1"
+  else
+      cursess="c:0"
+  fi
+  zformat -f REPLY $tprompt "s:$sess" "f:$read_fd" $cursess
   # We will pass this back up.
   REPLY="$REPLY$*"
 else