对话框 - 一行文字

时间:2012-12-04 12:46:21

标签: bash

如何在一行中自动显示文字? 例子是两行,我需要1行...比你 enter image description here

我试过--cr-wrap和--no-collapse dialog(1) - Linux man page

1 个答案:

答案 0 :(得分:1)

也许你必须指定更大的窗口:

dialog  --yesno 'Hello, this is my first dialog program' 20 60

您可以将$COLUMN$LINES用于相应的尺寸:

dialog  --yesno 'Hello, this is my first dialog program' $((LINES-4)) $((COLUMNS-4))

甚至用于在bash脚本中捕获窗口大小:

trap 'COLUMNS=`tput cols` LINES=`tput lines`' WINCH
相关问题