YiNNx / cmd-wrapped

👩‍💻 A CLI Tool for Command Line Insights
https://crates.io/crates/cmd-wrapped
MIT License
1.01k stars 27 forks source link

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

Closed aeghn closed 9 months ago

aeghn commented 9 months ago

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 commented 9 months ago

Nice! It is obviously a better approach and fixes https://github.com/YiNNx/cmd-wrapped/issues/3#issuecomment-1911331551 Please remove the unused import and I will merge it after that.

image

aeghn commented 9 months ago

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

done. 7c2e24f