使用命令提示符修改 cmd.exe 属性 [英] Modify cmd.exe properties using the command prompt

查看:45
本文介绍了使用命令提示符修改 cmd.exe 属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是很好地递归吗?

我的外部驱动器上有一个便携式命令提示符,它有一个不错的 .bat 文件来配置一些初始设置,但我想要更多!

I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!

这是我知道如何从 .bat 设置的内容:

Here's what I know how to set from .bat:

  • Colors = (color XY) 其中 x 和 y 是预定义颜色的十六进制数字
  • Prompt = (prompt $p$g) 将提示设置为C:etcetc >"默认提示
  • Title = (title "text") 将窗口标题设置为 "text"
  • Screen Size = (mode con: cols=XX lines=YY) 设置窗口的列和行大小
  • Path = (SET PATH=%~d0in;%PATH%) 为我的工具设置本地路径并附加计算机路径

所以这一切都很棒.但是有一些设置我似乎无法从蝙蝠设置.就像,如果不使用属性"对话框,我将如何设置这些:

So that's all great. But there are a few settings I can't seem to set from the bat. Like, how would I set these up wihtout using the Properties dialogue:

  • 缓冲区 = 不是屏幕大小,而是缓冲区
  • 快速编辑模式和自动完成等选项
  • 弹出颜色
  • 字体.您可以使用便携式驱动器上的字体,还是必须安装它才能工作?
  • 命令历史选项

推荐答案

关于设置缓冲区大小:

使用 mode con: cols=XX lines=YY 不仅可以设置窗口(屏幕)大小,还可以设置缓冲区大小.

Using mode con: cols=XX lines=YY sets not only the window (screen) size, but the buffer size too.

如果您根据可用的屏幕尺寸指定系统允许的尺寸,您将看到窗口和缓冲区尺寸都设置为相同的值;例如:

If you specify a size allowed by your system, based on available screen size, you'll see that both window and buffer dimension are set to the same value; .e.g:

mode con: cols=100 lines=30

结果如下(值相同):

  • 窗口大小:宽度=160,高度=78
  • 缓冲区大小:宽度=160,高度=78
  • window size: Width=160, Height=78
  • buffer size: Width=160, Height=78

相比之下,如果您根据可用屏幕尺寸指定过大的值,您会看到窗口大小更改为最大值,但缓冲区大小更改为指定的值.

By contrast, if you specify values that are too large based on the available screen size, you'll see that the window size changes to its maximum, but the buffer size is changed to the values as specified.

mode con: cols=1600 lines=900

如果屏幕分辨率为 1280x1024,您将获得:

With a screen resolution of 1280x1024, you'll get:

  • 窗口大小:宽度=160,高度=78
  • 缓冲区大小:宽度=1600,高度=900
  • window size: Width=160, Height=78
  • buffer size: Width=1600, Height=900

这篇关于使用命令提示符修改 cmd.exe 属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆