Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find bash history #18

Open
sontqq opened this issue Oct 12, 2018 · 9 comments
Open

Cannot find bash history #18

sontqq opened this issue Oct 12, 2018 · 9 comments

Comments

@sontqq
Copy link

sontqq commented Oct 12, 2018

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?

@pawamoy
Copy link
Owner

pawamoy commented Oct 12, 2018

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.

@sontqq
Copy link
Author

sontqq commented Oct 13, 2018

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! 😆

@pawamoy
Copy link
Owner

pawamoy commented Oct 13, 2018

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 😁

@sontqq
Copy link
Author

sontqq commented Oct 14, 2018

Nope, I've added it. :(

@pawamoy
Copy link
Owner

pawamoy commented Oct 23, 2018

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?

@pawamoy
Copy link
Owner

pawamoy commented Oct 24, 2018

Also, what version of Bash do you have? bash --version

@sontqq
Copy link
Author

sontqq commented Oct 26, 2018

Still no result 😞

GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf)

@pawamoy
Copy link
Owner

pawamoy commented Dec 26, 2018

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.

@pawamoy
Copy link
Owner

pawamoy commented Dec 31, 2018

Just finished testing on a Raspbian VM, it seems to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants