blob: 9430b9b43608c49f43afc65a983ad01234eaf4f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
Module Com_Manual
Public Sub Manual(Command As String)
'MAN command starts with this kinda format
'ShiftOS Help Manual
'
''command' Usage: [switch/value if needed]
'
'Summary of the command's action
'
'Example usage : command
NewLine("ShiftOS Help Manual")
NewLine(Nothing)
'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & command.Substring(4)
Dim mancommand As String = Command.Replace("man ", "")
Dim TempUsage As String = "'" & mancommand & "' Usage: "
Select Case mancommand
'In process to convert every command from printing from code to printing from text file
Case "bc"
If Strings.AvailableFeature(9) = "1" Then
TempUsage = TempUsage & "bc"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_bc & Environment.NewLine
NormalCommand()
End If
Case "cd"
If Strings.AvailableFeature(16) = "1" Then
TempUsage = TempUsage & "cd [DIRECTORY]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cd & Environment.NewLine
NormalCommand()
End If
Case "clear"
If Strings.AvailableFeature(1) = "1" Then
TempUsage = TempUsage & "clear"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_clear & Environment.NewLine
NormalCommand()
End If
Case "color"
TempUsage = TempUsage & "color [bg][fg]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_color & Environment.NewLine
NormalCommand()
Case "colors"
TempUsage = TempUsage & "colors"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_colors & Environment.NewLine
NormalCommand()
Case "cowsay"
If Strings.AvailableFeature(22) = 1 Then
TempUsage = TempUsage & "cowsay [STRING]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cowsay & Environment.NewLine
NormalCommand()
End If
Case "codepoint"
TempUsage = TempUsage & "codepoint"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_codepoint & Environment.NewLine
NormalCommand()
Case "del"
If Strings.AvailableFeature(16) = 1 Then
TempUsage = TempUsage & "del [FILENAME.TXT]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_del & Environment.NewLine
NormalCommand()
End If
Case "dir"
If Strings.AvailableFeature(16) = "1" Then
TempUsage = TempUsage & "dir"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_dir & Environment.NewLine
NormalCommand()
End If
Case "guess"
TempUsage = TempUsage & "guess"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_guess & Environment.NewLine
NormalCommand()
Case "help"
TempUsage = TempUsage & "help"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_help & Environment.NewLine
NormalCommand()
Case "hostname"
If Strings.AvailableFeature(20) = 1 Then
TempUsage = TempUsage & "hostname [HOSTNAME]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_hostname & Environment.NewLine
NormalCommand()
End If
Case "infobar"
If Strings.AvailableFeature(4) = 1 Then
TempUsage = TempUsage & "infobar [ON|OFF] [OPTION]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_infobar & Environment.NewLine
NormalCommand()
End If
Case "man"
If Strings.AvailableFeature(0) = "1" Then
TempUsage = TempUsage & "man [command]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_man & Environment.NewLine
NormalCommand()
End If
Case "mkdir"
If Strings.AvailableFeature(16) = "1" Then
TempUsage = TempUsage & "mkdir [DIRECTORY]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_mkdir & Environment.NewLine
NormalCommand()
End If
Case "print"
If Strings.AvailableFeature(2) = "1" Then
TempUsage = TempUsage & "print [text]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_print & Environment.NewLine
NormalCommand()
End If
Case "pwd"
If Strings.AvailableFeature(16) = "1" Then
TempUsage = TempUsage & "pwd"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_pwd & Environment.NewLine
NormalCommand()
End If
Case "reboot"
TempUsage = TempUsage & "reboot"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_reboot & Environment.NewLine
NormalCommand()
Case "rmdir"
If Strings.AvailableFeature(16) = "1" Then
TempUsage = TempUsage & "rmdir [DIRECTORY]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_rmdir & Environment.NewLine
NormalCommand()
End If
Case "shiftfetch"
If Strings.AvailableFeature(8) = "1" Then
TempUsage = TempUsage & "shiftfetch"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftfetch & Environment.NewLine
NormalCommand()
End If
Case "shiftorium"
TempUsage = TempUsage & "shiftorium [option] [featureName]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftorium & Environment.NewLine
NormalCommand()
Case "shutdown"
TempUsage = TempUsage & "shutdown"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shutdown & Environment.NewLine
NormalCommand()
Case "textpad"
If Strings.AvailableFeature(17) = "1" Then
TempUsage = TempUsage & "textpad [FILENAME.TXT]"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_textpad & Environment.NewLine
NormalCommand()
End If
Case "time"
If Strings.AvailableFeature(17) = "1" Then
TempUsage = TempUsage & "time"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_time & Environment.NewLine
NormalCommand()
End If
Case "username"
If Strings.AvailableFeature(19) = "1" Then
TempUsage = TempUsage & "username"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_username & Environment.NewLine
NormalCommand()
End If
Case "unzip"
If Strings.AvailableFeature(33) = "1" Then
TempUsage = TempUsage & "unzip [FILENAME.ZIP]"
'Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_unzip & Environment.NewLine
NormalCommand()
End If
Case "ver"
TempUsage = TempUsage & "ver"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_ver & Environment.NewLine
NormalCommand()
Case "zip"
If Strings.AvailableFeature(32) = "1" Then
TempUsage = TempUsage & "zip [CONTENT TYPE] '[FILENAME.ZIP]' '[CONTENT NAME]'"
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_zip & Environment.NewLine
NormalCommand()
End If
Case Else
NewLine("MAN : Invalid command")
End Select
End Sub
End Module
|