nushell icon indicating copy to clipboard operation
nushell copied to clipboard

Allow configuring history file path via `config.nu`

Open cos4ni2s opened this issue 10 months ago • 4 comments

Basics

  • [x] I have done a basic search through the issue tracker to find similar or related issues.
  • [x] I have made myself familiar with the available features of Nushell for the particular area this enhancement request touches.

Related problem

Currently, the only way to fully disable history is by using the --no-history flag, which cannot be applied when logging into a TTY (e.g. at system login or display manager startup). This makes it difficult or impossible for users who don't want their shell history written to disk.

Describe the solution you'd like

Add support for defining the history file path in config.nu, for example:

$env.config.history.path = "/dev/null"

Describe alternatives you've considered

--no-history flag (not usable for TTY login)

Additional context and details

No response

cos4ni2s avatar Jan 25 '26 03:01 cos4ni2s

What happens if you set $env.config.history.max_size equal to 1 or 0?

fdncred avatar Jan 25 '26 14:01 fdncred

What happens if you set $env.config.history.max_size equal to 1 or 0?

An empty history file is still created.

cos4ni2s avatar Jan 25 '26 20:01 cos4ni2s

Hey! 👋

could I give it a shot and try to implement what you need?

kx0101 avatar Jan 25 '26 22:01 kx0101

Hey! 👋

could I give it a shot and try to implement what you need?

I'll be glad.

cos4ni2s avatar Jan 25 '26 22:01 cos4ni2s