所以我正在尝试展示一些用于自用的 PowerShell 脚本命令。我使用一个文本文件作为列表的数据源,该文本文件的格式如下:
command (* is input)| description
----------------------------------------------------
pack | opens folder pack
c * / cpp * | copies mingw command to compile
code | reveals source
copy * | copies input
现在,我有一个名为的函数,它打印出这个文本文件,并且该函数如下:
Function help{
Write-Host (get-content -path {file-path})
}
然而,在终端中,输出看起来像这样:
command (* is input)| description ---------------------------------------------------- pack | opens folder pack * / cpp * | copies mingw command to compile code
我该如何修复这个问题?