contrib/mailto-meli-expect
raw| 1 | #!/usr/bin/env -S expect -f |
| 2 | # Copyright 2024 Manos Pitsidianakis |
| 3 | # |
| 4 | # SPDX-License-Identifier: EUPL-1.2 OR GPL-3.0-or-later |
| 5 | |
| 6 | # Trap window resize signal |
| 7 | trap { |
| 8 | set rows [stty rows] |
| 9 | set cols [stty columns] |
| 10 | stty rows $rows columns $cols < $spawn_out(slave,name) |
| 11 | } WINCH |
| 12 | # send the input with human-like delay: |
| 13 | set send_human {.001 .003 0.01 .005 .005} |
| 14 | spawn meli |
| 15 | send -h ":mailto " |
| 16 | send -h [lindex $argv 0] |
| 17 | send -h "\n" |
| 18 | interact |