diff options
| author | Albert Cervin <albert@acervin.com> | 2023-06-14 00:03:47 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-07-11 21:26:49 +0200 |
| commit | 3a8ae83aa13636679c151027cace905fa87ebd8e (patch) | |
| tree | 4a68bfb1e32dc1d6dbd4c8779312f0f32fcba926 /src/dged/path.h | |
| parent | bc5696e5bbd4739691f53563f3506b30b9be1ad3 (diff) | |
| download | dged-3a8ae83aa13636679c151027cace905fa87ebd8e.tar.gz dged-3a8ae83aa13636679c151027cace905fa87ebd8e.tar.xz dged-3a8ae83aa13636679c151027cace905fa87ebd8e.zip | |
Implement replace + autocomplete
Autocomplete is currently a POC and works only with find-file.
Diffstat (limited to 'src/dged/path.h')
| -rw-r--r-- | src/dged/path.h | 4 |
1 files changed, 3 insertions, 1 deletions
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; } } |
