Skip to content
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

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

Closed
nightroman opened this issue Jun 14, 2014 · 4 comments
Closed

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

nightroman opened this issue Jun 14, 2014 · 4 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@nightroman
Copy link
Contributor

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...

@lzybkr
Copy link
Member

lzybkr commented Jun 14, 2014

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.

@nightroman
Copy link
Contributor Author

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.

@lzybkr
Copy link
Member

lzybkr commented Sep 15, 2014

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".

@daxian-dbw daxian-dbw added Resolution-By Design The behavior is by design. and removed Issue-Enhancement It's a feature request. labels Dec 12, 2019
@daxian-dbw daxian-dbw added Issue-Enhancement It's a feature request. and removed Resolution-By Design The behavior is by design. labels Dec 12, 2019
@daxian-dbw
Copy link
Member

daxian-dbw commented Dec 12, 2019

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.

@daxian-dbw daxian-dbw added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Issue-Enhancement It's a feature request. labels Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants