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(
en-US
,zh-CN
,...) 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 enter
git
and pressSpace
Tab
to get command completion. - For more commands on
psc
, you can learn by enteringpsc
and then pressingSpace
Tab
.
- The module uses the
Tab
key by default. - You can set it by running
Set-PSReadLineKeyHandler <key> MenuComplete
.
- 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
-
Delete filter characters:
Backspace
-
Exit the completion menu:
ESC
/Ctrl + c
- When there are no characters in the filter area, you can also use
Backspace
key to exit the completion menu.
- When there are no characters in the filter area, you can also use
-
Select completion item:
Select previous item Select next item Up
Down
Left
Right
Shift + Tab
Tab
Shift + Space
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 apply 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 apply 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 apply it (option completion), you can press
Space
and enter a string, then pressSpace
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 apply 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
- Take
git
for example, when enteringgit add
, pressing theSpace
andTab
keys, path completion will not be triggered, only completion provided by the module will be triggered. - If you want to trigger path completion, you need to enter a content.
- If the content matches this regex rule
^\.*[\\/].*
, it will get the path completion, which is PowerShell completion. - e.g.
- Please enter
./
or.\
and pressTab
key to get path completion for the subdirectory or file. - Please enter
../
or..\
and pressTab
key to get path completion for the parent directory or file. - Please enter
/
or\
and pressTab
key to get path completion for the sibling directory.
- Please enter
- So you can enter
git add ./
and then pressTab
key to get the path completion.
- Guide
Completion
:Click to view to the official website of the command. Sort by first letter(0-9,a-z).- Special case:
abc(a)
, it means that you need to download it bypsc add abc
, but by defaulta
is used instead ofabc
to trigger the completion.
- Special case:
Language
: Supported Languages, and Translation Progress.- The translation progress is compared to
en-US
- If it is greater than
100%
, it means that the current language has some redundant completion items and should be cleaned.
- The translation progress is compared to
Description
: Command Description.
Completion | Language | Description |
---|---|---|
7z | en-US zh-CN(100%) |
The command line cli of 7-Zip |
arch | en-US zh-CN(100%) |
Display machine architecture. Come from uutils/coreutils |
b2sum | en-US |
Compute and check message digests. Come from uutils/coreutils |
b3sum | en-US |
Compute and check message digests. Come from uutils/coreutils |
base32 | en-US |
Encode/decode data and print to standard output. Come from uutils/coreutils |
base64 | en-US |
Encode/decode data and print to standard output. Come from uutils/coreutils |
basename | en-US |
Print NAME with any leading directory components removed. Come from uutils/coreutils |
basenc | en-US |
Encode/decode data and print to standard output. Come from uutils/coreutils |
bun | en-US zh-CN(100%) |
Bun - JavaScript all-in-one toolkit |
cargo | en-US zh-CN(100%) |
cargo - Rust package manager |
chfs | en-US zh-CN(100%) |
CuteHttpFileServer - A free, HTTP protocol file sharing server cross-platform file sharing server |
choco | en-US zh-CN(100%) |
choco(chocolatey) - Software Manager |
cksum | en-US |
Print CRC and size for each file. Come from uutils/coreutils |
comm | en-US |
Compare two sorted files line by line. Come from uutils/coreutils |
conda | en-US zh-CN(100%) |
conda - binary package and environment manager |
csplit | en-US |
Split a file into sections determined by context lines. Come from uutils/coreutils |
cut | en-US |
Print specified byte or field columns from each line of stdin or the input files. Come from uutils/coreutils |
date | en-US |
Print or set the system date and time. Come from uutils/coreutils |
dd | en-US zh-CN(100%) |
Copy, and optionally convert, a file system resource. Come from uutils/coreutils |
deno | en-US zh-CN(100%) |
Deno - A secure runtime for JavaScript and TypeScript. |
df | en-US |
Show information about the file system on which each FILE resides, or all file systems by default. Come from uutils/coreutils |
dircolors | en-US |
Output commands to set the LS_COLORS environment variable. Come from uutils/coreutils |
dirname | en-US |
Strip last component from file name. Come from uutils/coreutils |
docker | en-US zh-CN(100%) |
docker - Container Application Development |
du | en-US |
Estimate file space usage. Come from uutils/coreutils |
env | en-US |
Set each NAME to VALUE in the environment and run COMMAND. Come from uutils/coreutils |
factor | en-US |
Print the prime factors of the given NUMBER(s). Come from uutils/coreutils |
fmt | en-US |
Reformat paragraphs from input files (or stdin) to stdout. Come from uutils/coreutils |
fnm | en-US |
Fast and simple Node.js version manager, built in Rust. |
fold | en-US |
Writes each file (or standard input if no files are given) to standard output whilst breaking long lines. Come from uutils/coreutils |
git | en-US zh-CN(100%) |
Git - Version control system |
hashsum | en-US |
Compute and check message digests. Come from uutils/coreutils |
head | en-US |
Print the first 10 lines of each 'FILE' to standard output. Come from uutils/coreutils |
join | en-US |
For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks. Come from uutils/coreutils |
kubectl | en-US zh-CN(100%) |
Kubernetes, also known as K8s, is an open source system for automating deployment, scaling, and management of containerized applications. kubectl is its command-line tool. |
link | en-US zh-CN(100%) |
Call the link function to create a link named FILE2 to an existing FILE1. Come from uutils/coreutils |
ln | en-US |
Make links between files. Come from uutils/coreutils |
md5sum | en-US |
Compute and check message digests. Come from uutils/coreutils |
mktemp | en-US |
Create a temporary file or directory. Come from uutils/coreutils |
ngrok | en-US zh-CN(100%) |
ngrok - Unified Ingress Platform for developers. Connect localhost to the internet for testing applications and APIs. |
nl | en-US |
Number lines of files. Come from uutils/coreutils |
npm | en-US zh-CN(100%) |
npm - package manager |
nproc | en-US |
Print the number of cores available to the current process. Come from uutils/coreutils |
nrm | en-US zh-CN(100%) |
nrm - npm registry manager |
numfmt | en-US |
Convert numbers from/to human-readable strings. Come from uutils/coreutils |
nvm | en-US zh-CN(100%) |
nvm - Node Version Manager |
od | en-US |
Dump files in octal and other formats. Come from uutils/coreutils |
paste | en-US |
Write lines consisting of the sequentially corresponding lines from each 'FILE', separated by 'TAB's, to standard output. Come from uutils/coreutils |
pip | en-US zh-CN(100%) |
pip - Python Package Manager |
pnpm | en-US zh-CN(100%) |
pnpm - Package Manager |
psc | en-US zh-CN(100%) |
PSCompletions module's completion tips. It can only be updated, not removed. If removed, it will be automatically added again. |
python | en-US zh-CN(100%) |
python - command-line |
scoop | en-US zh-CN(100%) |
Scoop - Software Manager |
volta | en-US zh-CN(100%) |
volta - Accessible JavaScript Tool Manager |
winget | en-US zh-CN(100%) |
WinGet - Windows package manager |
wsl | en-US zh-CN(100%) |
WSL - Windows Subsystem for Linux |
wt | en-US zh-CN(100%) |
Windows Terminal command line. You can use it to start a terminal. |
yarn | en-US zh-CN(100%) |
yarn - package manager |
... | ... | ... |