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

zsh/bash: use $HISTFILE to get history file path #18

Merged
merged 2 commits into from
Jan 26, 2024
Merged

Conversation

aeghn
Copy link
Contributor

@aeghn aeghn commented Jan 26, 2024

Many times, our history file may not be in ~/.bash_history or ~/.zsh_history. In this case, we need to read HISTFILE to obtain this value, and HISTFILE may not be an environment variable, so we need to use a new process to obtain the location of this file.

@YiNNx
Copy link
Owner

YiNNx commented Jan 26, 2024

Nice! It is obviously a better approach and fixes #3 (comment)
Please remove the unused import and I will merge it after that.

image

@aeghn
Copy link
Contributor Author

aeghn commented Jan 26, 2024

Please remove the unused import and I will merge it after that.

done. 7c2e24f

Copy link
Owner

@YiNNx YiNNx left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

2 participants