-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_hbuild.c
More file actions
30 lines (28 loc) · 881 Bytes
/
_hbuild.c
File metadata and controls
30 lines (28 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "holberton.h"
/**
* _hbuild - Print the build
* @command: the command to print
* Return: -19 in exit case, 1 in success, 0 in no exec
*/
int _hbuild(char *command)
{
int i; /* Line printing counter */
char *msg[] = {
"GNU hsh, version 1.0+ - release (x86_64-pc-linux-gnu)\n",
"These shell commands are defined internally. Type 'help' to see this list.\n",
"Type 'help name' to find out more about the function 'name'.\n",
"Use 'info bash' to find out more about the shell in general.\n",
"Use 'man -k' or `info' to find out more about commands not in this list.\n",
"\n",
"A star (*) next to a name means that the command is disabled.\n",
"\n",
"cd [-L|[-P [-e]] [-@]] [dir]\n",
"exit [n]\n",
"help [-dms] [pattern ...]\n",
NULL
};
if (command == NULL)
for (i = 0; msg[i] != NULL; i++)
write(STDOUT_FILENO, msg[i], _strlen(msg[i]));
return (EXIT_SUCCESS);
}