Prerequisites
Summary
Adding a SQLite history backend to upgrade our current text based history for PSReadline. This will allow location, frequency, and recency based suggestions.
Currently this open pull request adds the infrastructure for users to be able to utilize a SQLite database for their history. It does not have smart suggestions mentioned above implemented.
Users can enable SQLite as their database with the following command:
Set-PSReadLineOption -HistoryType SQLite
and disable it with this command:
Set-PSReadLineOption -HistoryType Text
When turning on SQLite for the first time, it will migrate your text history to a SQLite database. The migration does take a bit of time, it can be up to 10 seconds. Once the database is created, it will not migrate again.
Since PSReadline doesn't have a config document, it is advised for users to set their history preference in their profiles.
Migrated text based history will not have location based data but the frequency and relative recency will be stored in the database. This can be used in the future once smart suggestions are implemented.
Details
Text history will remain the default for now. If you start a session without specifying SQLite as the history type it will write to text history. That text history will not be available in SQLite.
The db file is located in the same default location as the text history file. This is customizable via the Set-PSReadlineOptions -HistroySavePath [Desired Path]
HistorySavePath is updated to show the db file once you switch to sqlite.
Articles
No response
Related Source Pull Requests
Related Source Issues
Prerequisites
Get-Foocmdlet" instead of "New cmdlet."Summary
Adding a SQLite history backend to upgrade our current text based history for PSReadline. This will allow location, frequency, and recency based suggestions.
Currently this open pull request adds the infrastructure for users to be able to utilize a SQLite database for their history. It does not have smart suggestions mentioned above implemented.
Users can enable SQLite as their database with the following command:
and disable it with this command:
When turning on SQLite for the first time, it will migrate your text history to a SQLite database. The migration does take a bit of time, it can be up to 10 seconds. Once the database is created, it will not migrate again.
Since PSReadline doesn't have a config document, it is advised for users to set their history preference in their profiles.
Migrated text based history will not have location based data but the frequency and relative recency will be stored in the database. This can be used in the future once smart suggestions are implemented.
Details
Text history will remain the default for now. If you start a session without specifying SQLite as the history type it will write to text history. That text history will not be available in SQLite.
The db file is located in the same default location as the text history file. This is customizable via the Set-PSReadlineOptions -HistroySavePath [Desired Path]
HistorySavePath is updated to show the db file once you switch to sqlite.
Articles
No response
Related Source Pull Requests
Related Source Issues