opensouls / terminal-copilot

A smart terminal assistant that helps you find the right command.
Apache License 2.0
572 stars 43 forks source link

Disable history for windows #26

Closed EdwardTheLegend closed 1 year ago

EdwardTheLegend commented 1 year ago

Currently in the save function in history.py it checks os.environ["SHELL"] which doesn't exist on windows. This is just a quick patch to stop an ugly traceback on windows.

2mawi2 commented 1 year ago

Good point. I didn't test on windows. It looks like Powershell 5 supports a history feature (http://woshub.com/powershell-commands-history). But that sounds like and additional feature.

JoelKronander commented 1 year ago

Merging this for now, but to @2mawi2 s point, should we experiment with (http://woshub.com/powershell-commands-history) for Windows? @EdwardTheLegend What do you think?

EdwardTheLegend commented 1 year ago

Absolutely. I wonder if there is a way to write to the history for cmd as well.