@@ -50,6 +50,7 @@ typedef struct
5050
5151 int want_full_screen ;
5252 int stdout_isatty ; /* is stdout a terminal? */
53+ int not_a_term ; /* no warning for missing term? */
5354 char_u * term ; /* specified terminal name */
5455#ifdef FEAT_CRYPT
5556 int ask_for_key ; /* -x argument */
@@ -1856,6 +1857,7 @@ command_line_scan(mparm_T *parmp)
18561857 /* "--version" give version message */
18571858 /* "--literal" take files literally */
18581859 /* "--nofork" don't fork */
1860+ /* "--not-a-term" don't warn for not a term */
18591861 /* "--noplugin[s]" skip plugins */
18601862 /* "--cmd <cmd>" execute cmd before vimrc */
18611863 if (STRICMP (argv [0 ] + argv_idx , "help" ) == 0 )
@@ -1883,6 +1885,8 @@ command_line_scan(mparm_T *parmp)
18831885 }
18841886 else if (STRNICMP (argv [0 ] + argv_idx , "noplugin" , 8 ) == 0 )
18851887 p_lpl = FALSE;
1888+ else if (STRNICMP (argv [0 ] + argv_idx , "not-a-term" , 10 ) == 0 )
1889+ parmp -> not_a_term = TRUE;
18861890 else if (STRNICMP (argv [0 ] + argv_idx , "cmd" , 3 ) == 0 )
18871891 {
18881892 want_argument = TRUE;
@@ -2519,7 +2523,7 @@ check_tty(mparm_T *parmp)
25192523 /* don't want the delay when started from the desktop */
25202524 && !gui .starting
25212525#endif
2522- )
2526+ && ! parmp -> not_a_term )
25232527 {
25242528#ifdef NBDEBUG
25252529 /*
@@ -3303,6 +3307,7 @@ usage(void)
33033307 main_msg (_ ("-F\t\t\tStart in Farsi mode" ));
33043308#endif
33053309 main_msg (_ ("-T <terminal>\tSet terminal type to <terminal>" ));
3310+ main_msg (_ ("--not-a-term\t\tSkip warning for input/output not being a terminal" ));
33063311 main_msg (_ ("-u <vimrc>\t\tUse <vimrc> instead of any .vimrc" ));
33073312#ifdef FEAT_GUI
33083313 main_msg (_ ("-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc" ));
0 commit comments