I'm finally removing the --reply option to mv and cp. This is in my queue to push very soon:
>From f9e0096c158e95afe8ae1c68ea291981382208a2 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Wed, 8 Oct 2008 08:51:38 +0200 Subject: [PATCH] cp, mv: remove 3-year-deprecated+warned-about --reply option * src/cp.c (reply_args, reply_vals): Remove globals. [REPLY_OPTION]: Remove enum. (long_opts) ["reply"]: Remove initializer. (main): Remove case stmt. * src/mv.c: Likewise. * NEWS (Changes in behavior): Mention this. --- NEWS | 3 +++ src/cp.c | 22 ---------------------- src/mv.c | 23 +---------------------- 3 files changed, 4 insertions(+), 44 deletions(-) diff --git a/NEWS b/NEWS index 360cb4b..f0c5550 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,9 @@ GNU coreutils NEWS -*- outline -*- ** Changes in behavior + cp and mv: the --reply={yes,no,query} option has been removed. + Using it has elicited a warning for the last three years. + ls -l now marks SELinux-only files with the less obtrusive '.', rather than '+'. A file with any other combination of MAC and ACL is still marked with a '+'. diff --git a/src/cp.c b/src/cp.c index 95eba0c..8e34965 100644 --- a/src/cp.c +++ b/src/cp.c @@ -76,7 +76,6 @@ enum NO_PRESERVE_ATTRIBUTES_OPTION, PARENTS_OPTION, PRESERVE_ATTRIBUTES_OPTION, - REPLY_OPTION, SPARSE_OPTION, STRIP_TRAILING_SLASHES_OPTION, UNLINK_DEST_BEFORE_OPENING @@ -108,18 +107,6 @@ static enum Sparse_type const sparse_type[] = }; ARGMATCH_VERIFY (sparse_type_string, sparse_type); -/* Valid arguments to the `--reply' option. */ -static char const* const reply_args[] = -{ - "yes", "no", "query", NULL -}; -/* The values that correspond to the above strings. */ -static int const reply_vals[] = -{ - I_ALWAYS_YES, I_ALWAYS_NO, I_ASK_USER -}; -ARGMATCH_VERIFY (reply_args, reply_vals); - static struct option const long_opts[] = { {"archive", no_argument, NULL, 'a'}, @@ -138,8 +125,6 @@ static struct option const long_opts[] = {"preserve", optional_argument, NULL, PRESERVE_ATTRIBUTES_OPTION}, {"recursive", no_argument, NULL, 'R'}, {"remove-destination", no_argument, NULL, UNLINK_DEST_BEFORE_OPENING}, - {"reply", required_argument, NULL, REPLY_OPTION}, /* Deprecated 2005-07-03, - remove in 2008. */ {"sparse", required_argument, NULL, SPARSE_OPTION}, {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION}, {"suffix", required_argument, NULL, 'S'}, @@ -1001,13 +986,6 @@ main (int argc, char **argv) x.recursive = true; break; - case REPLY_OPTION: /* Deprecated */ - x.interactive = XARGMATCH ("--reply", optarg, - reply_args, reply_vals); - error (0, 0, - _("the --reply option is deprecated; use -i or -f instead")); - break; - case UNLINK_DEST_BEFORE_OPENING: x.unlink_dest_before_opening = true; break; diff --git a/src/mv.c b/src/mv.c index fc255f3..053504d 100644 --- a/src/mv.c +++ b/src/mv.c @@ -52,33 +52,18 @@ non-character as a pseudo short option, starting with CHAR_MAX + 1. */ enum { - REPLY_OPTION = CHAR_MAX + 1, - STRIP_TRAILING_SLASHES_OPTION + STRIP_TRAILING_SLASHES_OPTION = CHAR_MAX + 1 }; /* Remove any trailing slashes from each SOURCE argument. */ static bool remove_trailing_slashes; -/* Valid arguments to the `--reply' option. */ -static char const* const reply_args[] = -{ - "yes", "no", "query", NULL -}; - -/* The values that correspond to the above strings. */ -static int const reply_vals[] = -{ - I_ALWAYS_YES, I_ALWAYS_NO, I_ASK_USER -}; - static struct option const long_options[] = { {"backup", optional_argument, NULL, 'b'}, {"force", no_argument, NULL, 'f'}, {"interactive", no_argument, NULL, 'i'}, {"no-target-directory", no_argument, NULL, 'T'}, - {"reply", required_argument, NULL, REPLY_OPTION}, /* Deprecated 2005-07-03, - remove in 2008. */ {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION}, {"suffix", required_argument, NULL, 'S'}, {"target-directory", required_argument, NULL, 't'}, @@ -390,12 +375,6 @@ main (int argc, char **argv) case 'i': x.interactive = I_ASK_USER; break; - case REPLY_OPTION: /* Deprecated */ - x.interactive = XARGMATCH ("--reply", optarg, - reply_args, reply_vals); - error (0, 0, - _("the --reply option is deprecated; use -i or -f instead")); - break; case STRIP_TRAILING_SLASHES_OPTION: remove_trailing_slashes = true; break; -- 1.6.0.4.1101.g642f8 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils