fish: Deprecate the -D option (prefer --no-dest-paths instead).

This option will now print a warning:
guestfish: warning: -D option is deprecated, use --no-dest-paths instead
This commit is contained in:
Richard W.M. Jones
2013-12-16 15:06:32 +00:00
parent 78b9229bc8
commit d9826467c2
2 changed files with 5 additions and 3 deletions

View File

@@ -194,7 +194,7 @@ main (int argc, char *argv[])
{ "mount", 1, 0, 'm' },
{ "network", 0, 0, 0 },
{ "new", 1, 0, 'N' },
{ "no-dest-paths", 0, 0, 'D' },
{ "no-dest-paths", 0, 0, 0 },
{ "no-sync", 0, 0, 'n' },
{ "pipe-error", 0, 0, 0 },
{ "progress-bars", 0, 0, 0 },
@@ -286,6 +286,8 @@ main (int argc, char *argv[])
} else if (STREQ (long_options[option_index].name, "network")) {
if (guestfs_set_network (g, 1) == -1)
exit (EXIT_FAILURE);
} else if (STREQ (long_options[option_index].name, "no-dest-paths")) {
complete_dest_paths = 0;
} else {
fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
program_name, long_options[option_index].name, option_index);
@@ -306,6 +308,8 @@ main (int argc, char *argv[])
break;
case 'D':
fprintf (stderr, _("%s: warning: -D option is deprecated, use --no-dest-paths instead\n"),
program_name);
complete_dest_paths = 0;
break;

View File

@@ -217,8 +217,6 @@ Using this flag is mostly equivalent to using the C<add-domain> command,
with C<readonly:true> if the I<--ro> flag was given, and
with C<format:...> if the I<--format=...> flag was given.
=item B<-D>
=item B<--no-dest-paths>
Don't tab-complete paths on the guest filesystem. It is useful to be