X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Ffish.c;h=bf82b8af936e39c153f6ba16fc8607a2a9ab2252;hp=e66880f297c4de5da890a2f2d9a56f679d51d09d;hb=394c8bec21d47b74567a4148fdbf87318c301441;hpb=ad8a256f54a6cb99f89bb444c8597a152a793dce diff --git a/fish/fish.c b/fish/fish.c index e66880f..bf82b8a 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -56,7 +56,6 @@ static void interactive (void); static void shell_script (void); static void script (int prompt); static void cmdline (char *argv[], int optind, int argc); -static int issue_command (const char *cmd, char *argv[]); static void initialize_readline (void); static void cleanup_readline (void); static void add_history_line (const char *); @@ -569,7 +568,7 @@ cmdline (char *argv[], int optind, int argc) } } -static int +int issue_command (const char *cmd, char *argv[]) { int argc; @@ -601,6 +600,8 @@ issue_command (const char *cmd, char *argv[]) return do_edit (cmd, argc, argv); else if (strcasecmp (cmd, "lcd") == 0) return do_lcd (cmd, argc, argv); + else if (strcasecmp (cmd, "glob") == 0) + return do_glob (cmd, argc, argv); else return run_action (cmd, argc, argv); } @@ -622,6 +623,8 @@ list_builtin_commands (void) "edit", _("edit a file in the image")); printf ("%-20s %s\n", "lcd", _("local change directory")); + printf ("%-20s %s\n", + "glob", _("expand wildcards in command")); /* actions are printed after this (see list_commands) */ } @@ -676,6 +679,13 @@ display_builtin_command (const char *cmd) " Change guestfish's current directory. This command is\n" " useful if you want to download files to a particular\n" " place.\n")); + else if (strcasecmp (cmd, "glob") == 0) + printf (_("glob - expand wildcards in command\n" + " glob [ ...]\n" + "\n" + " Glob runs with wildcards expanded in any\n" + " command args. Note that the command is run repeatedly\n" + " once for each expanded argument.\n")); else if (strcasecmp (cmd, "help") == 0) printf (_("help - display a list of commands or help on a command\n" " help cmd\n"