TLDR; save history to $HOME/.local/state/influx/history if $XDG_STATE_HOME is not defined otherwise to $XDG_STATE_HOME/influx/history instead of $HOME/influx_history.
The XDG Base Directory Specification is based on the following concepts:
There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable $XDG_STATE_HOME.
The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:
actions history (logs, history, recently used files, …)
TLDR; save history to
$HOME/.local/state/influx/history
if$XDG_STATE_HOME
is not defined otherwise to$XDG_STATE_HOME/influx/history
instead of$HOME/influx_history
.From XDG Base Directory Specification:
Looks like relevant lines are around here: https://github.com/influxdata/influx-cli/blob/3a2e139292fcb3f854ebfbf40f0cf2de90b1b511/clients/v1_shell/v1_shell.go#L153