I use this link py for Import bash history to zsh history
but not working in manjaro
$ python bash-to-zsh-hist.py
File "~/bash-to-zsh-hist.py", line 26
command_list.each do |command|
^
SyntaxError: invalid syntax
Does anyone know where the problem is?
xabbu
16 July 2021 08:53
2
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
xabbu:
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.
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 = File.read(BASH_HISTORY_FILE_PATH)'
xabbu
16 July 2021 09:10
4
First find out what ruby is. Ruby Programming Language
https://wiki.archlinux.org/title/Ruby
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
system
Closed
31 July 2021 09:15
6
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.