Hacker News new | ask | show | jobs
by yamafaktory 8 days ago
Why not, plenty of tools - atuin included - are doing that.
1 comments

No, they are not? Atuin is not a shell prompt, you can use it with any prompt. Like Starship, Spaceship, liquidprompt, etc. None of those hijack shell history.
we are not talking about the same thing. I'm talking about ~/.whetuu - the tool doesn't hijack the shell history at all. You can rm -rf the store and your shell history is intact.
The XDG spec tells you exactly where to place your files. It isn’t in $HOME/.your-project ever. You know about XDG enough to mention in your docs, so you should know.

It does hijacks shell history. If I press the up arrow, I expect _my shell_ to handle it how I configured it, not your tool. Because you’re saying your tool is a shell prompt!

A shell prompt is the program that runs before and after every shell command to show me contextual information like the current directory, and the exit code of the last command.

If you want this to be include customizations beyond the prompt, stop calling it a prompt.

The XDG Base Directory spec covers config/data/cache/state, it does not define where executables go. Whetuu history & cache are both compliant as both go to respectively ~/.local/share/whetuu/ ($XDG_DATA_HOME) & ~/.cache/whetuu/ ($XDG_CACHE_HOME).Atuin, cargo and many other tools are doing the same. By the way, Atuin also rebinds the up arrow.
The XDG Base Directory spec covers config/data/cache/state, it does not define where executables go.

it does:

https://specifications.freedesktop.org/basedir/latest/

User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.

i prefer ~/bin/ but this is better than creating you own directory that needs to be added to the path.

Thanks for the hint.
> it does not define where executables go

It does. Read the spec. It’s in $HOME/.local/bin. It’s just not configurable like the other paths.

We’ve been over this. Atuin is not a shell prompt.
I'll try to make that a constructive argument and assume that the project shouldn't use the word "prompt".