Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.69 KB

README.zh.md

File metadata and controls

63 lines (47 loc) · 1.69 KB

scoop 自动补全

English


依赖:

通过 scoop 安装:

# add extras bucket
scoop bucket add extras

# install
scoop install scoop-completion

在当前 shell 启用补全:

# enable completion in current shell
Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"

自动加载,请手动修改 $Profile。如果希望补全为 所有用户 | 所有host 工作,请阅读 Docs

# create profile if not exist
if (!(Test-Path $profile)) { New-Item -Path $profile -ItemType "file" -Force }

# print $profile path
$profile

在文本编辑器打开 $profile,然后添加启用代码(Import-Module 行)到该文件。


用法: 输入 "scoop [想补全的内容]" 然后按 Tab 键将循环补全项,Ctrl+Space 将触发菜单式的补全

例子:

scoop ins[Press Tab]
scoop install py[Press Ctrl+Space]
scoop uninstall [Press Ctrl+Space]

卸载:

scoop uninstall scoop-completion

然后手动修改 $Profile (移除启用代码)


通过 PSGallery 安装 (已弃用):

Install-Module -AllowClobber -Name scoop-completion -Scope CurrentUser
Import-Module scoop-completion