gpt4 book ai didi

perl - 设置 cygwin 终端窗口的大小

转载 作者:行者123 更新时间:2023-12-04 13:22:51 24 4
gpt4 key购买 nike

我有一个小的 perl 脚本,它在 cygwin 终端中执行并打印出一个格式化的表。
在默认窗口大小上,如果文本太长,cygwin 将插入换行符,从而破坏我的表格格式。
有没有办法从我的 perl 脚本中将 cygwin 窗口设置为更大的尺寸以避免这种问题?

最佳答案

如果您碰巧从快捷方式运行它,您可以在其中添加标志到 mintty命令,然后您可以设置大小。好处是它看起来更平滑,没有抽搐的调整大小。

$ /cygdrive/c/tools/cygwin/bin/mintty.exe --help
Usage: mintty [OPTION]... [ PROGRAM [ARG]... | - ]

Start a new terminal session running the specified program or the user's shell.
If a dash is given instead of a program, invoke the shell as a login shell.

Options:
-c, --config FILE Load specified config file (cf. -C or -o ThemeFile)
-e, --exec ... Treat remaining arguments as the command to execute
-h, --hold never|start|error|always Keep window open after command finishes
-p, --position X,Y Open window at specified coordinates
-p, --position center|left|right|top|bottom Open window at special position
-p, --position @N Open window on monitor N
-s, --size COLS,ROWS Set screen size in characters (also COLSxROWS)
-s, --size maxwidth|maxheight Set max screen size in given dimension
-t, --title TITLE Set window title (default: the invoked command) (cf. -T)
-w, --window normal|min|max|full|hide Set initial window state
-i, --icon FILE[,IX] Load window icon from file, optionally with index
-l, --log FILE|- Log output to file or stdout
--nobidi|--nortl Disable bidi (right-to-left support)
-o, --option OPT=VAL Set/Override config file option with given value
-B, --Border frame|void Use thin/no window border
-R, --Reportpos s|o Report window position (short/long) after exit
--nopin Make this instance not pinnable to taskbar
-D, --daemon Start new instance with Windows shortcut key
-H, --help Display help and exit
-V, --version Print version information and exit
See manual page for further command line options and configuration.

关于perl - 设置 cygwin 终端窗口的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28766680/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com