我正在尝试运行 PowerShell Core 中存在别名的 Bash 命令。
我想清除bash历史。下面的示例代码:
# Launch PowerShell core on Linux
pwsh
# Attempt 1
history -c
Get-History: Missing an argument for parameter 'Count'. Specify a parameter of type 'System.Int32' and try again.
# Attempt 2
bash history -c
/usr/bin/bash: history: No such file or directory
# Attempt 3
& "history -c"
&: The term 'history -c' is not recognized as the name of a cmdlet, function, script file, or operable program.
似乎问题与history成为别名有关Get-History- 有没有办法在 PowerShell 核心中使用别名运行 Bash 命令?