mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
libast: optget(): emphasis: add screen/tmux, dtterm (re: ec79563b
)
src/lib/libast/misc/optget.c: - Add screen* (which includes tmux) and dtterm* (CDE terminal) to the glob pattern deciding whether to use ANSI boldface sequences. - Don't bother parsing the env var if stderr is not on a terminal. src/cmd/ksh93/sh.1: - Extend self-documentation documentation; document how optget(3) uses the ERROR_OPTIONS env var to control boldface output. - Tweaks and minor edits.
This commit is contained in:
parent
ec79563b8f
commit
a9d77bba40
2 changed files with 32 additions and 16 deletions
|
@ -2546,7 +2546,9 @@ opthelp(const char* oopts, const char* what)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if ((x = getenv("TERM")) && strmatch(x, "(ansi|vt???|xterm|linux|cons|wsvt|sun)*") && isatty(sffileno(sfstderr)))
|
||||
if (isatty(sffileno(sfstderr))
|
||||
&& (x = getenv("TERM"))
|
||||
&& strmatch(x, "(ansi|cons|dtterm|linux|screen|sun|vt???|wsvt|xterm)*"))
|
||||
state.emphasis = 1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue