mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pw-cli: add alias in comand help
Add alias to docs and mention alias in help. Fixes #2552
This commit is contained in:
parent
fe5e164876
commit
851bfba6ed
2 changed files with 8 additions and 4 deletions
|
|
@ -34,10 +34,11 @@ Use the 'help' command to list the available commands.
|
||||||
GENERAL COMMANDS
|
GENERAL COMMANDS
|
||||||
================
|
================
|
||||||
|
|
||||||
help
|
help | h
|
||||||
Show a quick help on the commands available.
|
Show a quick help on the commands available. It also lists the aliases
|
||||||
|
for many commands.
|
||||||
|
|
||||||
quit
|
quit | q
|
||||||
Exit from **pw-cli**
|
Exit from **pw-cli**
|
||||||
|
|
||||||
MODULE MANAGEMENT
|
MODULE MANAGEMENT
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,10 @@ static bool do_help(struct data *data, const char *cmd, char *args, char **error
|
||||||
|
|
||||||
printf("Available commands:\n");
|
printf("Available commands:\n");
|
||||||
for (i = 0; i < SPA_N_ELEMENTS(command_list); i++) {
|
for (i = 0; i < SPA_N_ELEMENTS(command_list); i++) {
|
||||||
printf("\t%-20.20s\t%s\n", command_list[i].name, command_list[i].description);
|
char cmd[256];
|
||||||
|
snprintf(cmd, sizeof(cmd), "%s | %s",
|
||||||
|
command_list[i].name, command_list[i].alias);
|
||||||
|
printf("\t%-20.20s\t%s\n", cmd, command_list[i].description);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue