From 5bacf997d084077b2311a44856dd67ad3a338f4e Mon Sep 17 00:00:00 2001 From: Laukka Date: Sun, 12 Jan 2025 09:07:52 +0100 Subject: [PATCH] added flags to the parser and ls --- command/ls/ls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/ls/ls.go b/command/ls/ls.go index be43153..90fc065 100644 --- a/command/ls/ls.go +++ b/command/ls/ls.go @@ -24,7 +24,7 @@ func Ls(in input_parser.Input, env *environment.Env) { fmt.Print(fmt.Sprintf("Error opening directory %s", env.Path)) } for _, f := range fs { - if (f.Name()[0] == '.') && (slices.Contains(in.Flags, "a")) { + if (f.Name()[0] == '.') && !(slices.Contains(in.Flags, "a")) { continue } // allows for hidden directories fmt.Print(f.Name())