ps1aniuge

powershell 的 tab 参数补全的,两个不同方式详解。

  •  
  •   ps1aniuge · Apr 21, 2020 · 2753 views
    This topic created in 2236 days ago, the information mentioned may be changed or developed.
    powershell 的 tab 参数补全,有两个方式:一种是 linux 的,一种是 win 的。

    默认值:win 用 win 的 tab 补全。这种是:先按“-”,然后按“tab”,补全出第一个参数名,或所选字母打头的参数名。再按 tab,补全出第二个参数名。
    默认值:linux 用类似 bash 的 tab 补全。这种是:先按“-”,然后按两次“tab”,列出所有参数名,或所选字母打头的参数名。

    linux 版 ps,若想改变成兼容 win 也容易:
    1 建立$profle 。
    pwsh -c 'mkdir -p "$env:HOME/.config/powershell" '
    2 写入 psreadline 选项。
    pwsh -c 'Add-Content -Value "Set-PSReadlineOption -EditMode Windows" -LiteralPath $profile ' #兼容 win
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3008 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 08:25 · PVG 16:25 · LAX 01:25 · JFK 04:25
    ♥ Do have faith in what you're doing.