PSReadLine
PSReadLine copied to clipboard
KeyHandler to toggle through predictors sources
Prerequisites
- [X] Write a descriptive title.
Description of the new feature/enhancement
Instead of typing Set-PSReadlineOption -PredictionSource <source> the user would be able to use a key handler to toggle between all the possible options for -PredictorSource and have a display note of which predictor source a user is on.
Open for discussion on the exact UI implementation.
Proposed technical implementation details (optional)
Shift + F2 to switch between different predictor sources.
PS C:\Users\stevenbucher> <Press Shift+F2>
PSReadLineOption Predictor Source now set to History
PS C:\Users\stevenbucher> <Press Shift+F2>
PSReadLineOption Predictor Source now set to HistoryAndPlugin
PS C:\Users\stevenbucher> <Press Shift+F2>
PSReadLineOption Predictor Source now set to Plugin
PS C:\Users\stevenbucher> <Press Shift+F2>
PSReadLineOption Predictor Source now set to None
A way to add a keyhandler for toggling on and off predictors can be found here: https://ianmorozoff.com/2023/01/10/predictive-intellisense-on-by-default-in-powershell-7-3/#keybinding