build: reenable "syntax-check" rule: sc_const_long_option
[libguestfs.git] / fish / fish.h
1 /* libguestfs - guestfish shell
2  * Copyright (C) 2009 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #ifndef FISH_H
20 #define FISH_H
21
22 #include <guestfs.h>
23
24 #ifdef HAVE_GETTEXT
25 #include "gettext.h"
26 #define _(str) dgettext(PACKAGE, (str))
27 #define N_(str) dgettext(PACKAGE, (str))
28 #else
29 #define _(str) str
30 #define N_(str) str
31 #endif
32
33 /* in fish.c */
34 extern guestfs_h *g;
35 extern int quit;
36 extern int verbose;
37 extern int issue_command (const char *cmd, char *argv[], const char *pipe);
38 extern void pod2text (const char *name, const char *shortdesc, const char *body);
39 extern void list_builtin_commands (void);
40 extern void display_builtin_command (const char *cmd);
41 extern void free_strings (char **argv);
42 extern int count_strings (char * const * const argv);
43 extern void print_strings (char * const * const argv);
44 extern void print_table (char * const * const argv);
45 extern int launch (guestfs_h *);
46 extern int is_true (const char *str);
47 extern char **parse_string_list (const char *str);
48 extern int xwrite (int fd, const void *buf, size_t len);
49
50 /* in cmds.c (auto-generated) */
51 extern void list_commands (void);
52 extern void display_command (const char *cmd);
53 extern int run_action (const char *cmd, int argc, char *argv[]);
54
55 /* in completion.c (auto-generated) */
56 extern char **do_completion (const char *text, int start, int end);
57
58 /* in destpaths.c */
59 extern int complete_dest_paths;
60 extern char *complete_dest_paths_generator (const char *text, int state);
61
62 /* in alloc.c */
63 extern int do_alloc (const char *cmd, int argc, char *argv[]);
64
65 /* in echo.c */
66 extern int do_echo (const char *cmd, int argc, char *argv[]);
67
68 /* in edit.c */
69 extern int do_edit (const char *cmd, int argc, char *argv[]);
70
71 /* in lcd.c */
72 extern int do_lcd (const char *cmd, int argc, char *argv[]);
73
74 /* in glob.c */
75 extern int do_glob (const char *cmd, int argc, char *argv[]);
76
77 /* in more.c */
78 extern int do_more (const char *cmd, int argc, char *argv[]);
79
80 /* in rc.c (remote control) */
81 extern void rc_listen (void);
82 extern int rc_remote (int pid, const char *cmd, int argc, char *argv[],
83                       int exit_on_error);
84
85 /* in reopen.c */
86 extern int do_reopen (const char *cmd, int argc, char *argv[]);
87
88 /* in time.c */
89 extern int do_time (const char *cmd, int argc, char *argv[]);
90
91 /* in tilde.c */
92 extern char *try_tilde_expansion (char *path);
93
94 /* This should just list all the built-in commands so they can
95  * be added to the generated auto-completion code.
96  */
97 #define BUILTIN_COMMANDS_FOR_COMPLETION \
98   "help",                               \
99   "quit", "exit", "q",                  \
100   "alloc", "allocate",                  \
101   "echo",                               \
102   "edit", "vi", "emacs",                \
103   "lcd",                                \
104   "glob",                               \
105   "more", "less",                       \
106   "reopen",                             \
107   "time"
108
109 #endif /* FISH_H */