summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-12-17 12:27:51 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-12-17 12:27:51 +0100
commite80d6b93a557446a42bf5eb5826798be12c046f0 (patch)
treef5891ced6626ec9aeb8675a05ba73b6078fcc10d /src/core
parent4043ca3d38df247850e3f95fa5b8c3a14140c23e (diff)
downloadweechat-e80d6b93a557446a42bf5eb5826798be12c046f0.zip
Add command line option "-c" (or "--colors") to display default colors in terminal
Diffstat (limited to 'src/core')
-rw-r--r--src/core/weechat.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/weechat.c b/src/core/weechat.c
index 75dac6b3c..8d60ba4a0 100644
--- a/src/core/weechat.c
+++ b/src/core/weechat.c
@@ -110,6 +110,7 @@ weechat_display_usage (char *exec_name)
string_iconv_fprintf (stdout, "\n\n");
string_iconv_fprintf (stdout,
_(" -a, --no-connect disable auto-connect to servers at startup\n"
+ " -c, --colors display default colors in terminal\n"
" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n"
" -h, --help this help\n"
" -k, --keys display WeeChat default keys\n"
@@ -173,7 +174,13 @@ weechat_parse_args (int argc, char *argv[])
for (i = 1; i < argc; i++)
{
- if ((strcmp (argv[i], "-d") == 0)
+ if ((strcmp (argv[i], "-c") == 0)
+ || (strcmp (argv[i], "--colors") == 0))
+ {
+ gui_color_display_terminal_colors ();
+ weechat_shutdown (EXIT_SUCCESS, 0);
+ }
+ else if ((strcmp (argv[i], "-d") == 0)
|| (strcmp (argv[i], "--dir") == 0))
{
if (i + 1 < argc)