Git Product home page Git Product logo

zsh-history-to-fish's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zsh-history-to-fish's Issues

hangs forever

When I run it it just hangs forever:

$ zsh-history-to-fish -dn
ZSH history to Fish
===================
input : /home/ddrucker/.zsh_history (naive-convert=False)
output: dry run mode

and that's it, just hangs forever.

From bash?

Hello,

Do you have recommendations for importing history from a ~/.bash_history file?

Partial import

In my .zsh_history file I have 3302 lines, why does the script find only 30?

cat .zsh_history | wc -l 3302

'ZSH history to Fish

input : /home/riccardo/.zsh_history (naive-convert=False)
output: dry run mode
.
Processed 30 commands.
No file has been written.`

History entries not showing in fish

┬─[yifei@bogon:~]─[14:10:51]
╰─>$ zsh-history-to-fish -n
ZSH history to Fish
===================
input : /Users/yifei/.zsh_history (naive-convert=False)
output: /Users/yifei/.local/share/fish/fish_history
.
Processed 1000 commands.

File "/Users/yifei/.local/share/fish/fish_history" has been written successfully.
┬─[yifei@bogon:~]─[14:11:08]
╰─>$ history | wc -l
     289

I can see the commands are already in ~/.local/share/fish/fish_history, but fish seems to ignore them.

For timestamp, command_zsh in parse_history(input_file):

I know you have put a lot of love into this @rsalmei . So I gave this tool a shot and got this error:

Traceback (most recent call last):
  File "/usr/local/bin/zsh-history-to-fish", line 8, in <module>
    sys.exit(exporter())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/zsh_history_to_fish/command.py", line 72, in exporter
    for timestamp, command_zsh in parse_history(input_file):
ValueError: not enough values to unpack (expected 2, got 1)

Any ideas?

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 27: invalid start byte

Traceback (most recent call last):
  File "/home/ilya/zsh-history-to-fish/virtualenv/bin/zsh-history-to-fish", line 10, in <module>
    sys.exit(exporter())
  File "/home/ilya/zsh-history-to-fish/virtualenv/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ilya/zsh-history-to-fish/virtualenv/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ilya/zsh-history-to-fish/virtualenv/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ilya/zsh-history-to-fish/virtualenv/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ilya/zsh-history-to-fish/virtualenv/lib/python3.7/site-packages/zsh_history_to_fish/command.py", line 68, in exporter
    for line in history(input):
  File "/home/ilya/zsh-history-to-fish/virtualenv/lib/python3.7/site-packages/zsh_history_to_fish/command.py", line 17, in history
    line = line.replace(b'\xe2\x80\x83\xb4', b'-').decode('utf-8').strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 27: invalid start byte

zsh-history-to-fish depends on HISTSIZE

If HISTSIZE is unset in your .zshrc, zsh-history-to-fish only processes 1000 lines of history. Set it to a large number instead to get your whole file.

I consider this a bug - the expection is that this program should process your entire history file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.