Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide PowerShell tab completion for Chocolatey #412

Closed
5 tasks done
dhilgarth opened this issue Sep 19, 2015 · 9 comments
Closed
5 tasks done

Provide PowerShell tab completion for Chocolatey #412

dhilgarth opened this issue Sep 19, 2015 · 9 comments
Assignees
Milestone

Comments

@dhilgarth
Copy link

Please provide PowerShell tab completion for chocolatey

  • For package names
  • For commands and options
  • Need the installer to put in the profile setting.
  • Need the profile setting to work appropriately.
  • Investigate if setting the profile is something to do in Posh v2 only. If so, set up for adding to PSModulePath.
@dhilgarth dhilgarth changed the title Provide tab completion for powershell Provide PowerShell tab completion for chocolatey Sep 19, 2015
@aronovgj
Copy link

@dhilgarth
Copy link
Author

It's a bit confusing with two repositories...

@ferventcoder
Copy link
Member

Yes, it is a bit confusing - the ones in chocolatey/chocolatey either get fixed just as a result of not being written in PowerShell or get migrated over to here. In this case migrated. :)

@ferventcoder
Copy link
Member

Well, you may have missed it but - https://twitter.com/ferventcoder/status/711530331879309312.

ferventcoder added a commit that referenced this issue Mar 20, 2016
The name of the skip powershell should be skip scripts for future
expansion into other automation providers.
ferventcoder added a commit that referenced this issue Mar 20, 2016
Provide PowerShell tab completion for Chocolatey commands including

- searching for installed packages for upgrade/uninstall
- searching for packages to install  - only return the top 5 results
   from a search and only search by id

Also set refreshenv as part of the profile additions.
ferventcoder added a commit that referenced this issue Mar 20, 2016
* stable:
  (GH-412)(GH-664) PoSh tab completion / refreshenv
  (GH-295) Do not replace PSModulePath
  (GH-664) RefreshEnv Should also work in PowerShell
  (GH-412) update parameter name for skip scripts
  (GH-663) Search just by id
  (doc) update how to pass args
@ferventcoder
Copy link
Member

To play with this, install the latest beta and run Import-Module “$env:ChocolateyInstall\helpers\chocolateyProfile.psm1” -Force in the shell you want to try this feature in.

@ferventcoder ferventcoder changed the title Provide PowerShell tab completion for chocolatey Provide PowerShell tab completion for Chocolatey Mar 22, 2016
@ferventcoder
Copy link
Member

Decided to punt on Posh v2 support. This is not a core feature, but an enhancement. So if someone can get this working with POSH v2, I'd accept the PR. I'm just not going to work on making it work.

ferventcoder added a commit that referenced this issue Mar 23, 2016
- Draw out the flow of tab completion so it feels natural,
  which includes the options most widely being used coming
  first in the option set.
- Introduce naive filtering to not redisplay an already
  passwed option/switch. It doesn't quite work if it is a
  value you need to add data to but it's a start.
- Skip using the choco shim and go directly to the choco.exe.
- Tweak commands to produce the fastest execution
ferventcoder added a commit that referenced this issue Mar 23, 2016
When installing Chocolatey, it should attempt to install the profile.
This may fail when run against Local System, so the failure should not
affect Chocolatey installation.
ferventcoder added a commit that referenced this issue Mar 23, 2016
* stable:
  (doc) update CHANGELOG/nuspec
  (GH-412) Add licensing to new Posh files
  (GH-412) Install Chocolatey Profile
  (GH-412) Tab Completion Flow / Filtering / Perf
  (GH-663) Search Order By Popularity
  (GH-663) Search by Id Starts With
  (GH-666) Setup messages as Output with color
ferventcoder added a commit to ferventcoder/choco that referenced this issue Mar 24, 2016
Filtering by subcommands doesn't autocomplete if you have entered part
of the wording.
ferventcoder added a commit that referenced this issue Mar 25, 2016
* stable:
  (doc) update changelog/nuspec
  (GH-501) Sign Assemblies/PowerShell Files
  (build) formatting
  (build) fix windows powershell path
  (doc) add example gifs
  (GH-670) Search enhancements
  (GH-668) Search should sort by version desc
  (GH-412) Allow filtering subcommands by match
@silverqx
Copy link

I have installed Chocolatey v0.10.3 but tab completion doesn't work for me, but I tried import module like is written above Import-Module “$env:ChocolateyInstall\helpers\chocolateyProfile.psm1” -Force and it works really good, how to do this permanent?

@ferventcoder
Copy link
Member

#833, #894, #991 are related.

@szachara what you are looking for is noted at #894 (comment)

@silverqx
Copy link

Thx, I try it later and let know at #894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants