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

SqliteFailure #65

Open
sivaswami opened this issue Sep 19, 2019 · 15 comments
Open

SqliteFailure #65

sivaswami opened this issue Sep 19, 2019 · 15 comments

Comments

@sivaswami
Copy link

• • • source mcfly.bash
• • •
McFly: Upgrading McFly DB to version 3, please wait...thread 'main' panicked at 'McFly error: Unable to add cmd_tp
l to commands: SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("duplicate column name: cmd_tpl"))',
src/libcore/result.rs:999:5
stack backtrace:
0:
1:
2:
3:
4:
5:
6:
7:
8: main
9: __libc_start_main
10:

@cantino
Copy link
Owner

cantino commented Sep 19, 2019

Hey @sivaswami, that's a new one. Are you just installing McFly for the first time?

@sivaswami
Copy link
Author

yes. for first time.

@cantino
Copy link
Owner

cantino commented Sep 19, 2019

could you try deleting the ~/.mcfly directoy and see if it happens again?

@sivaswami
Copy link
Author

• • • rm -rf ~/.mcfly ; source mcfly.bash
McFly: Importing Bash history for the first time. This may take a minute or two...thread 'main' panicked at 'McFly error: Insert to
work: NulError(NulError(0, [0, 108, 115]))', src/libcore/result.rs:999:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

@sivaswami
Copy link
Author

• • • rm -rf ~/.mcfly ; export RUST_BACKTRACE=1 ; source mcfly.bash
McFly: Importing Bash history for the first time. This may take a minute or two...thread 'main' panicked at 'McFly error: Insert to
work: NulError(NulError(0, [0, 108, 115]))', src/libcore/result.rs:999:5
stack backtrace:
0:
1:
2:
3:
4:
5:
6:
7:
8: main
9: __libc_start_main
10:

@cantino
Copy link
Owner

cantino commented Sep 19, 2019

Thank you @sivaswami. I suspect there's something in your existing history file that's causing an import error. I wish I knew what it was. I suspect that if you move .bash_history to a new name temporarily, then remove ~/.mcfly, it will work.

@sivaswami
Copy link
Author

I use timestamp with my history. is this could be a problem? content of history file looks like this:

#1529475153
ls
#1529475159
cd test

my settings in bashrc :
export HISTIGNORE='&:ssh*:*bin/se:. bin/se:*history:mutt:[bf]g:exit:pwd:
hostname:*cd ..:bash:zsh:*echo:cs:h:pushd:popd'
export HISTTIMEFORMAT='%F %T '

@sivaswami
Copy link
Author

sivaswami commented Sep 19, 2019

does mcfly handles HISTTIMEFORMAT and other History related env parameter settings ?
some more options include:
export HISTTIMEFORMAT=”%a %h %d – %r ”
export HISTTIMEFORMAT=”%A %B %d – %r ”

@sivaswami
Copy link
Author

in some env, I also change $HISTFILE to point to different file.

@cantino
Copy link
Owner

cantino commented Sep 19, 2019

Ah! We do support timestamps, but currently only in the default epoch format. I suspect if you unset HISTTIMEFORMAT it'd work.

@sivaswami
Copy link
Author

It works now after deleting the bash_history file. You are creating a new screen itself. is there any way, we can do half-screen alone just like fzf ? What are the intelligence I get from mcfly ? any inputs or documentation link ? Just to understand as beginner.

@cantino
Copy link
Owner

cantino commented Sep 22, 2019

Hey @sivaswami, glad it's working! The current UI is full screen. If you'd want to work on a half-screen view, you'd be welcome to. I find the current experience meets my needs well.

@Tatsh
Copy link

Tatsh commented Dec 1, 2021

If there are 'bad lines' in ~/.bash_history/etc, can they be ignored?

@cantino
Copy link
Owner

cantino commented Dec 24, 2021

They should be, @Tatsh. What are you seeing?

@Tatsh
Copy link

Tatsh commented Dec 24, 2021

I had a different error that was caused by using su without a new login shell (su -). This caused an issue with a temporary file mcfly writes to, because environment variables were inherited.

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

3 participants