TERMINAL: Fix original alias syntax (#545)

This commit is contained in:
Snarling
2023-05-29 06:54:16 -04:00
committed by omuretsu
parent 7f852373d8
commit 5f2a1c3f27
11 changed files with 48 additions and 23 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
export const TerminalHelpText: string[] = [
"Type 'help name' to learn more about the command ",
" ",
' alias [-g] ["name=value"] Create or display Terminal aliases',
' alias [-g] [name="value"] Create or display Terminal aliases',
" analyze Get information about the current machine ",
" backdoor Install a backdoor on the current machine ",
" buy [-l/-a/program] Purchase a program through the Dark Web",
@@ -69,20 +69,20 @@ const TemplatedHelpTexts: Record<string, (command: string) => string[]> = {
export const HelpTexts: Record<string, string[]> = {
alias: [
'Usage: alias [-g] ["name=value"] ',
'Usage: alias [-g] [name="value"] ',
" ",
"Create or display aliases. An alias enables a replacement of a word with another string. ",
"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME ",
"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, ",
"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: ",
" ",
' alias "nuke=run NUKE.exe"',
' alias nuke="run NUKE.exe"',
" ",
"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. ",
"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For ",
"example, if the following alias was set: ",
" ",
' alias "worm=HTTPWorm.exe"',
' alias worm="HTTPWorm.exe"',
" ",
"and then you tried to run the following terminal command: ",
" ",
@@ -91,7 +91,7 @@ export const HelpTexts: Record<string, string[]> = {
"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted ",
"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: ",
" ",
' alias -g "worm=HTTPWorm.exe"',
' alias -g worm="HTTPWorm.exe"',
" ",
"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. ",
" ",