A more intelligent & useful history file & way to query it

Open
#1,886 14 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, sqlite
Domain
cli

Research direction

No files or tests are named. Start by locating the current history implementation in PSReadLine and reviewing how experimental features are scoped; then define the initial module, SQLite-backed storage, schema, and query API. Done means the listed initial release goals are addressed.

Written by the indexing model from the issue text.

Description

Area-HistoryImprovements Issue-Enhancement

It would be great to have a much more intelligent & complex history file than the current simple implementation that we currently have, although to achieve this I expect that it would likely be much more computationally expensive than the current implementation.

Ideally I would like to see this be more structured & complex and able to be queried in a way that allows for much better analytics of common command use that enables inspection on the count of use being aliased or using the full command name, common parameter combinations as well as a count of the use of each parameter & arguments to that parameter.

Loose inital release goals

  • Wrapped in a module scoped experimental feature
  • API based with a end data store provider plugin module (allows SQLite, CosmosDb, jsonFile etc)
  • use of SqlLite file (local or remote) - Default option
  • Local File created if not already there
  • Initial base DB Schema
  • Ideally Encrypted

Post release enhancements

  • User Extensibility of DB Schema
  • Preference of remote for cross machine history reasons) - Configurable option
  • Configuration options
    • current file
    • other remote sources
  • Additional Querying cmdlets to replace needing to use Group|Sort cmdlets etc
  • Plugin with AIShell & other tooling
Dominant language
C#
Stars
4.4k
Forks
341
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/PSReadLine

All issues in PowerShell/PSReadLine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.