-
Notifications
You must be signed in to change notification settings - Fork 304
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
Sqlite backed history for advanced capabilities #3673
Comments
|
I would like to add another possibility: it is possible to store more fields than displayed. Therefore, the |
I tried an experiment with the OneDrive synchronization. The name conflict and overwrite would create issues. Therefore, the databases would need a unique identifier. I tried to use a console app as a medior: use a folder to store sqlite databases, each has unique names ( ATTACH `path/GUID.db` as localDb;
BEGIN;
INSERT INTO command SELECT * FROM localDb.command;
COMMIT;
DETACH localDb; Therefore, each instance has a persistent copy for each system but the in-memory data consists of all systems, and queryable. But this is an ugly solution as I assumed no concurrent writes. A proper synchronization requires continuous reading and deduplication. |
@zbalkan this has been discussed as a potential solution in this issue #1886 |
@kilasuit, as @StevenBucher98 mentioned above, it is related but not a duplicate. |
Prerequisites
Description of the new feature/enhancement
I work in a Linux/Windows hybrid environment where I try to minimize the cognitive load while keeping the security and usability in a reasonable amount. I recently started to use Bashhub and atuin to improve daily workflows on terminals. Even though I do not use the cloud synchronization, I experienced a database backed history provides alternatives without utilizing heavy
grep
orSelect-String
usage.However, this (SQLite backend) would require either adding a
Find-History
orSearch-History
command or similar (I prefer the latter) to fully benefit from it, or improvingGet-History
command.Currently, we handle basic search requirements with
Get-History | Select-String -Pattern...
, or parameters ofInvoke-History
orClear-History
but in order to make use of a database backend, a specific command makes more sense.Proposed technical implementation details (optional)
Almost all of these can be achieved by using several PowerShell modules already. Yet, a database backend might provide a smoother experience and open way to further improvements.
Select-Object -Property...
Select-Object -Property...
.Invoke-History
orClear-History
.-Unique
parameterEncoded: $true
.The text was updated successfully, but these errors were encountered: