diff options
author | Naïm Favier <n@monade.li> | 2022-02-18 13:26:40 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-03-07 12:01:54 +0100 |
commit | 5461ff532d6169be86af703b15cfb49569732cbb (patch) | |
tree | 1700965668139ed19e0ce4dc7b22c5714f7ee3a7 /src/libutil/args.cc | |
parent | a6d7cd418385e20feab8d7260a7251f218a0d5bb (diff) |
Make completeDir follow symlinks
Allows completing `nix why-depends /run/cur<Tab>` to /run/current-system
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r-- | src/libutil/args.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc index 38c748be0..b60c609a6 100644 --- a/src/libutil/args.cc +++ b/src/libutil/args.cc @@ -290,7 +290,7 @@ static void _completePath(std::string_view prefix, bool onlyDirs) if (glob((std::string(prefix) + "*").c_str(), flags, nullptr, &globbuf) == 0) { for (size_t i = 0; i < globbuf.gl_pathc; ++i) { if (onlyDirs) { - auto st = lstat(globbuf.gl_pathv[i]); + auto st = stat(globbuf.gl_pathv[i]); if (!S_ISDIR(st.st_mode)) continue; } completions->add(globbuf.gl_pathv[i]); |