Cannot find bash history
sontqq opened this issue ยท 10 comments
As the title says it cannot find the history.
Failed to import current history. The following exception occured: <class 'ValueError'>: /root/.shell_history/history: no such file
I am running Raspbian GNU/Linux 9 (stretch)
Any idea how to solve it?
Woohoo first issue ๐ ! Thanks for your interest ๐ !
A few questions:
- is bash the default shell on your distro?
- did you load shell history by sourcing the file (as mentioned in readme)? is it sourced each time you start bash?
- does
/root/.shell_history/history
file actually exist? - what command did you use to run the web application?
To check if shell history is enabled, simply enter set -x
in your shell. You should see all the instructions run by shell history. Deactivate this mode with set +x
.
All this is a bit wonky, sorry ๐ I plan on improving installation process and robustness.
I am using bash, and inserted . '/home/pi/git/shell-history/shellhistory.sh'
into /root/.bashrc
.
ls: cannot access '/root/.shell_history/history': No such file or directory
/root/.shell_history/db
--> exists
-rw------- 1 root root 18K Oct 12 21:48 /root/.bash_history
--> exists
root@sont:~# set -x
root@sont:~# set +x
+ set +x
root@sont:~# set -x
This is everything i found. I found your project really awesome. I love visualization! ๐
Ah, maybe you just forgot to add shellhistory enable
after . '/home/pi/git/shell-history/shellhistory.sh'
in .bashrc
?
I found your project really awesome. I love visualization!
Thanks a lot! Yeah I love visualization too, transforming some raw data in useful/meaningful graphics is great ๐
Nope, I've added it. :(
Sorry for the delay.
Here is how I use shell-history myself:
shopt -s histappend
export HISTSIZE=-1
. "/path/to/shellhistory/shellhistory.sh"
shellhistory enable
Could you try to set histappend and HISTSIZE like above?
Also, what version of Bash do you have? bash --version
Still no result ๐
GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf)
Hi @sontqq!
I just packaged the application using Poetry, and pushed a release to PyPI. Instructions are available in the README, and also in the CHANGELOG.
Could you try again with the new version?
The default directory is now ~/.shellhistory
instead of ~/.shell_history
. If you don't have a history file yet, you can simply delete the old database and directory, as the new one will be automatically created.
On my side I will try to see if I can launch a Raspbian docker container to see if it works.
Just finished testing on a Raspbian VM, it seems to work fine.