Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
c55b2f29
Commit
c55b2f29
authored
2 years ago
by
SteelT
Browse files
Options
Downloads
Patches
Plain Diff
Print list of existing alias commands
parent
9a31064c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!2055
Alias improvements
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/command.c
+12
-0
12 additions, 0 deletions
src/command.c
with
12 additions
and
0 deletions
src/command.c
+
12
−
0
View file @
c55b2f29
...
@@ -681,6 +681,17 @@ static void COM_ExecuteString(char *ptext)
...
@@ -681,6 +681,17 @@ static void COM_ExecuteString(char *ptext)
// SCRIPT COMMANDS
// SCRIPT COMMANDS
// =========================================================================
// =========================================================================
static
void
print_alias
(
void
)
{
cmdalias_t
*
a
;
CONS_Printf
(
"
\x82
""Current alias commands:
\n
"
);
for
(
a
=
com_alias
;
a
;
a
=
a
->
next
)
{
CONS_Printf
(
"%s : %s"
,
a
->
name
,
a
->
value
);
}
}
/** Creates a command name that replaces another command.
/** Creates a command name that replaces another command.
*/
*/
static
void
COM_Alias_f
(
void
)
static
void
COM_Alias_f
(
void
)
...
@@ -692,6 +703,7 @@ static void COM_Alias_f(void)
...
@@ -692,6 +703,7 @@ static void COM_Alias_f(void)
if
(
COM_Argc
()
<
3
)
if
(
COM_Argc
()
<
3
)
{
{
CONS_Printf
(
M_GetText
(
"alias <name> <command>: create a shortcut command that executes other command(s)
\n
"
));
CONS_Printf
(
M_GetText
(
"alias <name> <command>: create a shortcut command that executes other command(s)
\n
"
));
print_alias
();
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment