client now supports tilde sign '~/´ in paths

This commit is contained in:
iceman1001 committed 2026-09-03 14:59:37 +02:00
1 parent 130219fb99
commit 08a31f01db
3 files changed
+113 -13

No files matched your search

+14
View File
@@ -130,6 +130,20 @@ bool path_is_directory(const char *path);
*/
bool path_is_regular_file(const char *path);
/**
* @brief Check whether a path is absolute.
*/
bool path_is_absolute(const char *path);
/**
* @brief Expand a leading "~" into the user home directory.
*
* The pm3 prompt is not a shell, so "~" reaches the client verbatim.
* Returns a newly allocated string which the caller must free, NULL on failure.
* "~user/..." is not supported and is returned unchanged.
*/
char *path_expand_homedir(const char *path);
/**
* @brief Return the final path component, or an empty string for NULL input.
*/