We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01967a3 commit cc5dbf9Copy full SHA for cc5dbf9
1 file changed
implement-shell-tools/ls/ls.py
@@ -4,11 +4,8 @@
4
5
def show_files(files, show_hidden):
6
for file in files:
7
- if show_hidden:
8
- print(file)
9
- else:
10
- if not file.startswith("."):
11
+ if show_hidden or not file.startswith("."):
+ print(file)
12
13
14
parser = argparse.ArgumentParser(
@@ -24,8 +21,6 @@ def show_files(files, show_hidden):
24
21
args = parser.parse_args()
25
22
26
23
27
-fn = args.path
28
-listDir = os.listdir(fn)
+directory_path = args.path
+listDir = os.listdir(directory_path)
29
30
-if fn != "":
31
- show_files(listDir, args.a)
0 commit comments