pub fn session_name_from_path(path: &Path) -> StringExpand description
Generate a session name from a file path.
Rules:
- Uses the filename (not the full path)
- Strips leading dot (hidden files like
.bash_history→bash_history) - Replaces non-alphanumeric characters (except
-and_) with- - Collapses consecutive hyphens
- Trims leading/trailing hyphens
- Lowercases the result
- Falls back to
imported-sessionif result is empty or invalid