Guest User

Untitled

a guest
Jun 19th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. From 7be6e34e0293b7d619c2678403ebcdaae901bb1b Mon Sep 17 00:00:00 2001
  2. Message-Id: <7be6e34e0293b7d619c2678403ebcdaae901bb1b.1288195960.git.quigybo@hotmail.com>
  3. From: Chris van Dijk <quigybo@hotmail.com>
  4. Date: Thu, 28 Oct 2010 01:31:00 +1030
  5. Subject: [PATCH] Add `never' option to --color=[WHEN]
  6.  
  7. ---
  8. README.pod | 4 ++--
  9. cower.c | 4 +++-
  10. 2 files changed, 5 insertions(+), 3 deletions(-)
  11.  
  12. diff --git a/README.pod b/README.pod
  13. index 28fa353..1cdd8f6 100644
  14. --- a/README.pod
  15. +++ b/README.pod
  16. @@ -42,8 +42,8 @@ if any, at the same time.
  17.  
  18. =item B<-c, --color[=WHEN]>
  19.  
  20. -Use colored output. WHEN is `always' or `auto'. Color will be disabled in a pipe unless WHEN
  21. -is set to always.
  22. +Use colored output. WHEN is `never', `always' or `auto'. Color will be disabled in a pipe
  23. +unless WHEN is set to always.
  24.  
  25. =item B<-f, --force>
  26.  
  27. diff --git a/cower.c b/cower.c
  28. index 152db61..e313741 100644
  29. --- a/cower.c
  30. +++ b/cower.c
  31. @@ -104,7 +104,7 @@ Usage: cower [options] <operation> PACKAGE [PACKAGE2..]\n\
  32. --download flag is passed as well,\n\
  33. fetch each available update.\n\n", VERSION);
  34. printf(" General options:\n\
  35. - -c, --color[=WHEN] Use colored output. WHEN is `always' or `auto'.\n\
  36. + -c, --color[=WHEN] Use colored output. WHEN is `never', `always' or `auto'.\n\
  37. -f, --force Overwrite existing files when downloading.\n\
  38. --ignore <pkg> Ignore a package upgrade (can be used more than once)\n\
  39. -h, --help Display this help and exit\n\
  40. @@ -169,6 +169,8 @@ static int parseargs(int argc, char **argv) {
  41. config->color = 0;
  42. } else if (STREQ(optarg, "always"))
  43. config->color = 1;
  44. + else if (STREQ(optarg, "never"))
  45. + config->color = 0;
  46. break;
  47. case 'f':
  48. config->force = 1;
  49. --
  50. 1.7.3.1
Add Comment
Please, Sign In to add comment