Skip to content

Commit

Permalink
ensure HISTDB_HOST is set for directory search
Browse files Browse the repository at this point in the history
  • Loading branch information
m42e committed Mar 30, 2022
1 parent d1ac8b3 commit 13d43ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ fn build_query_string(theloc: &Location, grouped: bool) -> String {
};
match theloc {
Location::Session => {
query.push_str(&format!(" session in ({}) and ", &get_current_session_id()))
query.push_str(&format!(" session in ({}) and ", &get_current_session_id()));
}

Location::Directory => {
query.push_str(&format!(" (places.dir like '{}') and ", &get_current_dir()))
query.push_str(&format!(" (places.dir like '{}') and ", &get_current_dir()));
}

_ => {}
Expand Down
2 changes: 1 addition & 1 deletion zsh-histdb-skim.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ histdb-skim-widget() {
histdb-skim-ensure
origquery=${BUFFER}
output=$( \
HISTDB_HOST=$HISTDB_HOST \
HISTDB_HOST=${HISTDB_HOST:-"'$(sql_escape ${HOST})'"} \
HISTDB_SESSION=$HISTDB_SESSION \
HISTDB_FILE=$HISTDB_FILE \
${BIN_PATH} "$origquery"\
Expand Down

0 comments on commit 13d43ea

Please sign in to comment.