From 747bdf4abad4e3b6fbe7293b59103a98d75652fc Mon Sep 17 00:00:00 2001 From: lucaspalomodevelop Date: Fri, 30 Jun 2023 23:38:11 +0200 Subject: [PATCH] ls ignore dotfiles --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f3d39e5..bf39a71 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,6 +69,8 @@ void listScripts(int argc, char *argv[]) std::cout << "Scripts:" << std::endl; for (const auto &entry : std::filesystem::directory_iterator(dir)) { + if (entry.path().filename().string().substr(0, 1) == ".") + continue; std::string name = entry.path().filename().string(); std::cout << " " << name << std::endl; }