Skip to content

Commit

Permalink
Merge branch 'master' into speedup-pyenv-virtualenv-prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
shunk031 authored Jul 17, 2024
2 parents b70db74 + e1c65e6 commit 553fe2f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion home/dot_config/sheldon/plugins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ apply = ['source']

[plugins.history]
local = '~/.local/bin/server'
user = ['history.zsh']
use = ['history.zsh']
apply = ['source']
27 changes: 19 additions & 8 deletions home/dot_local/bin/server/history.zsh
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
#!/usr/bin/env zsh

setopt share_history
setopt append_history
setopt inc_append_history
setopt hist_no_store
setopt hist_ignore_all_dups
setopt hist_ignore_dups

export HISTFILE=${HISTFILE:-$HOME}/.zsh_history
# Copy from https://github.com/sorin-ionescu/prezto/blob/master/modules/history/init.zsh#L9-L23

#
# Options
#

setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
setopt HIST_BEEP # Beep when accessing non-existent history.

export HISTFILE=${HOME}/.zsh_history
export HISTSIZE=10000
export SAVEHIST=10000

0 comments on commit 553fe2f

Please sign in to comment.