Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zpty woes



On Thu, May 15, 2008 at 08:02:04AM -0400, Jaime Vargas wrote:
[...]
> #!/bin/zsh -x
>
> zmodload zsh/zpty
>
> zpty scppty scp hello.world luser@host:~/

Also, if you use "set -x", the subshell run within the pty will
have set -x as well, so:

> zpty -t scppty || echo "something went wrong" && exit
> zpty -r scppty line "*:" || echo "no password asked" && exit

will read the "+myscript:" in
"+myscript:1> scp hello...."

(by, the way, shouldn't it be something like "+(zpty):1> scp
hello"?)

-- 
Stéphane



Messages sorted by: Reverse Date, Date, Thread, Author