New API: write for creating files with fixed content (RHBZ#501889).
[libguestfs.git] / fish / fish.c
index a630cdc..a32ed4d 100644 (file)
@@ -65,7 +65,9 @@ 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 *);
+#endif
 static void print_shell_quote (FILE *stream, const char *str);
 
 /* Currently open libguestfs handle. */
@@ -1091,7 +1093,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"
@@ -1443,14 +1445,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)