Skip to main content

Crate pxh

Crate pxh 

Source

Modules§

helpers
recall
secrets_patterns

Structs§

Invocation

Functions§

atomically_remove_lines_from_file
atomically_remove_matching_lines_from_file
Rewrite a file removing lines that exactly match any of the contraband items. Unlike atomically_remove_lines_from_file, this matches complete lines (after trimming).
default_db_path
Return the default database path (pxh_data_dir()/pxh.db).
effective_host_set
Build the set of hostnames that count as “this host” for recall filtering. Returns {current_hostname} ∪ {aliases}, deduped.
get_hostname
get_setting
import_bash_history
import_json_history
import_zsh_history
initialize_base_schema
Initialize base schema and register custom functions on a connection. Safe to call on foreign databases (scan/scrub –dir) – all DDL is idempotent and the memdb ATTACH is per-connection only.
json_export
migrate_host_settings
Migrate host settings from DB legacy storage to config file. Called from install and config commands, not on every connection.
present_results_human_readable
pxh_config_dir
Return the pxh config directory. Prefers XDG, falls back to ~/.pxh if it exists. New installs default to $XDG_CONFIG_HOME/pxh (~/.config/pxh).
pxh_data_dir
Return the pxh data directory. Prefers XDG, falls back to ~/.pxh if it exists. New installs default to $XDG_DATA_HOME/pxh (~/.local/share/pxh).
resolve_hostname
Resolve hostname: config > DB setting (legacy “original_hostname”) > live hostname.
run_schema_migrations
Run versioned schema migrations tracked via PRAGMA user_version.
set_setting
sqlite_connection