From 0b46e414b0f9b193bd5df66ddfe61ea67470e4e3 Mon Sep 17 00:00:00 2001 From: dhvcc Date: Tue, 2 Jul 2024 00:38:00 +0300 Subject: [PATCH] Update import script --- .cfg/Dockerfile.test.brew | 1 + .cfg/scripts/import-bash-history-to-zsh.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.cfg/Dockerfile.test.brew b/.cfg/Dockerfile.test.brew index 73cbd5d..7c0a69c 100644 --- a/.cfg/Dockerfile.test.brew +++ b/.cfg/Dockerfile.test.brew @@ -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 diff --git a/.cfg/scripts/import-bash-history-to-zsh.py b/.cfg/scripts/import-bash-history-to-zsh.py index be91cda..816c050 100755 --- a/.cfg/scripts/import-bash-history-to-zsh.py +++ b/.cfg/scripts/import-bash-history-to-zsh.py @@ -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: