pub fn show_session(
session: &Session,
grep: Option<&str>,
json: bool,
output: &Output,
) -> Result<()>Expand description
Display session details with optional grep filtering and JSON output.
§Normal mode
Prints session header info (name, ID, date, shell, OS, hostname, etc.)
followed by a numbered command list. If grep is provided, only commands
matching the regex pattern are shown.
§JSON mode
Serializes the entire session to pretty-printed JSON.
§Errors
Returns an error if the grep pattern is an invalid regex.