7 Commits
Author SHA1 Message Date
VERSE e9e50c7dea fix(history): respect zdotdir config (#83)
closes #82

Also added a `HISTFILE` so it always reads the correct file that the
shell is pointing to

Is there a `HISTFILE`? If so, use it
If it's Zsh: Is there a `ZDOTDIR`? Use `ZDOTDIR/.zsh_history`
If it's Fish: Is there an `XDG_DATA_HOME`? Use
`XDG_DATA_HOME/fish/fish_history`
If none of them are present, revert to the default `$HOME/...`
2026-07-31 15:12:49 +07:00
VERSE ebb0bead7d fix: ZDOTDIR and XDG_CONFIG_HOME config detecting (#51)
From this discussion:

https://www.reddit.com/r/zsh/comments/1v8rq7s/comment/p09b05o/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

---

Problem: Iris hardcodes config paths to `~/.zshrc` and
`~/.config/fish/config.fish`. This ignores users' custom `ZDOTDIR` or
`XDG_CONFIG_HOME` setups, polluting their `$HOME` directory during init
and failing to scan their actual aliases. Also, ZDOTDIR is often set in
`~/.zshenv` without export, making it invisible to Go's `os.Getenv`

Solution:
- Bash: default `$HOME/.bashrc` so dont mind about it
- For Zsh, Iris now probes zsh directly (`zsh -c "echo $ZDOTDIR"`) with
a timeout to accurately resolve custom paths even if they aint exported
- For Fish, Iris now natively respects the `XDG_CONFIG_HOME` environment
variable
- Shared this robust resolution logic across init, uninstall, and alias
scanning
- Fixed alias scanning to process files in the correct zsh startup order
(`.zshenv` -> `.zprofile` -> `.zshrc`) and correctly merge them
2026-07-28 21:46:34 +07:00
VERSE ffa336196a chore: use go fix to enhance codebase (#29)
This pull request modernizes the codebase by adopting Go 1.21+ features, including built-in functions like min and max, standard library iterators such as strings.SplitSeq and strings.FieldsSeq, utility functions like maps.Copy and slices.Contains, and string manipulation helpers like strings.Cut and strings.CutPrefix. Feedback is provided on a test file where the usage of strings.Builder can be further optimized to avoid unnecessary string allocations during concatenation.

`go fix -diff ./...`
2026-07-04 19:44:38 +07:00
verse91 c76541258a fix: all issues by golangci-lint 2026-05-09 23:49:33 +07:00
verse91 e587f02798 fix(tests): fix all problems related to test 2026-05-09 23:37:13 +07:00
verse91 17f33ff480 feat: all tests 2026-05-09 23:18:08 +07:00
verse91 736723fbe8 refactor: shell adaptor 2026-04-11 22:34:04 +07:00