commit 2b1f89306cb04bce40fc6f8ece381ba535e30754 from: Thomas Adam date: Thu Jun 13 21:46:45 2024 UTC feature: remove external-cmd Now that telescope understands mailcap, there's no need for the use of external-cmd any longer. commit - c7c896261dc98b657ecbd219ddaf9f579f8a0f16 commit + 2b1f89306cb04bce40fc6f8ece381ba535e30754 blob - 13220c95e1ac0c13dc33f87674639ee5752ef16f blob + b412c417343219fb305754e53997eaf01ec7e8ef --- defaults.c +++ defaults.c @@ -31,7 +31,6 @@ char *default_protocol = NULL; char *download_path = NULL; -char *external_cmd = NULL; char *new_tab_url = NULL; char *default_search_engine = NULL; @@ -642,17 +641,6 @@ config_setvars(const char *var, char *val) free(download_path); if (asprintf(&download_path, "%s%s%s", prfx, v, sufx) == -1) { download_path = NULL; - return 0; - } - - free(val); - return 1; - } - - if (!strcmp(var, "external-cmd")) { - free(external_cmd); - if (asprintf(&external_cmd, "%s", val) == -1) { - external_cmd = NULL; return 0; } blob - 7e92fa6f65721da39557a0eb7ff0d2a60ddf7659 blob + b860d8acb7d1d179cdbbb5ca9afaee909897795b --- defaults.h +++ defaults.h @@ -20,7 +20,6 @@ extern char *default_protocol; extern char *default_search_engine; extern char *download_path; -extern char *external_cmd; extern char *new_tab_url; extern int autosave; blob - 74324a4cac2d1d487cb2ee459382e253a1092642 blob + 4f3a0398f45f93f1950f0e017d383e69a0d77965 --- telescope.1 +++ telescope.1 @@ -333,14 +333,6 @@ If true, enable colours. Defaults to false if .Ev NO_COLORS is set, true otherwise. -.It Ic external-cmd -.Pq string -The program to run on downloaded/unknown file types. -Assumes the program is in $PATH, unless the full path is given. -Defaults to -.Pa xdg-open . -Note that the file name of the downloaded file is implicitly passed as the -first argument. .It Ic fill-column .Pq integer If greater than zero, lines of text will be formatted in a way that blob - bfcedcfedceee6174d1bdf752dac1317d66516e9 blob + f09c9ded06f3ae03d9b9b7d6b0c8d2e27a05511f --- telescope.c +++ telescope.c @@ -1148,10 +1148,6 @@ main(int argc, char * const *argv) if (download_path == NULL && (download_path = strdup("/tmp/")) == NULL) - errx(1, "strdup"); - - if (external_cmd == NULL && - (external_cmd = strdup("xdg-open")) == NULL) errx(1, "strdup"); if (argc != 0) {