Commit Diff


commit - 69924ec3b333c61368c2f5ec82bf542dbff0a929
commit + d08fccd2fe31fb4f2415704ca8e867dc4d2e7480
blob - 2f8dab0975bc6a59cb9fd0f76a534bfac41771c6
blob + 85cbb67964fcb3f76a9e979914871972ab053e0a
--- telescope.1
+++ telescope.1
@@ -20,7 +20,7 @@
 .Sh SYNOPSIS
 .Nm
 .Bk -words
-.Op Fl ChnSv
+.Op Fl hnSv
 .Op Fl c Ar config
 .Op Ar URL
 .Ek
@@ -34,10 +34,6 @@ out-of-band TOFU verification.
 .Pp
 The arguments are as follows:
 .Bl -tag -width xxxxxxxxxxxxx
-.It Fl C , Fl -colours
-Show all available colors and exit.
-This option can also be spelled
-.Fl -colors .
 .It Fl c Ar config
 Specify an alternative configuration file.
 By default
blob - 5be7a5c39e9ff36b14dce25662daf2b6bab164cd
blob + 779cde03dd35d11bc270e4e621a08f79ad0577f1
--- telescope.c
+++ telescope.c
@@ -44,15 +44,13 @@
 #include "utils.h"
 
 static const struct option longopts[] = {
-	{"colors",      no_argument,    NULL,   'C'},
-	{"colours",	no_argument,    NULL,   'C'},
 	{"help",	no_argument,	NULL,	'h'},
 	{"safe",	no_argument,	NULL,	'S'},
 	{"version",	no_argument,	NULL,	'v'},
 	{NULL,		0,		NULL,	0},
 };
 
-static const char *opts = "Cc:hnST:v";
+static const char *opts = "c:hnST:v";
 
 static int	has_url;
 static char	url[GEMINI_URL_LEN];
@@ -1032,8 +1030,6 @@ main(int argc, char * const *argv)
 
 	while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) {
 		switch (ch) {
-		case 'C':
-			exit(ui_print_colors());
 		case 'c':
 			fail = 1;
 			strlcpy(config_path, optarg, sizeof(config_path));
blob - 795da31d0de4937c1a245d5b3064bb1420919f2a
blob + 2c16045881aaa24551c4373ab324470e474c29c0
--- ui.c
+++ ui.c
@@ -1092,48 +1092,6 @@ stop_loading_anim(struct tab *tab)
 	wrefresh(body);
 	if (in_minibuffer)
 		wrefresh(echoarea);
-}
-
-int
-ui_print_colors(void)
-{
-	int colors = 0, pairs = 0, can_change = 0;
-	int columns = 16, lines, color, i, j;
-
-	initscr();
-	if (has_colors()) {
-		start_color();
-		use_default_colors();
-
-		colors = COLORS;
-		pairs = COLOR_PAIRS;
-		can_change = can_change_color();
-	}
-	endwin();
-
-	printf("Term info:\n");
-	printf("TERM=%s COLORS=%d COLOR_PAIRS=%d can_change_colors=%d\n",
-	    getenv("TERM"), colors, pairs, can_change);
-	printf("\n");
-
-	if (colors == 0) {
-		printf("No color support\n");
-		return 0;
-	}
-
-	printf("Available colors:\n\n");
-	lines = (colors - 1) / columns + 1;
-	color = 0;
-	for (i = 0; i < lines; ++i) {
-		for (j = 0; j < columns; ++j, ++color) {
-			printf("\033[0;38;5;%dm %03d", color, color);
-		}
-		printf("\n");
-	}
-
-	printf("\033[0m");
-	fflush(stdout);
-	return 0;
 }
 
 int
blob - fcf976c7f57b6998925409975bc245eb3a05fc5b
blob + 13bb7ca893580b66629601c8000f72aa3c50fa1e
--- ui.h
+++ ui.h
@@ -143,7 +143,6 @@ struct buffer	*current_buffer(void);
 struct vline	*adjust_line(struct vline *, struct buffer *);
 void		 start_loading_anim(struct tab *);
 
-int		 ui_print_colors(void);
 int		 ui_init(void);
 void		 ui_main_loop(void);
 void		 ui_on_tab_loaded(struct tab *);