zoukankan      html  css  js  c++  java
  • 解决PowerShell命令行窗口中不显示光标的问题

    不知道什么原因,在有些系统上打开PowerShell命令行窗口后,光标无法显示。这种情况在Windows Server 2008/2012、Windows 8/9/10上都出现过,估计是由于某些系统软件/组件的兼容性问题导致的。

    遇到这种情况,通过修改PowerShell命令行窗口的背景颜色可以使光标正常显示,但关闭PowerShell窗口后重新打开,问题依然存在。

    最终的解决办法是:通过在PowerShell profile中添加设置来确保光标能够正常显示。

    创建PowerShell profile

    new-item -path $profile -itemtype file -force

    打开PowerShell profile

    notepad $profile

    执行上述命令后,会打开一个新的notepad窗口,在notepad输入:

    [console]::cursorsize=25

    保存并关闭notepad

    关闭并重新打开PowerShell窗口,光标就可以正常显示了,一劳永逸。

  • 相关阅读:
    sws_getContext函数参数介绍
    FFmpeg 将YUV数据转RGB
    信号槽同步
    git stash
    Qt 事件
    Qt 信号与槽函数
    微信红包的算法实现
    Python正则表达式中的re.S
    hive函数 -- split 字符串分割函数
    python None与Null
  • 原文地址:https://www.cnblogs.com/hunterxue/p/4918316.html
Copyright © 2011-2022 走看看