Comments (15)
Good to know. I'll add that to my update-all-the-things.ps1
script. Thanks!
from powertype.
I'm using powershell 7.2 and psreadline 2.2.0-beta4 and it works as expected, give me a few minutes to update and see if I get the same error.
from powertype.
Hmm that worked for me, when you run enable-powertype
it runs Set-PSReadLineOption -PredictionSource Plugin
behind the scenes, are you sure that you are on PSReadline 2.2.0-beta5
? It should have the PredictionSource
parameter.
The only other difference is that I'm on Windows 10.
Could you try to run Set-PSReadLineOption -PredictionSource Plugin
on it's own and see if you get the same error?
You could also try get-help Set-PSReadLineOption
and see if it lists PredictionSource.
from powertype.
That might be part of the problem. I was on 2.1.0-beta1 when I tried, then I upgraded it, and try to Set-PredictionSource
manually, which also failed (something about it not being defined.)
I just ran enable-powertype
again, and it didn't throw any errors. Then again, I don't see it doing anything, either.
from powertype.
Here are a few things to try
- Just to type
gi
and it should suggestgit
if you then selectgit
it should suggest a command, currently it dosent have a definition for any commands starting withget-
therefor it does not suggest anything. - If you want a list run
Set-PSReadLineOption -PredictionViewStyle ListView
- If you want both history and plugins run
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
(note you can combine this and the one above into one command)
from powertype.
Do I need to set something in my profile to enable it between launches? Seems like the answer is yes. (Perhaps that should be in the instructions, too.)
Setting Set-PSReadLineOption -PredictionViewStyle ListView
gave me what I expected, per the .gif example in the documentation. Maybe this should also be part of the install instructions? Will this need to be stored in my profile as well?
from powertype.
You need to put the following in your $profile
if you want it to be permanent:
Enable-PowerType
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView
But yes it should be in the documentation, but as I'm quite early in the development I haven't had time to write any extensive documentation yet, but its on the todo #10.
from powertype.
Excellent. It seems to be working as-expected!
Personally, I'm not as well-versed with PowerShell as I am with bash, zsh, and the like. How do I ensure that this plugin stays up-to-date?
from powertype.
You could put Update-Module PowerType -AllowPrerelease
in your profile but that would make all newly started sessions delay alot..
I have been thinking about creating a application that would monitor powershell modules, winget, dotnet tool and npm tools for updates but this project currently occupies all my free time.
But I'm no pro when it comes to PowerShell, you could ask in the PowerShell Discord if there is a better solution out there!
from powertype.
Actually, I ended up making a function in my profile. It would have been nice if PowerType would have seen that function.
from powertype.
I will have to give it some thinking the code that gives you the suggestions doesn't have direct access to you powershell session, not my choice, its how Microsoft designed the suggestion api..
I might be able to enumerate all commands that exists when you run Enable-PowerType
but all that are created after would be hard to get, sadly this will be low on the current priority list as I'm trying to get the git dictionary completed.. git supports a huge amount of commands and parameters.
But you could try ctrl + space, that should list your commands using a built in argument completer (this can also be used when using cd)
from powertype.
Hmm. Ctrl+space invokes my PowerToys Run dialog. Can this be modified?
from powertype.
I'm 99% sure it can but i have no idea how..
I'm guessing its a psreadline option (i'm not at my pc right now so i can't check)
from powertype.
from powertype.
Just a guess but try Set-PSReadLineKeyHandler -Key 'Ctrl+Tab' -Function MenuComplete
from powertype.
Related Issues (20)
- Handle matches from both ValueParameter without keys and Parameters with Keys
- Move platform to filename
- Add Get-PowerType-Dictionaries HOT 1
- Allow the user to specify what Dictionaries to load
- Add support for loading custom Dictionaries
- Add argument completer mode
- DynamicSource caching does not respect current working directory
- Remove code smells
- Add troubleshooting cmdlet
- simplify conditions to constant
- Fix code scanning alert - Missing statement block after 'else' keyword.
- Improve ast handeling HOT 1
- Order suggestions based on usage
- Remove Add-PowerTypeDictionary
- Git merge should suggest local branches
- git push should suggest origin and branch
- Cannot install 0.0.13-preview HOT 2
- PowerType not usable under ArchLinux with PowerShell 7.2.6 HOT 10
- Enable customization of hint list length HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertype.