English | 简体中文 | Github | Gitee
-
PowerShell
: A Cross-platform PowerShell. Start it in command line by runningpwsh
. -
Windows PowerShell
: A PowerShell which is built-in on Windows systems. Start it in command line by runningpowershell
.
- A completion manager in
PowerShell
for better and simpler use completions.It can also be used in
Windows PowerShell
.(Not Recommend) - Manage completions together.
- Switch between languages(
zh-CN
,en-US
...) freely. - Sort completion tab dynamically by frequency of use.
If this project is helpful to you, please consider giving it a star ⭐.
- Start
PowerShell
Install-Module PSCompletions -Scope CurrentUser
Import-Module PSCompletions
echo "Import-Module PSCompletions" >> $PROFILE
- So you don't have to import the module every time you open PowerShell.
- Start
PowerShell
Uninstall-Module PSCompletions
- If it doesn't include the completion you want, you can submit an issue and I will consider adding it.
psc add git
- Then you can type
git
and pressSpace
Tab
to get command completion. - For more commands on
psc
, you can learn by typingpsc
and then pressingSpace
Tab
.
-
When the module is imported after opening
PowerShell
,PSCompletions
will start a background job to check for the completion status of the remote repository. -
After getting the update,
PSCompletions
will show the latest status of the completions in the next time.
-
The module's completion menu provided by the module is based on PS-GuiCompletion realization idea, thanks!
-
It can only be used in PowerShell(pwsh) under Windows.
-
Some keys in the completion menu provided by the module.
-
Apply the selected completion item:
Enter
-
Exit the completion menu:
ESC
/Ctrl + c
-
Select completion item:
Select previous item Select next item Up
Down
Left
Right
Tab
Shift + Tab
Space
Shift + Space
Ctrl + u
Ctrl + d
Ctrl + p
Ctrl + n
-
-
All configurations of it, you can trigger completion by running
psc menu
, then learn about them by completion tip.
- 😄🤔😎 : If there are multiple, you can choose the effect of one of them.
- 😄 : It means that after you choose it, you can press
Space
andTab
key to continue to get command completions.(Normal or optional completions)- It can be customized by running
psc menu symbol SpaceTab <symbol>
- It can be customized by running
- 🤔 : It means that after you choose it (option completion), you can press
Space
andTab
key to continue to get option completions. (e.g.--verbose
)- It can be customized by running
psc menu symbol OptionTab <symbol>
- It can be customized by running
- 😎 : It means that after you choose it (option completion), you can enter a string, then press
Space
andTab
key to continue to get the rest of option completions.- If the string has Spaces, Please use "" or '' to wrap it. e.g. 'test content'
- If there is also 😄, it means that there are some strings to complete, you can press
Space
andTab
key to continue to get command completions without entering a string. - It can be customized by running
psc menu symbol WriteSpaceTab <symbol>
- Completion of generic options can also be triggered if there is one or more generic option completion.
- All complements can be triggered by pressing the
Tab
key after entering a part. - If you don't need or want to see these symbols, you can hide them by replacing them with the empty string.
- e.g.
psc menu symbol SpaceTab ""
- e.g.
- 😄 : It means that after you choose it, you can press
Global language
: Default to the language of current system.- You can show it by running
psc config language
- You can change it by running
psc config language zh-CN
- You can show it by running
Completion language
: The language set for the specified completion.- e.g.
psc completion git language en-US
- e.g.
Available language
: In the completionconfig.json
file, there is alanguage
attribute whose value is a list of available languages.
- Get the specified language:
- If there is
Completion language
,use it. - If not, use
Global language
.
- If there is
- Determine the final language:
- Determine whether the value of the first step exists in
Available language
. - If it exists, use it.
- If not, use the first of the
Available language
. (It's usuallyen-US
)
- Determine whether the value of the first step exists in
- Please type
./
or.\
and pressTab
to get path completion for the subdirectory or file. - Please type
/
or\
and pressTab
to get path completion for the sibling directory.