45.8.1 debian/zsh-common//usr/share/zsh/functions/TCP/tcp_alias;  debian/zsh-common//usr/share/zsh/functions/TCP/tcp_close;hdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_command (debian/zsh-common//usr/share/zsh/functions/TCP/tcp_expectE pdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_fd_handlerE  debian/zsh-common//usr/share/zsh/functions/TCP/tcp_log_ debian/zsh-common//usr/share/zsh/functions/TCP/tcp_open debian/zsh-common//usr/share/zsh/functions/TCP/tcp_output(debian/zsh-common//usr/share/zsh/functions/TCP/tcp_pointNdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_proxyNx debian/zsh-common//usr/share/zsh/functions/TCP/tcp_read8debian/zsh-common//usr/share/zsh/functions/TCP/tcp_renamea 8debian/zsh-common//usr/share/zsh/functions/TCP/tcp_send debian/zsh-common//usr/share/zsh/functions/TCP/tcp_sess!@|debian/zsh-common//usr/share/zsh/functions/TCP/tcp_shoot!&" debian/zsh-common//usr/share/zsh/functions/TCP/tcp_spam %cdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_talk%& debian/zsh-common//usr/share/zsh/functions/TCP/tcp_waitACfdқCAf <pA@z ;4P2#dACg|A AfzA 0 A.%0 "A.'0 ;AC F,A"-HC F|A 1A/A A0A\C 2#AA8 ,A ۔AF,At ;+<AT1A.<rAlC 1 A= %AFEA,?A &A,B A,C5A|1ADR]A"FRuFA,GA &AA>JRPrARA"KRuFA,LA C&|A111AO A,Q2#AdA<&1AS Q ACF A,V A%da AP 1AXR ACF ) qA.[u A@A_RuAF A,bA & A"f g <  A,g2#Ah 1Ah M A.iEu qA.ku A,m +4#Ah Af0LTA8AoAf +4#WA,tA,u2#Al 1 AvR+4#AF9A,xA C&AdAC=1.A} AX*1%A %A F A,EA %dAP  1AR9A!F ]qA.u AhC" AC"f0LTA8"AA"fL +4#qA#۔A@%ARuAC%FA,A &&AC'F,9emulatesetoptextendedglobcbaseslocalquietbasevaluealiasdeletematchmbeginmendarrayintegerstatindexgetoptsqdoptdeletereturn OPTIND > 1 shift( OPTIND - 1 ) ! # #tcp_aliases kvtcp_aliasesvalueprintalias: alias for session tcp_by_fd[fd]:-unnamed fd fdargbdelete0: value given with deletion command.continuematch1match2basequiet0: empty value for alias aliascontinue+tcp_by_nametcp_by_namebase0: no base session `base' for aliascontinuetcp_by_namealiastcp_aliasesfdarrayraliasunsettcp_by_name[alias]arrayialiasarray1,index1arrayindex+1,1arraytcp_aliases[fd]tcp_aliasesfdarray0: `alias' is already a session name.continue ! +tcp_aliases typesettcp_aliasestcp_aliasesfd aliasaliastcp_by_namealiaszmodloadzsh/parameter +functions[tcp_on_alias] tcp_on_alias0: no such alias `alias'continuearrayraliasdeletearrayialiasarray1,index1arrayindex+1,1arraytcp_aliases[fd]array +functions[tcp_on_unalias] tcp_on_unaliasalias: alias for session tcp_by_fd[fd]:-unnamed fd fd0: `alias' is a session name.continuestatAfdқCAf <pA$C cczAg A0Af=zAC?e0  A. cc0 A.0 bAy0 rA.0 A0 ;AFA"!CF(AA A# AX  A$AC FA FA uAhC  A)A"*R F!A FA +<A8C A1A AhC  A5A"6R F9A FAg2#AgAg A <PhAAf,Ap&AF<A~D1A.Dr-A.EyAA,KA,L2#9AlC 1 AMR+4#AFA,OA & A,S4 Y AATR A@CAURAF A,XA C& A1A>\2P  ApC, 9 A8A^ Af I +4#ACFd } AFd AX Ag c+ABfc+4+4#F! A 1Ak a AXC ACf+4#A,nA.o QAqR Ap 1 A&t A"uRCF qAFAFd AFd IADC1A>}2PRrAFA"r U Fd |A8 AA f +4#A!FMemulatesetoptextendedglobcbaseslocalquietaliasnoclosesessnamesgetoptsaql:ns:opts.,.OPTARGOPTARGreturn OPTIND > 1 shift( OPTIND - 1)all # printUsage: 0 [ -q ] [ -a | [ session ... ] ]ktcp_by_name ! #sessnames quietNo TCP sessions open. ! #sessnames TCP_SESS ! #sessnames No current TCP session.tcp_sessintegerstatcurstatztcp_fdslinematchmbeginmendzmodloadzsh/net/tcpztcpreadlinebfd 09ztcp_fdsmatch1tcp_sesssessnamescurstattcp_by_nametcp_sessNo TCP session tcp_sess!continuetcp_sesstcp_by_fdfdtcp_sessAaargh! Session for fd fd has disappeared!continue+tcp_aliasestcp_aliasesfdtcp_aliasesfd +functions[tcp_on_unalias] tcp_on_unaliasaliasunsettcp_by_name[alias]tcp_aliases[fd][Ignoring...]ztcp_fdsfdcurstatnoclosefdCan't close fd fd; will leave open.evalexec fd>&-tcp_by_name[tcp_sess]tcp_by_fd[fd]curstatSession tcp_sess successfully closed.TCP_SESSTCP_SESS +functions[tcp_on_close] tcp_on_closestatABF+<F$A@$ۤeAF$tcp_sendreturntcp_readTCP_TIMEOUT:0.3A fdқCA F <Al 1 A.2qA  G4-A g4PA$p$TAgp A P|AC4A$1AfpA0  AC 0 bAed 0X)A,E<qA` A.FAF$=AFAT 1 A.Jr1AF$UAFAp 1 A.Nr1AFdyA.PqAFd0 ACی0 AeۜA 0  A.Ya 0  A.[ 0  ACF0; A($ H e AFA"d F Ag< T A% AP4A & AC0(Ai A,jp A"k k AAl@ A\ 1 An A"o YFdAFAnr1ArA.sA 1ۤ}A.w+ACfA.zP+A\ 1 A|A"} CFdAFA 0uAC "A41 AN2pHr A,T A.$1qA,TYA.$AdC" 1 A.rA" "Fd-A"FemulatesetoptextendedglobtSECONDSfloattypesetTCP_SECONDS_STARTSECONDSSECONDSlocal_expect_opt_expect_pvar_expect_state_expect_arg_expect_ind_expect_read_argsfloat_expect_to1_expect_to_all_expect_to_expect_new_tointeger_expect_i_expect_stat_expect_statesgetoptsal:p:P:qs:t:T:_expect_optOPTARGpP_expect_pvarOPTARG_expect_pvarazAZ_azAZ_09printinvalid parameter name: _expect_pvarreturn_expect_pvar_expect0: parameter names staring `_expect' are reserved._expect_opteval_expect_pvar=0_expect_states_expect_pvar=OPTARGOPTARG_expect_to_all( SECONDS + OPTARG )Unhandledoption_expect_opt,complain OPTIND > 1 shift( OPTIND - 1 )tcp_expect_linestcp_expect_linestrue _expect_to_all || _expect_to1 _expect_to _expect_to1 _expect_to = _expect_to1 _expect_to_all (_expect_new_to = (_expect_to_all - SECONDS)) <= 0 _expect_pvar_expect_pvar=-1 _expect_to <= 0 || _expect_new_to < _expect_to _expect_to_expect_new_totcp_read_expect_read_args_expect_to_expect_stattcp_read_expect_read_args_expect_stat _expect_stat _expect_pvar_expect_stattcp_expect_linesTCP_LINE_expect_i = 1_expect_i <= #_expect_i++ _expect_statesargv_expect_ib::match1match2_expect_iTCP_LINE_expect_arg_expect_pvar_expect_pvar=$_expect_indA,G2#+,AA'A\17A AGAP 1A5AFc+LqA. XA!1!A$۬+4#A` AAf<+4#ABmCF+A" Fc+LAF!ACfc+4+4#AFAF$AFc+LAC1AC(۬+4#AF=Afc+4+4#AFA," AG@AD A (۬+4#ۤ@A.%aAC ۔locallinesesstcp_by_fd1TCP_HANDLER_ACTIVEsessTCP_INVALIDATE_ZLE # > 2 TCP_INVALIDATE_ZLEtcp_read +functions[tcp_on_awol] tcp_on_awol ? == 100 returnTCP_INVALIDATE_ZLEprint[TCP fd fd (session sess) gone awol; removing from poll list]read[Reading on fd failed; removing from poll list]fdfd:linenewlineline fdfd:newlinelineAfdқCAf <XA zAG AAf0QzApAHP0  A. 0 A.#0 A.&0 rA.)0 rA F0 A FD0;A F`yA FDA"7 FD]ACA9 AX A:AF`AFDAfPpAFDAL1ABAF`AFDAX AJAF`AFDAT)AO A G<p+AC1AQRAGAGJA0UA4A &q A G<H +A"\Ri  &AFDemulatesetoptcbasesextendedgloblocalappendsesscloseintegeractivitygetoptsascnN activity++ optappendTCP_SILENTunsetTCP_SILENTreturnprint0: option -opt not handled, oops. OPTIND > 1 shift( OPTIND - 1)close # 0: too many arguments for -cTCP_LOGTCP_LOG_SESS # == 0 && ! activity Per-session log: TCP_LOG_SESS:- Overall log: TCP_LOG:- Silent? TCP_SILENT:+yes:-no # != 1 0: wrong number of argumentssesstypesetappendsesslogsintegersesslogsTCP_LOG_SESSNi = 1i <= #sesslogsi++ sesslogsiTCP_LOGappendTCP_LOGA fdқCA f <pABfLFAfLA$C$۬HpA(0۬TtA(<۬`ABCAg<3A,z <PhA ACG$A("Af8YzA}0# A,MA` A.NAF4MAF0#2A,S<A` A.TACF4MAF0 bAC0 A.[0 AC 0 A._P0 ;ACFA"e< CFp ABg g<  ABh9 g<  ACg  Az1KAk At 1 AVlR+$R@  ACF49 AFAdp, A.q A,t` A\C 1 A&uR AF41 AFAC$ ACf  A"zr   &,An{1A{QA.|=Ax, AX  ARAC F4A F.A!1A62@RRA!1AA "+z3AD$+8+A"Fp MA#1A +A#+A $&p q A$AVA AxA.!AX& AYA&F4mAC'FA(g2#AC({-AX( A YA(F4A)FA)%4A*1A A.2#qA*1A YAB+fx +Fq A+AB+Fx%+FA.2#MA,iA,+4#A"2@ c+R -c+4+4#Ah.,+A.fL$A8/&%A]AC/!1!AC/f+4#A/1ARAT/ AA0f4YqA0F4AC1f`qA1یA,$A 2&Ax3 ARAT4 AAC4f4QqA5F4=AC61A6R@RRAl6 1 A UA"R7F4A C7G<tAC8Femulatesetoptextendedglobcbaseszmodloadzsh/net/tcpreturnzsh/zutilautoloadtcp_aliastcp_closetcp_commandtcp_expecttcp_fd_handlerautoloadtcp_logtcp_outputtcp_proxytcp_readtcp_renametcp_sendautoloadtcp_sesstcp_spamtcp_talktcp_waittcp_pointtcp_shoot +TCP_SECONDS_START typesetTCP_SECONDS_STARTlocalacceptfakenozlesessfilesessquietsessnamessessargsintegerstatgetoptsa:f:l:qs:zoptacceptOPTARGaccept:digit:printoption -a takes a file descriptorOPTARGfake:digit:option -f takes a file descriptors.,.OPTARGOPTARG OPTIND > 1 shift( OPTIND - 1 ) +tcp_by_fd tcp_by_fd +tcp_by_name tcp_by_namesessassoc #sessnames acceptIncompatible arguments with `-s' option.sessnamessessassocsesssessfileZDOTDIR:HOME/.ztcp_sessionssessfileNo session file: sessfilereadsessargssessargs1#continue +sessassoc[sessargs[1]] sessassocsessargs1sessargs[2,-1]sessassocsessCouldn't find session sess in sessfile.accept # < 2 wrongnumberargumentshostport( # > 1 ? 2 : 1 )( #tcp_by_fd + 1 )tcp_by_namesessnames1 sessnames[1]++ sessassocsessnames1host port # Usage: 0 [-z] [-a fd | -f fd | host port [ session ] ] 0 [-z] [ -s session | -l sesslist ] ...REPLYsessnamestcp_by_namesessSession `sess' already exists.sessargsacceptztcpacceptsessargssessassocsesssessargsREPLYtcp_by_fdfdsesstcp_by_namesessnozlezsh/parameter +functions[tcp_on_open] tcp_on_openquiet #sessargs Session sess(host sessargs[1], port sessargs[2] fd fd): tcp_on_open FAILED.Session sess (fd fd) tcp_on_open FAILED.tcp_closetcp_closecontinue #sessargs Session sess(host sessargs[1], port sessargs[2] fd fd) opened OK.Session sess (fd fd) opened OK.TCP_SESStcp_by_nameTCP_SESStcp_by_namesessnames1Setting default TCP session sessnames[1]TCP_SESSsessnames1statAfdқCAF <A,CpzA@Af(IzACq0 2A. 0 A. 0 A. 0 A.0;A"q Cf۔AFA"FAHCA 9A$D۔qA"1A A! 1A.!rA."@aqA.$xA$ 4 5iA|'1A.'r+:A.(A.+qA.-qAH A/ !A$ DE۔Ad +1+A3RqA 'pAC 1A&5A\ A"9r!"9 C&DAA<R]AL1AC uAFc+LAFA۔emulatesetoptextendedgloblocaltpromptsessread_fdtpatquietcursessgetoptsF:P:qS:optOPTARGtpromptOPTARGOPTARGprintCan't handle option optreturn OPTIND > 1 shift( OPTIND - 1 )TCP_LOG_SESS*TCP_LOG_SESS.sesstpromptsessTCP_SESScursessc:1cursessc:0zformatREPLYtprompts:sessf:read_fdcursessREPLY%REPLY%PREPLY*TCP_LOGTCP_LOGquietskiptcp_filtervtcp_filtertpatbreakskipTCP_INVALIDATE_ZLEunsetTCP_INVALIDATE_ZLEAfdқCAf <pA\ 1 A&+$AFACF A(@b3# 3#AdC 1 ACfXd+AFmAF A,b3#Ah AfX ACFAfXA, 3#A& ACfXAfXemulatesetoptextendedglobcbasesprintUsage: 0 port Listen on the given port; send anything that arrives to standard output.returnlocalREPLYztcpFailed to listen on port 1REPLYlfdFailed to accept on fd lfdafdACGA$PeBJr\pA`C A. +lAFAF0A'Ll+A &ABfdF0A,ABf+-A'k#+A C&A\NAf eACfAflocalTCP_LISTEN_FDtrap[[ -n $TCP_LISTEN_FD ]] && ztcp -c $TCP_LISTEN_FD; return 1TERMEXITPIPEprintUsage: 0 port [cmd args... ]returnintegerportshiftztcpportTCP_LISTEN_FDREPLY # SHELL:zshTCP_LISTEN_FDevalcmd$* <&$REPLY >&$REPLY 2>&$REPLY &AfdқCAf <pAfLA<z(@X ccxZ+ cACg A%A8AGXxA<AfzA0  A.I cc0 A.L@0 "A.O0/bAC,xA,RXEAX ASRAFACFLA.Wi0 A.](0'A,`XAXC AaRAF9AFLA.ei0A,iA"j F-0 A.m0+A,XA`C A.q!E AFAFLA.u0; A"x FuACFLA$#A~  A QAY AC  AR A"R  F A FL ARA AC!F A!FLA.) A"g <  A#% AL#' EP Ed Ex E A#G AlC$ 1 A. A $G 4( q AC%g 4 A\1A A A'fLtA'1A A'A ABC(ۤi(FLAB)Fi)FLAx*GAAC*91A A*F4@3AtC+ 1 A A"L+FLA^1AA|A,"AA@-A AC-FAAB-,ۤMi.FLA@.A A.FABC/ۤiC/FLA@0A AC0F9A40EXAt1 1 A1۬۔AC1F4=A,xA 1&A,A,xA,AA3AA|5Z+ cAXC5 A.r5 AB5fUiیA06Fۄۜ54MqA7A,7G <@qA"R8FLA9FLemulatesetoptextendedglobcbaseszmodloadzsh/mathfunclocaldrainlinequietblockread_fdsessnoprintread_fdsfloattimeouttimeout_allendtimeintegerstatgetoptsabdl:qs:t:T:u:opts.,.OPTARGtcp_by_namesessread_fdprint0: no such session: sessreturnread_fdsread_fdtcp_by_nameOPTARGread_fd0: no such session: sesstimeoutOPTARGTCP_READ_DEBUGTimeout per-operations is timeoutOPTARGs.,.OPTARGread_fd0x:xdigit::digit:Bad fd in OPTARGread_fds(read_fd)Unhandled option, complain: optallkvtcp_by_fd ! #read_fds TCP_SESSquietNo tcp connection open.tcp_by_nameTCP_SESSTCP session TCP_SESS has gorn!read_fdstcp_by_nameTCP_SESStypesettcp_linestcp_lineshelper_statskiptpatreplyREPLYnewtimeouttSECONDSfloatTCP_SECONDS_STARTSECONDSSECONDS timeout_all endtime = SECONDS + timeout_all zsh/zselectblockzselect( int(100*timeout_all + 0.5) )kread_fdshelper_statzselect #read_fds unset (newtimeout = endtime - SECONDS) <= 0 ! timeout || newtimeout < timeout timeout = newtimeout timeout TCP_READ_DEBUG[tcp_read: selecting timeout timeout on (k)read_fds]zselect( int(timeout*100 + 0.5) )TCP_READ_DEBUG[tcp_read: selecting no timeout on (k)read_fds]zselectTCP_READ_DEBUG[tcp_read: returned fds reply]reply2,1readread_fdread_fds[read_fd]continuehelper_stattcp_by_fdread_fdTCP_SILENT:+q +tcp_on_read kvtcp_on_readlinevalkeysesslinetcp_outputTCP_PROMPT=<-[%s] sessread_fdnoprintlinetcp_linesREPLYTCP_LINEREPLYTCP_LINE_FDread_fddrainstatACgzc#r+A1AA,zc#AA. r++QA iA, zc#+A. r++AFAFA'2#AX AR+4#AFaACFAX A AF ACFA` A.ACFAFA,!u+4#AFA,$%aA"&ru&aAl 1 A fLA<C 1A)A a+4#local # == 1 TCP_SESS # == 2 printUsage: 0 OLD NEWreturntcp_by_nameoldNo such session: oldtcp_by_namenewSession new already exists.tcp_by_fdfdoldUse tcp_alias to redefine an alias.tcp_by_namenewunsettcp_by_name[old]tcp_by_fdfdnewTCP_SESSTCP_SESSzmodloadzsh/parameter +functions[tcp_on_rename] tcp_on_renameAfdқCAf <pA0C'z cc2# A  0AGXxAtC&ACfzAH0  A.  cc0 A.  0 rA.t0 A.0*bAAX AR]ACFAF@A\0"AX ARAFACF@A\0;A"!CFAF@A"&, F`yAh  A( AC A*AA A|C 1A-A@ A.R A F)AC F@AGACf8AGLAxC'A C&pAd A> ABf۔ &qA.AA7LA,D2# AlC 1 AER+4#AFi A,GxA & A$۬+4# ۔- A1A>KRP+ E AF ACF 8 A,NxA &p APC AQ A,& ۄ ۜ) 4+4#یQ A"UR C&AF@ emulatesetoptextendedglobcbaseslocalquietsessnonewlinelinesessionswrite_fdsintegermystatgetoptsacl:nqs:optnonewlines.,.OPTARGtcp_by_namesessprint0: no such session: sessreturnsessionssesstcp_by_nameOPTARGNo such session: OPTARGsessionsOPTARGUnhandled option, complain: opt OPTIND > 1 shift( OPTIND - 1 )allsessionsktcp_by_name ! #sessions sessionsTCP_SESS ! #sessions quietNo current TCP session open.TCP_FD_CLOSEDtrapTCP_FD_CLOSED=1PIPETCP_SESStruecatreadbreak*sessionstcp_by_nameTCP_SESSNo such session: TCP_SESScontinuenonewlinelineTCP_FD_CLOSEDSession TCP_SESS: fd fd unusable.unsetTCP_FD_CLOSEDcontinueTCP_OUTPUTtcp_outputTCP_OUTPUTTCP_SESS(j. .)*mystatA' AtC-1-A +AP) AR=Ar{+A.QA +A'+A &(A'@+A C&(AfXmA &qA CG<+AFA2#ACA,2#9A  1A. rA.!qA.#AC ۬ A Fqinteger__myfdtcp_by_name1printsuchsession:__myfdlocalTCP_SESSshift__cmdeval__cmd$*returntypesetnamekotcp_by_nametcp_by_namenameTCP_SESSname *__myfdsess:name; fd:fdcur( __myfd - 1 )AfdқCAF <ACgp3#A\ 1 A&+$AFAFAdC 1 ACf++AF%AFA,3#A& AfemulatesetoptextendedgloblocalREPLYprintUsage: 0 host port Connect to the given host and port; send standard input.returnztcpFailed to open connection to host 1 port 2REPLYtfdAfdқCAF <A(C'pEA4Gpk#z4Tx ccA pAgp AAf4UzAk}0  A.  cc0 *A."0 bA 0 A.&40 A 0 A.*xۤ0 A.,0!;A".} F8QA F8A FA"4, F`yA GpA  A7 A QA9YAX A:AACL AX A?qA4ACAA1AF AGpkAGJAI 8A,JkMA,KA.L- AX APYACF8A AFAX AT ACF8 AFAtC 1AY  A.Zk#@ A[Re A,\k#+A C&`AF} A,7 A,cAh Ad ACp +<A"fr  & A1Ah 1 Ai 1A.irU } A.j qA.l A"$ 41 a f8۔ ATC 1Aq e AF+<Af 5emulatesetoptextendedgloblocalcursessTCP_SESSsessstrTCP_SESSverbosereversesesslisttransmitevalmatchmbeginmendREPLYsessionsgetoptsael:rtvoptsessionss.,.OPTARGsessionsOPTARGprintOption opt not handled.Sorry, spam's off.return OPTIND > 1 shift( OPTIND - 1 )nameallsessionskotcp_by_name ! #sessions #tcp_spam_list sessionstcp_spam_listsessions #tcp_no_spam_list tcp_no_spam_listsessionssessions:namereverseintegeri = 1i <= #sessions/2i++ sessionsisessionsisessionsisessionsitmpNo connections to spam. ! # No commands given.transmittcp_sendevalTCP_PROMPT:T%s:sessions +functions[tcp_on_spam] tcp_on_spamTCP_SESScmdREPLYdonecontinueverboseTCP_SESScursesssessstrc:1sessstrc:0zformatTCP_PROMPTs:TCP_SESSf:tcp_by_name[TCP_SESS]sessstr$*ACFA kY.AfdқCAF <ApAT)"A.rAARA,ACc+ A, 1AFhAFc+LACFqA.`ACFc+}qACFA.A,,A- 1A- 8A..mqA.0A fc+t-A c+ TCP_TALK_ESCAPE::tcpacceptlineorexitemulatesetoptextendedgloblocalmatchmbeginmendBUFFERTCP_TALK_ESCAPE:blank:bmatch1BUFFER.acceptlineacceptlineTCP_SAVE_PS1unsetTCP_SAVE_PS1print\r[Normal keyboard input restored]BUFFER.acceptlinetcp_sendBUFFERBUFFERTCP_SAVE_PS1PS1[T]prompt_substT[$TCP_SESS]TCP_SAVE_PS1[T]TCP_SAVE_PS1tcpacceptlineorexittcpacceptlineorexitacceptlineAlC 1 A.9A GT4tACgT4AgT{*s#AAHAxA ۤ+{AA &0tSECONDSfloattypesetTCP_SECONDS_STARTSECONDSSECONDS to = 1, end = SECONDS + to SECONDS < end tcp_read to = end - SECONDS return45.8.1 debian/zsh-common//usr/share/zsh/functions/TCP/tcp_alias;  debian/zsh-common//usr/share/zsh/functions/TCP/tcp_closehdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_command (debian/zsh-common//usr/share/zsh/functions/TCP/tcp_expect Epdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_fd_handler debian/zsh-common//usr/share/zsh/functions/TCP/tcp_log_ debian/zsh-common//usr/share/zsh/functions/TCP/tcp_open debian/zsh-common//usr/share/zsh/functions/TCP/tcp_output(debian/zsh-common//usr/share/zsh/functions/TCP/tcp_pointNdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_proxyx debian/zsh-common//usr/share/zsh/functions/TCP/tcp_read8debian/zsh-common//usr/share/zsh/functions/TCP/tcp_rename a8debian/zsh-common//usr/share/zsh/functions/TCP/tcp_send debian/zsh-common//usr/share/zsh/functions/TCP/tcp_sess!@|debian/zsh-common//usr/share/zsh/functions/TCP/tcp_shoot!"& debian/zsh-common//usr/share/zsh/functions/TCP/tcp_spam% cdebian/zsh-common//usr/share/zsh/functions/TCP/tcp_talk&% debian/zsh-common//usr/share/zsh/functions/TCP/tcp_waitACfdCAf <pA@z; 4P#2dACg|A AfzA  0.A% 0".A' 0;A CF,A"-H CF|A 1A/A A0A\ C #2AA8 ,A AF,At; <+AT1.A<rAlC 1A= %AFE,A?A &,AB ,AC5A|1ADR]A"FRuF,AGA &A>AJPRrARA"KRuF,ALA C&|A111AO ,AQ#2AdA<&1AS QACF ,AV A%d a AP 1AXR ACF )q.A[ u A@A_RuAF ,AbA & A"f g  < ,Ag#2Ah 1Ah M.AiE u q.Ak u ,Am #4+Ah  Af0LTA8AoAf #4+W,At,Au#2Al 1AvR#4+AF9,AxA C&AdAC=.1A} AX*%1A %A F ,AEA %dAP 1AR9A!F ]q.A uAh"C  A"Cf0LTA8"AA"fL #4+qA#A@%ARuA%CF,AA &&A'CF,9emulatesetoptextendedglobcbaseslocalquietbasevaluealiasdeletematchmbeginmendarrayintegerstatindexgetoptsqdoptdeletereturn OPTIND > 1 shift( OPTIND - 1 ) ! # #tcp_aliases kvtcp_aliasesvalueprintalias: alias for session tcp_by_fd[fd]:-unnamed fd fdargbdelete0: value given with deletion command.continuematch1match2basequiet0: empty value for alias aliascontinue+tcp_by_nametcp_by_namebase0: no base session `base' for aliascontinuetcp_by_namealiastcp_aliasesfdarrayraliasunsettcp_by_name[alias]arrayialiasarray1,index1arrayindex+1,1arraytcp_aliases[fd]tcp_aliasesfdarray0: `alias' is already a session name.continue ! +tcp_aliases typesettcp_aliasestcp_aliasesfd aliasaliastcp_by_namealiaszmodloadzsh/parameter +functions[tcp_on_alias] tcp_on_alias0: no such alias `alias'continuearrayraliasdeletearrayialiasarray1,index1arrayindex+1,1arraytcp_aliases[fd]array +functions[tcp_on_unalias] tcp_on_unaliasalias: alias for session tcp_by_fd[fd]:-unnamed fd fd0: `alias' is a session name.continuestatAfdCAf <pA$Ccc zAg A0Af=zAC?e 0 .Acc  0.A 0bAy 0r.A 0A 0;AFA"!CF(AA A# AX   A$A CFA FA uAh C  A)A"*R F!A FA <+A8 CA1A Ah C  A5A"6R F9A FAg#2AgAg A <PhAAf,Ap&AF<~AD1.ADr-.AEyA,AK,AL#29AlC 1AMR#4+AF,AOA & ,AS 4 YAATR A@CAURAF ,AXA C& A1>A\P2  ApC , 9A8A^ Af I#4+ACF d }AF d AX  Ag +cABf+c4#4+F !A 1Ak aAXC  ACf#4+,An.Ao QAqR Ap  1&At A"uRCF qAFAF dAF dIADC1>A}P2RrAFA"r U F d|A8 AA f #4+A!FMemulatesetoptextendedglobcbaseslocalquietaliasnoclosesessnamesgetoptsaql:ns:opts.,.OPTARGOPTARGreturn OPTIND > 1 shift( OPTIND - 1)all # printUsage: 0 [ -q ] [ -a | [ session ... ] ]ktcp_by_name ! #sessnames quietNo TCP sessions open. ! #sessnames TCP_SESS ! #sessnames No current TCP session.tcp_sessintegerstatcurstatztcp_fdslinematchmbeginmendzmodloadzsh/net/tcpztcpreadlinebfd 09ztcp_fdsmatch1tcp_sesssessnamescurstattcp_by_nametcp_sessNo TCP session tcp_sess!continuetcp_sesstcp_by_fdfdtcp_sessAaargh! Session for fd fd has disappeared!continue+tcp_aliasestcp_aliasesfdtcp_aliasesfd +functions[tcp_on_unalias] tcp_on_unaliasaliasunsettcp_by_name[alias]tcp_aliases[fd][Ignoring...]ztcp_fdsfdcurstatnoclosefdCan't close fd fd; will leave open.evalexec fd>&-tcp_by_name[tcp_sess]tcp_by_fd[fd]curstatSession tcp_sess successfully closed.TCP_SESSTCP_SESS +functions[tcp_on_close] tcp_on_closestatABF<+F$A@$eAF$tcp_sendreturntcp_readTCP_TIMEOUT:0.3A fdCA F <Al 1.A2qA  G4-A g4PA$p$TAgp A P|AC4A$1AfpA 0 AC  0bAed X0),AE<qA`  .AFAF$=AFAT 1.AJr1AF$UAFAp  1.ANr1AFdy.APqAFd 0AC 0Ae A 0 .AY a 0 .A[  0 ACF0; A($ H e AFA"d F Ag < TA% AP4A & AC0(Ai ,Aj pA"k k AAl @A\ 1An A"o YFdAFnAr1Ar.AsA 1}.Aw+ACf.AzP+A\ 1A|A"} CFdAFA 0uA C"4A 1NAp2Hr ,AT .A$1q,ATY.A$Ad"C 1.ArA" "Fd-A"FemulatesetoptextendedglobtSECONDSfloattypesetTCP_SECONDS_STARTSECONDSSECONDSlocal_expect_opt_expect_pvar_expect_state_expect_arg_expect_ind_expect_read_argsfloat_expect_to1_expect_to_all_expect_to_expect_new_tointeger_expect_i_expect_stat_expect_statesgetoptsal:p:P:qs:t:T:_expect_optOPTARGpP_expect_pvarOPTARG_expect_pvarazAZ_azAZ_09printinvalid parameter name: _expect_pvarreturn_expect_pvar_expect0: parameter names staring `_expect' are reserved._expect_opteval_expect_pvar=0_expect_states_expect_pvar=OPTARGOPTARG_expect_to_all( SECONDS + OPTARG )Unhandledoption_expect_opt,complain OPTIND > 1 shift( OPTIND - 1 )tcp_expect_linestcp_expect_linestrue _expect_to_all || _expect_to1 _expect_to _expect_to1 _expect_to = _expect_to1 _expect_to_all (_expect_new_to = (_expect_to_all - SECONDS)) <= 0 _expect_pvar_expect_pvar=-1 _expect_to <= 0 || _expect_new_to < _expect_to _expect_to_expect_new_totcp_read_expect_read_args_expect_to_expect_stattcp_read_expect_read_args_expect_stat _expect_stat _expect_pvar_expect_stattcp_expect_linesTCP_LINE_expect_i = 1_expect_i <= #_expect_i++ _expect_statesargv_expect_ib::match1match2_expect_iTCP_LINE_expect_arg_expect_pvar_expect_pvar=$_expect_indA,G#2+,AA'A\71A AGAP 1A5AF+cLq.A XA!!1A$#4+A`  AAf<#4+ABmCF+A" F+cLAF!ACf+c4#4+AFAF$AF+cLAC1AC(#4+AF=Af+c4#4+AF,A" AG@AD A (#4+@.A%aA Clocallinesesstcp_by_fd1TCP_HANDLER_ACTIVEsessTCP_INVALIDATE_ZLE # > 2 TCP_INVALIDATE_ZLEtcp_read +functions[tcp_on_awol] tcp_on_awol ? == 100 returnTCP_INVALIDATE_ZLEprint[TCP fd fd (session sess) gone awol; removing from poll list]read[Reading on fd failed; removing from poll list]fdfd:linenewlineline fdfd:newlinelineAfdCAf <XA zAG AAf0QzApAHP 0 .A  0.A# 0.A& 0r.A) 0rA F 0A FD0;A F`yA FDA"7 FD]ACA9 AX  A:AF`AFDAfPpAFDAL1ABAF`AFDAX  AJAF`AFDAT)AO A G<p+AC1AQRAGAGJA0UA4A & qA G< H+A"\R i &AFDemulatesetoptcbasesextendedgloblocalappendsesscloseintegeractivitygetoptsascnN activity++ optappendTCP_SILENTunsetTCP_SILENTreturnprint0: option -opt not handled, oops. OPTIND > 1 shift( OPTIND - 1)close # 0: too many arguments for -cTCP_LOGTCP_LOG_SESS # == 0 && ! activity Per-session log: TCP_LOG_SESS:- Overall log: TCP_LOG:- Silent? TCP_SILENT:+yes:-no # != 1 0: wrong number of argumentssesstypesetappendsesslogsintegersesslogsTCP_LOG_SESSNi = 1i <= #sesslogsi++ sesslogsiTCP_LOGappendTCP_LOGA fdCA f <pABfLFAfLA$C$ҬHpA(0ҬTtA(<Ҭ`ABCAg3<A,z <PhA ACG$A("Af8YzA}#0 ,AMA`  .ANAF4MAF#02,AS<A`  .ATACF4MAF 0bAC 0.A[ 0AC  0.A_P 0;ACFA"e <CF p ABg g < ABh 9g < ACg AzK1Ak At 1VAlR$+@R  ACF4 9AFdAp, .Aq ,At ` A\C 1&AuR AF4 1AFAC$ ACf  A"zr  &,nA{1A{Q.A|=Ax, AX   ARA CF4A F.A!16A@2RRA!1AA "+3zDA$+8+A"F pMA#1A +A#+A $& p qA$VAA  Ax.A!AX&  AYA&F4mA'CFA(g#2A(C{-AX(  A YA(F4A)FA)%4A*1A .A#2qA*1A YAB+fx +F qA+AB+Fx%+F.A#2M,Ai,A#4+A"@2 +cR -+c4#4+Ah.,+A.fL$A8/&%A]A/C!!1A/Cf#4+A/1ARAT/ AA0f4YqA0F4A1Cf`qA1,A$A 2&Ax3 ARAT4 AA4Cf4QqA5F4=A6C16A@RRRAl6 1A UA"R7F4A 7CG<tA8CFemulatesetoptextendedglobcbaseszmodloadzsh/net/tcpreturnzsh/zutilautoloadtcp_aliastcp_closetcp_commandtcp_expecttcp_fd_handlerautoloadtcp_logtcp_outputtcp_proxytcp_readtcp_renametcp_sendautoloadtcp_sesstcp_spamtcp_talktcp_waittcp_pointtcp_shoot +TCP_SECONDS_START typesetTCP_SECONDS_STARTlocalacceptfakenozlesessfilesessquietsessnamessessargsintegerstatgetoptsa:f:l:qs:zoptacceptOPTARGaccept:digit:printoption -a takes a file descriptorOPTARGfake:digit:option -f takes a file descriptors.,.OPTARGOPTARG OPTIND > 1 shift( OPTIND - 1 ) +tcp_by_fd tcp_by_fd +tcp_by_name tcp_by_namesessassoc #sessnames acceptIncompatible arguments with `-s' option.sessnamessessassocsesssessfileZDOTDIR:HOME/.ztcp_sessionssessfileNo session file: sessfilereadsessargssessargs1#continue +sessassoc[sessargs[1]] sessassocsessargs1sessargs[2,-1]sessassocsessCouldn't find session sess in sessfile.accept # < 2 wrongnumberargumentshostport( # > 1 ? 2 : 1 )( #tcp_by_fd + 1 )tcp_by_namesessnames1 sessnames[1]++ sessassocsessnames1host port # Usage: 0 [-z] [-a fd | -f fd | host port [ session ] ] 0 [-z] [ -s session | -l sesslist ] ...REPLYsessnamestcp_by_namesessSession `sess' already exists.sessargsacceptztcpacceptsessargssessassocsesssessargsREPLYtcp_by_fdfdsesstcp_by_namesessnozlezsh/parameter +functions[tcp_on_open] tcp_on_openquiet #sessargs Session sess(host sessargs[1], port sessargs[2] fd fd): tcp_on_open FAILED.Session sess (fd fd) tcp_on_open FAILED.tcp_closetcp_closecontinue #sessargs Session sess(host sessargs[1], port sessargs[2] fd fd) opened OK.Session sess (fd fd) opened OK.TCP_SESStcp_by_nameTCP_SESStcp_by_namesessnames1Setting default TCP session sessnames[1]TCP_SESSsessnames1statAfdCAF <A,CpzA@Af(IzACq 02.A  0.A  0.A  0.A0;A"q CfAFA"FAHCA 9A$DqA"1A A! 1.A!r.A"@aq.A$xA$ 4 5i|A'1.A'r:+.A(.A+q.A-qAH A/ !A$ DEAd ++1A3RqA 'pA C1&A5A\ A"9r!"9 C&DAA<R]AL1AC uAF+cLAFAemulatesetoptextendedgloblocaltpromptsessread_fdtpatquietcursessgetoptsF:P:qS:optOPTARGtpromptOPTARGOPTARGprintCan't handle option optreturn OPTIND > 1 shift( OPTIND - 1 )TCP_LOG_SESS*TCP_LOG_SESS.sesstpromptsessTCP_SESScursessc:1cursessc:0zformatREPLYtprompts:sessf:read_fdcursessREPLY%REPLY%PREPLY*TCP_LOGTCP_LOGquietskiptcp_filtervtcp_filtertpatbreakskipTCP_INVALIDATE_ZLEunsetTCP_INVALIDATE_ZLEAfdCAf <pA\ 1&A$+AFACF A(@#3b#3 AdC 1ACfXd+AFmAF ,A#3bAh  AfX ACFAfX,A#3 A& ACfXAfXemulatesetoptextendedglobcbasesprintUsage: 0 port Listen on the given port; send anything that arrives to standard output.returnlocalREPLYztcpFailed to listen on port 1REPLYlfdFailed to accept on fd lfdafdACGA$PeBrJ\pA`C  .A +lAFAF0A'Ll+A &ABfdF0,AABf+-A'#k+A C&A\NAf eACfAflocalTCP_LISTEN_FDtrap[[ -n $TCP_LISTEN_FD ]] && ztcp -c $TCP_LISTEN_FD; return 1TERMEXITPIPEprintUsage: 0 port [cmd args... ]returnintegerportshiftztcpportTCP_LISTEN_FDREPLY # SHELL:zshTCP_LISTEN_FDevalcmd$* <&$REPLY >&$REPLY 2>&$REPLY &AfdCAf <pAfLA<z(@Xcc x+Zc ACg A%A8AGXxA<AfzA 0 .AIcc  0.AL@ 0".AO/0bAC,x,ARXEAX  ASRAFACFL.AWi 0.A]('0,A`XAXC  AaRAF9AFL.Aei0,AiA"j F- 0.Am+0A,XA`C  .Aq!E AFAFL.Au0; A"x FuACFLA$#A~ A QA YA C AR A"R  F A FL AR AA!CF A!FL.A )A"g  < A#% AL#' E PE dE xE A#G Al$C 1.A A $G 4 ( qA%Cg 4 \A1A A A'fLtA'1A A'A AB(Ci(FLAB)Fi)FLAx*GAA*C91A A*F4@3At+C 1A A"L+FL^A1AA|A,"AA@-A A-CFAAB-,Mi.FLA@.A A.FAB/Ci/CFLA@0A A0CF9A40EXAt1 1A1A1CF4=,AxA 1&,A,Ax,AAA3AA|5+Zc AX5C  .Ar5 AB5fUiA06F54MqA7A,7G <@qA"R8FLA9FLemulatesetoptextendedglobcbaseszmodloadzsh/mathfunclocaldrainlinequietblockread_fdsessnoprintread_fdsfloattimeouttimeout_allendtimeintegerstatgetoptsabdl:qs:t:T:u:opts.,.OPTARGtcp_by_namesessread_fdprint0: no such session: sessreturnread_fdsread_fdtcp_by_nameOPTARGread_fd0: no such session: sesstimeoutOPTARGTCP_READ_DEBUGTimeout per-operations is timeoutOPTARGs.,.OPTARGread_fd0x:xdigit::digit:Bad fd in OPTARGread_fds(read_fd)Unhandled option, complain: optallkvtcp_by_fd ! #read_fds TCP_SESSquietNo tcp connection open.tcp_by_nameTCP_SESSTCP session TCP_SESS has gorn!read_fdstcp_by_nameTCP_SESStypesettcp_linestcp_lineshelper_statskiptpatreplyREPLYnewtimeouttSECONDSfloatTCP_SECONDS_STARTSECONDSSECONDS timeout_all endtime = SECONDS + timeout_all zsh/zselectblockzselect( int(100*timeout_all + 0.5) )kread_fdshelper_statzselect #read_fds unset (newtimeout = endtime - SECONDS) <= 0 ! timeout || newtimeout < timeout timeout = newtimeout timeout TCP_READ_DEBUG[tcp_read: selecting timeout timeout on (k)read_fds]zselect( int(timeout*100 + 0.5) )TCP_READ_DEBUG[tcp_read: selecting no timeout on (k)read_fds]zselectTCP_READ_DEBUG[tcp_read: returned fds reply]reply2,1readread_fdread_fds[read_fd]continuehelper_stattcp_by_fdread_fdTCP_SILENT:+q +tcp_on_read kvtcp_on_readlinevalkeysesslinetcp_outputTCP_PROMPT=<-[%s] sessread_fdnoprintlinetcp_linesREPLYTCP_LINEREPLYTCP_LINE_FDread_fddrainstatACg#cz+rA1A,A#czA.A +r+QA i,A #cz+.A +r+AFAFA'#2AX  AR#4+AFaACFAX  A AF ACFA`  .AACFAF,A!u#4+AF,A$%aA"&ru&aAl  1A fLA< C1A)A a#4+local # == 1 TCP_SESS # == 2 printUsage: 0 OLD NEWreturntcp_by_nameoldNo such session: oldtcp_by_namenewSession new already exists.tcp_by_fdfdoldUse tcp_alias to redefine an alias.tcp_by_namenewunsettcp_by_name[old]tcp_by_fdfdnewTCP_SESSTCP_SESSzmodloadzsh/parameter +functions[tcp_on_rename] tcp_on_renameAfdCAf <pA0C'zcc #2 A  0AGXxAtC&ACfzAH 0 .A cc  0.A   0r.At 0.A*0bAAX  AR]ACFAF@A\"0AX  ARAFACF@A\0;A"!CFAF@A"&, F`yAh  A( A CA*AA A| C1A-A@ A.R A F)A CF@AGACf8AGLAxC'A C&pAd A> ABf &q.AAA7L,AD#2 AlC 1AER#4+AF i,AGxA & A$#4+  -A1>AKPR+ EAF ACF 8,ANxA & pAPC AQ A,&   )4#4+ QA"UR C&AF@ emulatesetoptextendedglobcbaseslocalquietsessnonewlinelinesessionswrite_fdsintegermystatgetoptsacl:nqs:optnonewlines.,.OPTARGtcp_by_namesessprint0: no such session: sessreturnsessionssesstcp_by_nameOPTARGNo such session: OPTARGsessionsOPTARGUnhandled option, complain: opt OPTIND > 1 shift( OPTIND - 1 )allsessionsktcp_by_name ! #sessions sessionsTCP_SESS ! #sessions quietNo current TCP session open.TCP_FD_CLOSEDtrapTCP_FD_CLOSED=1PIPETCP_SESStruecatreadbreak*sessionstcp_by_nameTCP_SESSNo such session: TCP_SESScontinuenonewlinelineTCP_FD_CLOSEDSession TCP_SESS: fd fd unusable.unsetTCP_FD_CLOSEDcontinueTCP_OUTPUTtcp_outputTCP_OUTPUTTCP_SESS(j. .)*mystatA' AtC--1A +AP) AR=A{r+.AQA +A'+A &(A'@+A C&(AfXmA &qA CG<+AFA#2AC,A#29A 1.A r.A!q.A#A C A Fqinteger__myfdtcp_by_name1printsuchsession:__myfdlocalTCP_SESSshift__cmdeval__cmd$*returntypesetnamekotcp_by_nametcp_by_namenameTCP_SESSname *__myfdsess:name; fd:fdcur( __myfd - 1 )AfdCAF <ACgp#3A\ 1&A$+AFAFAdC 1ACf++AF%AF,A#3A& AfemulatesetoptextendedgloblocalREPLYprintUsage: 0 host port Connect to the given host and port; send standard input.returnztcpFailed to open connection to host 1 port 2REPLYtfdAfdCAF <A(C'pEA4Gp#kz4Txcc A pAgp AAf4UzAk} 0 .A cc  0*.A" 0bA  0.A&4 0A  0.A*x 0.A,!0;A".} F8QA F8A FA"4, F`yA GpA  A7 A QA9YAX A:AACL AX  A?qA4ACAA1AF AGpkAGJAI 8,AJkM,AK.AL -AX  APYACF8 AAFAX  AT ACF8 AFAtC 1AY .AZ#k @A[R e,A\#k+A C&`AF }A7, ,AcAh  Ad AC p <+A"fr & A1Ah 1Ai 1.Air U } .Aj q.Al A$" 4 1 a f8 ATC 1Aq eAF<+Af 5emulatesetoptextendedgloblocalcursessTCP_SESSsessstrTCP_SESSverbosereversesesslisttransmitevalmatchmbeginmendREPLYsessionsgetoptsael:rtvoptsessionss.,.OPTARGsessionsOPTARGprintOption opt not handled.Sorry, spam's off.return OPTIND > 1 shift( OPTIND - 1 )nameallsessionskotcp_by_name ! #sessions #tcp_spam_list sessionstcp_spam_listsessions #tcp_no_spam_list tcp_no_spam_listsessionssessions:namereverseintegeri = 1i <= #sessions/2i++ sessionsisessionsisessionsisessionsitmpNo connections to spam. ! # No commands given.transmittcp_sendevalTCP_PROMPT:T%s:sessions +functions[tcp_on_spam] tcp_on_spamTCP_SESScmdREPLYdonecontinueverboseTCP_SESScursesssessstrc:1sessstrc:0zformatTCP_PROMPTs:TCP_SESSf:tcp_by_name[TCP_SESS]sessstr$*ACFA kY.AfdCAF <ApAT)".ArAAR,AAC+c ,A 1AFhAF+cLACFq.A`ACF+c}qACF.A,A,A- 1A- 8.A.mq.A0A f+ct-A +c TCP_TALK_ESCAPE::tcpacceptlineorexitemulatesetoptextendedgloblocalmatchmbeginmendBUFFERTCP_TALK_ESCAPE:blank:bmatch1BUFFER.acceptlineacceptlineTCP_SAVE_PS1unsetTCP_SAVE_PS1print\r[Normal keyboard input restored]BUFFER.acceptlinetcp_sendBUFFERBUFFERTCP_SAVE_PS1PS1[T]prompt_substT[$TCP_SESS]TCP_SAVE_PS1[T]TCP_SAVE_PS1tcpacceptlineorexittcpacceptlineorexitacceptlineAlC 1.A9A GT4tACgT4AgT{#s*AAHAxA {+AA &0tSECONDSfloattypesetTCP_SECONDS_STARTSECONDSSECONDS to = 1, end = SECONDS + to SECONDS < end tcp_read to = end - SECONDS return