added aliases for multiple commands

This commit is contained in:
Brazly
2026-01-16 03:32:02 +00:00
parent 6ff1ab2670
commit 4652c706b9

View File

@@ -62,7 +62,7 @@ func EnterCommand() -> void:
var parts = userInput.split(" ")
match parts[0]:
"ls":
"ls", "list":
var currentDirData
if parts.size() > 1:
currentDirData = GetDirAtPath(directory + parts[1])
@@ -75,7 +75,7 @@ func EnterCommand() -> void:
CreateHistoryEntry(list)
else:
CreateHistoryEntry("error: Directory not found")
"cd":
"cd", "changedirectory":
if parts.size() > 1:
var targetPath = parts[1]
var newDir = ResolvePath(directory, targetPath)
@@ -85,12 +85,12 @@ func EnterCommand() -> void:
CreateHistoryEntry("cd: no such directory: " + targetPath)
else:
directory = "~/"
"cat":
"cat", "view":
if parts.size() > 1:
RetrieveData(parts[1])
else:
CreateHistoryEntry("usage: cat [filename]")
"clear":
"clear", "cls":
for child in historyContainer.get_children():
if child != terminalLine:
child.queue_free()