Can't unset `SHARE_HISTORY` option
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- zsh
- Domain
- cli
Research direction
Start by reproducing the behavior with the reported .zshrc, .zprofile, and .zshenv settings, comparing a fresh Warp restart with sourcing ~/.zshrc. Trace how Warp launches zsh and applies history options; done means SHARE_HISTORY can be unset during startup and new .zsh_history entries no longer contain timestamps.
Written by the indexing model from the issue text.
Description
Discord username (optional)
JanJakes#1807
Describe the bug
I was tuning up ZSH history settings and at some point I had setopt SHARE_HISTORY in my .zshrc file. That option happens to include command timestamps (same as EXTENDED_HISTORY does).
Before doing that, my .zsh_history records were looking as follows, for instance: ls -la
After that, they look like this: : 1666343798:0;ls -la
The problem is, I can't revert these settings in any way. What I tried:
- Removing all of the options form
.zshrc. - Adding
setopt NO_SHARE_HISTORYandunsetopt SHARE_HISTORYin this and inverse order to.zshrc. - Adding
setopt NO_EXTENDED_HISTORYto.zshrc. - Adding
setopt INC_APPEND_HISTORYto.zshrc. - Restarting the app after all of the above attempts.
- Disabling session restoration and restarting the app after all of the above attempts.
- Restarting the computer.
- Uninstalling Warp (all the files via Raycast but I kept
~/.warp) and doing a fresh install. - Adding all of the above options to
.zprofileand.zshenvfiles.
The thing is, .zshrc is loaded (adding some echo outputs stuff) but none of the unsetopts take effect. When I do source ~/.zshrc, then it works (with unsetopt SHARE_HISTORY).
Using setopt INC_APPEND_HISTORY in .zshrc doesn't work either, while doing source ~/.zshrc helps.
So I can see two parts to this problem:
- Once I had
setopt SHARE_HISTORYin my.zshrc, it's somehow persisted forever and it's always applied, even when removed, restarted, reinstalled, etc. - The options that can override this are not applied in
.zshrc, they work only on subsequentsource ~/.zshrc.
To Reproduce
- Run a command (e.g.,
ls -la) and check that your.zsh_historydoesn't contain timestamps (such as: 1666343798:0;ls -la). - Add
setopt SHARE_HISTORYto your.zshrc, restart Warp. - Run a command (e.g.,
ls -la) and see that your.zsh_historydoes contain timestamps (such as: 1666343798:0;ls -la) — this is expected. - Remove
setopt SHARE_HISTORYfrom your.zshrc, restart Warp. - Run a command (e.g.,
ls -la) and see that your.zsh_historystill contains timestamps (such as: 1666343798:0;ls -la) — this is probably not expected. - Add
unsetopt SHARE_HISTORYand/orsetopt NO_SHARE_HISTORYto.zshrc, restart Warp. - Run a command (e.g.,
ls -la) and see that your.zsh_historystill contains timestamps (such as: 1666343798:0;ls -la) — this is probably not expected.
Expected behaviour
At step 5. of the above reproduction, there should be no timestamps in .zsh_history. Same goes for point 7.
Screenshots
No response
Operating System
MacOS
OS Version
12.6
Shell Version
zsh 5.8.1 (x86_64-apple-darwin21.0)
Warp Version
v0.2022.10.11.08.13.stable_01
Additional context
No response
Does this block you from using Warp daily?
No
Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e
No response
- Dominant language
- Rust
- Stars
- 65.1k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from warpdotdev/warp
-
area:agent area:window-tabs-panes enhancement needs-info os:mac repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
warpdotdev/warp#15768 · 3 comments · 1 reaction ·
-
bug factory-auto-implement factory:revops-factory os:mac ready-to-implement repro:high triaged warp:auto-triage-review
Difficulty 1/5 Under an hour Newbie friendliness 90/100
warpdotdev/warp#15697 · 2 comments ·
-
area:editor-notebooks bug repro:high triaged warp:auto-triage-review warp:tracking
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
warpdotdev/warp#13949 · 3 comments ·
-
markdown_parser: unclosed `<u>` markers pair via the emphasis algorithm and delete surrounding text Openarea:editor-notebooks bug ready-to-implement repro:high triaged warp:auto-triage-review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
warpdotdev/warp#12863 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
warpdotdev/warp#11969 · 2 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100