larkery / zsh-histdb

A slightly better history for zsh
MIT License
1.27k stars 75 forks source link

Allow re-defining HISTDB_HOST #92

Closed mafredri closed 3 years ago

mafredri commented 4 years ago

This change allows the hostname to be modified after sourcing zsh-histdb, e.g. to change it to user@host:

source zsh-histdb/sqlite-history.zsh
HISTDB_HOST="'$(sql_escape ${USER}@${HOST})'"

My use-case is for merging history of multiple hosts where I may have multiple users on each host. Reassigning doesn't work without this change because init happens later.

larkery commented 3 years ago

This seems entirely reasonable to me. Thanks.