pxh 0.9.6

pxh is a fast, cross-shell history mining tool with interactive fuzzy search, secret scanning, and bidirectional sync across machines. It indexes bash and zsh history in SQLite with rich metadata for powerful recall.
Documentation
#!/usr/bin/env bats

@test "should not import if it's already defined" {
  bash_preexec_imported="defined"
  source "${BATS_TEST_DIRNAME}/../bash-preexec.sh"
  [ -z $(type -t __bp_install) ]
}

@test "should not import if it's already defined (old guard, don't use elsewhere!)" {
  __bp_imported="defined"
  source "${BATS_TEST_DIRNAME}/../bash-preexec.sh"
  [ -z $(type -t __bp_install) ]
}

@test "should import if not defined" {
  unset bash_preexec_imported
  source "${BATS_TEST_DIRNAME}/../bash-preexec.sh"
  [ -n $(type -t __bp_install) ]
}

@test "bp should stop installation if HISTTIMEFORMAT is readonly" {
  readonly HISTTIMEFORMAT
  run source "${BATS_TEST_DIRNAME}/../bash-preexec.sh"
  [ $status -ne 0 ]
  [[ "$output" =~ "HISTTIMEFORMAT" ]] || return 1
}