mirror of
https://github.com/tmux/tmux.git
synced 2025-09-11 22:08:19 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
* List all commands with usages.
|
||||
*/
|
||||
|
||||
enum cmd_retval cmd_list_commands_exec(struct cmd *, struct cmd_ctx *);
|
||||
enum cmd_retval cmd_list_commands_exec(struct cmd *, struct cmd_q *);
|
||||
|
||||
const struct cmd_entry cmd_list_commands_entry = {
|
||||
"list-commands", "lscm",
|
||||
@@ -36,14 +36,20 @@ const struct cmd_entry cmd_list_commands_entry = {
|
||||
cmd_list_commands_exec
|
||||
};
|
||||
|
||||
/* ARGSUSED */
|
||||
enum cmd_retval
|
||||
cmd_list_commands_exec(unused struct cmd *self, struct cmd_ctx *ctx)
|
||||
cmd_list_commands_exec(unused struct cmd *self, struct cmd_q *cmdq)
|
||||
{
|
||||
const struct cmd_entry **entryp;
|
||||
|
||||
for (entryp = cmd_table; *entryp != NULL; entryp++)
|
||||
ctx->print(ctx, "%s %s", (*entryp)->name, (*entryp)->usage);
|
||||
for (entryp = cmd_table; *entryp != NULL; entryp++) {
|
||||
if ((*entryp)->alias != NULL) {
|
||||
cmdq_print(cmdq, "%s (%s) %s", (*entryp)->name,
|
||||
(*entryp)->alias, (*entryp)->usage);
|
||||
} else {
|
||||
cmdq_print(cmdq, "%s %s", (*entryp)->name,
|
||||
(*entryp)->usage);
|
||||
}
|
||||
}
|
||||
|
||||
return (CMD_RETURN_NORMAL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user