PSCompletions

0

A completion manager for better and simpler use and Manage completions.(一个补全管理模块,更好、更简单、更方便的使用和管理补全)

Productivity

module
powershell
ps
completions

✨PSCompletions(psc) ✨

English | 简体中文 | Github | Gitee

license code size repo size created


Introduce

  • PowerShell: A Cross-platform PowerShell. Start it in command line by running pwsh.

  • Windows PowerShell: A PowerShell which is built-in on Windows systems. Start it in command line by running powershell.


  • 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 ⭐.

How to install

  1. Start PowerShell
  2. Install-Module PSCompletions -Scope CurrentUser
  3. Import-Module PSCompletions
    • echo "Import-Module PSCompletions" >> $PROFILE
    • So you don't have to import the module every time you open PowerShell.

How to uninstall

  1. Start PowerShell
  2. Uninstall-Module PSCompletions

How to use(e.g. git)

Available Completions

  • If it doesn't include the completion you want, you can submit an issue and I will consider adding it.
  1. psc add git
  2. Then you can type git and press Space Tab to get command completion.
  3. For more commands on psc, you can learn by typing psc and then pressing Space Tab.

Demo

demo

Tips

About completion update

  • When the module is imported after PowerShell is opened, 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.

About completion menu

  • 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.

  • When you use it, you can select previous or next option in the following keys.

    select previous optionselect next option
    UpDown
    LeftRight
    TabShift + Tab
    SpaceShift + Space
    Ctrl + uCtrl + d
    Ctrl + pCtrl + n
  • All configurations of it, you can trigger completion by running psc menu, then learn about them by completion tip.

About special symbols

  • 😄🤔😎 : If there are multiple, you can choose the effect of one of them.
    • 😄 : It means that after you choose it, you can press Space and Tab key to continue to get command completions.(Normal or optional completions)
      • It can be customized by running psc menu symbol SpaceTab <symbol>
    • 🤔 : It means that after you choose it (option completion), you can press Space and Tab key to continue to get option completions. (e.g. --verbose)
      • It can be customized by running psc menu symbol OptionTab <symbol>
    • 😎 : It means that after you choose it (option completion), you can enter a string, then press Space and Tab 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 and Tab 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 ""

About path completion

  • Please type ./ or .\ and press Tab to get path completion for the subdirectory or file.
  • Please type / or \ and press Tab to get path completion for the sibling directory.

Available Completions List

CompletionsSource
pscpsc - PSCompletions Module
bunBun - JavaScript all-in-one toolkit
cargocargo - Rust package manager
chfschfs(CuteHttpFileServer)
chocochoco(chocolatey) - Software Manager
condaconda - binary package and environment manager
denodeno - A secure runtime for JS and TS
dockerdocker - Container Application Development
gitGit - Version control system
kubectlKubernetes(k8s) command-line tool
npmnpm - package manager
nrmnrm - npm registry manager
nvmnvm - Node Version Manager
pippip - Python Package Manager
pnpmpnpm - Package Manager
pythonpython - command-line
scoopScoop - Software Manager
voltavolta - Accessible JavaScript Tool Manager
wingetWinGet - Windows package manager
wslWSL - Windows Subsystem for Linux
wtwindows terminal command line
yarnyarn - package manager
......