summaryrefslogtreecommitdiff
path: root/src/bin/tyls.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-07-30 16:31:56 +0200
committerBoris Faure <billiob@gmail.com>2016-07-30 16:31:56 +0200
commit0e0105e55931ab5483668dee9c972e6ec4cec279 (patch)
treeb9a22013eb0dd8f3f9f877813c2e7c26edc5f1a9 /src/bin/tyls.c
parente549612ab27694006317514f1ffb72d0ff28048e (diff)
make ty* fail nicely when in tmux/screen
Diffstat (limited to 'src/bin/tyls.c')
-rw-r--r--src/bin/tyls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/tyls.c b/src/bin/tyls.c
index 8469ff7..9bdd305 100644
--- a/src/bin/tyls.c
+++ b/src/bin/tyls.c
@@ -11,6 +11,7 @@
11#include <unistd.h> 11#include <unistd.h>
12#include <string.h> 12#include <string.h>
13#include <fnmatch.h> 13#include <fnmatch.h>
14#include "tycommon.h"
14 15
15// this code sucks. just letting you know... in advance... in case you 16// this code sucks. just letting you know... in advance... in case you
16// might be tempted to think otherwise... :) 17// might be tempted to think otherwise... :)
@@ -725,8 +726,9 @@ main(int argc, char **argv)
725 char *path; 726 char *path;
726 Eina_List *dirs = NULL; 727 Eina_List *dirs = NULL;
727 Tyls_Options options = {SMALL, EINA_FALSE}; 728 Tyls_Options options = {SMALL, EINA_FALSE};
728 729
729 if (!getenv("TERMINOLOGY")) return 0; 730 ON_NOT_RUNNING_IN_TERMINOLOGY_EXIT_1();
731
730 if ((argc == 2) && (!strcmp(argv[1], "-h"))) 732 if ((argc == 2) && (!strcmp(argv[1], "-h")))
731 { 733 {
732 printf("Usage: %s [-a] [-s|-m] FILE1 [FILE2 ...]\n" 734 printf("Usage: %s [-a] [-s|-m] FILE1 [FILE2 ...]\n"