1[](https://travis-ci.org/jtdaugherty/vty)
3`vty` is a terminal interface library. It provides a high-level
4interface for doing terminal I/O. Vty is supported on GHC versions
10git clone git://github.com/jtdaugherty/vty.git
13Install via `cabal` with:
21* Supports a large number of terminals. vt100, ansi, hurd, linux,
22 screen, etc., or anything with a sufficient terminfo entry.
24* Automatic handling of window resizes.
26* Unicode output on terminals with UTF-8 support.
28* Handles multi-column glyphs. (Requires user to properly configure
31* Efficient output. Output buffering and terminal state changes are
34* Minimizes repaint area, which virtually eliminates the flicker
35 problems that plague ncurses programs.
37* A pure, compositional interface for efficiently constructing display
40* Automatically decodes keyboard keys into (key,[modifier]) tuples.
42* Automatically supports refresh on Ctrl-L.
44* Supports a keypress timeout after for lone ESC. The timeout is
47* The interface is designed for easy extension.
49* Supports ANSI graphics modes (SGR as defined in `console_codes(4)`)
50 with a type-safe interface and graceful fallback for terminals
51 with limited or nonexistent support for such modes.
53* Properly handles cleanup (but not due to signals).
55* Provides a comprehensive test suite.
57* Supports "normal" and "extended" (SGR) mouse modes as described at
58 http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
60* Supports bracketed paste mode as described at
61 http://cirw.in/blog/bracketed-paste
65Vty uses threads internally, so programs made with Vty need to be
66compiled with the threaded runtime using the GHC `-threaded` option.
72Uses terminfo to determine terminal protocol. With some special rules to
73handle some omissions from terminfo.
77Unsupported (but contributions and testing here are very welcome!)
81If you decide to contribute, that's great! Here are some guidelines you
82should consider to make submitting patches easier for all concerned:
84 - If you want to take on big things, talk to me first; let's have a
85 design/vision discussion before you start coding. Create a GitHub
86 issue and we can use that as the place to hash things out.
87 - If you make changes, make them consistent with the syntactic
88 conventions already used in the codebase.
89 - Please provide Haddock documentation for any changes you make.
97After installing `ncurses` to the user environment:
100LIBRARY_PATH=$HOME/.nix-profile/lib/ cabal configure --enable-tests --extra-lib-dirs=$HOME/.nix-profile/lib
101LIBRARY_PATH=$HOME/.nix-profile/lib/ cabal build
102LIBRARY_PATH=$HOME/.nix-profile/lib/ cabal test
107As of last testing, profiling causes issues with coverage when enabled.
108To evaluate coverage, configure as follows:
111rm -rf dist ; cabal configure --enable-tests --enable-library-coverage \
112 --disable-library-profiling \
113 --disable-executable-profiling
119rm -rf dist ; cabal configure --enable-tests --disable-library-coverage \
120 --enable-library-profiling \
121 --enable-executable-profiling
126* Terminals have numerous quirks and bugs. Vty picks what works best for
127 the author in ambiguous or buggy situations.
129* Signal handling of STOP, TERM and INT are nonexistent.
131* The character encoding of the terminal is assumed to be UTF-8 if
134* Terminfo is assumed to be correct unless there is an override
135 configured. Some terminals will not have correct special key support
136 (shifted F10 etc). See `Config` for customizing vty's behavior for a
139* Uses the `TIOCGWINSZ` ioctl to find the current window size, which
140 appears to be limited to Linux and BSD.
144Good sources of documentation for terminal programming are:
146* https://github.com/b4winckler/vim/blob/master/src/term.c
147* http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
148* http://ulisse.elettra.trieste.it/services/doc/serial/config.html
149* http://www.leonerd.org.uk/hacks/hints/xterm-8bit.html
150* http://www.unixwiz.net/techtips/termios-vmin-vtime.html
151* http://vt100.net/docs/vt100-ug/chapter3.html
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list