X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=d38d1c1374183d4c4cebd461aaafc59a085bdac6;hb=f323479760ab23755d6b4f27c236befb5a4d6111;hp=b7601b9c5a372641b148ddcd16511bcbaf02913d;hpb=1c6ed48bd3cd471dc6e4613ede9151631e19f55a;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index b7601b9..d38d1c1 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -65,8 +65,10 @@ static void script (int prompt); static void cmdline (char *argv[], int optind, int argc); static void initialize_readline (void); static void cleanup_readline (void); +#ifdef HAVE_LIBREADLINE static void add_history_line (const char *); -static int print_shell_quote (FILE *stream, const char *str); +#endif +static void print_shell_quote (FILE *stream, const char *str); /* Currently open libguestfs handle. */ guestfs_h *g; @@ -1067,16 +1069,8 @@ display_builtin_command (const char *cmd) "\n" " For more advanced image creation, see qemu-img utility.\n" "\n" - " Size can be specified (where means a number):\n" - " number of kilobytes\n" - " eg: 1440 standard 3.5\" floppy\n" - " K or KB number of kilobytes\n" - " M or MB number of megabytes\n" - " G or GB number of gigabytes\n" - " T or TB number of terabytes\n" - " P or PB number of petabytes\n" - " E or EB number of exabytes\n" - " sects number of 512 byte sectors\n")); + " Size can be specified using standard suffixes, eg. '1M'.\n" + )); else if (STRCASEEQ (cmd, "echo")) printf (_("echo - display a line of text\n" " echo [ ...]\n" @@ -1091,7 +1085,7 @@ display_builtin_command (const char *cmd) " This is used to edit a file.\n" "\n" " It is the equivalent of (and is implemented by)\n" - " running \"cat\", editing locally, and then \"write-file\".\n" + " running \"cat\", editing locally, and then \"write\".\n" "\n" " Normally it uses $EDITOR, but if you use the aliases\n" " \"vi\" or \"emacs\" you will get those editors.\n" @@ -1166,16 +1160,8 @@ display_builtin_command (const char *cmd) "\n" " For more advanced image creation, see qemu-img utility.\n" "\n" - " Size can be specified (where means a number):\n" - " number of kilobytes\n" - " eg: 1440 standard 3.5\" floppy\n" - " K or KB number of kilobytes\n" - " M or MB number of megabytes\n" - " G or GB number of gigabytes\n" - " T or TB number of terabytes\n" - " P or PB number of petabytes\n" - " E or EB number of exabytes\n" - " sects number of 512 byte sectors\n")); + " Size can be specified using standard suffixes, eg. '1M'.\n" + )); else if (STRCASEEQ (cmd, "time")) printf (_("time - measure time taken to run command\n" " time [ ...]\n" @@ -1443,14 +1429,14 @@ cleanup_readline (void) #endif } +#ifdef HAVE_LIBREADLINE static void add_history_line (const char *line) { -#ifdef HAVE_LIBREADLINE add_history (line); nr_history_lines++; -#endif } +#endif int xwrite (int fd, const void *v_buf, size_t len)