Skip to content

Commit 9ecf33e

Browse files
committed
Revert history location change
1 parent 14ffdb2 commit 9ecf33e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shelloracle/shelloracle.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import asyncio
22
import os
33
import sys
4+
from pathlib import Path
45

56
from prompt_toolkit import PromptSession
67
from prompt_toolkit.application import create_app_session_from_tty
78
from prompt_toolkit.history import FileHistory
89

9-
from .config import data_home
1010
from .provider import get_provider
1111

1212
from .config import config
1313

1414

1515
async def prompt_user(default_prompt: str | None = None) -> str:
1616
with create_app_session_from_tty():
17-
prompt_session = PromptSession(history=FileHistory(data_home / ".shelloracle_history"))
17+
history_file = Path.home() / ".shelloracle_history"
18+
prompt_session = PromptSession(history=FileHistory(str(history_file)))
1819
# Can I do this with one of the builtin methods?
1920
# I tried a few (including cursor_down) with limited success
2021
prompt_session.output.write_raw("\033[E")

0 commit comments

Comments
 (0)