Skip to content

Commit 1613605

Browse files
committed
fixed terminal issue
1 parent 0f0cd7f commit 1613605

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Components/Terminal.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ const Terminal = (props) => {
131131
const processStatement = () => {
132132

133133
const validstatements = ['cd' , 'ls' , 'touch' , 'cat' , 'open', 'clear'];
134-
if ( currValue === "") return;
134+
if ( currValue === "") {
135+
curr.push({ statement: `Shuvayans-MacBook-Air:~ ${currDir.split('/').slice(-1)[0]}$` + currValue });
136+
return;
137+
}
135138
const tokens = currValue.split(' ').map( e => e.toLowerCase());
136139
const commmand = tokens[0];
137140
const error = "Wrong command : Supported Commands : cd , ls , touch , cat , open , clear";

0 commit comments

Comments
 (0)