page the ? output
The long answer is now well past a screen, so it scrolls the question off the top and the reader lands at a prompt having lost what they were choosing between. Piped through a pager, so it is read a screen at a time and the menu is redrawn underneath it afterwards. `more` rather than `less`: it exits at the end of the file instead of sitting there waiting to be quit, which is right for something asked for once. Only when stdout is a terminal. Redirected or piped — a transcript, a log, the test harness — it comes through whole, since a pager there either blocks or mangles the output. Applied to confirm()'s help hook as well, so every ? in the script pages, not just this one. Verified both ways: driven through a pty it shows --More--, and with output piped all four help sections come through in full. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -470,7 +470,7 @@ if ! skip; then
|
||||
3) TS_PLANE="tailscale" ;;
|
||||
"?")
|
||||
echo ""
|
||||
tailscale_networks_help
|
||||
tailscale_networks_help | page
|
||||
echo ""
|
||||
tailscale_network_menu
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user