6
6
# current_path = [] or ["", "root"]
7
7
8
8
dict_path = {
9
- "root" : ["" , "root" ],
9
+ "root" : ["" , "root" ],
10
10
"current_path" : [] or ["" , "root" ],
11
11
"dirs" : [],
12
12
"path" : []
@@ -23,8 +23,8 @@ def mkdir():
23
23
print ("ERR: DIRECTORY ALREADY EXISTS" )
24
24
else :
25
25
dict_path ["dirs" ].append (dir )
26
- print ("SUCC: CREATED" )
27
26
dict_path ["path" ].append (dir )
27
+ print ("SUCC: CREATED" )
28
28
29
29
30
30
"""
@@ -34,9 +34,7 @@ def mkdir():
34
34
def ls ():
35
35
if dict_path ["path" ] == dict_path ["root" ]:
36
36
dict_path ["path" ] = dict_path ["dirs" ]
37
- # dict_path["path"] = dict_path["path"]
38
- print ("DIRS: " )
39
- print (* dict_path ["path" ], sep = "\t " )
37
+ print ("DIRS: " , * dict_path ["path" ], sep = "\t " )
40
38
41
39
42
40
"""
@@ -75,7 +73,6 @@ def rm():
75
73
global dict_path
76
74
if dir in dict_path ["dirs" ]:
77
75
dict_path ["dirs" ].remove (dir )
78
- dict_path ["path" ].remove (dir )
79
76
print ("SUCC: DELETED" )
80
77
else :
81
78
print ("ERR: DIRECTORY DOES NOT EXIST" )
@@ -89,7 +86,7 @@ def session_clear():
89
86
global dict_path
90
87
dict_path ["dirs" ].clear ()
91
88
dict_path ["current_path" ].clear ()
92
- dict_path ["current_path" ] = dict_path ["root" ] or dict_path [ "" ]
89
+ dict_path ["current_path" ] = dict_path ["root" ]
93
90
dict_path ["path" ].clear ()
94
91
print ("SUCC: CLEARED: RESET TO ROOT" )
95
92
@@ -120,7 +117,7 @@ print("INFO - COMMANDS TO USE : mkdir, ls, cd, pwd, rm, session_clear, exit")
120
117
print ("<Starting your application...>" )
121
118
122
119
while True :
123
- char = input ("$:" )
120
+ char = input ("$: " )
124
121
command_list = []
125
122
command_list .append (char .split (" " ))
126
123
char = command_list [0 ][0 ]
0 commit comments