-
Notifications
You must be signed in to change notification settings - Fork 1.4k
~/.bash_history is truncated. #501
Copy link
Copy link
Closed
Labels
2025 EOYbugSomething isn't workingSomething isn't workingpriority-2Bug that affects more than a few users in a meaningful way but doesn't prevent core functionsBug that affects more than a few users in a meaningful way but doesn't prevent core functions
Metadata
Metadata
Assignees
Labels
2025 EOYbugSomething isn't workingSomething isn't workingpriority-2Bug that affects more than a few users in a meaningful way but doesn't prevent core functionsBug that affects more than a few users in a meaningful way but doesn't prevent core functions
Type
Fields
Give feedbackNo fields configured for Bug.
Describe the bug
It seems
copilotexecutes shell commands viabashwithout first loading~/.bashrc.So, even if users explictly set
HISTFILESIZE=-1in~/.bashrcto customize the max number of lines of~/.bash_history, running a shell command once viacopilottruncates~/.bash_historyto 1000 lines or so.This problem does not occur on
codex.Affected version
0.0.352 Commit: e743766
Steps to reproduce the behavior
In one terminal, check the number of lines of
~/.bash_history.In my case:
$ wc -l ~/.bash_history 375136 /Users/user/.bash_historyIn another terminal, run
copilotand typeRun "echo hello".Then
copilotrunsecho hellofor you.In the terminal used in the step 1, re-check the number of lines
$ wc -l ~/.bash_history 1004 /Users/user/.bash_historyBy the way, after the truncation,
~/.bash_historyincludes{ echo ___BEGIN___COMMAND_OUTPUT_MARKER___; PS1=""; PS2=""; EC=$?; echo "___BEGIN___COMMAND_DONE_MARKER___$EC"; }, which I'm sure is derived from
copilot:Expected behavior
~/.bash_historyshould not be truncated.Additional context
No response