Not tested this myself but from another post I recall their are potentially two options.
1. Using echo y | tmsh show…
2. Using the -q TMSH switch. “-q prevents tmsh from responding to user actions with questions. This option is useful when writing non-interactive shell scripts from the system shell.”