Skip to content

v1.0.0.11 -- PowerShell history is not populated #120

Closed

Description

Automatically saved history is a must have feature. Thank you very much!

But it looks like PSReadline populates its internal history only. Is it by
design or is it just work in progress? I would expect PowerShell history to be
populated as well, so that PowerShell history commands work and related user
defined tools for history work, too.


Off topic

To install, you'll need WMF5, but it will work fine with V3/4. I'm just restricting who installs to the most motivated folks until I get some more testing.
Alternatively, you can build it yourself, all the code has been pushed.

I am motivated :) but I do not have WMF5 and I cannot build myself, currently. It was slightly difficult to get this release for testing...

Activity

  1. lzybkr commented on Jun 14, 2014

    @lzybkr
    Contributor

    Not populating PowerShell history is sort of by design, part laziness. I definitely considered it.

    The main issue is not knowing the EndExcutionTime and ExecutionStatus when saving writing the entry incrementally - I don't want to wait until the command finishes - it might never finish, the session might get killed or whatever.

    Another slight factor was wanting trivially simple parsing code. I didn't think xml or json would work easily with incremental writing and reading - I don't want to read the whole file in another session when just one command was added - a structured format pretty much would require reading the whole file.

    I'll definitely keep this in mind though, but I was really wanting history shared across sessions so I implemented that first.

  2. nightroman commented on Jun 14, 2014

    @nightroman
    ContributorAuthor

    Ah, true, EndExcutionTime and ExecutionStatus is an issue for incremental approach. Then I would write any values there. One has to understand that this is inevitable with incremental history shared across sessions. Personally, I never use these times and statuses (I know, some people do) but I do want to see what is in the history, quite often.

    I'll definitely keep this in mind though, but I was really wanting history shared across sessions so I implemented that first.

    What we have right now is already very useful. Thank you once again.

  3. lzybkr commented on Sep 15, 2014

    @lzybkr
    Contributor

    I received some feedback that the option to disable incremental sharing isn't too discoverable. One suggestion is to remove HistorySaveStyle and instead have an option:

    HistoryMode = NotPersistent | Persistent | Shared
    

    The current default would map to "Persistent,Shared".

  4. daxian-dbw commented on Dec 12, 2019

    @daxian-dbw
    Member

    Actually, I see more interest around the convergence between the PSReadLine history and PowerShell built-in history cache.
    There are more discussion about this in #1247, so close this one as a duplicate of #1247.

  5. added
    Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
    and removed on Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions