summaryrefslogtreecommitdiffstats
path: root/fish/fish.h
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-06-01 16:27:33 +0100
committerRichard Jones <rjones@redhat.com>2010-06-02 13:38:00 +0100
commitf2b7a8e15c49ebc70c7ea56aefb340362aae5a99 (patch)
tree48f68fcd73ac06175b6fff61ffbb9084e99979ff /fish/fish.h
parent9733d4746988b3a072d8bb1daac4b9795b8f4134 (diff)
downloadlibguestfs-f2b7a8e15c49ebc70c7ea56aefb340362aae5a99.tar.gz
libguestfs-f2b7a8e15c49ebc70c7ea56aefb340362aae5a99.tar.xz
libguestfs-f2b7a8e15c49ebc70c7ea56aefb340362aae5a99.zip
fish: help command return error for non-existent commands (RHBZ#597145).
With this change, the exit status indicates error for non-existent commands. $ guestfish -h foo foo: command not known, use -h to list all commands $ echo $? 1 $ guestfish help foo foo: command not known, use -h to list all commands $ echo $? 1
Diffstat (limited to 'fish/fish.h')
-rw-r--r--fish/fish.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fish/fish.h b/fish/fish.h
index b98faf02..9f64979e 100644
--- a/fish/fish.h
+++ b/fish/fish.h
@@ -55,7 +55,7 @@ extern int command_num;
extern int issue_command (const char *cmd, char *argv[], const char *pipe);
extern void pod2text (const char *name, const char *shortdesc, const char *body);
extern void list_builtin_commands (void);
-extern void display_builtin_command (const char *cmd);
+extern int display_builtin_command (const char *cmd);
extern void free_strings (char **argv);
extern int count_strings (char *const *argv);
extern void print_strings (char *const *argv);
@@ -71,7 +71,7 @@ extern void extended_help_message (void);
/* in cmds.c (auto-generated) */
extern void list_commands (void);
-extern void display_command (const char *cmd);
+extern int display_command (const char *cmd);
extern int run_action (const char *cmd, int argc, char *argv[]);
/* in completion.c (auto-generated) */