dvorka / hstr

bash and zsh shell history suggest box - easily view, navigate, search and manage your command history.
http://me.mindforger.com
Apache License 2.0
4.07k stars 232 forks source link

Unable to read history file from '~/.bash_history'! #450

Open toast-gear opened 2 years ago

toast-gear commented 2 years ago

OS : M1 Mac

$ whoami
frank.spencer

$ echo $SHELL
/usr/local/bin/bash

$ echo $BASH_VERSION
5.1.16(1)-release

# I have tried setting this to 777
$ ls -al ~ | grep history
-rw-------    1 frank.spencer  256126645   614B  7 Mar 19:27 .bash_history

# ~/.bashrc
#  history config
export HISTFILE="~/.bash_history"
export HISTFILESIZE=1000000
export HISTTIMEFORMAT="[%F %T] "
export HISTCONTROL=ignoredups:erasedups:ignorespace
shopt -s histappend
zvezdochiot commented 2 years ago

Hi @toast-gear .

Type:

hstr -s

And:

history -w
awk '!x[$0]++' .bash_history > .bash_history.uniq
cat .bash_history.uniq > .bash_history
history -c
history -r

And favorite commands should be moved from .bash_history to .hstr_favorites. See also #269 .