jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
8.19k stars 192 forks source link

Need a general or simple way to. override shell_history #1962

Open GhostFlying opened 4 months ago

GhostFlying commented 4 months ago

What problem are you trying to solve?

I have some frequent used commands or snippers in my shell history and find them by autocompletion. But the devbox shell override the HISFILE env to a dedicated new file so I missed all the history inside the shell and can not find the snippers easily.

I meet a little strange situation that if I put export HISTFILE=~/.zsh_history in the devbox.json's init hook, it seems works as I expected but if I export it inside the interactive shell, it seems not working.

What solution would you like?

Autodetect the HISFILE env, if it is set, inherit it directly into she devbox shell. But maybe needs a way to disable this feature by add an option or another env?

Or just use a special env like DEVBOX_HISFILE directly.

Alternatives you've considered

If the ENV in the configuration file can be expand in the outside env, maybe it can be implemented by a more flexible way but as https://www.jetpack.io/devbox/docs/configuration/#env said it is not supported today.