Skip to content

fix: shell history is not xdg compliant. - #2

Open
webbrain-one wants to merge 1 commit into
aasixh:mainfrom
webbrain-one:webbrain/issue-1
Open

fix: shell history is not xdg compliant.#2
webbrain-one wants to merge 1 commit into
aasixh:mainfrom
webbrain-one:webbrain/issue-1

Conversation

@webbrain-one

Copy link
Copy Markdown

Closes #1

Check the HISTFILE environment variable to determine the history file location.
Falls back to default paths (`.bash_history` or `.zsh_history`) based on the
shell type if HISTFILE is not set.

This enables XDG-compliant history configurations.

Closes aasixh#1

@aasixh aasixh left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The implementation looks good. Could you also add unit tests for historyPaths() to cover the HISTFILE path, ~ expansion, and the fallback to .bash_history / .zsh_history when HISTFILE is unset?

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.

shell history is not xdg compliant.

3 participants