@@ -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 */
@@ -1929,6 +1930,7 @@ command_line_scan(mparm_T *parmp)
19291930 /* "--version" give version message */
19301931 /* "--literal" take files literally */
19311932 /* "--nofork" don't fork */
1933+ /* "--not-a-term" don't warn for not a term */
19321934 /* "--noplugin[s]" skip plugins */
19331935 /* "--cmd <cmd>" execute cmd before vimrc */
19341936 if (STRICMP (argv [0 ] + argv_idx , "help" ) == 0 )
@@ -1956,6 +1958,8 @@ command_line_scan(mparm_T *parmp)
19561958 }
19571959 else if (STRNICMP (argv [0 ] + argv_idx , "noplugin" , 8 ) == 0 )
19581960 p_lpl = FALSE;
1961+ else if (STRNICMP (argv [0 ] + argv_idx , "not-a-term" , 10 ) == 0 )
1962+ parmp -> not_a_term = TRUE;
19591963 else if (STRNICMP (argv [0 ] + argv_idx , "cmd" , 3 ) == 0 )
19601964 {
19611965 want_argument = TRUE;
@@ -2598,7 +2602,7 @@ check_tty(mparm_T *parmp)
25982602 /* don't want the delay when started from the desktop */
25992603 && !gui .starting
26002604#endif
2601- )
2605+ && ! parmp -> not_a_term )
26022606 {
26032607#ifdef NBDEBUG
26042608 /*
@@ -3382,6 +3386,7 @@ usage(void)
33823386 main_msg (_ ("-F\t\t\tStart in Farsi mode" ));
33833387#endif
33843388 main_msg (_ ("-T <terminal>\tSet terminal type to <terminal>" ));
3389+ main_msg (_ ("--not-a-term\t\tSkip warning for input/output not being a terminal" ));
33853390 main_msg (_ ("-u <vimrc>\t\tUse <vimrc> instead of any .vimrc" ));
33863391#ifdef FEAT_GUI
33873392 main_msg (_ ("-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc" ));
0 commit comments