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

Unicode chars in histdb -d output. #24

Open
dschaper opened this issue Dec 27, 2017 · 2 comments
Open

Unicode chars in histdb -d output. #24

dschaper opened this issue Dec 27, 2017 · 2 comments

Comments

@dschaper
Copy link

dschaper commented Dec 27, 2017

I ran the histdb -d command and found there are some unicode chars in the call. History is not functioning. Below is the histdb -d call. I am using zplug to install the zsh-histdb project. I think it may be related to my prompt, which is Powerlevel9k with NerdFonts. I have included my Powerlevel9k config as well if that might help.

histdb -d
select strftime(case when datetime(max_start, 'unixepoch') > datetime('now', 'start of day') then '%H:%M' else '%d/%m' end, max_start, 'unixepoch', 'localtime') as time, session as ses, dir, argv as cmd from (select session, replace(places.dir, '/home/dschaper', '~') as dir, replace(commands.argv, '
', '
���') as argv, max(start_time) as max_start
from
  history
  left join commands on history.command_id = commands.rowid
  left join places on history.place_id = places.rowid
where not (commands.argv like 'histdb%') and places.host='europa'
group by history.command_id, history.place_id
order by max_start desc
limit 34) order by max_start asc
    POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon ssh virtualenv docker_machine context dir vcs)
    POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs load ram)
    POWERLEVEL9K_SHORTEN_STRATEGY=truncate_middle
    POWERLEVEL9K_DIR_SHOW_WRITABLE=true
    DEFAULT_USER=dschaper
    POWERLEVEL9K_MODE='nerdfont-complete'
    POWERLEVEL9K_PROMPT_ON_NEWLINE=true
    POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
    POWERLEVEL9K_OS_ICON_BACKGROUND="white"
    POWERLEVEL9K_OS_ICON_FOREGROUND="blue"
    POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""

screenshot from 2017-12-26 23-00-14

@dschaper
Copy link
Author

Update: A bad alias was causing the problems with having to CTRL-C to get any commands to work, but the database still has the unicode and I think that's what is causing the sqlite3 database to not populate with the information. Let me know if my zshrc files would be any help to debugging. https://github.com/dschaper/dotfiles

@larkery
Copy link
Owner

larkery commented Jan 10, 2018

There's some unicode characters that go into the query, but they are only there for column alignment.
It should only really affect the output display or what is stored in the database. I am not sure what to suggest for debugging - maybe stick some print statements in the source and see where it gets to?

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