beep($num = 1)
beep 方法在运行命令的电脑上触发系统提示声。
静态 | 是 | ||||||
---|---|---|---|---|---|---|---|
参数 |
| ||||||
回传 | 空 | ||||||
範例 |
|
透过接受输入选项、参数及输出文字,与命令列互动。
beep 方法在运行命令的电脑上触发系统提示声。
静态 | 是 | ||||||
---|---|---|---|---|---|---|---|
参数 |
| ||||||
回传 | 空 | ||||||
範例 |
|
color 方法改变一段文字的颜色。
静态 | 是 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
参数 |
| |||||||||||||||
回传 | 字串 | |||||||||||||||
範例 |
|
error 方法会写一行文字到命令列做为一个错误(类似 write 但使用 STDERR 而非 STDOUT)。
静态 | 是 | ||||||
---|---|---|---|---|---|---|---|
参数 |
| ||||||
回传 | 空 | ||||||
範例 |
|
prompt 方法提示使用者输入。
静态 | 是 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
参数 |
| |||||||||
回传 | 字串 | |||||||||
範例 |
|
option 接受来自初始命令的选项。
静态 | 是 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
参数 |
| |||||||||
回传 | 字串 | |||||||||
範例 |
|
wait 方法使 cli 输出等待一个所给的秒数,且可选择性的显示倒数计时。
静态 | 是 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
参数 |
| |||||||||
回传 | 空 | |||||||||
範例 |
|
write 方法将写一行文字到命令列。
静态 | 是 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
参数 |
| ||||||||||||
回传 | 空 | ||||||||||||
範例 |
|
Changes or retrieves the current stdout stream. This is STDOUT by default.
Note the public property $nocolor
can be set to true to force all output to plaintext.
静态 | 是 | ||||||
---|---|---|---|---|---|---|---|
参数 |
| ||||||
回传 | The previous value of the filehandle (or current value if you are not changing it) | ||||||
範例 |
|
Changes or retrieves the current stderr stream. This is STDERR by default.
Note the public property $nocolor
can be set to true to force all output to plaintext.
静态 | 是 | ||||||
---|---|---|---|---|---|---|---|
参数 |
| ||||||
回传 | The previous value of the filehandle (or current value if you are not changing it) | ||||||
範例 |
|