mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 03:13:37 +08:00
1b71f91a01
darcs-hash:20061117162438-ac50b-5c4c7f0bd8bf53a16e16ecfead9569e642b7160f.gz
23 lines
356 B
C
23 lines
356 B
C
|
|
/** \file print_help.c
|
|
Print help message for the specified command
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
|
|
#include "print_help.h"
|
|
|
|
#define CMD_LEN 1024
|
|
|
|
void print_help( char *c, int fd )
|
|
{
|
|
char cmd[ CMD_LEN];
|
|
int printed = snprintf( cmd, CMD_LEN, "fish -c '__fish_print_help %s >&%d'", c, fd );
|
|
|
|
if( printed < CMD_LEN )
|
|
system( cmd );
|
|
|
|
}
|