How to make win32 console recognize ANSI/VT100 escape sequences?

后端 未结 13 1571
忘了有多久
忘了有多久 2020-11-22 03:47

I\'m building a lightweight version of the ncurses library. So far, it works pretty well with VT100-compatible terminals, but win32 console fails to recognise the \\03

13条回答
  •  伪装坚强ぢ
    2020-11-22 04:31

    I personally like clink. It not only processes ANSI codes, it also adds many other features so Windows Console behaves like bash (history, reverse history search, keyboard shortcuts, etc.):

    • The same line editing as Bash (from GNU's Readline library).
    • History persistence between sessions.
    • Context sensitive completion;
      • Executables (and aliases).
      • Directory commands.
      • Environment variables
      • Thirdparty tools; Git, Mercurial, SVN, Go, and P4.
    • New keyboard shortcuts;
      • Paste from clipboard (Ctrl-V).
      • Incremental history search (Ctrl-R/Ctrl-S).
      • Powerful completion (TAB).
      • Undo (Ctrl-Z).
      • Automatic "cd .." (Ctrl-PgUp).
      • Environment variable expansion (Ctrl-Alt-E).
      • (press Alt-H for many more...)
    • Scriptable completion with Lua.
    • Coloured and scriptable prompt.
    • Auto-answering of the "Terminate batch job?" prompt.

提交回复
热议问题