atuinsh/atuin · error
nonempty list of shells must result in at least one conditio
Error message
nonempty list of shells must result in at least one condition
What it means
Error "nonempty list of shells must result in at least one condition" thrown in atuinsh/atuin.
Source
Thrown at crates/atuin-client/src/database.rs:158
let nonempty_shells = shells.iter().filter(|s| {
let is_empty = s.is_empty();
if is_empty {
include_null = true;
}
!is_empty
});
let shell_list = nonempty_shells.map(quote).join(", ");
let mut cond = (!shell_list.is_empty()).then(|| format!("shell in ({shell_list})"));
if include_null {
// `SqlBuilder::and_where` wraps the whole expression in parentheses; we don't need to add
// them here.
cond = Some(cond.map_or_else(String::new, |s| s + " OR ") + "shell IS NULL");
}
// `OrFilter::items` is always non-empty.
sql.and_where(cond.expect("nonempty list of shells must result in at least one condition"));
}
fn get_session_start_time(session_id: &str) -> Option<i64> {
if let Ok(uuid) = Uuid::parse_str(session_id)
&& let Some(timestamp) = uuid.get_timestamp()
{
let (seconds, nanos) = timestamp.to_unix();
return Some(seconds as i64 * 1_000_000_000 + nanos as i64);
}
None
}
/// Controls the type of search [`Sqlite::search`] performs.
///
/// This is a narrower set of modes than [`SearchMode`], which also contains modes that apply only
/// to interactive searches.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DbSearchMode {View on GitHub (pinned to 15fe1318f1)
Solutions
- This is an internal invariant failure; report the bug with the command you ran.
When it happens
Trigger: Fires when a nonempty shell filter list produces no SQL conditions, indicating an internal query-building bug.
Common situations: See trigger scenarios.
AI-assisted analysis of atuinsh/atuin@15fe1318f1 (2026-08-19).
Data as JSON: /api/errors/dd2bc764f9fb7fe5.
Report an issue: GitHub.