Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: keep the existing '.zshrc' file in the same directory #137

Merged
merged 4 commits into from
May 2, 2023

Conversation

wintermi
Copy link
Contributor

@wintermi wintermi commented May 2, 2023

The current version moves the existing .zshrc file to the $HOME directory even when the $ZDOTDIR is populated.

This fix will keep the existing .zshrc file in the same location as specified by the $ZDOTDIR

@wintermi wintermi requested a review from mamaraddio May 2, 2023 12:49
Copy link
Member

@mamaraddio mamaraddio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEW_ZSHRC could become:

local _ZSHRCBACKUP="${ZSHRC}_$(date +%Y-%m-%d)_$(date +%s)"

DATE ad ID could so be deleted, and finally:

mv "$ZSHRC" "$_ZSHRCBACKUP"

What do you think?

@wintermi
Copy link
Contributor Author

wintermi commented May 2, 2023

I agree that the DATE and ID could be removed, though I wanted to fix the issue before refactoring anything further.

@wintermi wintermi requested a review from mamaraddio May 2, 2023 13:51
@mamaraddio mamaraddio merged commit 95ab1d4 into master May 2, 2023
1 check passed
@mamaraddio mamaraddio deleted the wintermi branch May 2, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants