mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
TERMINAL: Fix original alias syntax (#545)
This commit is contained in:
@@ -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. ",
|
||||
" ",
|
||||
|
||||
Reference in New Issue
Block a user