├── .DS_Store ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── README.md ├── docs ├── .DS_Store ├── edit.png ├── hash.png └── list.png ├── main.go ├── redis-api └── redis.go └── vendor ├── github.com ├── gdamore │ ├── encoding │ │ ├── .appveyor.yml │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ascii.go │ │ ├── charmap.go │ │ ├── doc.go │ │ ├── ebcdic.go │ │ ├── latin1.go │ │ ├── latin5.go │ │ └── utf8.go │ └── tcell │ │ ├── .appveyor.yml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── attr.go │ │ ├── cell.go │ │ ├── charset_stub.go │ │ ├── charset_unix.go │ │ ├── charset_windows.go │ │ ├── color.go │ │ ├── colorfit.go │ │ ├── console_stub.go │ │ ├── console_win.go │ │ ├── database.json │ │ ├── doc.go │ │ ├── encoding.go │ │ ├── errors.go │ │ ├── event.go │ │ ├── interrupt.go │ │ ├── key.go │ │ ├── mouse.go │ │ ├── resize.go │ │ ├── runes.go │ │ ├── screen.go │ │ ├── simulation.go │ │ ├── style.go │ │ ├── terminfo │ │ ├── .gitignore │ │ ├── TERMINALS.md │ │ ├── mkdatabase.sh │ │ ├── mkinfo.go │ │ ├── models.txt │ │ ├── term_Eterm.go │ │ ├── term_Eterm_256color.go │ │ ├── term_adm3a.go │ │ ├── term_aixterm.go │ │ ├── term_ansi.go │ │ ├── term_aterm.go │ │ ├── term_beterm.go │ │ ├── term_bsdos_pc.go │ │ ├── term_cygwin.go │ │ ├── term_d200.go │ │ ├── term_d210.go │ │ ├── term_dtterm.go │ │ ├── term_gnome.go │ │ ├── term_gnome_256color.go │ │ ├── term_hpterm.go │ │ ├── term_hz1500.go │ │ ├── term_konsole.go │ │ ├── term_konsole_256color.go │ │ ├── term_kterm.go │ │ ├── term_linux.go │ │ ├── term_pcansi.go │ │ ├── term_rxvt.go │ │ ├── term_rxvt_256color.go │ │ ├── term_rxvt_unicode.go │ │ ├── term_rxvt_unicode_256color.go │ │ ├── term_screen.go │ │ ├── term_screen_256color.go │ │ ├── term_st.go │ │ ├── term_st_meta.go │ │ ├── term_st_meta_256color.go │ │ ├── term_st_meta_truecolor.go │ │ ├── term_st_truecolor.go │ │ ├── term_sun.go │ │ ├── term_sun_color.go │ │ ├── term_tvi910.go │ │ ├── term_tvi912.go │ │ ├── term_tvi921.go │ │ ├── term_tvi925.go │ │ ├── term_tvi950.go │ │ ├── term_tvi970.go │ │ ├── term_vt100.go │ │ ├── term_vt102.go │ │ ├── term_vt220.go │ │ ├── term_vt320.go │ │ ├── term_vt400.go │ │ ├── term_vt420.go │ │ ├── term_vt52.go │ │ ├── term_wy50.go │ │ ├── term_wy60.go │ │ ├── term_wy99_ansi.go │ │ ├── term_wy99a_ansi.go │ │ ├── term_xfce.go │ │ ├── term_xnuppc.go │ │ ├── term_xterm.go │ │ ├── term_xterm_256color.go │ │ ├── term_xterm_truecolor.go │ │ └── terminfo.go │ │ ├── tscreen.go │ │ ├── tscreen_bsd.go │ │ ├── tscreen_linux.go │ │ ├── tscreen_posix.go │ │ ├── tscreen_stub.go │ │ └── tscreen_windows.go ├── gomodule │ └── redigo │ │ ├── LICENSE │ │ ├── internal │ │ └── commandinfo.go │ │ └── redis │ │ ├── conn.go │ │ ├── doc.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── go18.go │ │ ├── log.go │ │ ├── pool.go │ │ ├── pool17.go │ │ ├── pubsub.go │ │ ├── redis.go │ │ ├── reply.go │ │ ├── scan.go │ │ └── script.go ├── lucasb-eyer │ └── go-colorful │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── colorgens.go │ │ ├── colors.go │ │ ├── happy_palettegen.go │ │ ├── hexcolor.go │ │ ├── soft_palettegen.go │ │ └── warm_palettegen.go ├── mattn │ └── go-runewidth │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.mkd │ │ ├── runewidth.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ └── runewidth_windows.go ├── renstrom │ └── fuzzysearch │ │ ├── LICENSE │ │ └── fuzzy │ │ ├── fuzzy.go │ │ └── levenshtein.go └── rivo │ └── tview │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── LICENSE.txt │ ├── README.md │ ├── ansii.go │ ├── application.go │ ├── box.go │ ├── button.go │ ├── checkbox.go │ ├── doc.go │ ├── dropdown.go │ ├── flex.go │ ├── focusable.go │ ├── form.go │ ├── frame.go │ ├── grid.go │ ├── inputfield.go │ ├── list.go │ ├── modal.go │ ├── pages.go │ ├── primitive.go │ ├── styles.go │ ├── table.go │ ├── textview.go │ ├── tview.gif │ └── util.go └── golang.org └── x └── text ├── AUTHORS ├── CONTRIBUTORS ├── LICENSE ├── PATENTS ├── encoding ├── encoding.go └── internal │ └── identifier │ ├── gen.go │ ├── identifier.go │ └── mib.go ├── internal └── gen │ ├── code.go │ └── gen.go ├── transform └── transform.go └── unicode └── cldr ├── base.go ├── cldr.go ├── collate.go ├── decode.go ├── makexml.go ├── resolve.go ├── slice.go └── xml.go /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishm/redis-terminal/68324e971e582b0d3bccedd82103e81ecf54f595/.DS_Store -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | education, socio-economic status, nationality, personal appearance, race, 10 | religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at nitish.malhotra@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Update the README.md with details of changes to the interface, this includes new environment 13 | variables, exposed ports, useful file locations and container parameters. 14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this 15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you 17 | do not have permission to do that, you may request the second reviewer to merge it for you. -------------------------------------------------------------------------------- /Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | branch = "master" 6 | name = "github.com/gdamore/encoding" 7 | packages = ["."] 8 | revision = "b23993cbb6353f0e6aa98d0ee318a34728f628b9" 9 | 10 | [[projects]] 11 | name = "github.com/gdamore/tcell" 12 | packages = [ 13 | ".", 14 | "terminfo" 15 | ] 16 | revision = "061d51a604c546b48e92253cb65190d76cecf4c6" 17 | version = "v1.0.0" 18 | 19 | [[projects]] 20 | name = "github.com/gomodule/redigo" 21 | packages = [ 22 | "internal", 23 | "redis" 24 | ] 25 | revision = "9c11da706d9b7902c6da69c592f75637793fe121" 26 | version = "v2.0.0" 27 | 28 | [[projects]] 29 | branch = "master" 30 | name = "github.com/lucasb-eyer/go-colorful" 31 | packages = ["."] 32 | revision = "fa0f842f26263fb2ace6d6118309c8481e029fc1" 33 | 34 | [[projects]] 35 | name = "github.com/mattn/go-runewidth" 36 | packages = ["."] 37 | revision = "9e777a8366cce605130a531d2cd6363d07ad7317" 38 | version = "v0.0.2" 39 | 40 | [[projects]] 41 | name = "github.com/renstrom/fuzzysearch" 42 | packages = ["fuzzy"] 43 | revision = "d4ca9dfccd55dc6b076f9880d49c35315922c1f4" 44 | version = "v1.0.0" 45 | 46 | [[projects]] 47 | branch = "master" 48 | name = "github.com/rivo/tview" 49 | packages = ["."] 50 | revision = "7afc7ac89311a37e5ab380186fcfb27bac753c06" 51 | 52 | [[projects]] 53 | name = "golang.org/x/text" 54 | packages = [ 55 | "encoding", 56 | "encoding/internal/identifier", 57 | "internal/gen", 58 | "transform", 59 | "unicode/cldr" 60 | ] 61 | revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" 62 | version = "v0.3.0" 63 | 64 | [solve-meta] 65 | analyzer-name = "dep" 66 | analyzer-version = 1 67 | inputs-digest = "55a50d46a9e253de3cd4c05fc4be5dbfa2eb976350c4b21764d468f1174ee531" 68 | solver-name = "gps-cdcl" 69 | solver-version = 1 70 | -------------------------------------------------------------------------------- /Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | # 22 | # [prune] 23 | # non-go = false 24 | # go-tests = true 25 | # unused-packages = true 26 | 27 | 28 | [prune] 29 | go-tests = true 30 | unused-packages = true 31 | 32 | [[constraint]] 33 | branch = "master" 34 | name = "github.com/rivo/tview" 35 | 36 | [[constraint]] 37 | name = "github.com/gomodule/redigo" 38 | version = "2.0.0" 39 | [[constraint]] 40 | name = "github.com/renstrom/fuzzysearch" 41 | version = "1.0.0" 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2018] [Nitish Malhotra] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # redis-terminal : A terminal based redis browser and editor. 2 | Redis terminal provides a terminal based redis browser, modeled after the likes of [redis-commander](http://joeferner.github.io/redis-commander/), but with much more functionality. 3 | 4 | > **IN CONSTRUCTION** 5 | > *Keep watching this space for some EPIC functionality.* 6 | 7 | ## Installation 8 | go get github.com/nitishm/redis-terminal 9 | 10 | ## Task List 11 | - [] Support for multiple database connections. 12 | - [] Support for [rejson.io](https://oss.redislabs.com/rejson/) 13 | 14 | ## Usage 15 | ``` 16 | go build -o redis-term main.go 17 | ./redis-term 18 | ``` 19 | ## Screen shots 20 | ### Preview 21 | Hash 22 | --- 23 | ![alt text](https://github.com/nitishm/redis-terminal/blob/master/docs/hash.png) 24 | 25 | List 26 | --- 27 | ![alt text](https://github.com/nitishm/redis-terminal/blob/master/docs/list.png) 28 | 29 | ### Edit 30 | ![alt text](https://github.com/nitishm/redis-terminal/blob/master/docs/edit.png) -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishm/redis-terminal/68324e971e582b0d3bccedd82103e81ecf54f595/docs/.DS_Store -------------------------------------------------------------------------------- /docs/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishm/redis-terminal/68324e971e582b0d3bccedd82103e81ecf54f595/docs/edit.png -------------------------------------------------------------------------------- /docs/hash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishm/redis-terminal/68324e971e582b0d3bccedd82103e81ecf54f595/docs/hash.png -------------------------------------------------------------------------------- /docs/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishm/redis-terminal/68324e971e582b0d3bccedd82103e81ecf54f595/docs/list.png -------------------------------------------------------------------------------- /redis-api/redis.go: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) [2018] [Nitish Malhotra] 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | package redisapi 25 | 26 | import ( 27 | "encoding/json" 28 | "fmt" 29 | "time" 30 | 31 | "github.com/gomodule/redigo/redis" 32 | ) 33 | 34 | type Redis struct { 35 | pool *redis.Pool 36 | } 37 | 38 | func NewRedis(server string) (r *Redis, err error) { 39 | p := &redis.Pool{ 40 | MaxIdle: 3, 41 | IdleTimeout: 240 * time.Second, 42 | Dial: func() (redis.Conn, error) { 43 | c, err := redis.Dial("tcp", server) 44 | if err != nil { 45 | return nil, err 46 | } 47 | return c, err 48 | }, 49 | TestOnBorrow: func(c redis.Conn, t time.Time) error { 50 | _, err := c.Do("PING") 51 | return err 52 | }, 53 | } 54 | r = &Redis{p} 55 | return 56 | } 57 | 58 | func (r *Redis) GetKeys(pattern string) (keys []string, err error) { 59 | conn := r.pool.Get() 60 | 61 | iter := 0 62 | for { 63 | arr, err := redis.Values(conn.Do("SCAN", iter, "MATCH", pattern)) 64 | if err != nil { 65 | return keys, fmt.Errorf("error retrieving '%s' keys", pattern) 66 | } 67 | 68 | iter, _ = redis.Int(arr[0], nil) 69 | k, _ := redis.Strings(arr[1], nil) 70 | keys = append(keys, k...) 71 | 72 | if iter == 0 { 73 | break 74 | } 75 | } 76 | 77 | return keys, nil 78 | } 79 | 80 | func (r *Redis) GetValue(key string) (v interface{}, err error) { 81 | conn := r.pool.Get() 82 | t, err := r.GetType(key) 83 | if err != nil { 84 | return 85 | } 86 | 87 | switch t { 88 | case "hash": 89 | v, err = redis.StringMap(conn.Do("HGETALL", key)) 90 | if err != nil { 91 | return "", err 92 | } 93 | case "list": 94 | v, err = redis.Strings(conn.Do("LRANGE", key, 0, -1)) 95 | if err != nil { 96 | return "", err 97 | } 98 | case "string": 99 | v, err = redis.String(conn.Do("GET", key)) 100 | if err != nil { 101 | return "", err 102 | } 103 | default: 104 | fmt.Printf("Case not supported") 105 | return 106 | } 107 | return 108 | } 109 | 110 | func (r *Redis) GetType(key string) (t string, err error) { 111 | conn := r.pool.Get() 112 | return redis.String(conn.Do("TYPE", key)) 113 | } 114 | 115 | func PrintKey(r *Redis, key string) (s string, err error) { 116 | v, err := r.GetValue(key) 117 | if err != nil { 118 | return 119 | } 120 | 121 | b, err := json.MarshalIndent(v, "[green]", "\t") 122 | if err != nil { 123 | return 124 | } 125 | s = "[green]" + string(b) 126 | 127 | return 128 | } 129 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/.appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | clone_folder: c:\gopath\src\github.com\gdamore\encoding 3 | environment: 4 | GOPATH: c:\gopath 5 | build_script: 6 | - go version 7 | - go env 8 | - SET PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;%PATH% 9 | - go get -t ./... 10 | - go build 11 | - go install ./... 12 | test_script: 13 | - go test ./... 14 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.5 6 | - tip 7 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/README.md: -------------------------------------------------------------------------------- 1 | ## encoding 2 | 3 | [![Linux Status](https://img.shields.io/travis/gdamore/encoding.svg?label=linux)](https://travis-ci.org/gdamore/encoding) 4 | [![Windows Status](https://img.shields.io/appveyor/ci/gdamore/encoding.svg?label=windows)](https://ci.appveyor.com/project/gdamore/encoding) 5 | [![Apache License](https://img.shields.io/badge/license-APACHE2-blue.svg)](https://github.com/gdamore/encoding/blob/master/LICENSE) 6 | [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/gdamore/encoding) 7 | [![Go Report Card](http://goreportcard.com/badge/gdamore/encoding)](http://goreportcard.com/report/gdamore/encoding) 8 | 9 | Package encoding provides a number of encodings that are missing from the 10 | standard Go [encoding]("https://godoc.org/golang.org/x/text/encoding") package. 11 | 12 | We hope that we can contribute these to the standard Go library someday. It 13 | turns out that some of these are useful for dealing with I/O streams coming 14 | from non-UTF friendly sources. 15 | 16 | The UTF8 Encoder is also useful for situations where valid UTF-8 might be 17 | carried in streams that contain non-valid UTF; in particular I use it for 18 | helping me cope with terminals that embed escape sequences in otherwise 19 | valid UTF-8. 20 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/ascii.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Garrett D'Amore 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package encoding 16 | 17 | import ( 18 | "golang.org/x/text/encoding" 19 | ) 20 | 21 | // ASCII represents the 7-bit US-ASCII scheme. It decodes directly to 22 | // UTF-8 without change, as all ASCII values are legal UTF-8. 23 | // Unicode values less than 128 (i.e. 7 bits) map 1:1 with ASCII. 24 | // It encodes runes outside of that to 0x1A, the ASCII substitution character. 25 | var ASCII encoding.Encoding 26 | 27 | func init() { 28 | amap := make(map[byte]rune) 29 | for i := 128; i <= 255; i++ { 30 | amap[byte(i)] = RuneError 31 | } 32 | 33 | cm := &Charmap{Map: amap} 34 | cm.Init() 35 | ASCII = cm 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Garrett D'Amore 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package encoding provides a few of the encoding structures that are 16 | // missing from the Go x/text/encoding tree. 17 | package encoding 18 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/latin1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Garrett D'Amore 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package encoding 16 | 17 | import ( 18 | "golang.org/x/text/encoding" 19 | ) 20 | 21 | // ISO8859_1 represents the 8-bit ISO8859-1 scheme. It decodes directly to 22 | // UTF-8 without change, as all ISO8859-1 values are legal UTF-8. 23 | // Unicode values less than 256 (i.e. 8 bits) map 1:1 with 8859-1. 24 | // It encodes runes outside of that to 0x1A, the ASCII substitution character. 25 | var ISO8859_1 encoding.Encoding 26 | 27 | func init() { 28 | cm := &Charmap{} 29 | cm.Init() 30 | 31 | // 8859-1 is the 8-bit identity map for Unicode. 32 | ISO8859_1 = cm 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/latin5.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Garrett D'Amore 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package encoding 16 | 17 | import ( 18 | "golang.org/x/text/encoding" 19 | ) 20 | 21 | // ISO8859_9 represents the 8-bit ISO8859-9 scheme. 22 | var ISO8859_9 encoding.Encoding 23 | 24 | func init() { 25 | cm := &Charmap{Map: map[byte]rune{ 26 | 0xD0: 'Ğ', 27 | 0xDD: 'İ', 28 | 0xDE: 'Ş', 29 | 0xF0: 'ğ', 30 | 0xFD: 'ı', 31 | 0xFE: 'ş', 32 | }} 33 | cm.Init() 34 | ISO8859_9 = cm 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/encoding/utf8.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Garrett D'Amore 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package encoding 16 | 17 | import ( 18 | "golang.org/x/text/encoding" 19 | ) 20 | 21 | type validUtf8 struct{} 22 | 23 | // UTF8 is an encoding for UTF-8. All it does is verify that the UTF-8 24 | // in is valid. The main reason for its existence is that it will detect 25 | // and report ErrSrcShort or ErrDstShort, whereas the Nop encoding just 26 | // passes every byte, blithely. 27 | var UTF8 encoding.Encoding = validUtf8{} 28 | 29 | func (validUtf8) NewDecoder() *encoding.Decoder { 30 | return &encoding.Decoder{Transformer: encoding.UTF8Validator} 31 | } 32 | 33 | func (validUtf8) NewEncoder() *encoding.Encoder { 34 | return &encoding.Encoder{Transformer: encoding.UTF8Validator} 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/.appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | clone_folder: c:\gopath\src\github.com\gdamore\tcell 3 | environment: 4 | GOPATH: c:\gopath 5 | build_script: 6 | - go version 7 | - go env 8 | - SET PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;%PATH% 9 | - go get -t ./... 10 | - go build 11 | - go install ./... 12 | test_script: 13 | - go test ./... 14 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.txt 2 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.5.x 5 | - 1.6.x 6 | - 1.7.x 7 | - 1.8.x 8 | - master 9 | 10 | before_install: 11 | - go get -t -v ./... 12 | 13 | script: 14 | - go test -race -coverprofile=coverage.txt -covermode=atomic 15 | 16 | after_success: 17 | - bash <(curl -s https://codecov.io/bash) 18 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/AUTHORS: -------------------------------------------------------------------------------- 1 | Garrett D'Amore 2 | Zachary Yedidia 3 | Junegunn Choi 4 | Staysail Systems, Inc. 5 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/attr.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | // AttrMask represents a mask of text attributes, apart from color. 18 | // Note that support for attributes may vary widely across terminals. 19 | type AttrMask int 20 | 21 | // Attributes are not colors, but affect the display of text. They can 22 | // be combined. 23 | const ( 24 | AttrBold AttrMask = 1 << (25 + iota) 25 | AttrBlink 26 | AttrReverse 27 | AttrUnderline 28 | AttrDim 29 | AttrNone AttrMask = 0 // Just normal text. 30 | ) 31 | 32 | const attrAll = AttrBold | AttrBlink | AttrReverse | AttrUnderline | AttrDim 33 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/charset_stub.go: -------------------------------------------------------------------------------- 1 | // +build plan9 nacl 2 | 3 | // Copyright 2015 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | func getCharset() string { 20 | return "" 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/charset_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!nacl,!plan9 2 | 3 | // Copyright 2016 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | import ( 20 | "os" 21 | "strings" 22 | ) 23 | 24 | func getCharset() string { 25 | // Determine the character set. This can help us later. 26 | // Per POSIX, we search for LC_ALL first, then LC_CTYPE, and 27 | // finally LANG. First one set wins. 28 | locale := "" 29 | if locale = os.Getenv("LC_ALL"); locale == "" { 30 | if locale = os.Getenv("LC_CTYPE"); locale == "" { 31 | locale = os.Getenv("LANG") 32 | } 33 | } 34 | if locale == "POSIX" || locale == "C" { 35 | return "US-ASCII" 36 | } 37 | if i := strings.IndexRune(locale, '@'); i >= 0 { 38 | locale = locale[:i] 39 | } 40 | if i := strings.IndexRune(locale, '.'); i >= 0 { 41 | locale = locale[i+1:] 42 | } else { 43 | // Default assumption, and on Linux we can see LC_ALL 44 | // without a character set, which we assume implies UTF-8. 45 | return "UTF-8" 46 | } 47 | // XXX: add support for aliases 48 | return locale 49 | } 50 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/charset_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | // Copyright 2015 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | func getCharset() string { 20 | return "UTF-16" 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/colorfit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | import ( 18 | "github.com/lucasb-eyer/go-colorful" 19 | "math" 20 | ) 21 | 22 | // FindColor attempts to find a given color, or the best match possible for it, 23 | // from the palette given. This is an expensive operation, so results should 24 | // be cached by the caller. 25 | func FindColor(c Color, palette []Color) Color { 26 | match := ColorDefault 27 | dist := float64(0) 28 | r, g, b := c.RGB() 29 | c1 := colorful.Color{ 30 | R: float64(r) / 255.0, 31 | G: float64(g) / 255.0, 32 | B: float64(b) / 255.0, 33 | } 34 | for _, d := range palette { 35 | r, g, b = d.RGB() 36 | c2 := colorful.Color{ 37 | R: float64(r) / 255.0, 38 | G: float64(g) / 255.0, 39 | B: float64(b) / 255.0, 40 | } 41 | // CIE94 is more accurate, but really really expensive. 42 | nd := c1.DistanceCIE76(c2) 43 | if math.IsNaN(nd) { 44 | nd = math.Inf(1) 45 | } 46 | if match == ColorDefault || nd < dist { 47 | match = d 48 | dist = nd 49 | } 50 | } 51 | return match 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/console_stub.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | // Copyright 2015 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | // NewConsoleScreen returns a console based screen. This platform 20 | // doesn't have support for any, so it returns nil and a suitable error. 21 | func NewConsoleScreen() (Screen, error) { 22 | return nil, ErrNoScreen 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package tcell provides a lower-level, portable API for building 16 | // programs that interact with terminals or consoles. It works with 17 | // both common (and many uncommon!) terminals or terminal emulators, 18 | // and Windows console implementations. 19 | // 20 | // It provides support for up to 256 colors, text attributes, and box drawing 21 | // elements. A database of terminals built from a real terminfo database 22 | // is provided, along with code to generate new database entries. 23 | // 24 | // Tcell offers very rich support for mice, dependent upon the terminal 25 | // of course. (Windows, XTerm, and iTerm 2 are known to work very well.) 26 | // 27 | // If the environment is not Unicode by default, such as an ISO8859 based 28 | // locale or GB18030, Tcell can convert input and outupt, so that your 29 | // terminal can operate in whatever locale is most convenient, while the 30 | // application program can just assume "everything is UTF-8". Reasonable 31 | // defaults are used for updating characters to something suitable for 32 | // display. Unicode box drawing characters will be converted to use the 33 | // alternate character set of your terminal, if native conversions are 34 | // not available. If no ACS is available, then some ASCII fallbacks will 35 | // be used. 36 | // 37 | // A rich set of keycodes is supported, with support for up to 65 function 38 | // keys, and various other special keys. 39 | // 40 | package tcell 41 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | import ( 18 | "errors" 19 | "time" 20 | 21 | "github.com/gdamore/tcell/terminfo" 22 | ) 23 | 24 | var ( 25 | // ErrTermNotFound indicates that a suitable terminal entry could 26 | // not be found. This can result from either not having TERM set, 27 | // or from the TERM failing to support certain minimal functionality, 28 | // in particular absolute cursor addressability (the cup capability) 29 | // is required. For example, legacy "adm3" lacks this capability, 30 | // whereas the slightly newer "adm3a" supports it. This failure 31 | // occurs most often with "dumb". 32 | ErrTermNotFound = terminfo.ErrTermNotFound 33 | 34 | // ErrNoScreen indicates that no suitable screen could be found. 35 | // This may result from attempting to run on a platform where there 36 | // is no support for either termios or console I/O (such as nacl), 37 | // or from running in an environment where there is no access to 38 | // a suitable console/terminal device. (For example, running on 39 | // without a controlling TTY or with no /dev/tty on POSIX platforms.) 40 | ErrNoScreen = errors.New("no suitable screen available") 41 | 42 | // ErrNoCharset indicates that the locale environment the 43 | // program is not supported by the program, because no suitable 44 | // encoding was found for it. This problem never occurs if 45 | // the environment is UTF-8 or UTF-16. 46 | ErrNoCharset = errors.New("character set not supported") 47 | 48 | // ErrEventQFull indicates that the event queue is full, and 49 | // cannot accept more events. 50 | ErrEventQFull = errors.New("event queue full") 51 | ) 52 | 53 | // An EventError is an event representing some sort of error, and carries 54 | // an error payload. 55 | type EventError struct { 56 | t time.Time 57 | err error 58 | } 59 | 60 | // When returns the time when the event was created. 61 | func (ev *EventError) When() time.Time { 62 | return ev.t 63 | } 64 | 65 | // Error implements the error. 66 | func (ev *EventError) Error() string { 67 | return ev.err.Error() 68 | } 69 | 70 | // NewEventError creates an ErrorEvent with the given error payload. 71 | func NewEventError(err error) *EventError { 72 | return &EventError{t: time.Now(), err: err} 73 | } 74 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/event.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | import ( 18 | "time" 19 | ) 20 | 21 | // Event is a generic interface used for passing around Events. 22 | // Concrete types follow. 23 | type Event interface { 24 | // When reports the time when the event was generated. 25 | When() time.Time 26 | } 27 | 28 | // EventTime is a simple base event class, suitable for easy reuse. 29 | // It can be used to deliver actual timer events as well. 30 | type EventTime struct { 31 | when time.Time 32 | } 33 | 34 | // When returns the time stamp when the event occurred. 35 | func (e *EventTime) When() time.Time { 36 | return e.when 37 | } 38 | 39 | // SetEventTime sets the time of occurrence for the event. 40 | func (e *EventTime) SetEventTime(t time.Time) { 41 | e.when = t 42 | } 43 | 44 | // SetEventNow sets the time of occurrence for the event to the current time. 45 | func (e *EventTime) SetEventNow() { 46 | e.SetEventTime(time.Now()) 47 | } 48 | 49 | // EventHandler is anything that handles events. If the handler has 50 | // consumed the event, it should return true. False otherwise. 51 | type EventHandler interface { 52 | HandleEvent(Event) bool 53 | } 54 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/interrupt.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | import ( 18 | "time" 19 | ) 20 | 21 | // EventInterrupt is a generic wakeup event. Its can be used to 22 | // to request a redraw. It can carry an arbitrary payload, as well. 23 | type EventInterrupt struct { 24 | t time.Time 25 | v interface{} 26 | } 27 | 28 | // When returns the time when this event was created. 29 | func (ev *EventInterrupt) When() time.Time { 30 | return ev.t 31 | } 32 | 33 | // Data is used to obtain the opaque event payload. 34 | func (ev *EventInterrupt) Data() interface{} { 35 | return ev.v 36 | } 37 | 38 | // NewEventInterrupt creates an EventInterrupt with the given payload. 39 | func NewEventInterrupt(data interface{}) *EventInterrupt { 40 | return &EventInterrupt{t: time.Now(), v: data} 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/mouse.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | import ( 18 | "time" 19 | ) 20 | 21 | // EventMouse is a mouse event. It is sent on either mouse up or mouse down 22 | // events. It is also sent on mouse motion events - if the terminal supports 23 | // it. We make every effort to ensure that mouse release events are delivered. 24 | // Hence, click drag can be identified by a motion event with the mouse down, 25 | // without any intervening button release. On some terminals only the initiating 26 | // press and terminating release event will be delivered. 27 | // 28 | // Mouse wheel events, when reported, may appear on their own as individual 29 | // impulses; that is, there will normally not be a release event delivered 30 | // for mouse wheel movements. 31 | // 32 | // Most terminals cannot report the state of more than one button at a time -- 33 | // and some cannot report motion events unless a button is pressed. 34 | // 35 | // Applications can inspect the time between events to resolve double or 36 | // triple clicks. 37 | type EventMouse struct { 38 | t time.Time 39 | btn ButtonMask 40 | mod ModMask 41 | x int 42 | y int 43 | } 44 | 45 | // When returns the time when this EventMouse was created. 46 | func (ev *EventMouse) When() time.Time { 47 | return ev.t 48 | } 49 | 50 | // Buttons returns the list of buttons that were pressed or wheel motions. 51 | func (ev *EventMouse) Buttons() ButtonMask { 52 | return ev.btn 53 | } 54 | 55 | // Modifiers returns a list of keyboard modifiers that were pressed 56 | // with the mouse button(s). 57 | func (ev *EventMouse) Modifiers() ModMask { 58 | return ev.mod 59 | } 60 | 61 | // Position returns the mouse position in character cells. The origin 62 | // 0, 0 is at the upper left corner. 63 | func (ev *EventMouse) Position() (int, int) { 64 | return ev.x, ev.y 65 | } 66 | 67 | // NewEventMouse is used to create a new mouse event. Applications 68 | // shouldn't need to use this; its mostly for screen implementors. 69 | func NewEventMouse(x, y int, btn ButtonMask, mod ModMask) *EventMouse { 70 | return &EventMouse{t: time.Now(), x: x, y: y, btn: btn, mod: mod} 71 | } 72 | 73 | // ButtonMask is a mask of mouse buttons and wheel events. Mouse button presses 74 | // are normally delivered as both press and release events. Mouse wheel events 75 | // are normally just single impulse events. Windows supports up to eight 76 | // separate buttons plus all four wheel directions, but XTerm can only support 77 | // mouse buttons 1-3 and wheel up/down. Its not unheard of for terminals 78 | // to support only one or two buttons (think Macs). Old terminals, and true 79 | // emulations (such as vt100) won't support mice at all, of course. 80 | type ButtonMask int16 81 | 82 | // These are the actual button values. 83 | const ( 84 | Button1 ButtonMask = 1 << iota // Usually left mouse button. 85 | Button2 // Usually the middle mouse button. 86 | Button3 // Usually the right mouse button. 87 | Button4 // Often a side button (thumb/next). 88 | Button5 // Often a side button (thumb/prev). 89 | Button6 90 | Button7 91 | Button8 92 | WheelUp // Wheel motion up/away from user. 93 | WheelDown // Wheel motion down/towards user. 94 | WheelLeft // Wheel motion to left. 95 | WheelRight // Wheel motion to right. 96 | ButtonNone ButtonMask = 0 // No button or wheel events. 97 | ) 98 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/resize.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | import ( 18 | "time" 19 | ) 20 | 21 | // EventResize is sent when the window size changes. 22 | type EventResize struct { 23 | t time.Time 24 | w int 25 | h int 26 | } 27 | 28 | // NewEventResize creates an EventResize with the new updated window size, 29 | // which is given in character cells. 30 | func NewEventResize(width, height int) *EventResize { 31 | return &EventResize{t: time.Now(), w: width, h: height} 32 | } 33 | 34 | // When returns the time when the Event was created. 35 | func (ev *EventResize) When() time.Time { 36 | return ev.t 37 | } 38 | 39 | // Size returns the new window size as width, height in character cells. 40 | func (ev *EventResize) Size() (int, int) { 41 | return ev.w, ev.h 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/runes.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | // The names of these constants are chosen to match Terminfo names, 18 | // modulo case, and changing the prefix from ACS_ to Rune. These are 19 | // the runes we provide extra special handling for, with ASCII fallbacks 20 | // for terminals that lack them. 21 | const ( 22 | RuneSterling = '£' 23 | RuneDArrow = '↓' 24 | RuneLArrow = '←' 25 | RuneRArrow = '→' 26 | RuneUArrow = '↑' 27 | RuneBullet = '·' 28 | RuneBoard = '░' 29 | RuneCkBoard = '▒' 30 | RuneDegree = '°' 31 | RuneDiamond = '◆' 32 | RuneGEqual = '≥' 33 | RunePi = 'π' 34 | RuneHLine = '─' 35 | RuneLantern = '§' 36 | RunePlus = '┼' 37 | RuneLEqual = '≤' 38 | RuneLLCorner = '└' 39 | RuneLRCorner = '┘' 40 | RuneNEqual = '≠' 41 | RunePlMinus = '±' 42 | RuneS1 = '⎺' 43 | RuneS3 = '⎻' 44 | RuneS7 = '⎼' 45 | RuneS9 = '⎽' 46 | RuneBlock = '█' 47 | RuneTTee = '┬' 48 | RuneRTee = '┤' 49 | RuneLTee = '├' 50 | RuneBTee = '┴' 51 | RuneULCorner = '┌' 52 | RuneURCorner = '┐' 53 | RuneVLine = '│' 54 | ) 55 | 56 | // RuneFallbacks is the default map of fallback strings that will be 57 | // used to replace a rune when no other more appropriate transformation 58 | // is available, and the rune cannot be displayed directly. 59 | // 60 | // New entries may be added to this map over time, as it becomes clear 61 | // that such is desirable. Characters that represent either letters or 62 | // numbers should not be added to this list unless it is certain that 63 | // the meaning will still convey unambiguously. 64 | // 65 | // As an example, it would be appropriate to add an ASCII mapping for 66 | // the full width form of the letter 'A', but it would not be appropriate 67 | // to do so a glyph representing the country China. 68 | // 69 | // Programs that desire richer fallbacks may register additional ones, 70 | // or change or even remove these mappings with Screen.RegisterRuneFallback 71 | // Screen.UnregisterRuneFallback methods. 72 | // 73 | // Note that Unicode is presumed to be able to display all glyphs. 74 | // This is a pretty poor assumption, but there is no easy way to 75 | // figure out which glyphs are supported in a given font. Hence, 76 | // some care in selecting the characters you support in your application 77 | // is still appropriate. 78 | var RuneFallbacks = map[rune]string{ 79 | RuneSterling: "f", 80 | RuneDArrow: "v", 81 | RuneLArrow: "<", 82 | RuneRArrow: ">", 83 | RuneUArrow: "^", 84 | RuneBullet: "o", 85 | RuneBoard: "#", 86 | RuneCkBoard: ":", 87 | RuneDegree: "\\", 88 | RuneDiamond: "+", 89 | RuneGEqual: ">", 90 | RunePi: "*", 91 | RuneHLine: "-", 92 | RuneLantern: "#", 93 | RunePlus: "+", 94 | RuneLEqual: "<", 95 | RuneLLCorner: "+", 96 | RuneLRCorner: "+", 97 | RuneNEqual: "!", 98 | RunePlMinus: "#", 99 | RuneS1: "~", 100 | RuneS3: "-", 101 | RuneS7: "-", 102 | RuneS9: "_", 103 | RuneBlock: "#", 104 | RuneTTee: "+", 105 | RuneRTee: "+", 106 | RuneLTee: "+", 107 | RuneBTee: "+", 108 | RuneULCorner: "+", 109 | RuneURCorner: "+", 110 | RuneVLine: "|", 111 | } 112 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/style.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The TCell Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use file except in compliance with the License. 5 | // You may obtain a copy of the license at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tcell 16 | 17 | // Style represents a complete text style, including both foreground 18 | // and background color. We encode it in a 64-bit int for efficiency. 19 | // The coding is (MSB): <7b flags><1b><24b fgcolor><7b attr><1b><24b bgcolor>. 20 | // The <1b> is set true to indicate that the color is an RGB color, rather 21 | // than a named index. 22 | // 23 | // This gives 24bit color options, if it ever becomes truly necessary. 24 | // However, applications must not rely on this encoding. 25 | // 26 | // Note that not all terminals can display all colors or attributes, and 27 | // many might have specific incompatibilities between specific attributes 28 | // and color combinations. 29 | // 30 | // The intention is to extend styles to support paletting, in which case 31 | // some flag bit(s) would be set, and the foreground and background colors 32 | // would be replaced with a palette number and palette index. 33 | // 34 | // To use Style, just declare a variable of its type. 35 | type Style int64 36 | 37 | // StyleDefault represents a default style, based upon the context. 38 | // It is the zero value. 39 | const StyleDefault Style = 0 40 | 41 | // styleFlags -- used internally for now. 42 | const ( 43 | styleBgSet = 1 << (iota + 57) 44 | styleFgSet 45 | stylePalette 46 | ) 47 | 48 | // Foreground returns a new style based on s, with the foreground color set 49 | // as requested. ColorDefault can be used to select the global default. 50 | func (s Style) Foreground(c Color) Style { 51 | if c == ColorDefault { 52 | return (s &^ (0x1ffffff00000000 | styleFgSet)) 53 | } 54 | return (s &^ Style(0x1ffffff00000000)) | 55 | ((Style(c) & 0x1ffffff) << 32) | styleFgSet 56 | } 57 | 58 | // Background returns a new style based on s, with the background color set 59 | // as requested. ColorDefault can be used to select the global default. 60 | func (s Style) Background(c Color) Style { 61 | if c == ColorDefault { 62 | return (s &^ (0x1ffffff | styleBgSet)) 63 | } 64 | return (s &^ (0x1ffffff)) | (Style(c) & 0x1ffffff) | styleBgSet 65 | } 66 | 67 | // Decompose breaks a style up, returning the foreground, background, 68 | // and other attributes. 69 | func (s Style) Decompose() (fg Color, bg Color, attr AttrMask) { 70 | if s&styleFgSet != 0 { 71 | fg = Color(s>>32) & 0x1ffffff 72 | } else { 73 | fg = ColorDefault 74 | } 75 | if s&styleBgSet != 0 { 76 | bg = Color(s & 0x1ffffff) 77 | } else { 78 | bg = ColorDefault 79 | } 80 | attr = AttrMask(s) & attrAll 81 | 82 | return fg, bg, attr 83 | } 84 | 85 | func (s Style) setAttrs(attrs Style, on bool) Style { 86 | if on { 87 | return s | attrs 88 | } 89 | return s &^ attrs 90 | } 91 | 92 | // Normal returns the style with all attributes disabled. 93 | func (s Style) Normal() Style { 94 | return s &^ Style(attrAll) 95 | } 96 | 97 | // Bold returns a new style based on s, with the bold attribute set 98 | // as requested. 99 | func (s Style) Bold(on bool) Style { 100 | return s.setAttrs(Style(AttrBold), on) 101 | } 102 | 103 | // Blink returns a new style based on s, with the blink attribute set 104 | // as requested. 105 | func (s Style) Blink(on bool) Style { 106 | return s.setAttrs(Style(AttrBlink), on) 107 | } 108 | 109 | // Dim returns a new style based on s, with the dim attribute set 110 | // as requested. 111 | func (s Style) Dim(on bool) Style { 112 | return s.setAttrs(Style(AttrDim), on) 113 | } 114 | 115 | // Reverse returns a new style based on s, with the reverse attribute set 116 | // as requested. (Reverse usually changes the foreground and background 117 | // colors.) 118 | func (s Style) Reverse(on bool) Style { 119 | return s.setAttrs(Style(AttrReverse), on) 120 | } 121 | 122 | // Underline returns a new style based on s, with the underline attribute set 123 | // as requested. 124 | func (s Style) Underline(on bool) Style { 125 | return s.setAttrs(Style(AttrUnderline), on) 126 | } 127 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/.gitignore: -------------------------------------------------------------------------------- 1 | mkinfo 2 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/TERMINALS.md: -------------------------------------------------------------------------------- 1 | TERMINALS 2 | ========= 3 | 4 | The best way to populate terminals on Debian is to install ncurses, 5 | ncurses-term, screen, tmux, rxvt-unicode, and dvtm. This populates the 6 | the terminfo database so that we can have a reasonable set of starting 7 | terminals. 8 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/models.txt: -------------------------------------------------------------------------------- 1 | adm3a 2 | aixterm 3 | ansi 4 | aterm 5 | beterm 6 | bsdos-pc 7 | cygwin 8 | d200 9 | d210 10 | dtterm 11 | Eterm 12 | Eterm-256color 13 | eterm 14 | gnome 15 | gnome-256color 16 | hpterm 17 | hz1500 18 | konsole 19 | konsole-256color 20 | kterm 21 | linux 22 | pcansi 23 | rxvt 24 | rxvt-256color 25 | rxvt-unicode 26 | rxvt-unicode-256color 27 | screen 28 | screen-256color 29 | st 30 | st-256color 31 | st-truecolor 32 | st-meta 33 | st-meta-256color 34 | st-meta-truecolor 35 | sun 36 | sun-color 37 | tvi910 38 | tvi912 39 | tvi921 40 | tvi925 41 | tvi950 42 | tvi970 43 | vt52 44 | vt100 45 | vt102 46 | vt220 47 | vt320 48 | vt400 49 | vt420 50 | wy50 51 | wy60 52 | wy99-ansi 53 | wy99a-ansi 54 | xfce 55 | xnuppc 56 | xterm 57 | xterm 58 | xterm-256color 59 | xterm-truecolor 60 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_Eterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // gnu emacs term.el terminal emulation 7 | AddTerminfo(&Terminfo{ 8 | Name: "eterm", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1b[H\x1b[J", 13 | EnterCA: "\x1b7\x1b[?47h", 14 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 15 | AttrOff: "\x1b[m", 16 | Underline: "\x1b[4m", 17 | Bold: "\x1b[1m", 18 | Reverse: "\x1b[7m", 19 | PadChar: "\x00", 20 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 21 | CursorBack1: "\b", 22 | CursorUp1: "\x1b[A", 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_Eterm_256color.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Eterm with xterm 256-colors 7 | AddTerminfo(&Terminfo{ 8 | Name: "Eterm-256color", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 256, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b7\x1b[?47h", 15 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 16 | ShowCursor: "\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x0017", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", 24 | SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", 25 | SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", 26 | PadChar: "\x00", 27 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 28 | EnterAcs: "\x0e", 29 | ExitAcs: "\x0f", 30 | EnableAcs: "\x1b)0", 31 | Mouse: "\x1b[M", 32 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 33 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 34 | CursorBack1: "\b", 35 | CursorUp1: "\x1b[A", 36 | KeyUp: "\x1b[A", 37 | KeyDown: "\x1b[B", 38 | KeyRight: "\x1b[C", 39 | KeyLeft: "\x1b[D", 40 | KeyInsert: "\x1b[2~", 41 | KeyDelete: "\x1b[3~", 42 | KeyBackspace: "\b", 43 | KeyHome: "\x1b[7~", 44 | KeyEnd: "\x1b[8~", 45 | KeyPgUp: "\x1b[5~", 46 | KeyPgDn: "\x1b[6~", 47 | KeyF1: "\x1b[11~", 48 | KeyF2: "\x1b[12~", 49 | KeyF3: "\x1b[13~", 50 | KeyF4: "\x1b[14~", 51 | KeyF5: "\x1b[15~", 52 | KeyF6: "\x1b[17~", 53 | KeyF7: "\x1b[18~", 54 | KeyF8: "\x1b[19~", 55 | KeyF9: "\x1b[20~", 56 | KeyF10: "\x1b[21~", 57 | KeyF11: "\x1b[23~", 58 | KeyF12: "\x1b[24~", 59 | KeyF13: "\x1b[25~", 60 | KeyF14: "\x1b[26~", 61 | KeyF15: "\x1b[28~", 62 | KeyF16: "\x1b[29~", 63 | KeyF17: "\x1b[31~", 64 | KeyF18: "\x1b[32~", 65 | KeyF19: "\x1b[33~", 66 | KeyF20: "\x1b[34~", 67 | KeyF21: "\x1b[23$", 68 | KeyF22: "\x1b[24$", 69 | KeyF23: "\x1b[11^", 70 | KeyF24: "\x1b[12^", 71 | KeyF25: "\x1b[13^", 72 | KeyF26: "\x1b[14^", 73 | KeyF27: "\x1b[15^", 74 | KeyF28: "\x1b[17^", 75 | KeyF29: "\x1b[18^", 76 | KeyF30: "\x1b[19^", 77 | KeyF31: "\x1b[20^", 78 | KeyF32: "\x1b[21^", 79 | KeyF33: "\x1b[23^", 80 | KeyF34: "\x1b[24^", 81 | KeyF35: "\x1b[25^", 82 | KeyF36: "\x1b[26^", 83 | KeyF37: "\x1b[28^", 84 | KeyF38: "\x1b[29^", 85 | KeyF39: "\x1b[31^", 86 | KeyF40: "\x1b[32^", 87 | KeyF41: "\x1b[33^", 88 | KeyF42: "\x1b[34^", 89 | KeyF43: "\x1b[23@", 90 | KeyF44: "\x1b[24@", 91 | KeyHelp: "\x1b[28~", 92 | KeyShfLeft: "\x1b[d", 93 | KeyShfRight: "\x1b[c", 94 | KeyShfUp: "\x1b[a", 95 | KeyShfDown: "\x1b[b", 96 | KeyCtrlLeft: "\x1b[Od", 97 | KeyCtrlRight: "\x1b[Oc", 98 | KeyCtrlUp: "\x1b[Oa", 99 | KeyCtrlDown: "\x1b[Ob", 100 | KeyShfHome: "\x1b[7$", 101 | KeyShfEnd: "\x1b[8$", 102 | KeyCtrlHome: "\x1b[7^", 103 | KeyCtrlEnd: "\x1b[8^", 104 | }) 105 | } 106 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_adm3a.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // lsi adm3a 7 | AddTerminfo(&Terminfo{ 8 | Name: "adm3a", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x0032$<1/>", 13 | PadChar: "\x00", 14 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 15 | CursorBack1: "\b", 16 | CursorUp1: "\v", 17 | KeyUp: "\v", 18 | KeyDown: "\n", 19 | KeyRight: "\f", 20 | KeyLeft: "\b", 21 | }) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_aixterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // IBM Aixterm Terminal Emulator 7 | AddTerminfo(&Terminfo{ 8 | Name: "aixterm", 9 | Columns: 80, 10 | Lines: 25, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | AttrOff: "\x1b[0;10m\x1b(B", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Reverse: "\x1b[7m", 18 | SetFg: "\x1b[3%p1%dm", 19 | SetBg: "\x1b[4%p1%dm", 20 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 21 | PadChar: "\x00", 22 | AltChars: "jjkkllmmnnqqttuuvvwwxx", 23 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 24 | CursorBack1: "\b", 25 | CursorUp1: "\x1b[A", 26 | KeyUp: "\x1b[A", 27 | KeyDown: "\x1b[B", 28 | KeyRight: "\x1b[C", 29 | KeyLeft: "\x1b[D", 30 | KeyInsert: "\x1b[139q", 31 | KeyDelete: "\x1b[P", 32 | KeyBackspace: "\b", 33 | KeyHome: "\x1b[H", 34 | KeyEnd: "\x1b[146q", 35 | KeyPgUp: "\x1b[150q", 36 | KeyPgDn: "\x1b[154q", 37 | KeyF1: "\x1b[001q", 38 | KeyF2: "\x1b[002q", 39 | KeyF3: "\x1b[003q", 40 | KeyF4: "\x1b[004q", 41 | KeyF5: "\x1b[005q", 42 | KeyF6: "\x1b[006q", 43 | KeyF7: "\x1b[007q", 44 | KeyF8: "\x1b[008q", 45 | KeyF9: "\x1b[009q", 46 | KeyF10: "\x1b[010q", 47 | KeyF11: "\x1b[011q", 48 | KeyF12: "\x1b[012q", 49 | KeyF13: "\x1b[013q", 50 | KeyF14: "\x1b[014q", 51 | KeyF15: "\x1b[015q", 52 | KeyF16: "\x1b[016q", 53 | KeyF17: "\x1b[017q", 54 | KeyF18: "\x1b[018q", 55 | KeyF19: "\x1b[019q", 56 | KeyF20: "\x1b[020q", 57 | KeyF21: "\x1b[021q", 58 | KeyF22: "\x1b[022q", 59 | KeyF23: "\x1b[023q", 60 | KeyF24: "\x1b[024q", 61 | KeyF25: "\x1b[025q", 62 | KeyF26: "\x1b[026q", 63 | KeyF27: "\x1b[027q", 64 | KeyF28: "\x1b[028q", 65 | KeyF29: "\x1b[029q", 66 | KeyF30: "\x1b[030q", 67 | KeyF31: "\x1b[031q", 68 | KeyF32: "\x1b[032q", 69 | KeyF33: "\x1b[033q", 70 | KeyF34: "\x1b[034q", 71 | KeyF35: "\x1b[035q", 72 | KeyF36: "\x1b[036q", 73 | KeyClear: "\x1b[144q", 74 | KeyBacktab: "\x1b[Z", 75 | }) 76 | } 77 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_ansi.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // ansi/pc-term compatible with color 7 | AddTerminfo(&Terminfo{ 8 | Name: "ansi", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | AttrOff: "\x1b[0;10m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Blink: "\x1b[5m", 18 | Reverse: "\x1b[7m", 19 | SetFg: "\x1b[3%p1%dm", 20 | SetBg: "\x1b[4%p1%dm", 21 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 22 | PadChar: "\x00", 23 | AltChars: "+\x0020,\x0021-\x0030.\x190333`\x0004a261f370g361h260j331k277l332m300n305o~p304q304r304s_t303u264v301w302x263y363z362{343|330}234~376", 24 | EnterAcs: "\x1b[11m", 25 | ExitAcs: "\x1b[10m", 26 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 27 | CursorBack1: "\x1b[D", 28 | CursorUp1: "\x1b[A", 29 | KeyUp: "\x1b[A", 30 | KeyDown: "\x1b[B", 31 | KeyRight: "\x1b[C", 32 | KeyLeft: "\x1b[D", 33 | KeyInsert: "\x1b[L", 34 | KeyBackspace: "\b", 35 | KeyHome: "\x1b[H", 36 | KeyBacktab: "\x1b[Z", 37 | }) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_aterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // AfterStep terminal 7 | AddTerminfo(&Terminfo{ 8 | Name: "aterm", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b7\x1b[?47h", 15 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 16 | ShowCursor: "\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x0017", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b=", 24 | ExitKeypad: "\x1b>", 25 | SetFg: "\x1b[3%p1%dm", 26 | SetBg: "\x1b[4%p1%dm", 27 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 28 | PadChar: "\x00", 29 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 30 | EnterAcs: "\x0e", 31 | ExitAcs: "\x0f", 32 | EnableAcs: "\x1b(B\x1b)0", 33 | Mouse: "\x1b[M", 34 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 35 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 36 | CursorBack1: "\b", 37 | CursorUp1: "\x1b[A", 38 | KeyUp: "\x1b[A", 39 | KeyDown: "\x1b[B", 40 | KeyRight: "\x1b[C", 41 | KeyLeft: "\x1b[D", 42 | KeyInsert: "\x1b[2~", 43 | KeyDelete: "\x1b[3~", 44 | KeyBackspace: "177", 45 | KeyHome: "\x1b[7~", 46 | KeyEnd: "\x1b[8~", 47 | KeyPgUp: "\x1b[5~", 48 | KeyPgDn: "\x1b[6~", 49 | KeyF1: "\x1bOP", 50 | KeyF2: "\x1bOQ", 51 | KeyF3: "\x1bOR", 52 | KeyF4: "\x1bOS", 53 | KeyF5: "\x1b[15~", 54 | KeyF6: "\x1b[17~", 55 | KeyF7: "\x1b[18~", 56 | KeyF8: "\x1b[19~", 57 | KeyF9: "\x1b[20~", 58 | KeyF10: "\x1b[21~", 59 | KeyF11: "\x1b[23~", 60 | KeyF12: "\x1b[24~", 61 | KeyF13: "\x1b[25~", 62 | KeyF14: "\x1b[26~", 63 | KeyF15: "\x1b[28~", 64 | KeyF16: "\x1b[29~", 65 | KeyF17: "\x1b[31~", 66 | KeyF18: "\x1b[32~", 67 | KeyF19: "\x1b[33~", 68 | KeyF20: "\x1b[34~", 69 | KeyF21: "\x1b[23$", 70 | KeyF22: "\x1b[24$", 71 | KeyF23: "\x1b[11^", 72 | KeyF24: "\x1b[12^", 73 | KeyF25: "\x1b[13^", 74 | KeyF26: "\x1b[14^", 75 | KeyF27: "\x1b[15^", 76 | KeyF28: "\x1b[17^", 77 | KeyF29: "\x1b[18^", 78 | KeyF30: "\x1b[19^", 79 | KeyF31: "\x1b[20^", 80 | KeyF32: "\x1b[21^", 81 | KeyF33: "\x1b[23^", 82 | KeyF34: "\x1b[24^", 83 | KeyF35: "\x1b[25^", 84 | KeyF36: "\x1b[26^", 85 | KeyF37: "\x1b[28^", 86 | KeyF38: "\x1b[29^", 87 | KeyF39: "\x1b[31^", 88 | KeyF40: "\x1b[32^", 89 | KeyF41: "\x1b[33^", 90 | KeyF42: "\x1b[34^", 91 | KeyF43: "\x1b[23@", 92 | KeyF44: "\x1b[24@", 93 | KeyBacktab: "\x1b[Z", 94 | KeyShfLeft: "\x1b[d", 95 | KeyShfRight: "\x1b[c", 96 | KeyShfUp: "\x1b[a", 97 | KeyShfDown: "\x1b[b", 98 | KeyCtrlLeft: "\x1b[Od", 99 | KeyCtrlRight: "\x1b[Oc", 100 | KeyCtrlUp: "\x1b[Oa", 101 | KeyCtrlDown: "\x1b[Ob", 102 | KeyShfHome: "\x1b[7$", 103 | KeyShfEnd: "\x1b[8$", 104 | KeyCtrlHome: "\x1b[7^", 105 | KeyCtrlEnd: "\x1b[8^", 106 | }) 107 | } 108 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_beterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // BeOS Terminal 7 | AddTerminfo(&Terminfo{ 8 | Name: "beterm", 9 | Columns: 80, 10 | Lines: 25, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | AttrOff: "\x1b[0;10m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Reverse: "\x1b[7m", 18 | EnterKeypad: "\x1b[?4h", 19 | ExitKeypad: "\x1b[?4l", 20 | SetFg: "\x1b[3%p1%dm", 21 | SetBg: "\x1b[4%p1%dm", 22 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 23 | PadChar: "\x00", 24 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 25 | CursorBack1: "\b", 26 | CursorUp1: "\x1b[A", 27 | KeyUp: "\x1b[A", 28 | KeyDown: "\x1b[B", 29 | KeyRight: "\x1b[C", 30 | KeyLeft: "\x1b[D", 31 | KeyInsert: "\x1b[2~", 32 | KeyDelete: "\x1b[3~", 33 | KeyBackspace: "\b", 34 | KeyHome: "\x1b[1~", 35 | KeyEnd: "\x1b[4~", 36 | KeyPgUp: "\x1b[5~", 37 | KeyPgDn: "\x1b[6~", 38 | KeyF1: "\x1b[11~", 39 | KeyF2: "\x1b[12~", 40 | KeyF3: "\x1b[13~", 41 | KeyF4: "\x1b[14~", 42 | KeyF5: "\x1b[15~", 43 | KeyF6: "\x1b[16~", 44 | KeyF7: "\x1b[17~", 45 | KeyF8: "\x1b[18~", 46 | KeyF9: "\x1b[19~", 47 | KeyF10: "\x1b[20~", 48 | KeyF11: "\x1b[21~", 49 | KeyF12: "\x1b[22~", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_bsdos_pc.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // IBM PC BSD/OS Console 7 | AddTerminfo(&Terminfo{ 8 | Name: "bsdos-pc", 9 | Columns: 80, 10 | Lines: 25, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1bc", 14 | AttrOff: "\x1b[0;10m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Blink: "\x1b[5m", 18 | Reverse: "\x1b[7m", 19 | SetFg: "\x1b[3%p1%dm", 20 | SetBg: "\x1b[4%p1%dm", 21 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 22 | PadChar: "\x00", 23 | AltChars: "+\x0020,\x0021-\x0030.\x190333`\x0004a261f370g361h260j331k277l332m300n305o~p304q304r304s_t303u264v301w302x263y363z362{343|330}234~376", 24 | EnterAcs: "\x1b[11m", 25 | ExitAcs: "\x1b[10m", 26 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 27 | CursorBack1: "\b", 28 | CursorUp1: "\x1b[A", 29 | KeyUp: "\x1b[A", 30 | KeyDown: "\x1b[B", 31 | KeyRight: "\x1b[C", 32 | KeyLeft: "\x1b[D", 33 | KeyInsert: "\x1b[L", 34 | KeyBackspace: "\b", 35 | KeyHome: "\x1b[H", 36 | KeyPgUp: "\x1b[I", 37 | KeyPgDn: "\x1b[G", 38 | }) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_cygwin.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // ansi emulation for Cygwin 7 | AddTerminfo(&Terminfo{ 8 | Name: "cygwin", 9 | Colors: 8, 10 | Bell: "\a", 11 | Clear: "\x1b[H\x1b[J", 12 | EnterCA: "\x1b7\x1b[?47h", 13 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 14 | AttrOff: "\x1b[0;10m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Reverse: "\x1b[7m", 18 | SetFg: "\x1b[3%p1%dm", 19 | SetBg: "\x1b[4%p1%dm", 20 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 21 | PadChar: "\x00", 22 | AltChars: "+\x0020,\x0021-\x0030.\x190333`\x0004a261f370g361h260j331k277l332m300n305o~p304q304r304s_t303u264v301w302x263y363z362{343|330}234~376", 23 | EnterAcs: "\x1b[11m", 24 | ExitAcs: "\x1b[10m", 25 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 26 | CursorBack1: "\b", 27 | CursorUp1: "\x1b[A", 28 | KeyUp: "\x1b[A", 29 | KeyDown: "\x1b[B", 30 | KeyRight: "\x1b[C", 31 | KeyLeft: "\x1b[D", 32 | KeyInsert: "\x1b[2~", 33 | KeyDelete: "\x1b[3~", 34 | KeyBackspace: "\b", 35 | KeyHome: "\x1b[1~", 36 | KeyEnd: "\x1b[4~", 37 | KeyPgUp: "\x1b[5~", 38 | KeyPgDn: "\x1b[6~", 39 | KeyF1: "\x1b[[A", 40 | KeyF2: "\x1b[[B", 41 | KeyF3: "\x1b[[C", 42 | KeyF4: "\x1b[[D", 43 | KeyF5: "\x1b[[E", 44 | KeyF6: "\x1b[17~", 45 | KeyF7: "\x1b[18~", 46 | KeyF8: "\x1b[19~", 47 | KeyF9: "\x1b[20~", 48 | KeyF10: "\x1b[21~", 49 | KeyF11: "\x1b[23~", 50 | KeyF12: "\x1b[24~", 51 | KeyF13: "\x1b[25~", 52 | KeyF14: "\x1b[26~", 53 | KeyF15: "\x1b[28~", 54 | KeyF16: "\x1b[29~", 55 | KeyF17: "\x1b[31~", 56 | KeyF18: "\x1b[32~", 57 | KeyF19: "\x1b[33~", 58 | KeyF20: "\x1b[34~", 59 | }) 60 | } 61 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_d200.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Data General DASHER D200 7 | AddTerminfo(&Terminfo{ 8 | Name: "d200", 9 | Aliases: []string{"d200-dg"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\f", 14 | AttrOff: "\x0017\x0025\x0035\x0036E", 15 | Underline: "\x14", 16 | Bold: "\x1eD\x14", 17 | Dim: "\x1c", 18 | Blink: "\x0e", 19 | Reverse: "\x1eD", 20 | PadChar: "\x00", 21 | SetCursor: "\x0020%p2%c%p1%c", 22 | CursorBack1: "\x19", 23 | CursorUp1: "\x17", 24 | KeyUp: "\x17", 25 | KeyDown: "\x1a", 26 | KeyRight: "\x18", 27 | KeyLeft: "\x19", 28 | KeyHome: "\b", 29 | KeyF1: "\x1eq", 30 | KeyF2: "\x1er", 31 | KeyF3: "\x1es", 32 | KeyF4: "\x1et", 33 | KeyF5: "\x1eu", 34 | KeyF6: "\x1ev", 35 | KeyF7: "\x1ew", 36 | KeyF8: "\x1ex", 37 | KeyF9: "\x1ey", 38 | KeyF10: "\x1ez", 39 | KeyF11: "\x1e{", 40 | KeyF12: "\x1e|", 41 | KeyF13: "\x1e}", 42 | KeyF14: "\x1e~", 43 | KeyF15: "\x1ep", 44 | KeyF16: "\x1ea", 45 | KeyF17: "\x1eb", 46 | KeyF18: "\x1ec", 47 | KeyF19: "\x1ed", 48 | KeyF20: "\x1ee", 49 | KeyF21: "\x1ef", 50 | KeyF22: "\x1eg", 51 | KeyF23: "\x1eh", 52 | KeyF24: "\x1ei", 53 | KeyF25: "\x1ej", 54 | KeyF26: "\x1ek", 55 | KeyF27: "\x1el", 56 | KeyF28: "\x1em", 57 | KeyF29: "\x1en", 58 | KeyF30: "\x1e`", 59 | KeyF31: "\x1e1", 60 | KeyF32: "\x1e2", 61 | KeyF33: "\x1e3", 62 | KeyF34: "\x1e4", 63 | KeyF35: "\x1e5", 64 | KeyF36: "\x1e6", 65 | KeyF37: "\x1e7", 66 | KeyF38: "\x1e8", 67 | KeyF39: "\x1e9", 68 | KeyF40: "\x1e:", 69 | KeyF41: "\x1e;", 70 | KeyF42: "\x1e<", 71 | KeyF43: "\x1e=", 72 | KeyF44: "\x1e>", 73 | KeyF45: "\x1e0", 74 | KeyF46: "\x1e!", 75 | KeyF47: "\x1e\"", 76 | KeyF48: "\x1e#", 77 | KeyF49: "\x1e$", 78 | KeyF50: "\x1e%%", 79 | KeyF51: "\x1e&", 80 | KeyF52: "\x1e'", 81 | KeyF53: "\x1e(", 82 | KeyF54: "\x1e)", 83 | KeyF55: "\x1e*", 84 | KeyF56: "\x1e+", 85 | KeyF57: "\x1e,", 86 | KeyF58: "\x1e-", 87 | KeyF59: "\x1e.", 88 | KeyF60: "\x1e ", 89 | KeyClear: "\f", 90 | KeyShfLeft: "\x1e\x19", 91 | KeyShfRight: "\x1e\x18", 92 | KeyShfHome: "\x1e\b", 93 | }) 94 | } 95 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_d210.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Data General DASHER D210 series 7 | AddTerminfo(&Terminfo{ 8 | Name: "d210", 9 | Aliases: []string{"d214"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b[2J", 14 | AttrOff: "\x1b[m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[4;7m", 17 | Dim: "\x1b[2m", 18 | Blink: "\x1b[5m", 19 | Reverse: "\x1b[7m", 20 | PadChar: "\x00", 21 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 22 | CursorBack1: "\b", 23 | CursorUp1: "\x1b[A", 24 | KeyUp: "\x1b[A", 25 | KeyDown: "\x1b[B", 26 | KeyRight: "\x1b[C", 27 | KeyLeft: "\x1b[D", 28 | KeyHome: "\x1b[H", 29 | KeyF1: "\x1b[001z", 30 | KeyF2: "\x1b[002z", 31 | KeyF3: "\x1b[003z", 32 | KeyF4: "\x1b[004z", 33 | KeyF5: "\x1b[005z", 34 | KeyF6: "\x1b[006z", 35 | KeyF7: "\x1b[007z", 36 | KeyF8: "\x1b[008z", 37 | KeyF9: "\x1b[009z", 38 | KeyF10: "\x1b[010z", 39 | KeyF11: "\x1b[011z", 40 | KeyF12: "\x1b[012z", 41 | KeyF13: "\x1b[013z", 42 | KeyF14: "\x1b[014z", 43 | KeyF15: "\x1b[000z", 44 | KeyF16: "\x1b[101z", 45 | KeyF17: "\x1b[102z", 46 | KeyF18: "\x1b[103z", 47 | KeyF19: "\x1b[104z", 48 | KeyF20: "\x1b[105z", 49 | KeyF21: "\x1b[106z", 50 | KeyF22: "\x1b[107z", 51 | KeyF23: "\x1b[108z", 52 | KeyF24: "\x1b[109z", 53 | KeyF25: "\x1b[110z", 54 | KeyF26: "\x1b[111z", 55 | KeyF27: "\x1b[112z", 56 | KeyF28: "\x1b[113z", 57 | KeyF29: "\x1b[114z", 58 | KeyF30: "\x1b[100z", 59 | KeyF31: "\x1b[201z", 60 | KeyF32: "\x1b[202z", 61 | KeyF33: "\x1b[203z", 62 | KeyF34: "\x1b[204z", 63 | KeyF35: "\x1b[205z", 64 | KeyF36: "\x1b[206z", 65 | KeyF37: "\x1b[207z", 66 | KeyF38: "\x1b[208z", 67 | KeyF39: "\x1b[209z", 68 | KeyF40: "\x1b[210z", 69 | KeyF41: "\x1b[211z", 70 | KeyF42: "\x1b[212z", 71 | KeyF43: "\x1b[213z", 72 | KeyF44: "\x1b[214z", 73 | KeyF45: "\x1b[200z", 74 | KeyF46: "\x1b[301z", 75 | KeyF47: "\x1b[302z", 76 | KeyF48: "\x1b[303z", 77 | KeyF49: "\x1b[304z", 78 | KeyF50: "\x1b[305z", 79 | KeyF51: "\x1b[306z", 80 | KeyF52: "\x1b[307z", 81 | KeyF53: "\x1b[308z", 82 | KeyF54: "\x1b[309z", 83 | KeyF55: "\x1b[310z", 84 | KeyF56: "\x1b[311z", 85 | KeyF57: "\x1b[312z", 86 | KeyF58: "\x1b[313z", 87 | KeyF59: "\x1b[314z", 88 | KeyF60: "\x1b[300z", 89 | KeyPrint: "\x1b[i", 90 | KeyClear: "\x1b[2J", 91 | }) 92 | } 93 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_dtterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // CDE desktop terminal 7 | AddTerminfo(&Terminfo{ 8 | Name: "dtterm", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | ShowCursor: "\x1b[?25h", 15 | HideCursor: "\x1b[?25l", 16 | AttrOff: "\x1b[m\x0017", 17 | Underline: "\x1b[4m", 18 | Bold: "\x1b[1m", 19 | Dim: "\x1b[2m", 20 | Blink: "\x1b[5m", 21 | Reverse: "\x1b[7m", 22 | SetFg: "\x1b[3%p1%dm", 23 | SetBg: "\x1b[4%p1%dm", 24 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 25 | PadChar: "\x00", 26 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 27 | EnterAcs: "\x0e", 28 | ExitAcs: "\x0f", 29 | EnableAcs: "\x1b(B\x1b)0", 30 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 31 | CursorBack1: "\b", 32 | CursorUp1: "\x1b[A", 33 | KeyUp: "\x1b[A", 34 | KeyDown: "\x1b[B", 35 | KeyRight: "\x1b[C", 36 | KeyLeft: "\x1b[D", 37 | KeyInsert: "\x1b[2~", 38 | KeyDelete: "\x1b[3~", 39 | KeyBackspace: "\b", 40 | KeyPgUp: "\x1b[5~", 41 | KeyPgDn: "\x1b[6~", 42 | KeyF1: "\x1b[11~", 43 | KeyF2: "\x1b[12~", 44 | KeyF3: "\x1b[13~", 45 | KeyF4: "\x1b[14~", 46 | KeyF5: "\x1b[15~", 47 | KeyF6: "\x1b[17~", 48 | KeyF7: "\x1b[18~", 49 | KeyF8: "\x1b[19~", 50 | KeyF9: "\x1b[20~", 51 | KeyF10: "\x1b[21~", 52 | KeyF11: "\x1b[23~", 53 | KeyF12: "\x1b[24~", 54 | KeyF13: "\x1b[25~", 55 | KeyF14: "\x1b[26~", 56 | KeyF15: "\x1b[28~", 57 | KeyF16: "\x1b[29~", 58 | KeyF17: "\x1b[31~", 59 | KeyF18: "\x1b[32~", 60 | KeyF19: "\x1b[33~", 61 | KeyF20: "\x1b[34~", 62 | KeyHelp: "\x1b[28~", 63 | }) 64 | } 65 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_hpterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // hp X11 terminal emulator 7 | AddTerminfo(&Terminfo{ 8 | Name: "hpterm", 9 | Aliases: []string{"X-hpterm"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b&a0y0C\x1bJ", 14 | AttrOff: "\x1b&d@", 15 | Underline: "\x1b&dD", 16 | Bold: "\x1b&dB", 17 | Dim: "\x1b&dH", 18 | Reverse: "\x1b&dB", 19 | EnterKeypad: "\x1b&s1A", 20 | ExitKeypad: "\x1b&s0A", 21 | PadChar: "\x00", 22 | EnterAcs: "\x0e", 23 | ExitAcs: "\x0f", 24 | SetCursor: "\x1b&a%p1%dy%p2%dC", 25 | CursorBack1: "\b", 26 | CursorUp1: "\x1bA", 27 | KeyUp: "\x1bA", 28 | KeyDown: "\x1bB", 29 | KeyRight: "\x1bC", 30 | KeyLeft: "\x1bD", 31 | KeyInsert: "\x1bQ", 32 | KeyDelete: "\x1bP", 33 | KeyBackspace: "\b", 34 | KeyHome: "\x1bh", 35 | KeyPgUp: "\x1bV", 36 | KeyPgDn: "\x1bU", 37 | KeyF1: "\x1bp", 38 | KeyF2: "\x1bq", 39 | KeyF3: "\x1br", 40 | KeyF4: "\x1bs", 41 | KeyF5: "\x1bt", 42 | KeyF6: "\x1bu", 43 | KeyF7: "\x1bv", 44 | KeyF8: "\x1bw", 45 | KeyClear: "\x1bJ", 46 | }) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_hz1500.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // hazeltine 1500 7 | AddTerminfo(&Terminfo{ 8 | Name: "hz1500", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "~\x1c", 13 | PadChar: "\x00", 14 | SetCursor: "~\x0021%p2%p2%?%{30}%>%t%' '%+%;%'`'%+%c%p1%'`'%+%c", 15 | CursorBack1: "\b", 16 | CursorUp1: "~\f", 17 | KeyUp: "~\f", 18 | KeyDown: "\n", 19 | KeyRight: "\x10", 20 | KeyLeft: "\b", 21 | KeyHome: "~\x12", 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_konsole.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // KDE console window 7 | AddTerminfo(&Terminfo{ 8 | Name: "konsole", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Clear: "\x1b[H\x1b[2J", 13 | EnterCA: "\x1b7\x1b[?47h", 14 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 15 | ShowCursor: "\x1b[?25h", 16 | HideCursor: "\x1b[?25l", 17 | AttrOff: "\x1b[0m\x0017", 18 | Underline: "\x1b[4m", 19 | Bold: "\x1b[1m", 20 | Blink: "\x1b[5m", 21 | Reverse: "\x1b[7m", 22 | EnterKeypad: "\x1b[?1h\x1b=", 23 | ExitKeypad: "\x1b[?1l\x1b>", 24 | SetFg: "\x1b[3%p1%dm", 25 | SetBg: "\x1b[4%p1%dm", 26 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 27 | AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 28 | EnterAcs: "\x0e", 29 | ExitAcs: "\x0f", 30 | EnableAcs: "\x1b)0", 31 | Mouse: "\x1b[M", 32 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 33 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 34 | CursorBack1: "\b", 35 | CursorUp1: "\x1b[A", 36 | KeyUp: "\x1bOA", 37 | KeyDown: "\x1bOB", 38 | KeyRight: "\x1bOC", 39 | KeyLeft: "\x1bOD", 40 | KeyInsert: "\x1b[2~", 41 | KeyDelete: "\x1b[3~", 42 | KeyBackspace: "177", 43 | KeyHome: "\x1bOH", 44 | KeyEnd: "\x1bOF", 45 | KeyPgUp: "\x1b[5~", 46 | KeyPgDn: "\x1b[6~", 47 | KeyF1: "\x1bOP", 48 | KeyF2: "\x1bOQ", 49 | KeyF3: "\x1bOR", 50 | KeyF4: "\x1bOS", 51 | KeyF5: "\x1b[15~", 52 | KeyF6: "\x1b[17~", 53 | KeyF7: "\x1b[18~", 54 | KeyF8: "\x1b[19~", 55 | KeyF9: "\x1b[20~", 56 | KeyF10: "\x1b[21~", 57 | KeyF11: "\x1b[23~", 58 | KeyF12: "\x1b[24~", 59 | KeyF13: "\x1bO2P", 60 | KeyF14: "\x1bO2Q", 61 | KeyF15: "\x1bO2R", 62 | KeyF16: "\x1bO2S", 63 | KeyF17: "\x1b[15;2~", 64 | KeyF18: "\x1b[17;2~", 65 | KeyF19: "\x1b[18;2~", 66 | KeyF20: "\x1b[19;2~", 67 | KeyF21: "\x1b[20;2~", 68 | KeyF22: "\x1b[21;2~", 69 | KeyF23: "\x1b[23;2~", 70 | KeyF24: "\x1b[24;2~", 71 | KeyF25: "\x1bO5P", 72 | KeyF26: "\x1bO5Q", 73 | KeyF27: "\x1bO5R", 74 | KeyF28: "\x1bO5S", 75 | KeyF29: "\x1b[15;5~", 76 | KeyF30: "\x1b[17;5~", 77 | KeyF31: "\x1b[18;5~", 78 | KeyF32: "\x1b[19;5~", 79 | KeyF33: "\x1b[20;5~", 80 | KeyF34: "\x1b[21;5~", 81 | KeyF35: "\x1b[23;5~", 82 | KeyF36: "\x1b[24;5~", 83 | KeyF37: "\x1bO6P", 84 | KeyF38: "\x1bO6Q", 85 | KeyF39: "\x1bO6R", 86 | KeyF40: "\x1bO6S", 87 | KeyF41: "\x1b[15;6~", 88 | KeyF42: "\x1b[17;6~", 89 | KeyF43: "\x1b[18;6~", 90 | KeyF44: "\x1b[19;6~", 91 | KeyF45: "\x1b[20;6~", 92 | KeyF46: "\x1b[21;6~", 93 | KeyF47: "\x1b[23;6~", 94 | KeyF48: "\x1b[24;6~", 95 | KeyF49: "\x1bO3P", 96 | KeyF50: "\x1bO3Q", 97 | KeyF51: "\x1bO3R", 98 | KeyF52: "\x1bO3S", 99 | KeyF53: "\x1b[15;3~", 100 | KeyF54: "\x1b[17;3~", 101 | KeyF55: "\x1b[18;3~", 102 | KeyF56: "\x1b[19;3~", 103 | KeyF57: "\x1b[20;3~", 104 | KeyF58: "\x1b[21;3~", 105 | KeyF59: "\x1b[23;3~", 106 | KeyF60: "\x1b[24;3~", 107 | KeyF61: "\x1bO4P", 108 | KeyF62: "\x1bO4Q", 109 | KeyF63: "\x1bO4R", 110 | KeyBacktab: "\x1b[Z", 111 | }) 112 | } 113 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_konsole_256color.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // KDE console window with xterm 256-colors 7 | AddTerminfo(&Terminfo{ 8 | Name: "konsole-256color", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 256, 12 | Clear: "\x1b[H\x1b[2J", 13 | EnterCA: "\x1b7\x1b[?47h", 14 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 15 | ShowCursor: "\x1b[?25h", 16 | HideCursor: "\x1b[?25l", 17 | AttrOff: "\x1b[0m\x0017", 18 | Underline: "\x1b[4m", 19 | Bold: "\x1b[1m", 20 | Blink: "\x1b[5m", 21 | Reverse: "\x1b[7m", 22 | EnterKeypad: "\x1b[?1h\x1b=", 23 | ExitKeypad: "\x1b[?1l\x1b>", 24 | SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", 25 | SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", 26 | SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", 27 | AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 28 | EnterAcs: "\x0e", 29 | ExitAcs: "\x0f", 30 | EnableAcs: "\x1b)0", 31 | Mouse: "\x1b[M", 32 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 33 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 34 | CursorBack1: "\b", 35 | CursorUp1: "\x1b[A", 36 | KeyUp: "\x1bOA", 37 | KeyDown: "\x1bOB", 38 | KeyRight: "\x1bOC", 39 | KeyLeft: "\x1bOD", 40 | KeyInsert: "\x1b[2~", 41 | KeyDelete: "\x1b[3~", 42 | KeyBackspace: "177", 43 | KeyHome: "\x1bOH", 44 | KeyEnd: "\x1bOF", 45 | KeyPgUp: "\x1b[5~", 46 | KeyPgDn: "\x1b[6~", 47 | KeyF1: "\x1bOP", 48 | KeyF2: "\x1bOQ", 49 | KeyF3: "\x1bOR", 50 | KeyF4: "\x1bOS", 51 | KeyF5: "\x1b[15~", 52 | KeyF6: "\x1b[17~", 53 | KeyF7: "\x1b[18~", 54 | KeyF8: "\x1b[19~", 55 | KeyF9: "\x1b[20~", 56 | KeyF10: "\x1b[21~", 57 | KeyF11: "\x1b[23~", 58 | KeyF12: "\x1b[24~", 59 | KeyF13: "\x1bO2P", 60 | KeyF14: "\x1bO2Q", 61 | KeyF15: "\x1bO2R", 62 | KeyF16: "\x1bO2S", 63 | KeyF17: "\x1b[15;2~", 64 | KeyF18: "\x1b[17;2~", 65 | KeyF19: "\x1b[18;2~", 66 | KeyF20: "\x1b[19;2~", 67 | KeyF21: "\x1b[20;2~", 68 | KeyF22: "\x1b[21;2~", 69 | KeyF23: "\x1b[23;2~", 70 | KeyF24: "\x1b[24;2~", 71 | KeyF25: "\x1bO5P", 72 | KeyF26: "\x1bO5Q", 73 | KeyF27: "\x1bO5R", 74 | KeyF28: "\x1bO5S", 75 | KeyF29: "\x1b[15;5~", 76 | KeyF30: "\x1b[17;5~", 77 | KeyF31: "\x1b[18;5~", 78 | KeyF32: "\x1b[19;5~", 79 | KeyF33: "\x1b[20;5~", 80 | KeyF34: "\x1b[21;5~", 81 | KeyF35: "\x1b[23;5~", 82 | KeyF36: "\x1b[24;5~", 83 | KeyF37: "\x1bO6P", 84 | KeyF38: "\x1bO6Q", 85 | KeyF39: "\x1bO6R", 86 | KeyF40: "\x1bO6S", 87 | KeyF41: "\x1b[15;6~", 88 | KeyF42: "\x1b[17;6~", 89 | KeyF43: "\x1b[18;6~", 90 | KeyF44: "\x1b[19;6~", 91 | KeyF45: "\x1b[20;6~", 92 | KeyF46: "\x1b[21;6~", 93 | KeyF47: "\x1b[23;6~", 94 | KeyF48: "\x1b[24;6~", 95 | KeyF49: "\x1bO3P", 96 | KeyF50: "\x1bO3Q", 97 | KeyF51: "\x1bO3R", 98 | KeyF52: "\x1bO3S", 99 | KeyF53: "\x1b[15;3~", 100 | KeyF54: "\x1b[17;3~", 101 | KeyF55: "\x1b[18;3~", 102 | KeyF56: "\x1b[19;3~", 103 | KeyF57: "\x1b[20;3~", 104 | KeyF58: "\x1b[21;3~", 105 | KeyF59: "\x1b[23;3~", 106 | KeyF60: "\x1b[24;3~", 107 | KeyF61: "\x1bO4P", 108 | KeyF62: "\x1bO4Q", 109 | KeyF63: "\x1bO4R", 110 | KeyBacktab: "\x1b[Z", 111 | }) 112 | } 113 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_kterm.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // kterm kanji terminal emulator (X window system) 7 | AddTerminfo(&Terminfo{ 8 | Name: "kterm", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b7\x1b[?47h", 15 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 16 | AttrOff: "\x1b[m\x1b(B", 17 | Underline: "\x1b[4m", 18 | Bold: "\x1b[1m", 19 | Reverse: "\x1b[7m", 20 | EnterKeypad: "\x1b[?1h\x1b=", 21 | ExitKeypad: "\x1b[?1l\x1b>", 22 | SetFg: "\x1b[3%p1%dm", 23 | SetBg: "\x1b[4%p1%dm", 24 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 25 | PadChar: "\x00", 26 | AltChars: "``aajjkkllmmnnooppqqrrssttuuvvwwxx~~", 27 | EnterAcs: "\x1b(0", 28 | ExitAcs: "\x1b(B", 29 | Mouse: "\x1b[M", 30 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 31 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 32 | CursorBack1: "\b", 33 | CursorUp1: "\x1b[A", 34 | KeyUp: "\x1bOA", 35 | KeyDown: "\x1bOB", 36 | KeyRight: "\x1bOC", 37 | KeyLeft: "\x1bOD", 38 | KeyInsert: "\x1b[2~", 39 | KeyDelete: "\x1b[3~", 40 | KeyBackspace: "\b", 41 | KeyPgUp: "\x1b[5~", 42 | KeyPgDn: "\x1b[6~", 43 | KeyF1: "\x1b[11~", 44 | KeyF2: "\x1b[12~", 45 | KeyF3: "\x1b[13~", 46 | KeyF4: "\x1b[14~", 47 | KeyF5: "\x1b[15~", 48 | KeyF6: "\x1b[17~", 49 | KeyF7: "\x1b[18~", 50 | KeyF8: "\x1b[19~", 51 | KeyF9: "\x1b[20~", 52 | KeyF10: "\x1b[21~", 53 | KeyF11: "\x1b[23~", 54 | KeyF12: "\x1b[24~", 55 | KeyF13: "\x1b[25~", 56 | KeyF14: "\x1b[26~", 57 | KeyF15: "\x1b[28~", 58 | KeyF16: "\x1b[29~", 59 | KeyF17: "\x1b[31~", 60 | KeyF18: "\x1b[32~", 61 | KeyF19: "\x1b[33~", 62 | KeyF20: "\x1b[34~", 63 | }) 64 | } 65 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_linux.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // linux console 7 | AddTerminfo(&Terminfo{ 8 | Name: "linux", 9 | Colors: 8, 10 | Bell: "\a", 11 | Clear: "\x1b[H\x1b[J", 12 | ShowCursor: "\x1b[?25h\x1b[?0c", 13 | HideCursor: "\x1b[?25l\x1b[?1c", 14 | AttrOff: "\x1b[0;10m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Dim: "\x1b[2m", 18 | Blink: "\x1b[5m", 19 | Reverse: "\x1b[7m", 20 | SetFg: "\x1b[3%p1%dm", 21 | SetBg: "\x1b[4%p1%dm", 22 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 23 | PadChar: "\x00", 24 | AltChars: "+\x0020,\x0021-\x0030.\x190333`\x0004a261f370g361h260i316j331k277l332m300n305o~p304q304r304s_t303u264v301w302x263y363z362{343|330}234~376", 25 | EnterAcs: "\x1b[11m", 26 | ExitAcs: "\x1b[10m", 27 | Mouse: "\x1b[M", 28 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 29 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 30 | CursorBack1: "\b", 31 | CursorUp1: "\x1b[A", 32 | KeyUp: "\x1b[A", 33 | KeyDown: "\x1b[B", 34 | KeyRight: "\x1b[C", 35 | KeyLeft: "\x1b[D", 36 | KeyInsert: "\x1b[2~", 37 | KeyDelete: "\x1b[3~", 38 | KeyBackspace: "177", 39 | KeyHome: "\x1b[1~", 40 | KeyEnd: "\x1b[4~", 41 | KeyPgUp: "\x1b[5~", 42 | KeyPgDn: "\x1b[6~", 43 | KeyF1: "\x1b[[A", 44 | KeyF2: "\x1b[[B", 45 | KeyF3: "\x1b[[C", 46 | KeyF4: "\x1b[[D", 47 | KeyF5: "\x1b[[E", 48 | KeyF6: "\x1b[17~", 49 | KeyF7: "\x1b[18~", 50 | KeyF8: "\x1b[19~", 51 | KeyF9: "\x1b[20~", 52 | KeyF10: "\x1b[21~", 53 | KeyF11: "\x1b[23~", 54 | KeyF12: "\x1b[24~", 55 | KeyF13: "\x1b[25~", 56 | KeyF14: "\x1b[26~", 57 | KeyF15: "\x1b[28~", 58 | KeyF16: "\x1b[29~", 59 | KeyF17: "\x1b[31~", 60 | KeyF18: "\x1b[32~", 61 | KeyF19: "\x1b[33~", 62 | KeyF20: "\x1b[34~", 63 | KeyBacktab: "\x1b[Z", 64 | }) 65 | } 66 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_pcansi.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // ibm-pc terminal programs claiming to be ansi 7 | AddTerminfo(&Terminfo{ 8 | Name: "pcansi", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | AttrOff: "\x1b[0;10m", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Blink: "\x1b[5m", 18 | Reverse: "\x1b[7m", 19 | SetFg: "\x1b[3%p1%dm", 20 | SetBg: "\x1b[4%p1%dm", 21 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 22 | PadChar: "\x00", 23 | AltChars: "+\x0020,\x0021-\x0030.\x190333`\x0004a261f370g361h260j331k277l332m300n305o~p304q304r304s_t303u264v301w302x263y363z362{343|330}234~376", 24 | EnterAcs: "\x1b[12m", 25 | ExitAcs: "\x1b[10m", 26 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 27 | CursorBack1: "\x1b[D", 28 | CursorUp1: "\x1b[A", 29 | KeyUp: "\x1b[A", 30 | KeyDown: "\x1b[B", 31 | KeyRight: "\x1b[C", 32 | KeyLeft: "\x1b[D", 33 | KeyBackspace: "\b", 34 | KeyHome: "\x1b[H", 35 | }) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_rxvt.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // rxvt terminal emulator (X Window System) 7 | AddTerminfo(&Terminfo{ 8 | Name: "rxvt", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b7\x1b[?47h", 15 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 16 | ShowCursor: "\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x0017", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b=", 24 | ExitKeypad: "\x1b>", 25 | SetFg: "\x1b[3%p1%dm", 26 | SetBg: "\x1b[4%p1%dm", 27 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 28 | PadChar: "\x00", 29 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 30 | EnterAcs: "\x0e", 31 | ExitAcs: "\x0f", 32 | EnableAcs: "\x1b(B\x1b)0", 33 | Mouse: "\x1b[M", 34 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 35 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 36 | CursorBack1: "\b", 37 | CursorUp1: "\x1b[A", 38 | KeyUp: "\x1b[A", 39 | KeyDown: "\x1b[B", 40 | KeyRight: "\x1b[C", 41 | KeyLeft: "\x1b[D", 42 | KeyInsert: "\x1b[2~", 43 | KeyDelete: "\x1b[3~", 44 | KeyBackspace: "\b", 45 | KeyHome: "\x1b[7~", 46 | KeyEnd: "\x1b[8~", 47 | KeyPgUp: "\x1b[5~", 48 | KeyPgDn: "\x1b[6~", 49 | KeyF1: "\x1b[11~", 50 | KeyF2: "\x1b[12~", 51 | KeyF3: "\x1b[13~", 52 | KeyF4: "\x1b[14~", 53 | KeyF5: "\x1b[15~", 54 | KeyF6: "\x1b[17~", 55 | KeyF7: "\x1b[18~", 56 | KeyF8: "\x1b[19~", 57 | KeyF9: "\x1b[20~", 58 | KeyF10: "\x1b[21~", 59 | KeyF11: "\x1b[23~", 60 | KeyF12: "\x1b[24~", 61 | KeyF13: "\x1b[25~", 62 | KeyF14: "\x1b[26~", 63 | KeyF15: "\x1b[28~", 64 | KeyF16: "\x1b[29~", 65 | KeyF17: "\x1b[31~", 66 | KeyF18: "\x1b[32~", 67 | KeyF19: "\x1b[33~", 68 | KeyF20: "\x1b[34~", 69 | KeyF21: "\x1b[23$", 70 | KeyF22: "\x1b[24$", 71 | KeyF23: "\x1b[11^", 72 | KeyF24: "\x1b[12^", 73 | KeyF25: "\x1b[13^", 74 | KeyF26: "\x1b[14^", 75 | KeyF27: "\x1b[15^", 76 | KeyF28: "\x1b[17^", 77 | KeyF29: "\x1b[18^", 78 | KeyF30: "\x1b[19^", 79 | KeyF31: "\x1b[20^", 80 | KeyF32: "\x1b[21^", 81 | KeyF33: "\x1b[23^", 82 | KeyF34: "\x1b[24^", 83 | KeyF35: "\x1b[25^", 84 | KeyF36: "\x1b[26^", 85 | KeyF37: "\x1b[28^", 86 | KeyF38: "\x1b[29^", 87 | KeyF39: "\x1b[31^", 88 | KeyF40: "\x1b[32^", 89 | KeyF41: "\x1b[33^", 90 | KeyF42: "\x1b[34^", 91 | KeyF43: "\x1b[23@", 92 | KeyF44: "\x1b[24@", 93 | KeyBacktab: "\x1b[Z", 94 | KeyShfLeft: "\x1b[d", 95 | KeyShfRight: "\x1b[c", 96 | KeyShfUp: "\x1b[a", 97 | KeyShfDown: "\x1b[b", 98 | KeyCtrlLeft: "\x1b[Od", 99 | KeyCtrlRight: "\x1b[Oc", 100 | KeyCtrlUp: "\x1b[Oa", 101 | KeyCtrlDown: "\x1b[Ob", 102 | KeyShfHome: "\x1b[7$", 103 | KeyShfEnd: "\x1b[8$", 104 | KeyCtrlHome: "\x1b[7^", 105 | KeyCtrlEnd: "\x1b[8^", 106 | }) 107 | } 108 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_rxvt_256color.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // rxvt 2.7.9 with xterm 256-colors 7 | AddTerminfo(&Terminfo{ 8 | Name: "rxvt-256color", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 256, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b7\x1b[?47h", 15 | ExitCA: "\x1b[2J\x1b[?47l\x1b8", 16 | ShowCursor: "\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x0017", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b=", 24 | ExitKeypad: "\x1b>", 25 | SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", 26 | SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", 27 | SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", 28 | PadChar: "\x00", 29 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 30 | EnterAcs: "\x0e", 31 | ExitAcs: "\x0f", 32 | EnableAcs: "\x1b(B\x1b)0", 33 | Mouse: "\x1b[M", 34 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 35 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 36 | CursorBack1: "\b", 37 | CursorUp1: "\x1b[A", 38 | KeyUp: "\x1b[A", 39 | KeyDown: "\x1b[B", 40 | KeyRight: "\x1b[C", 41 | KeyLeft: "\x1b[D", 42 | KeyInsert: "\x1b[2~", 43 | KeyDelete: "\x1b[3~", 44 | KeyBackspace: "\b", 45 | KeyHome: "\x1b[7~", 46 | KeyEnd: "\x1b[8~", 47 | KeyPgUp: "\x1b[5~", 48 | KeyPgDn: "\x1b[6~", 49 | KeyF1: "\x1b[11~", 50 | KeyF2: "\x1b[12~", 51 | KeyF3: "\x1b[13~", 52 | KeyF4: "\x1b[14~", 53 | KeyF5: "\x1b[15~", 54 | KeyF6: "\x1b[17~", 55 | KeyF7: "\x1b[18~", 56 | KeyF8: "\x1b[19~", 57 | KeyF9: "\x1b[20~", 58 | KeyF10: "\x1b[21~", 59 | KeyF11: "\x1b[23~", 60 | KeyF12: "\x1b[24~", 61 | KeyF13: "\x1b[25~", 62 | KeyF14: "\x1b[26~", 63 | KeyF15: "\x1b[28~", 64 | KeyF16: "\x1b[29~", 65 | KeyF17: "\x1b[31~", 66 | KeyF18: "\x1b[32~", 67 | KeyF19: "\x1b[33~", 68 | KeyF20: "\x1b[34~", 69 | KeyF21: "\x1b[23$", 70 | KeyF22: "\x1b[24$", 71 | KeyF23: "\x1b[11^", 72 | KeyF24: "\x1b[12^", 73 | KeyF25: "\x1b[13^", 74 | KeyF26: "\x1b[14^", 75 | KeyF27: "\x1b[15^", 76 | KeyF28: "\x1b[17^", 77 | KeyF29: "\x1b[18^", 78 | KeyF30: "\x1b[19^", 79 | KeyF31: "\x1b[20^", 80 | KeyF32: "\x1b[21^", 81 | KeyF33: "\x1b[23^", 82 | KeyF34: "\x1b[24^", 83 | KeyF35: "\x1b[25^", 84 | KeyF36: "\x1b[26^", 85 | KeyF37: "\x1b[28^", 86 | KeyF38: "\x1b[29^", 87 | KeyF39: "\x1b[31^", 88 | KeyF40: "\x1b[32^", 89 | KeyF41: "\x1b[33^", 90 | KeyF42: "\x1b[34^", 91 | KeyF43: "\x1b[23@", 92 | KeyF44: "\x1b[24@", 93 | KeyBacktab: "\x1b[Z", 94 | KeyShfLeft: "\x1b[d", 95 | KeyShfRight: "\x1b[c", 96 | KeyShfUp: "\x1b[a", 97 | KeyShfDown: "\x1b[b", 98 | KeyCtrlLeft: "\x1b[Od", 99 | KeyCtrlRight: "\x1b[Oc", 100 | KeyCtrlUp: "\x1b[Oa", 101 | KeyCtrlDown: "\x1b[Ob", 102 | KeyShfHome: "\x1b[7$", 103 | KeyShfEnd: "\x1b[8$", 104 | KeyCtrlHome: "\x1b[7^", 105 | KeyCtrlEnd: "\x1b[8^", 106 | }) 107 | } 108 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_rxvt_unicode.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // rxvt-unicode terminal (X Window System) 7 | AddTerminfo(&Terminfo{ 8 | Name: "rxvt-unicode", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 88, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b[?1049h", 15 | ExitCA: "\x1b[r\x1b[?1049l", 16 | ShowCursor: "\x1b[?12l\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x1b(B", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b=", 24 | ExitKeypad: "\x1b>", 25 | SetFg: "\x1b[38;5;%p1%dm", 26 | SetBg: "\x1b[48;5;%p1%dm", 27 | SetFgBg: "\x1b[38;5;%p1%d;48;5;%p2%dm", 28 | AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 29 | EnterAcs: "\x1b(0", 30 | ExitAcs: "\x1b(B", 31 | Mouse: "\x1b[M", 32 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 33 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 34 | CursorBack1: "\b", 35 | CursorUp1: "\x1b[A", 36 | KeyUp: "\x1b[A", 37 | KeyDown: "\x1b[B", 38 | KeyRight: "\x1b[C", 39 | KeyLeft: "\x1b[D", 40 | KeyInsert: "\x1b[2~", 41 | KeyDelete: "\x1b[3~", 42 | KeyBackspace: "177", 43 | KeyHome: "\x1b[7~", 44 | KeyEnd: "\x1b[8~", 45 | KeyPgUp: "\x1b[5~", 46 | KeyPgDn: "\x1b[6~", 47 | KeyF1: "\x1b[11~", 48 | KeyF2: "\x1b[12~", 49 | KeyF3: "\x1b[13~", 50 | KeyF4: "\x1b[14~", 51 | KeyF5: "\x1b[15~", 52 | KeyF6: "\x1b[17~", 53 | KeyF7: "\x1b[18~", 54 | KeyF8: "\x1b[19~", 55 | KeyF9: "\x1b[20~", 56 | KeyF10: "\x1b[21~", 57 | KeyF11: "\x1b[23~", 58 | KeyF12: "\x1b[24~", 59 | KeyF13: "\x1b[25~", 60 | KeyF14: "\x1b[26~", 61 | KeyF15: "\x1b[28~", 62 | KeyF16: "\x1b[29~", 63 | KeyF17: "\x1b[31~", 64 | KeyF18: "\x1b[32~", 65 | KeyF19: "\x1b[33~", 66 | KeyF20: "\x1b[34~", 67 | KeyBacktab: "\x1b[Z", 68 | KeyShfLeft: "\x1b[d", 69 | KeyShfRight: "\x1b[c", 70 | KeyShfUp: "\x1b[a", 71 | KeyShfDown: "\x1b[b", 72 | KeyCtrlLeft: "\x1b[Od", 73 | KeyCtrlRight: "\x1b[Oc", 74 | KeyCtrlUp: "\x1b[Oa", 75 | KeyCtrlDown: "\x1b[Ob", 76 | KeyShfHome: "\x1b[7$", 77 | KeyShfEnd: "\x1b[8$", 78 | KeyCtrlHome: "\x1b[7^", 79 | KeyCtrlEnd: "\x1b[8^", 80 | }) 81 | } 82 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_rxvt_unicode_256color.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // rxvt-unicode terminal with 256 colors (X Window System) 7 | AddTerminfo(&Terminfo{ 8 | Name: "rxvt-unicode-256color", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 256, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | EnterCA: "\x1b[?1049h", 15 | ExitCA: "\x1b[r\x1b[?1049l", 16 | ShowCursor: "\x1b[?12l\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x1b(B", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b=", 24 | ExitKeypad: "\x1b>", 25 | SetFg: "\x1b[38;5;%p1%dm", 26 | SetBg: "\x1b[48;5;%p1%dm", 27 | SetFgBg: "\x1b[38;5;%p1%d;48;5;%p2%dm", 28 | AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 29 | EnterAcs: "\x1b(0", 30 | ExitAcs: "\x1b(B", 31 | Mouse: "\x1b[M", 32 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 33 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 34 | CursorBack1: "\b", 35 | CursorUp1: "\x1b[A", 36 | KeyUp: "\x1b[A", 37 | KeyDown: "\x1b[B", 38 | KeyRight: "\x1b[C", 39 | KeyLeft: "\x1b[D", 40 | KeyInsert: "\x1b[2~", 41 | KeyDelete: "\x1b[3~", 42 | KeyBackspace: "177", 43 | KeyHome: "\x1b[7~", 44 | KeyEnd: "\x1b[8~", 45 | KeyPgUp: "\x1b[5~", 46 | KeyPgDn: "\x1b[6~", 47 | KeyF1: "\x1b[11~", 48 | KeyF2: "\x1b[12~", 49 | KeyF3: "\x1b[13~", 50 | KeyF4: "\x1b[14~", 51 | KeyF5: "\x1b[15~", 52 | KeyF6: "\x1b[17~", 53 | KeyF7: "\x1b[18~", 54 | KeyF8: "\x1b[19~", 55 | KeyF9: "\x1b[20~", 56 | KeyF10: "\x1b[21~", 57 | KeyF11: "\x1b[23~", 58 | KeyF12: "\x1b[24~", 59 | KeyF13: "\x1b[25~", 60 | KeyF14: "\x1b[26~", 61 | KeyF15: "\x1b[28~", 62 | KeyF16: "\x1b[29~", 63 | KeyF17: "\x1b[31~", 64 | KeyF18: "\x1b[32~", 65 | KeyF19: "\x1b[33~", 66 | KeyF20: "\x1b[34~", 67 | KeyBacktab: "\x1b[Z", 68 | KeyShfLeft: "\x1b[d", 69 | KeyShfRight: "\x1b[c", 70 | KeyShfUp: "\x1b[a", 71 | KeyShfDown: "\x1b[b", 72 | KeyCtrlLeft: "\x1b[Od", 73 | KeyCtrlRight: "\x1b[Oc", 74 | KeyCtrlUp: "\x1b[Oa", 75 | KeyCtrlDown: "\x1b[Ob", 76 | KeyShfHome: "\x1b[7$", 77 | KeyShfEnd: "\x1b[8$", 78 | KeyCtrlHome: "\x1b[7^", 79 | KeyCtrlEnd: "\x1b[8^", 80 | }) 81 | } 82 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_screen.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // VT 100/ANSI X3.64 virtual terminal 7 | AddTerminfo(&Terminfo{ 8 | Name: "screen", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | EnterCA: "\x1b[?1049h", 15 | ExitCA: "\x1b[?1049l", 16 | ShowCursor: "\x1b[34h\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x0017", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b[?1h\x1b=", 24 | ExitKeypad: "\x1b[?1l\x1b>", 25 | SetFg: "\x1b[3%p1%dm", 26 | SetBg: "\x1b[4%p1%dm", 27 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 28 | PadChar: "\x00", 29 | AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 30 | EnterAcs: "\x0e", 31 | ExitAcs: "\x0f", 32 | EnableAcs: "\x1b(B\x1b)0", 33 | Mouse: "\x1b[M", 34 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 35 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 36 | CursorBack1: "\b", 37 | CursorUp1: "\x1bM", 38 | KeyUp: "\x1bOA", 39 | KeyDown: "\x1bOB", 40 | KeyRight: "\x1bOC", 41 | KeyLeft: "\x1bOD", 42 | KeyInsert: "\x1b[2~", 43 | KeyDelete: "\x1b[3~", 44 | KeyBackspace: "\b", 45 | KeyHome: "\x1b[1~", 46 | KeyEnd: "\x1b[4~", 47 | KeyPgUp: "\x1b[5~", 48 | KeyPgDn: "\x1b[6~", 49 | KeyF1: "\x1bOP", 50 | KeyF2: "\x1bOQ", 51 | KeyF3: "\x1bOR", 52 | KeyF4: "\x1bOS", 53 | KeyF5: "\x1b[15~", 54 | KeyF6: "\x1b[17~", 55 | KeyF7: "\x1b[18~", 56 | KeyF8: "\x1b[19~", 57 | KeyF9: "\x1b[20~", 58 | KeyF10: "\x1b[21~", 59 | KeyF11: "\x1b[23~", 60 | KeyF12: "\x1b[24~", 61 | KeyBacktab: "\x1b[Z", 62 | }) 63 | } 64 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_screen_256color.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // GNU Screen with 256 colors 7 | AddTerminfo(&Terminfo{ 8 | Name: "screen-256color", 9 | Columns: 80, 10 | Lines: 24, 11 | Colors: 256, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | EnterCA: "\x1b[?1049h", 15 | ExitCA: "\x1b[?1049l", 16 | ShowCursor: "\x1b[34h\x1b[?25h", 17 | HideCursor: "\x1b[?25l", 18 | AttrOff: "\x1b[m\x0017", 19 | Underline: "\x1b[4m", 20 | Bold: "\x1b[1m", 21 | Blink: "\x1b[5m", 22 | Reverse: "\x1b[7m", 23 | EnterKeypad: "\x1b[?1h\x1b=", 24 | ExitKeypad: "\x1b[?1l\x1b>", 25 | SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", 26 | SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", 27 | SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", 28 | PadChar: "\x00", 29 | AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 30 | EnterAcs: "\x0e", 31 | ExitAcs: "\x0f", 32 | EnableAcs: "\x1b(B\x1b)0", 33 | Mouse: "\x1b[M", 34 | MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c", 35 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 36 | CursorBack1: "\b", 37 | CursorUp1: "\x1bM", 38 | KeyUp: "\x1bOA", 39 | KeyDown: "\x1bOB", 40 | KeyRight: "\x1bOC", 41 | KeyLeft: "\x1bOD", 42 | KeyInsert: "\x1b[2~", 43 | KeyDelete: "\x1b[3~", 44 | KeyBackspace: "\b", 45 | KeyHome: "\x1b[1~", 46 | KeyEnd: "\x1b[4~", 47 | KeyPgUp: "\x1b[5~", 48 | KeyPgDn: "\x1b[6~", 49 | KeyF1: "\x1bOP", 50 | KeyF2: "\x1bOQ", 51 | KeyF3: "\x1bOR", 52 | KeyF4: "\x1bOS", 53 | KeyF5: "\x1b[15~", 54 | KeyF6: "\x1b[17~", 55 | KeyF7: "\x1b[18~", 56 | KeyF8: "\x1b[19~", 57 | KeyF9: "\x1b[20~", 58 | KeyF10: "\x1b[21~", 59 | KeyF11: "\x1b[23~", 60 | KeyF12: "\x1b[24~", 61 | KeyBacktab: "\x1b[Z", 62 | }) 63 | } 64 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_sun.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Sun Microsystems Inc. workstation console 7 | AddTerminfo(&Terminfo{ 8 | Name: "sun", 9 | Aliases: []string{"sun1", "sun2"}, 10 | Columns: 80, 11 | Lines: 34, 12 | Bell: "\a", 13 | Clear: "\f", 14 | AttrOff: "\x1b[m", 15 | Reverse: "\x1b[7m", 16 | PadChar: "\x00", 17 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 18 | CursorBack1: "\b", 19 | CursorUp1: "\x1b[A", 20 | KeyUp: "\x1b[A", 21 | KeyDown: "\x1b[B", 22 | KeyRight: "\x1b[C", 23 | KeyLeft: "\x1b[D", 24 | KeyDelete: "177", 25 | KeyBackspace: "\b", 26 | KeyHome: "\x1b[214z", 27 | KeyEnd: "\x1b[220z", 28 | KeyPgUp: "\x1b[216z", 29 | KeyPgDn: "\x1b[222z", 30 | KeyF1: "\x1b[224z", 31 | KeyF2: "\x1b[225z", 32 | KeyF3: "\x1b[226z", 33 | KeyF4: "\x1b[227z", 34 | KeyF5: "\x1b[228z", 35 | KeyF6: "\x1b[229z", 36 | KeyF7: "\x1b[230z", 37 | KeyF8: "\x1b[231z", 38 | KeyF9: "\x1b[232z", 39 | KeyF10: "\x1b[233z", 40 | KeyF11: "\x1b[234z", 41 | KeyF12: "\x1b[235z", 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_sun_color.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Sun Microsystems Workstation console with color support (IA systems) 7 | AddTerminfo(&Terminfo{ 8 | Name: "sun-color", 9 | Columns: 80, 10 | Lines: 34, 11 | Colors: 8, 12 | Bell: "\a", 13 | Clear: "\f", 14 | AttrOff: "\x1b[m", 15 | Reverse: "\x1b[7m", 16 | SetFg: "\x1b[3%p1%dm", 17 | SetBg: "\x1b[4%p1%dm", 18 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 19 | PadChar: "\x00", 20 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 21 | CursorBack1: "\b", 22 | CursorUp1: "\x1b[A", 23 | KeyUp: "\x1b[A", 24 | KeyDown: "\x1b[B", 25 | KeyRight: "\x1b[C", 26 | KeyLeft: "\x1b[D", 27 | KeyDelete: "177", 28 | KeyBackspace: "\b", 29 | KeyHome: "\x1b[214z", 30 | KeyEnd: "\x1b[220z", 31 | KeyPgUp: "\x1b[216z", 32 | KeyPgDn: "\x1b[222z", 33 | KeyF1: "\x1b[224z", 34 | KeyF2: "\x1b[225z", 35 | KeyF3: "\x1b[226z", 36 | KeyF4: "\x1b[227z", 37 | KeyF5: "\x1b[228z", 38 | KeyF6: "\x1b[229z", 39 | KeyF7: "\x1b[230z", 40 | KeyF8: "\x1b[231z", 41 | KeyF9: "\x1b[232z", 42 | KeyF10: "\x1b[233z", 43 | KeyF11: "\x1b[234z", 44 | KeyF12: "\x1b[235z", 45 | }) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_tvi910.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // televideo model 910 7 | AddTerminfo(&Terminfo{ 8 | Name: "tvi910", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1a", 13 | AttrOff: "\x1bG0", 14 | Underline: "\x1bG8", 15 | Reverse: "\x1bG4", 16 | PadChar: "\x00", 17 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 18 | CursorBack1: "\b", 19 | CursorUp1: "\v", 20 | KeyUp: "\v", 21 | KeyDown: "\n", 22 | KeyRight: "\f", 23 | KeyLeft: "\b", 24 | KeyBackspace: "\b", 25 | KeyHome: "\x1e", 26 | KeyF1: "\x01@\r", 27 | KeyF2: "\x01A\r", 28 | KeyF3: "\x01B\r", 29 | KeyF4: "\x01C\r", 30 | KeyF5: "\x01D\r", 31 | KeyF6: "\x01E\r", 32 | KeyF7: "\x01F\r", 33 | KeyF8: "\x01G\r", 34 | KeyF9: "\x01H\r", 35 | }) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_tvi912.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // old televideo 912/914/920 7 | AddTerminfo(&Terminfo{ 8 | Name: "tvi912", 9 | Aliases: []string{"tvi914", "tvi920"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1a", 14 | Underline: "\x1bl", 15 | PadChar: "\x00", 16 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 17 | CursorBack1: "\b", 18 | CursorUp1: "\v", 19 | KeyUp: "\v", 20 | KeyDown: "\n", 21 | KeyRight: "\f", 22 | KeyLeft: "\b", 23 | KeyBackspace: "\b", 24 | KeyHome: "\x1e", 25 | KeyF1: "\x01@\r", 26 | KeyF2: "\x01A\r", 27 | KeyF3: "\x01B\r", 28 | KeyF4: "\x01C\r", 29 | KeyF5: "\x01D\r", 30 | KeyF6: "\x01E\r", 31 | KeyF7: "\x01F\r", 32 | KeyF8: "\x01G\r", 33 | KeyF9: "\x01H\r", 34 | }) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_tvi921.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // televideo model 921 with sysline same as page & real vi function 7 | AddTerminfo(&Terminfo{ 8 | Name: "tvi921", 9 | Columns: 80, 10 | Lines: 24, 11 | Clear: "\x1a", 12 | ShowCursor: "\x1b.3", 13 | AttrOff: "\x1bG0", 14 | Underline: "\x1bG8", 15 | Reverse: "\x1bG4", 16 | PadChar: "\x00", 17 | EnterAcs: "\x1b$", 18 | ExitAcs: "\x1b%%", 19 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c$<3/>", 20 | CursorBack1: "\b", 21 | CursorUp1: "\v", 22 | KeyUp: "\v", 23 | KeyDown: "\x16", 24 | KeyRight: "\f", 25 | KeyLeft: "\b", 26 | KeyInsert: "\x1bQ", 27 | KeyDelete: "\x1bW", 28 | KeyBackspace: "\b", 29 | KeyClear: "\x1a", 30 | }) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_tvi925.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // televideo 925 7 | AddTerminfo(&Terminfo{ 8 | Name: "tvi925", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1a", 13 | ShowCursor: "\x1b.4", 14 | AttrOff: "\x1bG0", 15 | Underline: "\x1bG8", 16 | Reverse: "\x1bG4", 17 | PadChar: "\x00", 18 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 19 | CursorBack1: "\b", 20 | CursorUp1: "\v", 21 | KeyUp: "\v", 22 | KeyDown: "\x16", 23 | KeyRight: "\f", 24 | KeyLeft: "\b", 25 | KeyInsert: "\x1bQ", 26 | KeyDelete: "\x1bW", 27 | KeyBackspace: "\b", 28 | KeyHome: "\x1e", 29 | KeyF1: "\x01@\r", 30 | KeyF2: "\x01A\r", 31 | KeyF3: "\x01B\r", 32 | KeyF4: "\x01C\r", 33 | KeyF5: "\x01D\r", 34 | KeyF6: "\x01E\r", 35 | KeyF7: "\x01F\r", 36 | KeyF8: "\x01G\r", 37 | KeyF9: "\x01H\r", 38 | KeyClear: "\x1a", 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_tvi950.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // televideo 950 7 | AddTerminfo(&Terminfo{ 8 | Name: "tvi950", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1b*", 13 | AttrOff: "\x1bG0", 14 | Underline: "\x1bG8", 15 | Reverse: "\x1bG4", 16 | PadChar: "\x00", 17 | AltChars: "b\x0011c\x0014d\re\ni\x0013", 18 | EnterAcs: "\x15", 19 | ExitAcs: "\x18", 20 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 21 | CursorBack1: "\b", 22 | CursorUp1: "\v", 23 | KeyUp: "\v", 24 | KeyDown: "\x16", 25 | KeyRight: "\f", 26 | KeyLeft: "\b", 27 | KeyInsert: "\x1bQ", 28 | KeyDelete: "\x1bW", 29 | KeyBackspace: "\b", 30 | KeyHome: "\x1e", 31 | KeyF1: "\x01@\r", 32 | KeyF2: "\x01A\r", 33 | KeyF3: "\x01B\r", 34 | KeyF4: "\x01C\r", 35 | KeyF5: "\x01D\r", 36 | KeyF6: "\x01E\r", 37 | KeyF7: "\x01F\r", 38 | KeyF8: "\x01G\r", 39 | KeyF9: "\x01H\r", 40 | KeyClear: "\x1b*", 41 | KeyBacktab: "\x1bI", 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_tvi970.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // televideo 970 7 | AddTerminfo(&Terminfo{ 8 | Name: "tvi970", 9 | Columns: 80, 10 | Lines: 24, 11 | Clear: "\x1b[H\x1b[2J", 12 | EnterCA: "\x1b[?20l\x1b[?7h\x1b[1Q", 13 | AttrOff: "\x1b[m", 14 | Underline: "\x1b[4m", 15 | PadChar: "\x00", 16 | EnterAcs: "\x1b(B", 17 | ExitAcs: "\x1b(B", 18 | SetCursor: "\x1b[%i%p1%d;%p2%df", 19 | CursorBack1: "\b", 20 | CursorUp1: "\x1bM", 21 | KeyUp: "\x1b[A", 22 | KeyDown: "\x1b[B", 23 | KeyRight: "\x1b[C", 24 | KeyLeft: "\x1b[D", 25 | KeyBackspace: "\b", 26 | KeyHome: "\x1b[H", 27 | KeyF1: "\x1b?a", 28 | KeyF2: "\x1b?b", 29 | KeyF3: "\x1b?c", 30 | KeyF4: "\x1b?d", 31 | KeyF5: "\x1b?e", 32 | KeyF6: "\x1b?f", 33 | KeyF7: "\x1b?g", 34 | KeyF8: "\x1b?h", 35 | KeyF9: "\x1b?i", 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt100.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // dec vt100 (w/advanced video) 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt100", 9 | Aliases: []string{"vt100-am"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J$<50>", 14 | AttrOff: "\x1b[m\x0017$<2>", 15 | Underline: "\x1b[4m$<2>", 16 | Bold: "\x1b[1m$<2>", 17 | Blink: "\x1b[5m$<2>", 18 | Reverse: "\x1b[7m$<2>", 19 | EnterKeypad: "\x1b[?1h\x1b=", 20 | ExitKeypad: "\x1b[?1l\x1b>", 21 | PadChar: "\x00", 22 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 23 | EnterAcs: "\x0e", 24 | ExitAcs: "\x0f", 25 | EnableAcs: "\x1b(B\x1b)0", 26 | SetCursor: "\x1b[%i%p1%d;%p2%dH$<5>", 27 | CursorBack1: "\b", 28 | CursorUp1: "\x1b[A$<2>", 29 | KeyUp: "\x1bOA", 30 | KeyDown: "\x1bOB", 31 | KeyRight: "\x1bOC", 32 | KeyLeft: "\x1bOD", 33 | KeyBackspace: "\b", 34 | KeyF1: "\x1bOP", 35 | KeyF2: "\x1bOQ", 36 | KeyF3: "\x1bOR", 37 | KeyF4: "\x1bOS", 38 | KeyF5: "\x1bOt", 39 | KeyF6: "\x1bOu", 40 | KeyF7: "\x1bOv", 41 | KeyF8: "\x1bOl", 42 | KeyF9: "\x1bOw", 43 | KeyF10: "\x1bOx", 44 | }) 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt102.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // dec vt102 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt102", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1b[H\x1b[J$<50>", 13 | AttrOff: "\x1b[m\x0017$<2>", 14 | Underline: "\x1b[4m$<2>", 15 | Bold: "\x1b[1m$<2>", 16 | Blink: "\x1b[5m$<2>", 17 | Reverse: "\x1b[7m$<2>", 18 | EnterKeypad: "\x1b[?1h\x1b=", 19 | ExitKeypad: "\x1b[?1l\x1b>", 20 | PadChar: "\x00", 21 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 22 | EnterAcs: "\x0e", 23 | ExitAcs: "\x0f", 24 | EnableAcs: "\x1b(B\x1b)0", 25 | SetCursor: "\x1b[%i%p1%d;%p2%dH$<5>", 26 | CursorBack1: "\b", 27 | CursorUp1: "\x1b[A$<2>", 28 | KeyUp: "\x1bOA", 29 | KeyDown: "\x1bOB", 30 | KeyRight: "\x1bOC", 31 | KeyLeft: "\x1bOD", 32 | KeyBackspace: "\b", 33 | KeyF1: "\x1bOP", 34 | KeyF2: "\x1bOQ", 35 | KeyF3: "\x1bOR", 36 | KeyF4: "\x1bOS", 37 | KeyF5: "\x1bOt", 38 | KeyF6: "\x1bOu", 39 | KeyF7: "\x1bOv", 40 | KeyF8: "\x1bOl", 41 | KeyF9: "\x1bOw", 42 | KeyF10: "\x1bOx", 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt220.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // dec vt220 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt220", 9 | Aliases: []string{"vt200"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[J", 14 | AttrOff: "\x1b[m\x1b(B", 15 | Underline: "\x1b[4m", 16 | Bold: "\x1b[1m", 17 | Blink: "\x1b[5m", 18 | Reverse: "\x1b[7m", 19 | PadChar: "\x00", 20 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 21 | EnterAcs: "\x1b(0$<2>", 22 | ExitAcs: "\x1b(B$<4>", 23 | EnableAcs: "\x1b)0", 24 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 25 | CursorBack1: "\b", 26 | CursorUp1: "\x1b[A", 27 | KeyUp: "\x1b[A", 28 | KeyDown: "\x1b[B", 29 | KeyRight: "\x1b[C", 30 | KeyLeft: "\x1b[D", 31 | KeyInsert: "\x1b[2~", 32 | KeyBackspace: "\b", 33 | KeyPgUp: "\x1b[5~", 34 | KeyPgDn: "\x1b[6~", 35 | KeyF1: "\x1bOP", 36 | KeyF2: "\x1bOQ", 37 | KeyF3: "\x1bOR", 38 | KeyF4: "\x1bOS", 39 | KeyF6: "\x1b[17~", 40 | KeyF7: "\x1b[18~", 41 | KeyF8: "\x1b[19~", 42 | KeyF9: "\x1b[20~", 43 | KeyF10: "\x1b[21~", 44 | KeyF11: "\x1b[23~", 45 | KeyF12: "\x1b[24~", 46 | KeyF13: "\x1b[25~", 47 | KeyF14: "\x1b[26~", 48 | KeyF17: "\x1b[31~", 49 | KeyF18: "\x1b[32~", 50 | KeyF19: "\x1b[33~", 51 | KeyF20: "\x1b[34~", 52 | KeyHelp: "\x1b[28~", 53 | }) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt320.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // dec vt320 7 bit terminal 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt320", 9 | Aliases: []string{"vt300"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b[H\x1b[2J", 14 | ShowCursor: "\x1b[?25h", 15 | HideCursor: "\x1b[?25l", 16 | AttrOff: "\x1b[m\x1b(B", 17 | Underline: "\x1b[4m", 18 | Bold: "\x1b[1m", 19 | Blink: "\x1b[5m", 20 | Reverse: "\x1b[7m", 21 | EnterKeypad: "\x1b[?1h\x1b=", 22 | ExitKeypad: "\x1b[?1l\x1b>", 23 | PadChar: "\x00", 24 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 25 | EnterAcs: "\x1b(0", 26 | ExitAcs: "\x1b(B", 27 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 28 | CursorBack1: "\b", 29 | CursorUp1: "\x1b[A", 30 | KeyUp: "\x1bOA", 31 | KeyDown: "\x1bOB", 32 | KeyRight: "\x1bOC", 33 | KeyLeft: "\x1bOD", 34 | KeyInsert: "\x1b[2~", 35 | KeyDelete: "\x1b[3~", 36 | KeyBackspace: "177", 37 | KeyHome: "\x1b[1~", 38 | KeyPgUp: "\x1b[5~", 39 | KeyPgDn: "\x1b[6~", 40 | KeyF1: "\x1bOP", 41 | KeyF2: "\x1bOQ", 42 | KeyF3: "\x1bOR", 43 | KeyF4: "\x1bOS", 44 | KeyF6: "\x1b[17~", 45 | KeyF7: "\x1b[18~", 46 | KeyF8: "\x1b[19~", 47 | KeyF9: "\x1b[20~", 48 | KeyF10: "\x1b[21~", 49 | KeyF11: "\x1b[23~", 50 | KeyF12: "\x1b[24~", 51 | KeyF13: "\x1b[25~", 52 | KeyF14: "\x1b[26~", 53 | KeyF15: "\x1b[28~", 54 | KeyF16: "\x1b[29~", 55 | KeyF17: "\x1b[31~", 56 | KeyF18: "\x1b[32~", 57 | KeyF19: "\x1b[33~", 58 | KeyF20: "\x1b[34~", 59 | }) 60 | } 61 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt400.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // dec vt400 24x80 column autowrap 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt400", 9 | Aliases: []string{"vt400-24", "dec-vt400"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Clear: "\x1b[H\x1b[J$<10/>", 13 | ShowCursor: "\x1b[?25h", 14 | HideCursor: "\x1b[?25l", 15 | AttrOff: "\x1b[m\x1b(B", 16 | Underline: "\x1b[4m", 17 | Bold: "\x1b[1m", 18 | Blink: "\x1b[5m", 19 | Reverse: "\x1b[7m", 20 | EnterKeypad: "\x1b[?1h\x1b=", 21 | ExitKeypad: "\x1b[?1l\x1b>", 22 | PadChar: "\x00", 23 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 24 | EnterAcs: "\x1b(0", 25 | ExitAcs: "\x1b(B", 26 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 27 | CursorBack1: "\b", 28 | CursorUp1: "\x1b[A", 29 | KeyUp: "\x1bOA", 30 | KeyDown: "\x1bOB", 31 | KeyRight: "\x1bOC", 32 | KeyLeft: "\x1bOD", 33 | KeyBackspace: "\b", 34 | KeyF1: "\x1bOP", 35 | KeyF2: "\x1bOQ", 36 | KeyF3: "\x1bOR", 37 | KeyF4: "\x1bOS", 38 | KeyF6: "\x1b[17~", 39 | KeyF7: "\x1b[18~", 40 | KeyF8: "\x1b[19~", 41 | KeyF9: "\x1b[20~", 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt420.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // DEC VT420 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt420", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1b[H\x1b[2J$<50>", 13 | AttrOff: "\x1b[m$<2>", 14 | Underline: "\x1b[4m", 15 | Bold: "\x1b[1m$<2>", 16 | Blink: "\x1b[5m$<2>", 17 | Reverse: "\x1b[7m$<2>", 18 | EnterKeypad: "\x1b=", 19 | ExitKeypad: "\x1b>", 20 | PadChar: "\x00", 21 | AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", 22 | EnterAcs: "\x1b(0$<2>", 23 | ExitAcs: "\x1b(B$<4>", 24 | SetCursor: "\x1b[%i%p1%d;%p2%dH$<10>", 25 | CursorBack1: "\b", 26 | CursorUp1: "\x1b[A", 27 | KeyUp: "\x1b[A", 28 | KeyDown: "\x1b[B", 29 | KeyRight: "\x1b[C", 30 | KeyLeft: "\x1b[D", 31 | KeyInsert: "\x1b[2~", 32 | KeyDelete: "\x1b[3~", 33 | KeyBackspace: "\b", 34 | KeyPgUp: "\x1b[5~", 35 | KeyPgDn: "\x1b[6~", 36 | KeyF1: "\x1bOP", 37 | KeyF2: "\x1bOQ", 38 | KeyF3: "\x1bOR", 39 | KeyF4: "\x1bOS", 40 | KeyF5: "\x1b[17~", 41 | KeyF6: "\x1b[18~", 42 | KeyF7: "\x1b[19~", 43 | KeyF8: "\x1b[20~", 44 | KeyF9: "\x1b[21~", 45 | KeyF10: "\x1b[29~", 46 | }) 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_vt52.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // dec vt52 7 | AddTerminfo(&Terminfo{ 8 | Name: "vt52", 9 | Columns: 80, 10 | Lines: 24, 11 | Bell: "\a", 12 | Clear: "\x1bH\x1bJ", 13 | PadChar: "\x00", 14 | AltChars: ".kffgghhompoqqss", 15 | EnterAcs: "\x1bF", 16 | ExitAcs: "\x1bG", 17 | SetCursor: "\x1bY%p1%' '%+%c%p2%' '%+%c", 18 | CursorBack1: "\x1bD", 19 | CursorUp1: "\x1bA", 20 | KeyUp: "\x1bA", 21 | KeyDown: "\x1bB", 22 | KeyRight: "\x1bC", 23 | KeyLeft: "\x1bD", 24 | KeyBackspace: "\b", 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_wy50.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Wyse 50 7 | AddTerminfo(&Terminfo{ 8 | Name: "wy50", 9 | Aliases: []string{"wyse50"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b+$<20>", 14 | ShowCursor: "\x1b`1", 15 | HideCursor: "\x1b`0", 16 | AttrOff: "\x1b(\x1bH\x0003", 17 | Dim: "\x1b`7\x1b)", 18 | Reverse: "\x1b`6\x1b)", 19 | PadChar: "\x00", 20 | AltChars: "0wa_h[jukslrmqnxqzttuyv]wpxv", 21 | EnterAcs: "\x1bH\x02", 22 | ExitAcs: "\x1bH\x03", 23 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 24 | CursorBack1: "\b", 25 | CursorUp1: "\v", 26 | KeyUp: "\v", 27 | KeyDown: "\n", 28 | KeyRight: "\f", 29 | KeyLeft: "\b", 30 | KeyInsert: "\x1bQ", 31 | KeyDelete: "\x1bW", 32 | KeyBackspace: "\b", 33 | KeyHome: "\x1e", 34 | KeyPgUp: "\x1bJ", 35 | KeyPgDn: "\x1bK", 36 | KeyF1: "\x01@\r", 37 | KeyF2: "\x01A\r", 38 | KeyF3: "\x01B\r", 39 | KeyF4: "\x01C\r", 40 | KeyF5: "\x01D\r", 41 | KeyF6: "\x01E\r", 42 | KeyF7: "\x01F\r", 43 | KeyF8: "\x01G\r", 44 | KeyF9: "\x01H\r", 45 | KeyF10: "\x01I\r", 46 | KeyF11: "\x01J\r", 47 | KeyF12: "\x01K\r", 48 | KeyF13: "\x01L\r", 49 | KeyF14: "\x01M\r", 50 | KeyF15: "\x01N\r", 51 | KeyF16: "\x01O\r", 52 | KeyPrint: "\x1bP", 53 | KeyBacktab: "\x1bI", 54 | KeyShfHome: "\x1b{", 55 | }) 56 | } 57 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_wy60.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Wyse 60 7 | AddTerminfo(&Terminfo{ 8 | Name: "wy60", 9 | Aliases: []string{"wyse60"}, 10 | Columns: 80, 11 | Lines: 24, 12 | Bell: "\a", 13 | Clear: "\x1b+$<100>", 14 | EnterCA: "\x1bw0", 15 | ExitCA: "\x1bw1", 16 | ShowCursor: "\x1b`1", 17 | HideCursor: "\x1b`0", 18 | AttrOff: "\x1b(\x1bH\x0003\x1bG0\x1bcD", 19 | Underline: "\x1bG8", 20 | Dim: "\x1bGp", 21 | Blink: "\x1bG2", 22 | Reverse: "\x1bG4", 23 | PadChar: "\x00", 24 | AltChars: "+/,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~", 25 | EnterAcs: "\x1bcE", 26 | ExitAcs: "\x1bcD", 27 | SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", 28 | CursorBack1: "\b", 29 | CursorUp1: "\v", 30 | KeyUp: "\v", 31 | KeyDown: "\n", 32 | KeyRight: "\f", 33 | KeyLeft: "\b", 34 | KeyInsert: "\x1bQ", 35 | KeyDelete: "\x1bW", 36 | KeyBackspace: "\b", 37 | KeyHome: "\x1e", 38 | KeyPgUp: "\x1bJ", 39 | KeyPgDn: "\x1bK", 40 | KeyF1: "\x01@\r", 41 | KeyF2: "\x01A\r", 42 | KeyF3: "\x01B\r", 43 | KeyF4: "\x01C\r", 44 | KeyF5: "\x01D\r", 45 | KeyF6: "\x01E\r", 46 | KeyF7: "\x01F\r", 47 | KeyF8: "\x01G\r", 48 | KeyF9: "\x01H\r", 49 | KeyF10: "\x01I\r", 50 | KeyF11: "\x01J\r", 51 | KeyF12: "\x01K\r", 52 | KeyF13: "\x01L\r", 53 | KeyF14: "\x01M\r", 54 | KeyF15: "\x01N\r", 55 | KeyF16: "\x01O\r", 56 | KeyPrint: "\x1bP", 57 | KeyBacktab: "\x1bI", 58 | KeyShfHome: "\x1b{", 59 | }) 60 | } 61 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_wy99_ansi.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Wyse WY-99GT in ansi mode (int'l PC keyboard) 7 | AddTerminfo(&Terminfo{ 8 | Name: "wy99-ansi", 9 | Columns: 80, 10 | Lines: 25, 11 | Bell: "\a", 12 | Clear: "\x1b[H\x1b[J$<200>", 13 | ShowCursor: "\x1b[34h\x1b[?25h", 14 | HideCursor: "\x1b[?25l", 15 | AttrOff: "\x1b[m\x0017\x1b[\"q", 16 | Underline: "\x1b[4m", 17 | Bold: "\x1b[1m", 18 | Dim: "\x1b[2m", 19 | Blink: "\x1b[5m", 20 | Reverse: "\x1b[7m", 21 | EnterKeypad: "\x1b[?1h", 22 | ExitKeypad: "\x1b[?1l", 23 | PadChar: "\x00", 24 | AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~", 25 | EnterAcs: "\x0e", 26 | ExitAcs: "\x0f", 27 | EnableAcs: "\x1b)0", 28 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 29 | CursorBack1: "\x0010$<1>", 30 | CursorUp1: "\x1bM", 31 | KeyUp: "\x1bOA", 32 | KeyDown: "\x1bOB", 33 | KeyRight: "\x1bOC", 34 | KeyLeft: "\x1bOD", 35 | KeyBackspace: "\b", 36 | KeyF1: "\x1bOP", 37 | KeyF2: "\x1bOQ", 38 | KeyF3: "\x1bOR", 39 | KeyF4: "\x1bOS", 40 | KeyF5: "\x1b[M", 41 | KeyF6: "\x1b[17~", 42 | KeyF7: "\x1b[18~", 43 | KeyF8: "\x1b[19~", 44 | KeyF9: "\x1b[20~", 45 | KeyF10: "\x1b[21~", 46 | KeyF11: "\x1b[23~", 47 | KeyF12: "\x1b[24~", 48 | KeyF17: "\x1b[K", 49 | KeyF18: "\x1b[31~", 50 | KeyF19: "\x1b[32~", 51 | KeyF20: "\x1b[33~", 52 | KeyF21: "\x1b[34~", 53 | KeyF22: "\x1b[35~", 54 | KeyF23: "\x1b[1~", 55 | KeyF24: "\x1b[2~", 56 | KeyBacktab: "\x1b[z", 57 | }) 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_wy99a_ansi.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Wyse WY-99GT in ansi mode (US PC keyboard) 7 | AddTerminfo(&Terminfo{ 8 | Name: "wy99a-ansi", 9 | Columns: 80, 10 | Lines: 25, 11 | Bell: "\a", 12 | Clear: "\x1b[H\x1b[J$<200>", 13 | ShowCursor: "\x1b[34h\x1b[?25h", 14 | HideCursor: "\x1b[?25l", 15 | AttrOff: "\x1b[m\x0017\x1b[\"q", 16 | Underline: "\x1b[4m", 17 | Bold: "\x1b[1m", 18 | Dim: "\x1b[2m", 19 | Blink: "\x1b[5m", 20 | Reverse: "\x1b[7m", 21 | EnterKeypad: "\x1b[?1h", 22 | ExitKeypad: "\x1b[?1l", 23 | PadChar: "\x00", 24 | AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~", 25 | EnterAcs: "\x0e", 26 | ExitAcs: "\x0f", 27 | EnableAcs: "\x1b)0", 28 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 29 | CursorBack1: "\x0010$<1>", 30 | CursorUp1: "\x1bM", 31 | KeyUp: "\x1bOA", 32 | KeyDown: "\x1bOB", 33 | KeyRight: "\x1bOC", 34 | KeyLeft: "\x1bOD", 35 | KeyBackspace: "\b", 36 | KeyF1: "\x1bOP", 37 | KeyF2: "\x1bOQ", 38 | KeyF3: "\x1bOR", 39 | KeyF4: "\x1bOS", 40 | KeyF5: "\x1b[M", 41 | KeyF6: "\x1b[17~", 42 | KeyF7: "\x1b[18~", 43 | KeyF8: "\x1b[19~", 44 | KeyF9: "\x1b[20~", 45 | KeyF10: "\x1b[21~", 46 | KeyF11: "\x1b[23~", 47 | KeyF12: "\x1b[24~", 48 | KeyF17: "\x1b[K", 49 | KeyF18: "\x1b[31~", 50 | KeyF19: "\x1b[32~", 51 | KeyF20: "\x1b[33~", 52 | KeyF21: "\x1b[34~", 53 | KeyF22: "\x1b[35~", 54 | KeyF23: "\x1b[1~", 55 | KeyF24: "\x1b[2~", 56 | KeyBacktab: "\x1b[z", 57 | }) 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/terminfo/term_xnuppc.go: -------------------------------------------------------------------------------- 1 | // Generated automatically. DO NOT HAND-EDIT. 2 | 3 | package terminfo 4 | 5 | func init() { 6 | // Darwin PowerPC Console (color) 7 | AddTerminfo(&Terminfo{ 8 | Name: "xnuppc", 9 | Aliases: []string{"darwin"}, 10 | Colors: 8, 11 | Clear: "\x1b[H\x1b[J", 12 | AttrOff: "\x1b[m\x0017", 13 | Underline: "\x1b[4m", 14 | Bold: "\x1b[1m", 15 | Reverse: "\x1b[7m", 16 | EnterKeypad: "\x1b[?1h\x1b=", 17 | ExitKeypad: "\x1b[?1l\x1b>", 18 | SetFg: "\x1b[3%p1%dm", 19 | SetBg: "\x1b[4%p1%dm", 20 | SetFgBg: "\x1b[3%p1%d;4%p2%dm", 21 | PadChar: "\x00", 22 | SetCursor: "\x1b[%i%p1%d;%p2%dH", 23 | CursorBack1: "\x1b[D", 24 | CursorUp1: "\x1b[A", 25 | KeyUp: "\x1bOA", 26 | KeyDown: "\x1bOB", 27 | KeyRight: "\x1bOC", 28 | KeyLeft: "\x1bOD", 29 | KeyBackspace: "177", 30 | }) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/tscreen_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd openbsd dragonfly 2 | 3 | // Copyright 2017 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | import ( 20 | "os" 21 | "os/signal" 22 | "syscall" 23 | "unsafe" 24 | ) 25 | 26 | type termiosPrivate syscall.Termios 27 | 28 | func (t *tScreen) termioInit() error { 29 | var e error 30 | var newtios termiosPrivate 31 | var fd uintptr 32 | var tios uintptr 33 | var ioc uintptr 34 | t.tiosp = &termiosPrivate{} 35 | 36 | if t.in, e = os.OpenFile("/dev/tty", os.O_RDONLY, 0); e != nil { 37 | goto failed 38 | } 39 | if t.out, e = os.OpenFile("/dev/tty", os.O_WRONLY, 0); e != nil { 40 | goto failed 41 | } 42 | 43 | tios = uintptr(unsafe.Pointer(t.tiosp)) 44 | ioc = uintptr(syscall.TIOCGETA) 45 | fd = uintptr(t.out.Fd()) 46 | if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 { 47 | e = e1 48 | goto failed 49 | } 50 | 51 | // On this platform (FreeBSD and family), the baud rate is stored 52 | // directly as an integer in termios.c_ospeed. No bitmasking required. 53 | t.baud = int(t.tiosp.Ospeed) 54 | newtios = *t.tiosp 55 | newtios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | 56 | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | 57 | syscall.ICRNL | syscall.IXON 58 | newtios.Oflag &^= syscall.OPOST 59 | newtios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | 60 | syscall.ISIG | syscall.IEXTEN 61 | newtios.Cflag &^= syscall.CSIZE | syscall.PARENB 62 | newtios.Cflag |= syscall.CS8 63 | 64 | tios = uintptr(unsafe.Pointer(&newtios)) 65 | 66 | ioc = uintptr(syscall.TIOCSETA) 67 | if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 { 68 | e = e1 69 | goto failed 70 | } 71 | 72 | signal.Notify(t.sigwinch, syscall.SIGWINCH) 73 | 74 | if w, h, e := t.getWinSize(); e == nil && w != 0 && h != 0 { 75 | t.cells.Resize(w, h) 76 | } 77 | 78 | return nil 79 | 80 | failed: 81 | if t.in != nil { 82 | t.in.Close() 83 | } 84 | if t.out != nil { 85 | t.out.Close() 86 | } 87 | return e 88 | } 89 | 90 | func (t *tScreen) termioFini() { 91 | 92 | signal.Stop(t.sigwinch) 93 | 94 | <-t.indoneq 95 | 96 | if t.out != nil { 97 | fd := uintptr(t.out.Fd()) 98 | ioc := uintptr(syscall.TIOCSETAF) 99 | tios := uintptr(unsafe.Pointer(t.tiosp)) 100 | syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0) 101 | t.out.Close() 102 | } 103 | if t.in != nil { 104 | t.in.Close() 105 | } 106 | } 107 | 108 | func (t *tScreen) getWinSize() (int, int, error) { 109 | 110 | fd := uintptr(t.out.Fd()) 111 | dim := [4]uint16{} 112 | dimp := uintptr(unsafe.Pointer(&dim)) 113 | ioc := uintptr(syscall.TIOCGWINSZ) 114 | if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, 115 | fd, ioc, dimp, 0, 0, 0); err != 0 { 116 | return -1, -1, err 117 | } 118 | return int(dim[1]), int(dim[0]), nil 119 | } 120 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/tscreen_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | // Copyright 2017 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | import ( 20 | "os" 21 | "os/signal" 22 | "syscall" 23 | "unsafe" 24 | ) 25 | 26 | type termiosPrivate syscall.Termios 27 | 28 | func (t *tScreen) termioInit() error { 29 | var e error 30 | var newtios termiosPrivate 31 | var fd uintptr 32 | var tios uintptr 33 | var ioc uintptr 34 | t.tiosp = &termiosPrivate{} 35 | 36 | if t.in, e = os.OpenFile("/dev/tty", os.O_RDONLY, 0); e != nil { 37 | goto failed 38 | } 39 | if t.out, e = os.OpenFile("/dev/tty", os.O_WRONLY, 0); e != nil { 40 | goto failed 41 | } 42 | 43 | tios = uintptr(unsafe.Pointer(t.tiosp)) 44 | ioc = uintptr(syscall.TCGETS) 45 | fd = uintptr(t.out.Fd()) 46 | if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 { 47 | e = e1 48 | goto failed 49 | } 50 | 51 | // On this platform, the baud rate is stored 52 | // directly as an integer in termios.c_ospeed. 53 | t.baud = int(t.tiosp.Ospeed) 54 | newtios = *t.tiosp 55 | newtios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | 56 | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | 57 | syscall.ICRNL | syscall.IXON 58 | newtios.Oflag &^= syscall.OPOST 59 | newtios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | 60 | syscall.ISIG | syscall.IEXTEN 61 | newtios.Cflag &^= syscall.CSIZE | syscall.PARENB 62 | newtios.Cflag |= syscall.CS8 63 | 64 | // This is setup for blocking reads. In the past we attempted to 65 | // use non-blocking reads, but now a separate input loop and timer 66 | // copes with the problems we had on some systems (BSD/Darwin) 67 | // where close hung forever. 68 | newtios.Cc[syscall.VMIN] = 1 69 | newtios.Cc[syscall.VTIME] = 0 70 | 71 | tios = uintptr(unsafe.Pointer(&newtios)) 72 | 73 | // Well this kind of sucks, because we don't have TCSETSF, but only 74 | // TCSETS. This can leave some output unflushed. 75 | ioc = uintptr(syscall.TCSETS) 76 | if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 { 77 | e = e1 78 | goto failed 79 | } 80 | 81 | signal.Notify(t.sigwinch, syscall.SIGWINCH) 82 | 83 | if w, h, e := t.getWinSize(); e == nil && w != 0 && h != 0 { 84 | t.cells.Resize(w, h) 85 | } 86 | 87 | return nil 88 | 89 | failed: 90 | if t.in != nil { 91 | t.in.Close() 92 | } 93 | if t.out != nil { 94 | t.out.Close() 95 | } 96 | return e 97 | } 98 | 99 | func (t *tScreen) termioFini() { 100 | 101 | signal.Stop(t.sigwinch) 102 | 103 | <-t.indoneq 104 | 105 | if t.out != nil { 106 | fd := uintptr(t.out.Fd()) 107 | // XXX: We'd really rather do TCSETSF here! 108 | ioc := uintptr(syscall.TCSETS) 109 | tios := uintptr(unsafe.Pointer(t.tiosp)) 110 | syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0) 111 | t.out.Close() 112 | } 113 | if t.in != nil { 114 | t.in.Close() 115 | } 116 | } 117 | 118 | func (t *tScreen) getWinSize() (int, int, error) { 119 | 120 | fd := uintptr(t.out.Fd()) 121 | dim := [4]uint16{} 122 | dimp := uintptr(unsafe.Pointer(&dim)) 123 | ioc := uintptr(syscall.TIOCGWINSZ) 124 | if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, 125 | fd, ioc, dimp, 0, 0, 0); err != 0 { 126 | return -1, -1, err 127 | } 128 | return int(dim[1]), int(dim[0]), nil 129 | } 130 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/tscreen_stub.go: -------------------------------------------------------------------------------- 1 | // +build nacl plan9 2 | 3 | // Copyright 2015 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | // This stub file is for systems that have no termios. 20 | 21 | type termiosPrivate struct{} 22 | 23 | func (t *tScreen) termioInit() error { 24 | return ErrNoScreen 25 | } 26 | 27 | func (t *tScreen) termioFini() { 28 | } 29 | 30 | func (t *tScreen) getWinSize() (int, int, error) { 31 | return 0, 0, ErrNoScreen 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/gdamore/tcell/tscreen_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | // Copyright 2015 The TCell Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use file except in compliance with the License. 7 | // You may obtain a copy of the license at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | package tcell 18 | 19 | // On Windows we don't have support for termios. We probably could, and 20 | // may should, in a cygwin type environment. Its not clear how to make 21 | // this all work nicely with both cygwin and Windows console, so we 22 | // decline to do so here. 23 | 24 | func (t *tScreen) termioInit() error { 25 | return ErrNoScreen 26 | } 27 | 28 | func (t *tScreen) termioFini() { 29 | return 30 | } 31 | 32 | func (t *tScreen) getWinSize() (int, int, error) { 33 | return 0, 0, ErrNoScreen 34 | } 35 | 36 | func (t *tScreen) getCharset() string { 37 | return "UTF-16LE" 38 | } 39 | 40 | type termiosPrivate struct{} 41 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/internal/commandinfo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Gary Burd 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package internal // import "github.com/gomodule/redigo/internal" 16 | 17 | import ( 18 | "strings" 19 | ) 20 | 21 | const ( 22 | WatchState = 1 << iota 23 | MultiState 24 | SubscribeState 25 | MonitorState 26 | ) 27 | 28 | type CommandInfo struct { 29 | Set, Clear int 30 | } 31 | 32 | var commandInfos = map[string]CommandInfo{ 33 | "WATCH": {Set: WatchState}, 34 | "UNWATCH": {Clear: WatchState}, 35 | "MULTI": {Set: MultiState}, 36 | "EXEC": {Clear: WatchState | MultiState}, 37 | "DISCARD": {Clear: WatchState | MultiState}, 38 | "PSUBSCRIBE": {Set: SubscribeState}, 39 | "SUBSCRIBE": {Set: SubscribeState}, 40 | "MONITOR": {Set: MonitorState}, 41 | } 42 | 43 | func init() { 44 | for n, ci := range commandInfos { 45 | commandInfos[strings.ToLower(n)] = ci 46 | } 47 | } 48 | 49 | func LookupCommandInfo(commandName string) CommandInfo { 50 | if ci, ok := commandInfos[commandName]; ok { 51 | return ci 52 | } 53 | return commandInfos[strings.ToUpper(commandName)] 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/go16.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package redis 4 | 5 | import "crypto/tls" 6 | 7 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 | return &tls.Config{ 9 | Rand: cfg.Rand, 10 | Time: cfg.Time, 11 | Certificates: cfg.Certificates, 12 | NameToCertificate: cfg.NameToCertificate, 13 | GetCertificate: cfg.GetCertificate, 14 | RootCAs: cfg.RootCAs, 15 | NextProtos: cfg.NextProtos, 16 | ServerName: cfg.ServerName, 17 | ClientAuth: cfg.ClientAuth, 18 | ClientCAs: cfg.ClientCAs, 19 | InsecureSkipVerify: cfg.InsecureSkipVerify, 20 | CipherSuites: cfg.CipherSuites, 21 | PreferServerCipherSuites: cfg.PreferServerCipherSuites, 22 | ClientSessionCache: cfg.ClientSessionCache, 23 | MinVersion: cfg.MinVersion, 24 | MaxVersion: cfg.MaxVersion, 25 | CurvePreferences: cfg.CurvePreferences, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.7,!go1.8 2 | 3 | package redis 4 | 5 | import "crypto/tls" 6 | 7 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 | return &tls.Config{ 9 | Rand: cfg.Rand, 10 | Time: cfg.Time, 11 | Certificates: cfg.Certificates, 12 | NameToCertificate: cfg.NameToCertificate, 13 | GetCertificate: cfg.GetCertificate, 14 | RootCAs: cfg.RootCAs, 15 | NextProtos: cfg.NextProtos, 16 | ServerName: cfg.ServerName, 17 | ClientAuth: cfg.ClientAuth, 18 | ClientCAs: cfg.ClientCAs, 19 | InsecureSkipVerify: cfg.InsecureSkipVerify, 20 | CipherSuites: cfg.CipherSuites, 21 | PreferServerCipherSuites: cfg.PreferServerCipherSuites, 22 | ClientSessionCache: cfg.ClientSessionCache, 23 | MinVersion: cfg.MinVersion, 24 | MaxVersion: cfg.MaxVersion, 25 | CurvePreferences: cfg.CurvePreferences, 26 | DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled, 27 | Renegotiation: cfg.Renegotiation, 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package redis 4 | 5 | import "crypto/tls" 6 | 7 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 8 | return cfg.Clone() 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/log.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Gary Burd 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package redis 16 | 17 | import ( 18 | "bytes" 19 | "fmt" 20 | "log" 21 | "time" 22 | ) 23 | 24 | var ( 25 | _ ConnWithTimeout = (*loggingConn)(nil) 26 | ) 27 | 28 | // NewLoggingConn returns a logging wrapper around a connection. 29 | func NewLoggingConn(conn Conn, logger *log.Logger, prefix string) Conn { 30 | if prefix != "" { 31 | prefix = prefix + "." 32 | } 33 | return &loggingConn{conn, logger, prefix} 34 | } 35 | 36 | type loggingConn struct { 37 | Conn 38 | logger *log.Logger 39 | prefix string 40 | } 41 | 42 | func (c *loggingConn) Close() error { 43 | err := c.Conn.Close() 44 | var buf bytes.Buffer 45 | fmt.Fprintf(&buf, "%sClose() -> (%v)", c.prefix, err) 46 | c.logger.Output(2, buf.String()) 47 | return err 48 | } 49 | 50 | func (c *loggingConn) printValue(buf *bytes.Buffer, v interface{}) { 51 | const chop = 32 52 | switch v := v.(type) { 53 | case []byte: 54 | if len(v) > chop { 55 | fmt.Fprintf(buf, "%q...", v[:chop]) 56 | } else { 57 | fmt.Fprintf(buf, "%q", v) 58 | } 59 | case string: 60 | if len(v) > chop { 61 | fmt.Fprintf(buf, "%q...", v[:chop]) 62 | } else { 63 | fmt.Fprintf(buf, "%q", v) 64 | } 65 | case []interface{}: 66 | if len(v) == 0 { 67 | buf.WriteString("[]") 68 | } else { 69 | sep := "[" 70 | fin := "]" 71 | if len(v) > chop { 72 | v = v[:chop] 73 | fin = "...]" 74 | } 75 | for _, vv := range v { 76 | buf.WriteString(sep) 77 | c.printValue(buf, vv) 78 | sep = ", " 79 | } 80 | buf.WriteString(fin) 81 | } 82 | default: 83 | fmt.Fprint(buf, v) 84 | } 85 | } 86 | 87 | func (c *loggingConn) print(method, commandName string, args []interface{}, reply interface{}, err error) { 88 | var buf bytes.Buffer 89 | fmt.Fprintf(&buf, "%s%s(", c.prefix, method) 90 | if method != "Receive" { 91 | buf.WriteString(commandName) 92 | for _, arg := range args { 93 | buf.WriteString(", ") 94 | c.printValue(&buf, arg) 95 | } 96 | } 97 | buf.WriteString(") -> (") 98 | if method != "Send" { 99 | c.printValue(&buf, reply) 100 | buf.WriteString(", ") 101 | } 102 | fmt.Fprintf(&buf, "%v)", err) 103 | c.logger.Output(3, buf.String()) 104 | } 105 | 106 | func (c *loggingConn) Do(commandName string, args ...interface{}) (interface{}, error) { 107 | reply, err := c.Conn.Do(commandName, args...) 108 | c.print("Do", commandName, args, reply, err) 109 | return reply, err 110 | } 111 | 112 | func (c *loggingConn) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error) { 113 | reply, err := DoWithTimeout(c.Conn, timeout, commandName, args...) 114 | c.print("DoWithTimeout", commandName, args, reply, err) 115 | return reply, err 116 | } 117 | 118 | func (c *loggingConn) Send(commandName string, args ...interface{}) error { 119 | err := c.Conn.Send(commandName, args...) 120 | c.print("Send", commandName, args, nil, err) 121 | return err 122 | } 123 | 124 | func (c *loggingConn) Receive() (interface{}, error) { 125 | reply, err := c.Conn.Receive() 126 | c.print("Receive", "", nil, reply, err) 127 | return reply, err 128 | } 129 | 130 | func (c *loggingConn) ReceiveWithTimeout(timeout time.Duration) (interface{}, error) { 131 | reply, err := ReceiveWithTimeout(c.Conn, timeout) 132 | c.print("ReceiveWithTimeout", "", nil, reply, err) 133 | return reply, err 134 | } 135 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/pool17.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gary Burd 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | // +build go1.7 16 | 17 | package redis 18 | 19 | import "context" 20 | 21 | // GetContext gets a connection using the provided context. 22 | // 23 | // The provided Context must be non-nil. If the context expires before the 24 | // connection is complete, an error is returned. Any expiration on the context 25 | // will not affect the returned connection. 26 | // 27 | // If the function completes without error, then the application must close the 28 | // returned connection. 29 | func (p *Pool) GetContext(ctx context.Context) (Conn, error) { 30 | pc, err := p.get(ctx) 31 | if err != nil { 32 | return errorConn{err}, err 33 | } 34 | return &activeConn{p: p, pc: pc}, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gomodule/redigo/redis/script.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Gary Burd 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package redis 16 | 17 | import ( 18 | "crypto/sha1" 19 | "encoding/hex" 20 | "io" 21 | "strings" 22 | ) 23 | 24 | // Script encapsulates the source, hash and key count for a Lua script. See 25 | // http://redis.io/commands/eval for information on scripts in Redis. 26 | type Script struct { 27 | keyCount int 28 | src string 29 | hash string 30 | } 31 | 32 | // NewScript returns a new script object. If keyCount is greater than or equal 33 | // to zero, then the count is automatically inserted in the EVAL command 34 | // argument list. If keyCount is less than zero, then the application supplies 35 | // the count as the first value in the keysAndArgs argument to the Do, Send and 36 | // SendHash methods. 37 | func NewScript(keyCount int, src string) *Script { 38 | h := sha1.New() 39 | io.WriteString(h, src) 40 | return &Script{keyCount, src, hex.EncodeToString(h.Sum(nil))} 41 | } 42 | 43 | func (s *Script) args(spec string, keysAndArgs []interface{}) []interface{} { 44 | var args []interface{} 45 | if s.keyCount < 0 { 46 | args = make([]interface{}, 1+len(keysAndArgs)) 47 | args[0] = spec 48 | copy(args[1:], keysAndArgs) 49 | } else { 50 | args = make([]interface{}, 2+len(keysAndArgs)) 51 | args[0] = spec 52 | args[1] = s.keyCount 53 | copy(args[2:], keysAndArgs) 54 | } 55 | return args 56 | } 57 | 58 | // Hash returns the script hash. 59 | func (s *Script) Hash() string { 60 | return s.hash 61 | } 62 | 63 | // Do evaluates the script. Under the covers, Do optimistically evaluates the 64 | // script using the EVALSHA command. If the command fails because the script is 65 | // not loaded, then Do evaluates the script using the EVAL command (thus 66 | // causing the script to load). 67 | func (s *Script) Do(c Conn, keysAndArgs ...interface{}) (interface{}, error) { 68 | v, err := c.Do("EVALSHA", s.args(s.hash, keysAndArgs)...) 69 | if e, ok := err.(Error); ok && strings.HasPrefix(string(e), "NOSCRIPT ") { 70 | v, err = c.Do("EVAL", s.args(s.src, keysAndArgs)...) 71 | } 72 | return v, err 73 | } 74 | 75 | // SendHash evaluates the script without waiting for the reply. The script is 76 | // evaluated with the EVALSHA command. The application must ensure that the 77 | // script is loaded by a previous call to Send, Do or Load methods. 78 | func (s *Script) SendHash(c Conn, keysAndArgs ...interface{}) error { 79 | return c.Send("EVALSHA", s.args(s.hash, keysAndArgs)...) 80 | } 81 | 82 | // Send evaluates the script without waiting for the reply. 83 | func (s *Script) Send(c Conn, keysAndArgs ...interface{}) error { 84 | return c.Send("EVAL", s.args(s.src, keysAndArgs)...) 85 | } 86 | 87 | // Load loads the script without evaluating it. 88 | func (s *Script) Load(c Conn) error { 89 | _, err := c.Do("SCRIPT", "LOAD", s.src) 90 | return err 91 | } 92 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Vim swap files 11 | .*.sw? 12 | 13 | # Architecture specific extensions/prefixes 14 | *.[568vq] 15 | [568vq].out 16 | 17 | *.cgo1.go 18 | *.cgo2.c 19 | _cgo_defun.c 20 | _cgo_gotypes.go 21 | _cgo_export.* 22 | 23 | _testmain.go 24 | 25 | *.exe 26 | 27 | # Code coverage stuff 28 | coverage.out 29 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | install: 3 | - go get golang.org/x/tools/cmd/cover 4 | - go get gopkg.in/DATA-DOG/go-sqlmock.v1 5 | - go get github.com/mattn/goveralls 6 | script: 7 | - go test -v -covermode=count -coverprofile=coverage.out 8 | - if [[ "$TRAVIS_PULL_REQUEST" = "false" ]]; then $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN; fi 9 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Lucas Beyer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/colorgens.go: -------------------------------------------------------------------------------- 1 | // Various ways to generate single random colors 2 | 3 | package colorful 4 | 5 | import ( 6 | "math/rand" 7 | ) 8 | 9 | // Creates a random dark, "warm" color through a restricted HSV space. 10 | func FastWarmColor() Color { 11 | return Hsv( 12 | rand.Float64() * 360.0, 13 | 0.5 + rand.Float64()*0.3, 14 | 0.3 + rand.Float64()*0.3) 15 | } 16 | 17 | // Creates a random dark, "warm" color through restricted HCL space. 18 | // This is slower than FastWarmColor but will likely give you colors which have 19 | // the same "warmness" if you run it many times. 20 | func WarmColor() (c Color) { 21 | for c = randomWarm() ; !c.IsValid() ; c = randomWarm() {} 22 | return 23 | } 24 | 25 | func randomWarm() Color { 26 | return Hcl( 27 | rand.Float64() * 360.0, 28 | 0.1 + rand.Float64()*0.3, 29 | 0.2 + rand.Float64()*0.3) 30 | } 31 | 32 | // Creates a random bright, "pimpy" color through a restricted HSV space. 33 | func FastHappyColor() Color { 34 | return Hsv( 35 | rand.Float64() * 360.0, 36 | 0.7 + rand.Float64()*0.3, 37 | 0.6 + rand.Float64()*0.3) 38 | } 39 | 40 | // Creates a random bright, "pimpy" color through restricted HCL space. 41 | // This is slower than FastHappyColor but will likely give you colors which 42 | // have the same "brightness" if you run it many times. 43 | func HappyColor() (c Color) { 44 | for c = randomPimp() ; !c.IsValid() ; c = randomPimp() {} 45 | return 46 | } 47 | 48 | func randomPimp() Color { 49 | return Hcl( 50 | rand.Float64() * 360.0, 51 | 0.5 + rand.Float64()*0.3, 52 | 0.5 + rand.Float64()*0.3) 53 | } 54 | 55 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastHappyPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0 ; i < colorsCount ; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.8 + rand.Float64()*0.2, 0.65 + rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func HappyPalette(colorsCount int) ([]Color, error) { 20 | pimpy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.3 <= c && 0.4 <= l && l <= 0.8 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{pimpy, 50, true}) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "database/sql/driver" 5 | "fmt" 6 | "reflect" 7 | ) 8 | 9 | // A HexColor is a Color stored as a hex string "#rrggbb". It implements the 10 | // database/sql.Scanner and database/sql/driver.Value interfaces. 11 | type HexColor Color 12 | 13 | type errUnsupportedType struct { 14 | got interface{} 15 | want reflect.Type 16 | } 17 | 18 | func (hc *HexColor) Scan(value interface{}) error { 19 | s, ok := value.(string) 20 | if !ok { 21 | return errUnsupportedType{got: reflect.TypeOf(value), want: reflect.TypeOf("")} 22 | } 23 | c, err := Hex(s) 24 | if err != nil { 25 | return err 26 | } 27 | *hc = HexColor(c) 28 | return nil 29 | } 30 | 31 | func (hc *HexColor) Value() (driver.Value, error) { 32 | return Color(*hc).Hex(), nil 33 | } 34 | 35 | func (e errUnsupportedType) Error() string { 36 | return fmt.Sprintf("unsupported type: got %v, want a %s", e.got, e.want) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/lucasb-eyer/go-colorful/warm_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastWarmPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0 ; i < colorsCount ; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.55 + rand.Float64()*0.2, 0.35 + rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func WarmPalette(colorsCount int) ([]Color, error) { 20 | warmy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.1 <= c && c <= 0.4 && 0.2 <= l && l <= 0.5 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{warmy, 50, true}) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | before_install: 5 | - go get github.com/mattn/goveralls 6 | - go get golang.org/x/tools/cmd/cover 7 | script: 8 | - $HOME/gopath/bin/goveralls -repotoken lAKAWPzcGsD3A8yBX3BGGtRUdJ6CaGERL 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/README.mkd: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) 5 | [![Coverage Status](https://coveralls.io/repos/mattn/go-runewidth/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package runewidth 4 | 5 | func IsEastAsian() bool { 6 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!js 2 | 3 | package runewidth 4 | 5 | import ( 6 | "os" 7 | "regexp" 8 | "strings" 9 | ) 10 | 11 | var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`) 12 | 13 | var mblenTable = map[string]int{ 14 | "utf-8": 6, 15 | "utf8": 6, 16 | "jis": 8, 17 | "eucjp": 3, 18 | "euckr": 2, 19 | "euccn": 2, 20 | "sjis": 2, 21 | "cp932": 2, 22 | "cp51932": 2, 23 | "cp936": 2, 24 | "cp949": 2, 25 | "cp950": 2, 26 | "big5": 2, 27 | "gbk": 2, 28 | "gb2312": 2, 29 | } 30 | 31 | func isEastAsian(locale string) bool { 32 | charset := strings.ToLower(locale) 33 | r := reLoc.FindStringSubmatch(locale) 34 | if len(r) == 2 { 35 | charset = strings.ToLower(r[1]) 36 | } 37 | 38 | if strings.HasSuffix(charset, "@cjk_narrow") { 39 | return false 40 | } 41 | 42 | for pos, b := range []byte(charset) { 43 | if b == '@' { 44 | charset = charset[:pos] 45 | break 46 | } 47 | } 48 | max := 1 49 | if m, ok := mblenTable[charset]; ok { 50 | max = m 51 | } 52 | if max > 1 && (charset[0] != 'u' || 53 | strings.HasPrefix(locale, "ja") || 54 | strings.HasPrefix(locale, "ko") || 55 | strings.HasPrefix(locale, "zh")) { 56 | return true 57 | } 58 | return false 59 | } 60 | 61 | // IsEastAsian return true if the current locale is CJK 62 | func IsEastAsian() bool { 63 | locale := os.Getenv("LC_CTYPE") 64 | if locale == "" { 65 | locale = os.Getenv("LANG") 66 | } 67 | 68 | // ignore C locale 69 | if locale == "POSIX" || locale == "C" { 70 | return false 71 | } 72 | if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') { 73 | return false 74 | } 75 | 76 | return isEastAsian(locale) 77 | } 78 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | package runewidth 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var ( 8 | kernel32 = syscall.NewLazyDLL("kernel32") 9 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 10 | ) 11 | 12 | // IsEastAsian return true if the current locale is CJK 13 | func IsEastAsian() bool { 14 | r1, _, _ := procGetConsoleOutputCP.Call() 15 | if r1 == 0 { 16 | return false 17 | } 18 | 19 | switch int(r1) { 20 | case 932, 51932, 936, 949, 950: 21 | return true 22 | } 23 | 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/renstrom/fuzzysearch/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Peter Renström 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/renstrom/fuzzysearch/fuzzy/levenshtein.go: -------------------------------------------------------------------------------- 1 | package fuzzy 2 | 3 | // LevenshteinDistance measures the difference between two strings. 4 | // The Levenshtein distance between two words is the minimum number of 5 | // single-character edits (i.e. insertions, deletions or substitutions) 6 | // required to change one word into the other. 7 | // 8 | // This implemention is optimized to use O(min(m,n)) space and is based on the 9 | // optimized C version found here: 10 | // http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levenshtein_distance#C 11 | func LevenshteinDistance(s, t string) int { 12 | r1, r2 := []rune(s), []rune(t) 13 | column := make([]int, len(r1)+1) 14 | 15 | for y := 1; y <= len(r1); y++ { 16 | column[y] = y 17 | } 18 | 19 | for x := 1; x <= len(r2); x++ { 20 | column[0] = x 21 | 22 | for y, lastDiag := 1, x-1; y <= len(r1); y++ { 23 | oldDiag := column[y] 24 | cost := 0 25 | if r1[y-1] != r2[x-1] { 26 | cost = 1 27 | } 28 | column[y] = min(column[y]+1, column[y-1]+1, lastDiag+cost) 29 | lastDiag = oldDiag 30 | } 31 | } 32 | 33 | return column[len(r1)] 34 | } 35 | 36 | func min(a, b, c int) int { 37 | if a < b && a < c { 38 | return a 39 | } else if b < c { 40 | return b 41 | } 42 | return c 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | education, socio-economic status, nationality, personal appearance, race, 10 | religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at https://rentafounder.com/page/about-me/. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to tview 2 | 3 | First of all, thank you for taking the time to contribute. 4 | 5 | The following provides you with some guidance on how to contribute to this project. Mainly, it is meant to save us all some time so please read it, it's not long. 6 | 7 | Please note that this document is work in progress so I might add to it in the future. 8 | 9 | ## Issues 10 | 11 | - Please include enough information so everybody understands your request. 12 | - Screenshots or code that illustrates your point always helps. 13 | - It's fine to ask for help. But you should have checked out the [documentation](https://godoc.org/github.com/rivo/tview) first in any case. 14 | - If you request a new feature, state your motivation and share a use case that you faced where you needed that new feature. It should be something that others will also need. 15 | 16 | ## Pull Requests 17 | 18 | If you have a feature request, open an issue first before sending me a pull request. It may save you from writing code that will get rejected. If your case is strong, there is a good chance that I will add the feature for you. 19 | 20 | I'm very picky about the code that goes into this repo. So if you violate any of the following guidelines, there is a good chance I won't merge your pull request. 21 | 22 | - There must be a strong case for your additions/changes, such as: 23 | - Bug fixes 24 | - Features that are needed (see "Issues" above; state your motivation) 25 | - Improvements in stability or performance (if readability does not suffer) 26 | - Your code must follow the structure of the existing code. Don't just patch something on. Try to understand how `tview` is currently designed and follow that design. Your code needs to be consistent with existing code. 27 | - If you're adding code that increases the work required to maintain the project, you must be willing to take responsibility for that extra work. I will ask you to maintain your part of the code in the long run. 28 | - Function/type/variable/constant names must be as descriptive as they are right now. Follow the conventions of the package. 29 | - All functions/types/variables/constants, even private ones, must have comments in good English. These comments must be elaborate enough so that new users of the package understand them and can follow them. Provide examples if you have to. 30 | - Your changes must not decrease the project's [Go Report](https://goreportcard.com/report/github.com/rivo/tview) rating. 31 | - No breaking changes unless there is absolutely no other way. 32 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/README.md: -------------------------------------------------------------------------------- 1 | # Rich Interactive Widgets for Terminal UIs 2 | 3 | [![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/rivo/tview) 4 | [![Go Report](https://img.shields.io/badge/go%20report-A%2B-brightgreen.svg)](https://goreportcard.com/report/github.com/rivo/tview) 5 | 6 | This Go package provides commonly needed components for terminal based user interfaces. 7 | 8 | ![Screenshot](tview.gif) 9 | 10 | Among these components are: 11 | 12 | - __Input forms__ (include __input/password fields__, __drop-down selections__, __checkboxes__, and __buttons__) 13 | - Navigable multi-color __text views__ 14 | - Sophisticated navigable __table views__ 15 | - Selectable __lists__ 16 | - __Grid__, __Flexbox__ and __page layouts__ 17 | - Modal __message windows__ 18 | - An __application__ wrapper 19 | 20 | They come with lots of customization options and can be easily extended to fit your needs. 21 | 22 | ## Installation 23 | 24 | ```bash 25 | go get github.com/rivo/tview 26 | ``` 27 | 28 | ## Hello World 29 | 30 | This basic example creates a box titled "Hello, World!" and displays it in your terminal: 31 | 32 | ```go 33 | package main 34 | 35 | import ( 36 | "github.com/rivo/tview" 37 | ) 38 | 39 | func main() { 40 | box := tview.NewBox().SetBorder(true).SetTitle("Hello, world!") 41 | if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil { 42 | panic(err) 43 | } 44 | } 45 | ``` 46 | 47 | Check out the [GitHub Wiki](https://github.com/rivo/tview/wiki) for more examples along with screenshots. Or try the examples in the "demos" subdirectory. 48 | 49 | For a presentation highlighting this package, compile and run the program found in the "demos/presentation" subdirectory. 50 | 51 | ## Documentation 52 | 53 | Refer to https://godoc.org/github.com/rivo/tview for the package's documentation. 54 | 55 | ## Dependencies 56 | 57 | This package is based on [github.com/gdamore/tcell](https://github.com/gdamore/tcell) (and its dependencies). 58 | 59 | ## Your Feedback 60 | 61 | Add your issue here on GitHub. Feel free to get in touch if you have any questions. 62 | 63 | ## Version History 64 | 65 | (There are no corresponding tags in the project. I only keep such a history in this README.) 66 | 67 | - v0.15 (2018-05-02) 68 | - `Flex` and `Grid` don't clear their background per default, thus allowing for custom modals. See the [Wiki](https://github.com/rivo/tview/wiki/Modal) for an example. 69 | - v0.14 (2018-04-13) 70 | - Added an `Escape()` function which keep strings like color or region tags from being recognized as such. 71 | - Added `ANSIIWriter()` and `TranslateANSII()` which convert ANSII escape sequences to `tview` color tags. 72 | - v0.13 (2018-04-01) 73 | - Added background colors and text attributes to color tags. 74 | - v0.12 (2018-03-13) 75 | - Added "suspended mode" to `Application`. 76 | - v0.11 (2018-03-02) 77 | - Added a `RemoveItem()` function to `Grid` and `Flex`. 78 | - v0.10 (2018-02-22) 79 | - Direct access to the `screen` object through callback in `Box` (i.e. for all primitives). 80 | - v0.9 (2018-02-20) 81 | - Introduced `Grid` layout. 82 | - Direct access to the `screen` object through callbacks in `Application`. 83 | - v0.8 (2018-01-17) 84 | - Color tags can now be used almost everywhere. 85 | - v0.7 (2018-01-16) 86 | - Forms can now also have a horizontal layout. 87 | - v0.6 (2018-01-14) 88 | - All primitives can now intercept all key events when they have focus. 89 | - Key events can also be intercepted globally (changed to a more general, consistent handling) 90 | - v0.5 (2018-01-13) 91 | - `TextView` now has word wrapping and text alignment 92 | - v0.4 (2018-01-12) 93 | - `TextView` now accepts color tags with any W3C color (including RGB hex values). 94 | - Support for wide unicode characters. 95 | - v0.3 (2018-01-11) 96 | - Added masking to `InputField` and password entry to `Form`. 97 | - v0.2 (2018-01-10) 98 | - Added `Styles` variable with default colors for primitives. 99 | - Completed some missing InputField functions. 100 | - v0.1 (2018-01-06) 101 | - First Release. 102 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/button.go: -------------------------------------------------------------------------------- 1 | package tview 2 | 3 | import ( 4 | "github.com/gdamore/tcell" 5 | ) 6 | 7 | // Button is labeled box that triggers an action when selected. 8 | // 9 | // See https://github.com/rivo/tview/wiki/Button for an example. 10 | type Button struct { 11 | *Box 12 | 13 | // The text to be displayed before the input area. 14 | label string 15 | 16 | // The label color. 17 | labelColor tcell.Color 18 | 19 | // The label color when the button is in focus. 20 | labelColorActivated tcell.Color 21 | 22 | // The background color when the button is in focus. 23 | backgroundColorActivated tcell.Color 24 | 25 | // An optional function which is called when the button was selected. 26 | selected func() 27 | 28 | // An optional function which is called when the user leaves the button. A 29 | // key is provided indicating which key was pressed to leave (tab or backtab). 30 | blur func(tcell.Key) 31 | } 32 | 33 | // NewButton returns a new input field. 34 | func NewButton(label string) *Button { 35 | box := NewBox().SetBackgroundColor(Styles.ContrastBackgroundColor) 36 | box.SetRect(0, 0, StringWidth(label)+4, 1) 37 | return &Button{ 38 | Box: box, 39 | label: label, 40 | labelColor: Styles.PrimaryTextColor, 41 | labelColorActivated: Styles.InverseTextColor, 42 | backgroundColorActivated: Styles.PrimaryTextColor, 43 | } 44 | } 45 | 46 | // SetLabel sets the button text. 47 | func (b *Button) SetLabel(label string) *Button { 48 | b.label = label 49 | return b 50 | } 51 | 52 | // GetLabel returns the button text. 53 | func (b *Button) GetLabel() string { 54 | return b.label 55 | } 56 | 57 | // SetLabelColor sets the color of the button text. 58 | func (b *Button) SetLabelColor(color tcell.Color) *Button { 59 | b.labelColor = color 60 | return b 61 | } 62 | 63 | // SetLabelColorActivated sets the color of the button text when the button is 64 | // in focus. 65 | func (b *Button) SetLabelColorActivated(color tcell.Color) *Button { 66 | b.labelColorActivated = color 67 | return b 68 | } 69 | 70 | // SetBackgroundColorActivated sets the background color of the button text when 71 | // the button is in focus. 72 | func (b *Button) SetBackgroundColorActivated(color tcell.Color) *Button { 73 | b.backgroundColorActivated = color 74 | return b 75 | } 76 | 77 | // SetSelectedFunc sets a handler which is called when the button was selected. 78 | func (b *Button) SetSelectedFunc(handler func()) *Button { 79 | b.selected = handler 80 | return b 81 | } 82 | 83 | // SetBlurFunc sets a handler which is called when the user leaves the button. 84 | // The callback function is provided with the key that was pressed, which is one 85 | // of the following: 86 | // 87 | // - KeyEscape: Leaving the button with no specific direction. 88 | // - KeyTab: Move to the next field. 89 | // - KeyBacktab: Move to the previous field. 90 | func (b *Button) SetBlurFunc(handler func(key tcell.Key)) *Button { 91 | b.blur = handler 92 | return b 93 | } 94 | 95 | // Draw draws this primitive onto the screen. 96 | func (b *Button) Draw(screen tcell.Screen) { 97 | // Draw the box. 98 | borderColor := b.borderColor 99 | backgroundColor := b.backgroundColor 100 | if b.focus.HasFocus() { 101 | b.backgroundColor = b.backgroundColorActivated 102 | b.borderColor = b.labelColorActivated 103 | defer func() { 104 | b.borderColor = borderColor 105 | }() 106 | } 107 | b.Box.Draw(screen) 108 | b.backgroundColor = backgroundColor 109 | 110 | // Draw label. 111 | x, y, width, height := b.GetInnerRect() 112 | if width > 0 && height > 0 { 113 | y = y + height/2 114 | labelColor := b.labelColor 115 | if b.focus.HasFocus() { 116 | labelColor = b.labelColorActivated 117 | } 118 | Print(screen, b.label, x, y, width, AlignCenter, labelColor) 119 | } 120 | } 121 | 122 | // InputHandler returns the handler for this primitive. 123 | func (b *Button) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) { 124 | return b.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p Primitive)) { 125 | // Process key event. 126 | switch key := event.Key(); key { 127 | case tcell.KeyEnter: // Selected. 128 | if b.selected != nil { 129 | b.selected() 130 | } 131 | case tcell.KeyBacktab, tcell.KeyTab, tcell.KeyEscape: // Leave. No action. 132 | if b.blur != nil { 133 | b.blur(key) 134 | } 135 | } 136 | }) 137 | } 138 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/focusable.go: -------------------------------------------------------------------------------- 1 | package tview 2 | 3 | // Focusable provides a method which determines if a primitive has focus. 4 | // Composed primitives may be focused based on the focused state of their 5 | // contained primitives. 6 | type Focusable interface { 7 | HasFocus() bool 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/modal.go: -------------------------------------------------------------------------------- 1 | package tview 2 | 3 | import ( 4 | "github.com/gdamore/tcell" 5 | ) 6 | 7 | // Modal is a centered message window used to inform the user or prompt them 8 | // for an immediate decision. It needs to have at least one button (added via 9 | // AddButtons()) or it will never disappear. 10 | // 11 | // See https://github.com/rivo/tview/wiki/Modal for an example. 12 | type Modal struct { 13 | *Box 14 | 15 | // The framed embedded in the modal. 16 | frame *Frame 17 | 18 | // The form embedded in the modal's frame. 19 | form *Form 20 | 21 | // The message text (original, not word-wrapped). 22 | text string 23 | 24 | // The text color. 25 | textColor tcell.Color 26 | 27 | // The optional callback for when the user clicked one of the buttons. It 28 | // receives the index of the clicked button and the button's label. 29 | done func(buttonIndex int, buttonLabel string) 30 | } 31 | 32 | // NewModal returns a new modal message window. 33 | func NewModal() *Modal { 34 | m := &Modal{ 35 | Box: NewBox(), 36 | textColor: Styles.PrimaryTextColor, 37 | } 38 | m.form = NewForm(). 39 | SetButtonsAlign(AlignCenter). 40 | SetButtonBackgroundColor(Styles.PrimitiveBackgroundColor). 41 | SetButtonTextColor(Styles.PrimaryTextColor) 42 | m.form.SetBackgroundColor(Styles.ContrastBackgroundColor).SetBorderPadding(0, 0, 0, 0) 43 | m.frame = NewFrame(m.form).SetBorders(0, 0, 1, 0, 0, 0) 44 | m.frame.SetBorder(true). 45 | SetBackgroundColor(Styles.ContrastBackgroundColor). 46 | SetBorderPadding(1, 1, 1, 1) 47 | m.focus = m 48 | return m 49 | } 50 | 51 | // SetTextColor sets the color of the message text. 52 | func (m *Modal) SetTextColor(color tcell.Color) *Modal { 53 | m.textColor = color 54 | return m 55 | } 56 | 57 | // SetDoneFunc sets a handler which is called when one of the buttons was 58 | // pressed. It receives the index of the button as well as its label text. The 59 | // handler is also called when the user presses the Escape key. The index will 60 | // then be negative and the label text an emptry string. 61 | func (m *Modal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *Modal { 62 | m.done = handler 63 | return m 64 | } 65 | 66 | // SetText sets the message text of the window. The text may contain line 67 | // breaks. Note that words are wrapped, too, based on the final size of the 68 | // window. 69 | func (m *Modal) SetText(text string) *Modal { 70 | m.text = text 71 | return m 72 | } 73 | 74 | // AddButtons adds buttons to the window. There must be at least one button and 75 | // a "done" handler so the window can be closed again. 76 | func (m *Modal) AddButtons(labels []string) *Modal { 77 | for index, label := range labels { 78 | func(i int, l string) { 79 | m.form.AddButton(label, func() { 80 | if m.done != nil { 81 | m.done(i, l) 82 | } 83 | }) 84 | }(index, label) 85 | } 86 | return m 87 | } 88 | 89 | // Focus is called when this primitive receives focus. 90 | func (m *Modal) Focus(delegate func(p Primitive)) { 91 | delegate(m.form) 92 | } 93 | 94 | // HasFocus returns whether or not this primitive has focus. 95 | func (m *Modal) HasFocus() bool { 96 | return m.form.HasFocus() 97 | } 98 | 99 | // Draw draws this primitive onto the screen. 100 | func (m *Modal) Draw(screen tcell.Screen) { 101 | // Calculate the width of this modal. 102 | buttonsWidth := 0 103 | for _, button := range m.form.buttons { 104 | buttonsWidth += StringWidth(button.label) + 4 + 2 105 | } 106 | buttonsWidth -= 2 107 | screenWidth, screenHeight := screen.Size() 108 | width := screenWidth / 3 109 | if width < buttonsWidth { 110 | width = buttonsWidth 111 | } 112 | // width is now without the box border. 113 | 114 | // Reset the text and find out how wide it is. 115 | m.frame.Clear() 116 | lines := WordWrap(m.text, width) 117 | for _, line := range lines { 118 | m.frame.AddText(line, true, AlignCenter, m.textColor) 119 | } 120 | 121 | // Set the modal's position and size. 122 | height := len(lines) + 6 123 | width += 4 124 | x := (screenWidth - width) / 2 125 | y := (screenHeight - height) / 2 126 | m.SetRect(x, y, width, height) 127 | 128 | // Draw the frame. 129 | m.frame.SetRect(x, y, width, height) 130 | m.frame.Draw(screen) 131 | } 132 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/primitive.go: -------------------------------------------------------------------------------- 1 | package tview 2 | 3 | import "github.com/gdamore/tcell" 4 | 5 | // Primitive is the top-most interface for all graphical primitives. 6 | type Primitive interface { 7 | // Draw draws this primitive onto the screen. Implementers can call the 8 | // screen's ShowCursor() function but should only do so when they have focus. 9 | // (They will need to keep track of this themselves.) 10 | Draw(screen tcell.Screen) 11 | 12 | // GetRect returns the current position of the primitive, x, y, width, and 13 | // height. 14 | GetRect() (int, int, int, int) 15 | 16 | // SetRect sets a new position of the primitive. 17 | SetRect(x, y, width, height int) 18 | 19 | // InputHandler returns a handler which receives key events when it has focus. 20 | // It is called by the Application class. 21 | // 22 | // A value of nil may also be returned, in which case this primitive cannot 23 | // receive focus and will not process any key events. 24 | // 25 | // The handler will receive the key event and a function that allows it to 26 | // set the focus to a different primitive, so that future key events are sent 27 | // to that primitive. 28 | // 29 | // The Application's Draw() function will be called automatically after the 30 | // handler returns. 31 | // 32 | // The Box class provides functionality to intercept keyboard input. If you 33 | // subclass from Box, it is recommended that you wrap your handler using 34 | // Box.WrapInputHandler() so you inherit that functionality. 35 | InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) 36 | 37 | // Focus is called by the application when the primitive receives focus. 38 | // Implementers may call delegate() to pass the focus on to another primitive. 39 | Focus(delegate func(p Primitive)) 40 | 41 | // Blur is called by the application when the primitive loses focus. 42 | Blur() 43 | 44 | // GetFocusable returns the item's Focusable. 45 | GetFocusable() Focusable 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/styles.go: -------------------------------------------------------------------------------- 1 | package tview 2 | 3 | import "github.com/gdamore/tcell" 4 | 5 | // Styles defines various colors used when primitives are initialized. These 6 | // may be changed to accommodate a different look and feel. 7 | // 8 | // The default is for applications with a black background and basic colors: 9 | // black, white, yellow, green, and blue. 10 | var Styles = struct { 11 | PrimitiveBackgroundColor tcell.Color // Main background color for primitives. 12 | ContrastBackgroundColor tcell.Color // Background color for contrasting elements. 13 | MoreContrastBackgroundColor tcell.Color // Background color for even more contrasting elements. 14 | BorderColor tcell.Color // Box borders. 15 | TitleColor tcell.Color // Box titles. 16 | GraphicsColor tcell.Color // Graphics. 17 | PrimaryTextColor tcell.Color // Primary text. 18 | SecondaryTextColor tcell.Color // Secondary text (e.g. labels). 19 | TertiaryTextColor tcell.Color // Tertiary text (e.g. subtitles, notes). 20 | InverseTextColor tcell.Color // Text on primary-colored backgrounds. 21 | ContrastSecondaryTextColor tcell.Color // Secondary text on ContrastBackgroundColor-colored backgrounds. 22 | }{ 23 | PrimitiveBackgroundColor: tcell.ColorBlack, 24 | ContrastBackgroundColor: tcell.ColorBlue, 25 | MoreContrastBackgroundColor: tcell.ColorGreen, 26 | BorderColor: tcell.ColorWhite, 27 | TitleColor: tcell.ColorWhite, 28 | GraphicsColor: tcell.ColorWhite, 29 | PrimaryTextColor: tcell.ColorWhite, 30 | SecondaryTextColor: tcell.ColorYellow, 31 | TertiaryTextColor: tcell.ColorGreen, 32 | InverseTextColor: tcell.ColorBlue, 33 | ContrastSecondaryTextColor: tcell.ColorDarkCyan, 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/rivo/tview/tview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitishm/redis-terminal/68324e971e582b0d3bccedd82103e81ecf54f595/vendor/github.com/rivo/tview/tview.gif -------------------------------------------------------------------------------- /vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/internal/identifier/gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build ignore 6 | 7 | package main 8 | 9 | import ( 10 | "bytes" 11 | "encoding/xml" 12 | "fmt" 13 | "io" 14 | "log" 15 | "strings" 16 | 17 | "golang.org/x/text/internal/gen" 18 | ) 19 | 20 | type registry struct { 21 | XMLName xml.Name `xml:"registry"` 22 | Updated string `xml:"updated"` 23 | Registry []struct { 24 | ID string `xml:"id,attr"` 25 | Record []struct { 26 | Name string `xml:"name"` 27 | Xref []struct { 28 | Type string `xml:"type,attr"` 29 | Data string `xml:"data,attr"` 30 | } `xml:"xref"` 31 | Desc struct { 32 | Data string `xml:",innerxml"` 33 | // Any []struct { 34 | // Data string `xml:",chardata"` 35 | // } `xml:",any"` 36 | // Data string `xml:",chardata"` 37 | } `xml:"description,"` 38 | MIB string `xml:"value"` 39 | Alias []string `xml:"alias"` 40 | MIME string `xml:"preferred_alias"` 41 | } `xml:"record"` 42 | } `xml:"registry"` 43 | } 44 | 45 | func main() { 46 | r := gen.OpenIANAFile("assignments/character-sets/character-sets.xml") 47 | reg := ®istry{} 48 | if err := xml.NewDecoder(r).Decode(®); err != nil && err != io.EOF { 49 | log.Fatalf("Error decoding charset registry: %v", err) 50 | } 51 | if len(reg.Registry) == 0 || reg.Registry[0].ID != "character-sets-1" { 52 | log.Fatalf("Unexpected ID %s", reg.Registry[0].ID) 53 | } 54 | 55 | w := &bytes.Buffer{} 56 | fmt.Fprintf(w, "const (\n") 57 | for _, rec := range reg.Registry[0].Record { 58 | constName := "" 59 | for _, a := range rec.Alias { 60 | if strings.HasPrefix(a, "cs") && strings.IndexByte(a, '-') == -1 { 61 | // Some of the constant definitions have comments in them. Strip those. 62 | constName = strings.Title(strings.SplitN(a[2:], "\n", 2)[0]) 63 | } 64 | } 65 | if constName == "" { 66 | switch rec.MIB { 67 | case "2085": 68 | constName = "HZGB2312" // Not listed as alias for some reason. 69 | default: 70 | log.Fatalf("No cs alias defined for %s.", rec.MIB) 71 | } 72 | } 73 | if rec.MIME != "" { 74 | rec.MIME = fmt.Sprintf(" (MIME: %s)", rec.MIME) 75 | } 76 | fmt.Fprintf(w, "// %s is the MIB identifier with IANA name %s%s.\n//\n", constName, rec.Name, rec.MIME) 77 | if len(rec.Desc.Data) > 0 { 78 | fmt.Fprint(w, "// ") 79 | d := xml.NewDecoder(strings.NewReader(rec.Desc.Data)) 80 | inElem := true 81 | attr := "" 82 | for { 83 | t, err := d.Token() 84 | if err != nil { 85 | if err != io.EOF { 86 | log.Fatal(err) 87 | } 88 | break 89 | } 90 | switch x := t.(type) { 91 | case xml.CharData: 92 | attr = "" // Don't need attribute info. 93 | a := bytes.Split([]byte(x), []byte("\n")) 94 | for i, b := range a { 95 | if b = bytes.TrimSpace(b); len(b) != 0 { 96 | if !inElem && i > 0 { 97 | fmt.Fprint(w, "\n// ") 98 | } 99 | inElem = false 100 | fmt.Fprintf(w, "%s ", string(b)) 101 | } 102 | } 103 | case xml.StartElement: 104 | if x.Name.Local == "xref" { 105 | inElem = true 106 | use := false 107 | for _, a := range x.Attr { 108 | if a.Name.Local == "type" { 109 | use = use || a.Value != "person" 110 | } 111 | if a.Name.Local == "data" && use { 112 | attr = a.Value + " " 113 | } 114 | } 115 | } 116 | case xml.EndElement: 117 | inElem = false 118 | fmt.Fprint(w, attr) 119 | } 120 | } 121 | fmt.Fprint(w, "\n") 122 | } 123 | for _, x := range rec.Xref { 124 | switch x.Type { 125 | case "rfc": 126 | fmt.Fprintf(w, "// Reference: %s\n", strings.ToUpper(x.Data)) 127 | case "uri": 128 | fmt.Fprintf(w, "// Reference: %s\n", x.Data) 129 | } 130 | } 131 | fmt.Fprintf(w, "%s MIB = %s\n", constName, rec.MIB) 132 | fmt.Fprintln(w) 133 | } 134 | fmt.Fprintln(w, ")") 135 | 136 | gen.WriteGoFile("mib.go", "identifier", w.Bytes()) 137 | } 138 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/internal/identifier/identifier.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:generate go run gen.go 6 | 7 | // Package identifier defines the contract between implementations of Encoding 8 | // and Index by defining identifiers that uniquely identify standardized coded 9 | // character sets (CCS) and character encoding schemes (CES), which we will 10 | // together refer to as encodings, for which Encoding implementations provide 11 | // converters to and from UTF-8. This package is typically only of concern to 12 | // implementers of Indexes and Encodings. 13 | // 14 | // One part of the identifier is the MIB code, which is defined by IANA and 15 | // uniquely identifies a CCS or CES. Each code is associated with data that 16 | // references authorities, official documentation as well as aliases and MIME 17 | // names. 18 | // 19 | // Not all CESs are covered by the IANA registry. The "other" string that is 20 | // returned by ID can be used to identify other character sets or versions of 21 | // existing ones. 22 | // 23 | // It is recommended that each package that provides a set of Encodings provide 24 | // the All and Common variables to reference all supported encodings and 25 | // commonly used subset. This allows Index implementations to include all 26 | // available encodings without explicitly referencing or knowing about them. 27 | package identifier 28 | 29 | // Note: this package is internal, but could be made public if there is a need 30 | // for writing third-party Indexes and Encodings. 31 | 32 | // References: 33 | // - http://source.icu-project.org/repos/icu/icu/trunk/source/data/mappings/convrtrs.txt 34 | // - http://www.iana.org/assignments/character-sets/character-sets.xhtml 35 | // - http://www.iana.org/assignments/ianacharset-mib/ianacharset-mib 36 | // - http://www.ietf.org/rfc/rfc2978.txt 37 | // - http://www.unicode.org/reports/tr22/ 38 | // - http://www.w3.org/TR/encoding/ 39 | // - https://encoding.spec.whatwg.org/ 40 | // - https://encoding.spec.whatwg.org/encodings.json 41 | // - https://tools.ietf.org/html/rfc6657#section-5 42 | 43 | // Interface can be implemented by Encodings to define the CCS or CES for which 44 | // it implements conversions. 45 | type Interface interface { 46 | // ID returns an encoding identifier. Exactly one of the mib and other 47 | // values should be non-zero. 48 | // 49 | // In the usual case it is only necessary to indicate the MIB code. The 50 | // other string can be used to specify encodings for which there is no MIB, 51 | // such as "x-mac-dingbat". 52 | // 53 | // The other string may only contain the characters a-z, A-Z, 0-9, - and _. 54 | ID() (mib MIB, other string) 55 | 56 | // NOTE: the restrictions on the encoding are to allow extending the syntax 57 | // with additional information such as versions, vendors and other variants. 58 | } 59 | 60 | // A MIB identifies an encoding. It is derived from the IANA MIB codes and adds 61 | // some identifiers for some encodings that are not covered by the IANA 62 | // standard. 63 | // 64 | // See http://www.iana.org/assignments/ianacharset-mib. 65 | type MIB uint16 66 | 67 | // These additional MIB types are not defined in IANA. They are added because 68 | // they are common and defined within the text repo. 69 | const ( 70 | // Unofficial marks the start of encodings not registered by IANA. 71 | Unofficial MIB = 10000 + iota 72 | 73 | // Replacement is the WhatWG replacement encoding. 74 | Replacement 75 | 76 | // XUserDefined is the code for x-user-defined. 77 | XUserDefined 78 | 79 | // MacintoshCyrillic is the code for x-mac-cyrillic. 80 | MacintoshCyrillic 81 | ) 82 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/cldr/base.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cldr 6 | 7 | import ( 8 | "encoding/xml" 9 | "regexp" 10 | "strconv" 11 | ) 12 | 13 | // Elem is implemented by every XML element. 14 | type Elem interface { 15 | setEnclosing(Elem) 16 | setName(string) 17 | enclosing() Elem 18 | 19 | GetCommon() *Common 20 | } 21 | 22 | type hidden struct { 23 | CharData string `xml:",chardata"` 24 | Alias *struct { 25 | Common 26 | Source string `xml:"source,attr"` 27 | Path string `xml:"path,attr"` 28 | } `xml:"alias"` 29 | Def *struct { 30 | Common 31 | Choice string `xml:"choice,attr,omitempty"` 32 | Type string `xml:"type,attr,omitempty"` 33 | } `xml:"default"` 34 | } 35 | 36 | // Common holds several of the most common attributes and sub elements 37 | // of an XML element. 38 | type Common struct { 39 | XMLName xml.Name 40 | name string 41 | enclElem Elem 42 | Type string `xml:"type,attr,omitempty"` 43 | Reference string `xml:"reference,attr,omitempty"` 44 | Alt string `xml:"alt,attr,omitempty"` 45 | ValidSubLocales string `xml:"validSubLocales,attr,omitempty"` 46 | Draft string `xml:"draft,attr,omitempty"` 47 | hidden 48 | } 49 | 50 | // Default returns the default type to select from the enclosed list 51 | // or "" if no default value is specified. 52 | func (e *Common) Default() string { 53 | if e.Def == nil { 54 | return "" 55 | } 56 | if e.Def.Choice != "" { 57 | return e.Def.Choice 58 | } else if e.Def.Type != "" { 59 | // Type is still used by the default element in collation. 60 | return e.Def.Type 61 | } 62 | return "" 63 | } 64 | 65 | // Element returns the XML element name. 66 | func (e *Common) Element() string { 67 | return e.name 68 | } 69 | 70 | // GetCommon returns e. It is provided such that Common implements Elem. 71 | func (e *Common) GetCommon() *Common { 72 | return e 73 | } 74 | 75 | // Data returns the character data accumulated for this element. 76 | func (e *Common) Data() string { 77 | e.CharData = charRe.ReplaceAllStringFunc(e.CharData, replaceUnicode) 78 | return e.CharData 79 | } 80 | 81 | func (e *Common) setName(s string) { 82 | e.name = s 83 | } 84 | 85 | func (e *Common) enclosing() Elem { 86 | return e.enclElem 87 | } 88 | 89 | func (e *Common) setEnclosing(en Elem) { 90 | e.enclElem = en 91 | } 92 | 93 | // Escape characters that can be escaped without further escaping the string. 94 | var charRe = regexp.MustCompile(`&#x[0-9a-fA-F]*;|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\[abtnvfr]`) 95 | 96 | // replaceUnicode converts hexadecimal Unicode codepoint notations to a one-rune string. 97 | // It assumes the input string is correctly formatted. 98 | func replaceUnicode(s string) string { 99 | if s[1] == '#' { 100 | r, _ := strconv.ParseInt(s[3:len(s)-1], 16, 32) 101 | return string(r) 102 | } 103 | r, _, _, _ := strconv.UnquoteChar(s, 0) 104 | return string(r) 105 | } 106 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/cldr/cldr.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:generate go run makexml.go -output xml.go 6 | 7 | // Package cldr provides a parser for LDML and related XML formats. 8 | // This package is intended to be used by the table generation tools 9 | // for the various internationalization-related packages. 10 | // As the XML types are generated from the CLDR DTD, and as the CLDR standard 11 | // is periodically amended, this package may change considerably over time. 12 | // This mostly means that data may appear and disappear between versions. 13 | // That is, old code should keep compiling for newer versions, but data 14 | // may have moved or changed. 15 | // CLDR version 22 is the first version supported by this package. 16 | // Older versions may not work. 17 | package cldr // import "golang.org/x/text/unicode/cldr" 18 | 19 | import ( 20 | "fmt" 21 | "sort" 22 | ) 23 | 24 | // CLDR provides access to parsed data of the Unicode Common Locale Data Repository. 25 | type CLDR struct { 26 | parent map[string][]string 27 | locale map[string]*LDML 28 | resolved map[string]*LDML 29 | bcp47 *LDMLBCP47 30 | supp *SupplementalData 31 | } 32 | 33 | func makeCLDR() *CLDR { 34 | return &CLDR{ 35 | parent: make(map[string][]string), 36 | locale: make(map[string]*LDML), 37 | resolved: make(map[string]*LDML), 38 | bcp47: &LDMLBCP47{}, 39 | supp: &SupplementalData{}, 40 | } 41 | } 42 | 43 | // BCP47 returns the parsed BCP47 LDML data. If no such data was parsed, nil is returned. 44 | func (cldr *CLDR) BCP47() *LDMLBCP47 { 45 | return nil 46 | } 47 | 48 | // Draft indicates the draft level of an element. 49 | type Draft int 50 | 51 | const ( 52 | Approved Draft = iota 53 | Contributed 54 | Provisional 55 | Unconfirmed 56 | ) 57 | 58 | var drafts = []string{"unconfirmed", "provisional", "contributed", "approved", ""} 59 | 60 | // ParseDraft returns the Draft value corresponding to the given string. The 61 | // empty string corresponds to Approved. 62 | func ParseDraft(level string) (Draft, error) { 63 | if level == "" { 64 | return Approved, nil 65 | } 66 | for i, s := range drafts { 67 | if level == s { 68 | return Unconfirmed - Draft(i), nil 69 | } 70 | } 71 | return Approved, fmt.Errorf("cldr: unknown draft level %q", level) 72 | } 73 | 74 | func (d Draft) String() string { 75 | return drafts[len(drafts)-1-int(d)] 76 | } 77 | 78 | // SetDraftLevel sets which draft levels to include in the evaluated LDML. 79 | // Any draft element for which the draft level is higher than lev will be excluded. 80 | // If multiple draft levels are available for a single element, the one with the 81 | // lowest draft level will be selected, unless preferDraft is true, in which case 82 | // the highest draft will be chosen. 83 | // It is assumed that the underlying LDML is canonicalized. 84 | func (cldr *CLDR) SetDraftLevel(lev Draft, preferDraft bool) { 85 | // TODO: implement 86 | cldr.resolved = make(map[string]*LDML) 87 | } 88 | 89 | // RawLDML returns the LDML XML for id in unresolved form. 90 | // id must be one of the strings returned by Locales. 91 | func (cldr *CLDR) RawLDML(loc string) *LDML { 92 | return cldr.locale[loc] 93 | } 94 | 95 | // LDML returns the fully resolved LDML XML for loc, which must be one of 96 | // the strings returned by Locales. 97 | func (cldr *CLDR) LDML(loc string) (*LDML, error) { 98 | return cldr.resolve(loc) 99 | } 100 | 101 | // Supplemental returns the parsed supplemental data. If no such data was parsed, 102 | // nil is returned. 103 | func (cldr *CLDR) Supplemental() *SupplementalData { 104 | return cldr.supp 105 | } 106 | 107 | // Locales returns the locales for which there exist files. 108 | // Valid sublocales for which there is no file are not included. 109 | // The root locale is always sorted first. 110 | func (cldr *CLDR) Locales() []string { 111 | loc := []string{"root"} 112 | hasRoot := false 113 | for l, _ := range cldr.locale { 114 | if l == "root" { 115 | hasRoot = true 116 | continue 117 | } 118 | loc = append(loc, l) 119 | } 120 | sort.Strings(loc[1:]) 121 | if !hasRoot { 122 | return loc[1:] 123 | } 124 | return loc 125 | } 126 | 127 | // Get fills in the fields of x based on the XPath path. 128 | func Get(e Elem, path string) (res Elem, err error) { 129 | return walkXPath(e, path) 130 | } 131 | --------------------------------------------------------------------------------