From 3a8ae83aa13636679c151027cace905fa87ebd8e Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 14 Jun 2023 00:03:47 +0200 Subject: Implement replace + autocomplete Autocomplete is currently a POC and works only with find-file. --- src/dged/path.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dged/path.h') diff --git a/src/dged/path.h b/src/dged/path.h index 6e11d6a..da62457 100644 --- a/src/dged/path.h +++ b/src/dged/path.h @@ -29,10 +29,12 @@ static char *expanduser(const char *path) { } static char *to_abspath(const char *path) { + char *exp = expanduser(path); char *p = realpath(path, NULL); if (p != NULL) { + free(exp); return p; } else { - return strdup(path); + return exp; } } -- cgit v1.2.3