feat: add Tauri desktop app support and terminal management
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Shortens a file path by replacing the home directory prefix with ~.
|
||||
* Handles both macOS (/Users/username) and Linux (/home/username) paths.
|
||||
*/
|
||||
export function shortenPath(path: string | undefined | null): string {
|
||||
if (!path) {
|
||||
return "";
|
||||
}
|
||||
return path.replace(/^\/(?:Users|home)\/[^/]+/, "~");
|
||||
}
|
||||
Reference in New Issue
Block a user