Skip to content

Commit

Permalink
Update import script
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvcc committed Jul 1, 2024
1 parent 68cfd97 commit 0b46e41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .cfg/Dockerfile.test.brew
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN brew install starship neofetch fzf btop wget \
RUN curl -fLo '~/.vim/autoload/plug.vim' --create-dirs \
'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

ENV E=123
RUN rm -rf .bashrc .zshrc && curl -Lks https://raw.githubusercontent.com/dhvcc/configs/master/.cfg/install.sh | /bin/sh

# Install manually or in script
Expand Down
7 changes: 4 additions & 3 deletions .cfg/scripts/import-bash-history-to-zsh.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import pathlib
import time


def main():
timestamp = None
with open("~/.bash_history", "rt") as bash_history:
with open("~/.zsh_history", "wt") as zsh_history:
with open(pathlib.Path.home() / ".bash_history", "rt") as bash_history:
with open(pathlib.Path.home() / ".zsh_history", "wt") as zsh_history:
for line in bash_history.readlines():
line = line.rstrip('\n')
if line.startswith('#') and timestamp is None:
Expand Down

0 comments on commit 0b46e41

Please sign in to comment.