Skip to content

Commit 27d97d0

Browse files
committed
Change o flag to 1 for display per line
1 parent af69721 commit 27d97d0

File tree

1 file changed

+2
-2
lines changed
  • implement-shell-tools/ls

1 file changed

+2
-2
lines changed

implement-shell-tools/ls/ls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
)
88

99
parser.add_argument("-a", action="store_true", help="Display all files include hidden files")
10-
parser.add_argument("-o", action="store_true", help="list one file per line")
10+
parser.add_argument("-1", action="store_true", help="list one file per line")
1111
parser.add_argument("dir", nargs="?", default=".", help="Directory to list, default curent directory")
1212

1313
args = parser.parse_args()
@@ -18,7 +18,7 @@
1818
files = [f for f in files if not f.startswith(".")]
1919
files.sort()
2020

21-
if args.o:
21+
if args.__dict__["1"]:
2222
for f in files:
2323
print(f)
2424
else:

0 commit comments

Comments
 (0)