Help convert bash history to zsh history

I use this link py for Import bash history to zsh history
but not working in manjaro

$ python
  File "~/", line 26
    command_list.each do |command|
SyntaxError: invalid syntax

Does anyone know where the problem is?

The script will not be magically converted into a python program by changing the file ending in .py. It is still a ruby script and of course ruby is not python.

Read the commends if you don’t want to use ruby, there are alternatives.

1 Like

thx for reply
howt to run .rb?
i run normal but same error

$ ~/bash_to_zsh_history.rb 
~/bash_to_zsh_history.rb: line 15: syntax error near unexpected token `('
~/bash_to_zsh_history.rb: line 15: `bash_hist_file ='

First find out what ruby is. Ruby Programming Language

Then install the ruby package. You probably don’t need to install any additional gems. RubyGems are like modules in python.

After that read the header comment from bash_to_zsh_history.rb, it tells you how to run the ruby script.

1 Like

Thank you

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.