added flags to the parser and ls
This commit is contained in:
parent
f0cbfb1db5
commit
5bacf997d0
@ -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())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user