Skip to main content

Module menu_path

Module menu_path 

Source
Expand description

Parse "File > Save"-style menu paths into a typed list of titles.

The path separator is > or →, with optional whitespace around it. Each segment is trimmed. Empty segments are rejected. A single title such as Save parses as a one-segment path.

Paths are case-folded on the macOS backend so callers may pass either File > Save or file > save.

Structs§

MenuPath
One menu path. Each entry is a title that the macOS backend matches case-insensitively against AXTitle.

Constants§

SEPARATORS
Separator between menu titles. > is the documented form. → (U+2192) is accepted as a Unicode-friendly alias.

Functions§

parse
Split a single title path. Empty input and empty segments are rejected.