diff --git a/shiftos_next/Terminal.vb b/shiftos_next/Terminal.vb
index 8a94704..c0e70a3 100644
--- a/shiftos_next/Terminal.vb
+++ b/shiftos_next/Terminal.vb
@@ -1,11 +1,12 @@
Public Class Terminal
+ Public currentdir As String = root
Dim trackpos As Integer = 0
Public Sub terminal_Innitiate(sender As Object, e As EventArgs) Handles MyBase.Load
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.WindowState = FormWindowState.Maximized
- AddLine("user@shiftos ~$> ")
+ AddLine("user@shiftos " & currentdir.ToLower.Replace("c:\shiftos", "~") & "$> ")
SelectBottom()
End Sub
@@ -17,12 +18,49 @@
command = command.ToLower
If command Like "help" Then
ShowHelp()
+ ElseIf command Like "cd *" Then
+ Dim folder As String = command.Replace("cd ", "")
+
+ If folder = ".." Then
+ If currentdir.ToLower = "c:\shiftos" Then
+ AddLine("cd: Error! You are at the root of your drive.")
+ Else
+ currentdir = IO.Directory.GetParent(currentdir).ToString
+ End If
+ Else
+ If IO.Directory.Exists(currentdir + "\" + folder) Then
+ currentdir = currentdir & "\" & folder
+ ElseIf IO.Directory.Exists(folder) Then
+ currentdir = folder
+ Else
+ AddLine("cd: Directory """ & folder & """ doesn't exist.")
+ End If
+ End If
+ ElseIf command = "dir" Or command = "ls" Then
+ AddLine("Type | Name ")
+ AddLine("-------+-------------------------------------------")
+ For Each Dir As String In IO.Directory.GetDirectories(currentdir)
+ Dim dirinf As New IO.DirectoryInfo(Dir)
+ AddLine("[DIR] | " & dirinf.Name)
+ Next
+ For Each file As String In IO.Directory.GetFiles(currentdir)
+ Dim filinf As New IO.FileInfo(file)
+ AddLine(filinf.Extension & " | " & filinf.Name)
+ Next
+ ElseIf command Like "mkdir *" Then
+ Dim foldertomake As String = command.Replace("mkdir ", "")
+ If IO.Directory.Exists(currentdir + "\" + foldertomake) Then
+ AddLine("Directory already exists!")
+ Else
+ IO.Directory.CreateDirectory(currentdir + "\" + foldertomake)
+ AddLine("mkdir: Directory created successfully.")
+ End If
ElseIf command Like "shutdown" Then
Me.Close()
ElseIf command Like "" Then
- 'This is here to make it so that the Terminal doesn't say "Wrong Command" if the user doesn't input anything.
+ 'This is here to make it so that the Terminal doesn't say "Wrong Command" if the user doesn't input anything.
Else
- AddLine("Invalid command! Type ""help"" for a list of commands.")
+ AddLine("Invalid command! Type ""help"" for a list of commands.")
End If
End Sub
@@ -35,6 +73,9 @@
AddLine(" - Terminal commands are case-insensitive.")
AddLine(" - The screen can only display Black and White." & vbNewLine)
AddLine("Commands: " & vbNewLine)
+ AddLine(" - cd: Change to the specified directory.")
+ AddLine(" - mkdir: Create a directory inside the current directory (marked before the %)")
+ AddLine(" - ls, dir: View the contents of the current directory.")
AddLine(" - shutdown: Shuts the system down.")
AddLine(" - help: Shows this screen.")
@@ -109,25 +150,25 @@
If e.KeyCode = Keys.Enter Then
e.SuppressKeyPress = True
- Dim command As String = txtterm.Lines(txtterm.Lines.Length - 1).Replace("user@shiftos ~$> ", "").ToLower
+ Dim command As String = txtterm.Lines(txtterm.Lines.Length - 1).Replace("user@shiftos " & currentdir.ToLower.Replace("c:\shiftos", "~") & "$> ", "").ToLower
Interpret(command)
If command = "clear" Then
- txtterm.Text = "user@shiftos ~$> "
+ txtterm.Text = "user@shiftos " & currentdir.ToLower.Replace("c:\shiftos", "~") & "$> "
txtterm.Select(txtterm.Text.Length, 0)
Else
- AddLine("user@shiftos ~$> ")
+ AddLine("user@shiftos " & currentdir.ToLower.Replace("c:\shiftos", "~") & "$> ")
txtterm.Select(txtterm.Text.Length, 0)
End If
- trackpos = 0
- Else
- If e.KeyCode = Keys.Back Then
+ trackpos = 0
Else
- trackpos = trackpos + 1
+ If e.KeyCode = Keys.Back Then
+ Else
+ trackpos = trackpos + 1
+ End If
End If
- End If
If e.KeyCode = Keys.Back Then
If trackpos < 1 Then
diff --git a/shiftos_next/bin/Debug/shiftos_next.exe b/shiftos_next/bin/Debug/shiftos_next.exe
index 3600d1b..a5bbe22 100644
Binary files a/shiftos_next/bin/Debug/shiftos_next.exe and b/shiftos_next/bin/Debug/shiftos_next.exe differ
diff --git a/shiftos_next/bin/Debug/shiftos_next.pdb b/shiftos_next/bin/Debug/shiftos_next.pdb
index df285b0..86a65d9 100644
Binary files a/shiftos_next/bin/Debug/shiftos_next.pdb and b/shiftos_next/bin/Debug/shiftos_next.pdb differ
diff --git a/shiftos_next/bin/Debug/shiftos_next.vshost.exe.manifest b/shiftos_next/bin/Debug/shiftos_next.vshost.exe.manifest
new file mode 100644
index 0000000..061c9ca
--- /dev/null
+++ b/shiftos_next/bin/Debug/shiftos_next.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/shiftos_next/filesystem.vb b/shiftos_next/filesystem.vb
new file mode 100644
index 0000000..25d2785
--- /dev/null
+++ b/shiftos_next/filesystem.vb
@@ -0,0 +1,19 @@
+Module filesystem
+ 'This module represents the folder structure of the ShiftFS Filesystem.
+
+ Public root As String = "C:\ShiftOS"
+
+ Public home As String = root + "\Home\" 'Inconsistent to fix terminal glitch.
+
+ Public documents As String = home + "Documents\"
+ Public pictures As String = home + "Pictures\"
+ Public music As String = home + "Music\"
+
+ Public systemdir As String = root + "Shiftum42\"
+
+ Public drivers As String = systemdir + "Drivers\"
+
+ Public save As String = drivers + "HDD.dri"
+
+
+End Module
diff --git a/shiftos_next/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/shiftos_next/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index dd12c47..24e97f7 100644
Binary files a/shiftos_next/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/shiftos_next/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/shiftos_next/obj/Debug/shiftos_next.exe b/shiftos_next/obj/Debug/shiftos_next.exe
index 3600d1b..a5bbe22 100644
Binary files a/shiftos_next/obj/Debug/shiftos_next.exe and b/shiftos_next/obj/Debug/shiftos_next.exe differ
diff --git a/shiftos_next/obj/Debug/shiftos_next.pdb b/shiftos_next/obj/Debug/shiftos_next.pdb
index df285b0..86a65d9 100644
Binary files a/shiftos_next/obj/Debug/shiftos_next.pdb and b/shiftos_next/obj/Debug/shiftos_next.pdb differ
diff --git a/shiftos_next/obj/Debug/shiftos_next.vbproj.FileListAbsolute.txt b/shiftos_next/obj/Debug/shiftos_next.vbproj.FileListAbsolute.txt
index 73b207a..0ddd711 100644
--- a/shiftos_next/obj/Debug/shiftos_next.vbproj.FileListAbsolute.txt
+++ b/shiftos_next/obj/Debug/shiftos_next.vbproj.FileListAbsolute.txt
@@ -9,3 +9,14 @@ c:\users\the ultimate hacker\documents\github\ORION\project-orion\shiftos_next\s
c:\users\the ultimate hacker\documents\github\ORION\project-orion\shiftos_next\shiftos_next\obj\Debug\shiftos_next.exe
c:\users\the ultimate hacker\documents\github\ORION\project-orion\shiftos_next\shiftos_next\obj\Debug\shiftos_next.xml
c:\users\the ultimate hacker\documents\github\ORION\project-orion\shiftos_next\shiftos_next\obj\Debug\shiftos_next.pdb
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\bin\Debug\shiftos_next.exe.config
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.exe
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.xml
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.pdb
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.HijackScreen.resources
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.Resources.resources
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.Terminal.resources
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\obj\Debug\shiftos_next.vbproj.GenerateResource.Cache
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\bin\Debug\shiftos_next.exe
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\bin\Debug\shiftos_next.pdb
+C:\Users\The Ultimate Hacker\Documents\shiftos-next\shiftos_next\bin\Debug\shiftos_next.xml
diff --git a/shiftos_next/shiftos_next.vbproj b/shiftos_next/shiftos_next.vbproj
index 5e727d8..adbc449 100644
--- a/shiftos_next/shiftos_next.vbproj
+++ b/shiftos_next/shiftos_next.vbproj
@@ -70,6 +70,7 @@
+
Hijack.vb