summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-04-06 23:54:08 +0100
committerRichard Jones <rjones@redhat.com>2010-04-07 12:06:07 +0100
commit4c50f4c38d9a50fbf983c79dd208d1b1598fef8a (patch)
treece781f324d58384eae82845bd828aad839744882 /src
parent2ade61d1f864c75ce65c358e4ac8a012a897b89a (diff)
downloadlibguestfs-4c50f4c38d9a50fbf983c79dd208d1b1598fef8a.tar.gz
libguestfs-4c50f4c38d9a50fbf983c79dd208d1b1598fef8a.tar.xz
libguestfs-4c50f4c38d9a50fbf983c79dd208d1b1598fef8a.zip
fish: Print extended help when the user types an unknown command first.
$ guestfish /tmp/disk.img /tmp/disk.img: unknown command Did you mean to open a disk image? guestfish -a disk.img For a list of commands: guestfish -h For complete documentation: man guestfish
Diffstat (limited to 'src')
-rwxr-xr-xsrc/generator.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml
index f206be1b..416a66fd 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -7403,6 +7403,8 @@ and generate_fish_cmds () =
) all_functions;
pr " {\n";
pr " fprintf (stderr, _(\"%%s: unknown command\\n\"), cmd);\n";
+ pr " if (command_num == 1)\n";
+ pr " extended_help_message ();\n";
pr " return -1;\n";
pr " }\n";
pr " return 0;\n";