Skip to main content

parse_session_kv

Function parse_session_kv 

Source
pub fn parse_session_kv(s: &str) -> SessionDirSpec
Expand description

Parse the umbrella --session <kv-list> argument into a SessionDirSpec. The list is comma-separated; each item is either a bare shortcut (restart, resume, error) or a key:value pair.

Recognised keys (and their long-form flag equivalents):

KeyLong-form flag
name--session-name
path / dir--session-path
reuse--session-reuse
keep--session-keep
shelflife--session-shelflife

Bare shortcuts:

TokenEquivalent
restartreuse:restart
resumereuse:resume
errorreuse:error
newforce a fresh auto-named session (defeats stick_session)

Whitespace around items + key/value separators is trimmed. Unknown keys produce a Warn log; the rest of the spec is kept (so a typo doesn’t kill the run).