💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
` `使用 `--text-info` 选项来创建一个文本信息框。 ` `文本信息框支持以下选项: * [ ] 指定一个加载到文本信息框里的文件。 ``` --filename=文件名 ``` * [ ] 显示的文本允许编辑,当对话框关闭后,编辑后的文本显示到显示器上。 ``` --editable ``` * [ ] 指定文本字体。 ``` --font=字体 ``` * [ ] 启用复选框,如“我已阅读并接受该条款。" ``` --checkbox=文本 ``` * [ ] 启用 html 支持。 ``` --html ``` * [ ] 设置一个网址,而不是文件。只有当您使用 --html 选项时才有效。 ``` --url=网址 ``` 下面的脚本示范了如何创建一个文本信息对话框: ~~~ #!/bin/sh # You must place file "COPYING" in same folder of this script. FILE=`dirname $0`/COPYING zenity --text-info \ --title="License" \ --filename=$FILE \ --checkbox="I read and accept the terms." case $? in 0) echo "Start installation!" # next step ;; 1) echo "Stop installation!" ;; -1) echo "An unexpected error has occurred." ;; esac ~~~ ![](https://img.kancloud.cn/58/95/589536ca783441baa101c7c47eeb1d39_300x444.png)