Skip to content

Commit 1766ec3

Browse files
committed
implementing ls -a
1 parent 3d571eb commit 1766ec3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • implement-shell-tools/ls

implement-shell-tools/ls/ls.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
for path in paths :
1414
files_list=os.listdir(path)
1515
files_list.sort(key=str.lower)
16-
if args.one :
17-
for item in files_list :
18-
print(item)
16+
for item in files_list :
17+
if args.one and args.a :
18+
print(item)
19+
elif args.one :
20+
if not item.startswith(".") :
21+
print(item)

0 commit comments

Comments
 (0)