Skip to content

Commit

Permalink
lib: remove share_history
Browse files Browse the repository at this point in the history
Related: #2537, #9324
  • Loading branch information
mcornella committed Oct 10, 2020
1 parent 75ae0e9 commit 2376022
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/history.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ setopt hist_expire_dups_first # delete duplicates first when HISTFILE size excee
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
setopt share_history # share command history data

11 comments on commit 2376022

@sramsay64
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would have been nice to have been notified about this change, so I could add it to my rc file. That being said, it's pretty awesome to be able to look through the git commits and find the cause of the regression myself.

I also think this is one the the best default features of zsh/ohmyzsh. Now when I'm evangelizing zsh, I'll need to recommend they not only also install ohmyzsh but also change this setting. It's a shame to see it be turned off by default, but I can sort of understand why.

I can hardly fault you for trying to keep my software in my daily driver stack up to date though. Thanks, and keep up the good work.

@andyrafter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. I wondered what I had broken.

@deelaka
Copy link

@deelaka deelaka commented on 2376022 Nov 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was rather a big change and I had wondered what had broken, could there be a way to notify users of big changes such as this when omz update is executed?

@siriniok
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have lost a lot of my command history and few hours on figuring out what's wrong :(. Does OMZ have a CHANGELOG or something? Can't find anything.

@mcornella
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the rushed decision to remove this. It had been a long issue in the project and I grew tired of it, but in hindsight, I should have waited at least until a changelog was put in place.

I've been working towards that this week, and I'm finally able to submit a working, polished prototype:

image

This changelog will be shown after an update and will be able to be shown on command with omz changelog [version]. This is also prepared for when OMZ finally adopts a versioning system.

I've pushed the changes to #9428. You can test it with omz pr test 9428, but at the moment you will only be able to test it with omz changelog, no changelog on update display since there won't be updates to pull from. There's more information in the PR.

@mcornella
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have lost a lot of my command history and few hours on figuring out what's wrong

This shouldn't happen. Is it possible that the history of different tabs where written in a different order instead? If not, we might need to reenable inc_append_history.

@siriniok
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcornella Wow, great job, thank you!

I'm using OMZ with tmux in iTerm2 and had these options enabled:

$ setopt | grep hist 
extendedhistory
histexpiredupsfirst
histignoredups
histignorespace
histverify

Looks like it has stopped adding commands to the history after the OMZ update. Without tmux, in a regular terminal session, commands were still added to the history.

@mcornella
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe try putting setopt inc_append_history in your zshrc file. If that works I'll add it to OMZ.

@mcornella
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the change in 28ed288.

@siriniok
Copy link

@siriniok siriniok commented on 2376022 Nov 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inc_append_history seemingly works. I'm not sure whether it has any conflicts with extended_history though—I didn't notice any problems, but probably replacing these options with inc_append_history_time makes more sense.

@siriniok
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, people may unset inc_append_history_time, but forget to set extended_history...

Please sign in to comment.