Skip to main content

slug_from_abs_path

Function slug_from_abs_path 

Source
pub fn slug_from_abs_path(abs: &str) -> String
Expand description

Slugify an absolute filesystem path into Cursor’s project-slug form (the directory name under ~/.cursor/projects/).

Cursor encodes /Users/ben/projects/temp/cursortestUsers-ben-projects-temp-cursortest (strip leading /, replace / with -). Tmp-dir workspaces and remote/untitled workspaces use different slugs we don’t try to reconstruct here.