From 4258dd667f12ca77a7af971c0d3d2baa90621548 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 6 Nov 2010 15:33:22 +0000 Subject: [PATCH] Document left option and add -l as short option --- ChangeLog | 2 ++ src/xcowsay.c | 6 +++--- xcowsay.6 | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7953693..23069e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ left-handed though bubbles. * src/bubblegen.c (bubble_content_left): Align left-handed text content correctly. + * src/xcowsay.c (main): Add -l option as short form of --left. + * xcowsay.6: Document --left option. * src/xcowsay.c (main): Fix bug with absolute dream image paths. Use realpath(3) to get canonical path. diff --git a/src/xcowsay.c b/src/xcowsay.c index 73a488d..14c1d5e 100644 --- a/src/xcowsay.c +++ b/src/xcowsay.c @@ -105,6 +105,7 @@ static void usage() " -r, --reading-speed=N\t%s\n" " -f, --font=FONT\t%s\n" " -d, --dream=FILE\t%s\n" + " -l, --left\t\t%s\n" " --think\t\t%s\n" " --daemon\t\t%s\n" " --cow-size=SIZE\t%s\n" @@ -113,7 +114,6 @@ static void usage() " --at=X,Y\t\t%s\n" " --bubble-at=X,Y\t%s\n" " --no-wrap\t\t%s\n" - " --left\t\t%s\n" " --config=FILE\t%s\n" " --debug\t\t%s\n\n" "%s\n\n" @@ -128,6 +128,7 @@ static void usage() i18n("Number of milliseconds to delay per word."), i18n("Set message font (Pango format)."), i18n("Display an image instead of text."), + i18n("Make the bubble appear to the left of cow."), i18n("Display a thought bubble rather than a speech bubble."), i18n("Run xcowsay in daemon mode."), i18n("Size of the cow (small, med, large)."), @@ -136,7 +137,6 @@ static void usage() i18n("Force the cow to appear at screen location (X,Y)."), i18n("Change relative position of bubble."), i18n("Disable wrapping if text cannot fit on screen."), - i18n("Make the bubble appear to the left of cow."), i18n("Specify alternative config file."), i18n("Keep daemon attached to terminal."), i18n("Default values for these options can be specified in the " @@ -252,7 +252,7 @@ int main(int argc, char **argv) parse_config_file(); int c, index = 0, failure = 0; - const char *spec = "hvd:rt:f:"; + const char *spec = "hvld:rt:f:"; const char *dream_file = NULL; while ((c = getopt_long(argc, argv, spec, long_options, &index)) != -1) { switch (c) { diff --git a/xcowsay.6 b/xcowsay.6 index d8ae16e..5454b16 100644 --- a/xcowsay.6 +++ b/xcowsay.6 @@ -154,6 +154,10 @@ or .I false to set this explicitly. .TP +.B "-l, --left" +Make the bubble appear on the left hand side of the cow. This is useful +if you are using your own image. +.TP .B "--debug" Print messages about what .B xcowsay -- 2.39.2