CINXE.COM
readline package - github.com/chzyer/readline - Go Packages
<!DOCTYPE html> <html lang="en" data-layout="responsive" data-local=""> <head> <script> window.addEventListener('error', window.__err=function f(e){f.p=f.p||[];f.p.push(e)}); </script> <script> (function() { const theme = document.cookie.match(/prefers-color-scheme=(light|dark|auto)/)?.[1] if (theme) { document.querySelector('html').setAttribute('data-theme', theme); } }()) </script> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="Description" content="Readline is a pure go implementation for GNU-Readline kind library."> <meta class="js-gtmID" data-gtmid="GTM-W8MVQXG"> <link rel="shortcut icon" href="/static/shared/icon/favicon.ico"> <link rel="canonical" href="https://pkg.go.dev/github.com/chzyer/readline"> <link href="/static/frontend/frontend.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Go Packages"> <title>readline package - github.com/chzyer/readline - Go Packages</title> <link href="/static/frontend/unit/unit.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> <link href="/static/frontend/unit/main/main.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> </head> <body> <script> function loadScript(src, mod = true) { let s = document.createElement('script'); s.src = src; if (mod) { s.type = 'module'; s.async = true; s.defer = true } document.head.appendChild(s); } loadScript("/third_party/dialog-polyfill/dialog-polyfill.js", false) loadScript("/static/frontend/frontend.js"); </script> <header class="go-Header go-Header--full js-siteHeader"> <div class="go-Header-inner go-Header-inner--dark"> <nav class="go-Header-nav"> <a href="https://go.dev/" class="js-headerLogo" data-gtmc="nav link" data-test-id="go-header-logo-link" role="heading" aria-level="1"> <img class="go-Header-logo" src="/static/shared/logo/go-white.svg" alt="Go"> </a> <div class="skip-navigation-wrapper"> <a class="skip-to-content-link" aria-label="Skip to main content" href="#main-content"> Skip to Main Content </a> </div> <div class="go-Header-rightContent"> <div class="go-SearchForm js-searchForm"> <form class="go-InputGroup go-ShortcutKey go-SearchForm-form" action="/search" data-shortcut="/" data-shortcut-alt="search" data-gtmc="search form" aria-label="Search for a package" role="search" > <input name="q" class="go-Input js-searchFocus" aria-label="Search for a package" type="search" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" placeholder="Search packages or symbols" value="" /> <input name="m" value="" hidden> <button class="go-Button go-Button--inverted" aria-label="Submit search"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/search_gm_grey_24dp.svg" alt="" /> </button> </form> <button class="go-SearchForm-expandSearch js-expandSearch" data-gtmc="nav button" aria-label="Open search" data-test-id="expand-search"> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/search_gm_grey_24dp.svg" alt=""> </button> </div> <ul class="go-Header-menu"> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Why Go <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--why js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/solutions#case-studies"> </span>Case Studies</span> </a> </div> <p>Common problems companies solve with Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/solutions#use-cases"> </span>Use Cases</span> </a> </div> <p>Stories about how and why companies use Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/security/policy/"> </span>Security Policy</span> </a> </div> <p>How Go can help keep you secure by default</p> </li> </ul> </li> <li class="go-Header-menuItem"> <a href="https://go.dev/learn/" data-gtmc="nav link">Learn</a> </li> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Docs <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--docs js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/effective_go"> <span>Effective Go</span> </a> </div> <p>Tips for writing clear, performant, and idiomatic Go code</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/"> <span>Go User Manual</span> </a> </div> <p>A complete introduction to building software with Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://pkg.go.dev/std"> <span>Standard library</span> </a> </div> <p>Reference documentation for Go's standard library</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/devel/release"> <span>Release Notes</span> </a> </div> <p>Learn what's new in each Go release</p> </li> </ul> </li> <li class="go-Header-menuItem go-Header-menuItem--active"> <a href="/" data-gtmc="nav link">Packages</a> </li> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Community <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--community js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/talks/"> <span>Recorded Talks</span> </a> </div> <p>Videos from prior events</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://www.meetup.com/pro/go"> <span>Meetups</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </div> <p>Meet other local Go developers</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://github.com/golang/go/wiki/Conferences"> <span>Conferences</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </div> <p>Learn and network with Go developers from around the world</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/blog"> <span>Go blog</span> </a> </div> <p>The Go project's official blog.</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/help"> <span>Go project</span> </a> </div> <p>Get help and stay informed from Go</p> </li> <li class="go-Header-submenuItem"> <div> Get connected </div> <p></p> <div class="go-Header-socialIcons"> <a class="go-Header-socialIcon" aria-label="Get connected with google-groups (Opens in new window)" href="https://groups.google.com/g/golang-nuts" ><img src="/static/shared/logo/social/google-groups.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with github (Opens in new window)" href="https://github.com/golang"><img src="/static/shared/logo/social/github.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with twitter (Opens in new window)" href="https://twitter.com/golang"><img src="/static/shared/logo/social/twitter.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with reddit (Opens in new window)" href="https://www.reddit.com/r/golang/"><img src="/static/shared/logo/social/reddit.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with slack (Opens in new window)" href="https://invite.slack.golangbridge.org/"><img src="/static/shared/logo/social/slack.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with stack-overflow (Opens in new window)" href="https://stackoverflow.com/collectives/go"><img src="/static/shared/logo/social/stack-overflow.svg" /></a> </div> </li> </ul> </li> </ul> <button class="go-Header-navOpen js-headerMenuButton go-Header-navOpen--white" data-gtmc="nav button" aria-label="Open navigation"> </button> </div> </nav> </div> </header> <aside class="go-NavigationDrawer js-header"> <nav class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="https://go.dev/"> <img class="go-NavigationDrawer-logo" src="/static/shared/logo/go-blue.svg" alt="Go."> </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Why Go</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Why Go </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/solutions#case-studies"> Case Studies </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/solutions#use-cases"> Use Cases </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/security/policy/"> Security Policy </a> </li> </ul> </div> </div> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/learn/">Learn</a> </li> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Docs</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"><i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Docs </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/effective_go"> Effective Go </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/"> Go User Manual </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://pkg.go.dev/std"> Standard library </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/devel/release"> Release Notes </a> </li> </ul> </div> </div> </li> <li class="go-NavigationDrawer-listItem go-NavigationDrawer-listItem--active"> <a href="/">Packages</a> </li> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Community</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Community </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/talks/"> Recorded Talks </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://www.meetup.com/pro/go"> Meetups <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://github.com/golang/go/wiki/Conferences"> Conferences <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/blog"> Go blog </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/help"> Go project </a> </li> <li class="go-NavigationDrawer-listItem"> <div>Get connected</div> <div class="go-Header-socialIcons"> <a class="go-Header-socialIcon" href="https://groups.google.com/g/golang-nuts"><img src="/static/shared/logo/social/google-groups.svg" /></a> <a class="go-Header-socialIcon" href="https://github.com/golang"><img src="/static/shared/logo/social/github.svg" /></a> <a class="go-Header-socialIcon" href="https://twitter.com/golang"><img src="/static/shared/logo/social/twitter.svg" /></a> <a class="go-Header-socialIcon" href="https://www.reddit.com/r/golang/"><img src="/static/shared/logo/social/reddit.svg" /></a> <a class="go-Header-socialIcon" href="https://invite.slack.golangbridge.org/"><img src="/static/shared/logo/social/slack.svg" /></a> <a class="go-Header-socialIcon" href="https://stackoverflow.com/collectives/go"><img src="/static/shared/logo/social/stack-overflow.svg" /></a> </div> </li> </ul> </div> </div> </li> </ul> </nav> </aside> <div class="go-NavigationDrawer-scrim js-scrim" role="presentation"></div> <main class="go-Main" id="main-content"> <div class="go-Main-banner" role="alert"></div> <header class="go-Main-header js-mainHeader"> <nav class="go-Main-headerBreadcrumb go-Breadcrumb" aria-label="Breadcrumb" data-test-id="UnitHeader-breadcrumb"> <ol> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/" data-gtmc="breadcrumb link">Discover Packages</a> </li> <li> <a href="/github.com/chzyer/readline@v1.5.1" data-gtmc="breadcrumb link" aria-current="location" data-test-id="UnitHeader-breadcrumbCurrent"> github.com/chzyer/readline </a> <button class="go-Button go-Button--inline go-Clipboard js-clipboard" title="Copy path to clipboard. github.com/chzyer/readline" aria-label="Copy Path to Clipboard" data-to-copy="github.com/chzyer/readline" data-gtmc="breadcrumbs button" > <img class="go-Icon go-Icon--accented" height="24" width="24" src="/static/shared/icon/content_copy_gm_grey_24dp.svg" alt="" > </button> </li> </ol> </nav> <div class="go-Main-headerContent"> <div class="go-Main-headerTitle js-stickyHeader"> <a class="go-Main-headerLogo" href="https://go.dev/" aria-hidden="true" tabindex="-1" data-gtmc="header link" aria-label="Link to Go Homepage"> <img height="78" width="207" src="/static/shared/logo/go-blue.svg" alt="Go"> </a> <h1 class="UnitHeader-titleHeading" data-test-id="UnitHeader-title">readline</h1> <span class="go-Chip go-Chip--inverted">package</span> <span class="go-Chip go-Chip--inverted">module</span> <button class="go-Button go-Button--inline go-Clipboard js-clipboard" title="Copy path to clipboard. github.com/chzyer/readline" aria-label="Copy Path to Clipboard" data-to-copy="github.com/chzyer/readline" data-gtmc="title button" tabindex="-1" > <img class="go-Icon go-Icon--accented" height="24" width="24" src="/static/shared/icon/content_copy_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="go-Main-headerDetails"> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-version"> <a href="?tab=versions" aria-label="Version: v1.5.1" data-gtmc="header link" aria-describedby="version-description"> <span class="go-textSubtle" aria-hidden="true">Version: </span> v1.5.1 </a> <div class="screen-reader-only" id="version-description" hidden> Opens a new window with list of versions in this module. </div> <span class="DetailsHeader-badge--latest" data-test-id="UnitHeader-minorVersionBanner"> <span class="go-Chip DetailsHeader-span--latest">Latest</span> <span class="go-Chip DetailsHeader-span--notAtLatest"> Latest <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/alert_gm_grey_24dp.svg" alt="Warning"> </summary> <p>This package is not in the latest version of its module.</p> </details> </span> <a href="/github.com/chzyer/readline" aria-label="Go to Latest Version" data-gtmc="header link"> <span class="go-Chip go-Chip--alert DetailsHeader-span--goToLatest">Go to latest</span> </a> </span> </span> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-commitTime"> Published: Jul 15, 2022 </span> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-licenses"> License: <a href="/github.com/chzyer/readline?tab=licenses" data-test-id="UnitHeader-license" data-gtmc="header link" aria-describedby="license-description">MIT</a> </span> <div class="screen-reader-only" id="license-description" hidden> Opens a new window with license information. </div> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-imports"> <a href="/github.com/chzyer/readline?tab=imports" aria-label="Imports: 19" data-gtmc="header link" aria-describedby="imports-description"> <span class="go-textSubtle">Imports: </span>19 </a> </span> <div class="screen-reader-only" id="imports-description" hidden> Opens a new window with list of imports. </div> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-importedby"> <a href="/github.com/chzyer/readline?tab=importedby" aria-label="Imported By: 2,215" data-gtmc="header link" aria-describedby="importedby-description"> <span class="go-textSubtle">Imported by: </span>2,215 </a> </span> <div class="screen-reader-only" id="importedby-description" hidden> Opens a new window with list of known importers. </div> </div> <div class="UnitHeader-overflowContainer"> <svg class="UnitHeader-overflowImage" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> <path d="M0 0h24v24H0z" fill="none"/> <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/> </svg> <select class="UnitHeader-overflowSelect js-selectNav" tabindex="-1"> <option value="/">Main</option> <option value="/github.com/chzyer/readline?tab=versions"> Versions </option> <option value="/github.com/chzyer/readline?tab=licenses"> Licenses </option> <option value="/github.com/chzyer/readline?tab=imports"> Imports </option> <option value="/github.com/chzyer/readline?tab=importedby"> Imported By </option> </select> </div> </div> </header> <aside class="go-Main-aside js-mainAside"> <div class="UnitMeta"> <h2 class="go-textLabel">Details</h2> <ul class="UnitMeta-details"> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Valid <a href="https://github.com/chzyer/readline/tree/v1.5.1/go.mod" target="_blank" rel="noopener">go.mod</a> file <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p> The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. </p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Redistributable license <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p> Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. </p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Tagged version <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p>Modules with tagged versions give importers more predictable builds.</p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Stable version <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p>When a project reaches major version v1 it is considered stable.</p> </details> </li> <li class="UnitMeta-detailsLearn"> <a href="/about#best-practices" data-gtmc="meta link">Learn more about best practices</a> </li> </ul> <h2 class="go-textLabel">Repository</h2> <div class="UnitMeta-repo"> <a href="https://github.com/chzyer/readline" title="https://github.com/chzyer/readline" target="_blank" rel="noopener"> github.com/chzyer/readline </a> </div> <h2 class="go-textLabel">Links</h2> <ul class="UnitMeta-links"> <li> <a href="https://deps.dev/go/github.com%2Fchzyer%2Freadline/v1.5.1" title="View this module on Open Source Insights" target="_blank" rel="noopener" data-test-id="meta-link-depsdev"> <img class="depsdev-Icon" src="/static/shared/icon/depsdev-logo.svg" alt="Open Source Insights Logo" /> Open Source Insights </a> </li> </ul> </div> </aside> <nav class="go-Main-nav go-Main-nav--sticky js-mainNav" aria-label="Outline"> <div class="go-Main-navDesktop"> <div class="UnitOutline-jumpTo"> <button class="UnitOutline-jumpToInput go-ShortcutKey js-jumpToInput" aria-controls="jump-to-modal" aria-label="Open Jump to Identifier" data-shortcut="f" data-shortcut-alt="find" data-test-id="jump-to-button" data-gtmc="outline button"> Jump to ... </button> </div> <ul class="go-Tree js-tree" role="tree" aria-label="Outline"> <li class="js-readmeOutline"> <a href="#section-readme" data-gtmc="outline link"> README </a> <ul id="readme-outline"> <li> <a href="#readme-guide" data-gtmc="readme outline link"> Guide </a> </li> <li> <a href="#readme-repos-using-readline" data-gtmc="readme outline link"> Repos using readline </a> </li> <li> <a href="#readme-feedback" data-gtmc="readme outline link"> Feedback </a> </li> <li> <a href="#readme-backers" data-gtmc="readme outline link"> Backers </a> </li> <li> <a href="#readme-sponsors" data-gtmc="readme outline link"> Sponsors </a> </li> </ul> </li> <li> <a href="#section-documentation" data-gtmc="outline link"> Documentation </a> <ul> <li> <a href="#pkg-overview" data-gtmc="doc outline link">Overview</a> </li> <li class="DocNav-overview"> <a href="#pkg-index" data-gtmc="doc outline link"> Index </a> </li> <li class="DocNav-constants"> <a href="#pkg-constants" data-gtmc="doc outline link"> Constants </a> </li> <li class="DocNav-variables"> <a href="#pkg-variables" data-gtmc="doc outline link"> Variables </a> </li> <li class="DocNav-functions"> <a href="#pkg-functions" data-gtmc="doc outline link"> Functions </a> <ul> <li> <a href="#AddHistory" title="AddHistory(content)" data-gtmc="doc outline link"> AddHistory(content) </a> </li> <li> <a href="#CaptureExitSignal" title="CaptureExitSignal(f)" data-gtmc="doc outline link"> CaptureExitSignal(f) </a> </li> <li> <a href="#ClearScreen" title="ClearScreen(w)" data-gtmc="doc outline link"> ClearScreen(w) </a> </li> <li> <a href="#Debug" title="Debug(o)" data-gtmc="doc outline link"> Debug(o) </a> </li> <li> <a href="#DefaultIsTerminal" title="DefaultIsTerminal()" data-gtmc="doc outline link"> DefaultIsTerminal() </a> </li> <li> <a href="#DefaultOnWidthChanged" title="DefaultOnWidthChanged(f)" data-gtmc="doc outline link"> DefaultOnWidthChanged(f) </a> </li> <li> <a href="#DialRemote" title="DialRemote(n, addr)" data-gtmc="doc outline link"> DialRemote(n, addr) </a> </li> <li> <a href="#Do" title="Do(p, line, pos)" data-gtmc="doc outline link"> Do(p, line, pos) </a> </li> <li> <a href="#GetInt" title="GetInt(s, def)" data-gtmc="doc outline link"> GetInt(s, def) </a> </li> <li> <a href="#GetScreenWidth" title="GetScreenWidth()" data-gtmc="doc outline link"> GetScreenWidth() </a> </li> <li> <a href="#GetSize" title="GetSize(fd)" data-gtmc="doc outline link"> GetSize(fd) </a> </li> <li> <a href="#GetStdin" title="GetStdin()" data-gtmc="doc outline link"> GetStdin() </a> </li> <li> <a href="#IsPrintable" title="IsPrintable(key)" data-gtmc="doc outline link"> IsPrintable(key) </a> </li> <li> <a href="#IsTerminal" title="IsTerminal(fd)" data-gtmc="doc outline link"> IsTerminal(fd) </a> </li> <li> <a href="#IsWordBreak" title="IsWordBreak(i)" data-gtmc="doc outline link"> IsWordBreak(i) </a> </li> <li> <a href="#Line" title="Line(prompt)" data-gtmc="doc outline link"> Line(prompt) </a> </li> <li> <a href="#LineCount" title="LineCount(screenWidth, w)" data-gtmc="doc outline link"> LineCount(screenWidth, w) </a> </li> <li> <a href="#ListenRemote" title="ListenRemote(n, addr, cfg, h, onListen)" data-gtmc="doc outline link"> ListenRemote(n, addr, cfg, h, onListen) </a> </li> <li> <a href="#NewFillableStdin" title="NewFillableStdin(stdin)" data-gtmc="doc outline link"> NewFillableStdin(stdin) </a> </li> <li> <a href="#Password" title="Password(prompt)" data-gtmc="doc outline link"> Password(prompt) </a> </li> <li> <a href="#Print" title="Print(p, prefix, level, buf)" data-gtmc="doc outline link"> Print(p, prefix, level, buf) </a> </li> <li> <a href="#ReadPassword" title="ReadPassword(fd)" data-gtmc="doc outline link"> ReadPassword(fd) </a> </li> <li> <a href="#Restore" title="Restore(fd, state)" data-gtmc="doc outline link"> Restore(fd, state) </a> </li> <li> <a href="#RetSegment" title="RetSegment(segments, cands, idx)" data-gtmc="doc outline link"> RetSegment(segments, cands, idx) </a> </li> <li> <a href="#SetAutoComplete" title="SetAutoComplete(completer)" data-gtmc="doc outline link"> SetAutoComplete(completer) </a> </li> <li> <a href="#SetHistoryPath" title="SetHistoryPath(fp)" data-gtmc="doc outline link"> SetHistoryPath(fp) </a> </li> <li> <a href="#SplitByLine" title="SplitByLine(start, screenWidth, rs)" data-gtmc="doc outline link"> SplitByLine(start, screenWidth, rs) </a> </li> <li> <a href="#SplitSegment" title="SplitSegment(line, pos)" data-gtmc="doc outline link"> SplitSegment(line, pos) </a> </li> <li> <a href="#SuspendMe" title="SuspendMe()" data-gtmc="doc outline link"> SuspendMe() </a> </li> <li> <a href="#WaitForResume" title="WaitForResume()" data-gtmc="doc outline link"> WaitForResume() </a> </li> </ul> </li> <li class="DocNav-types"> <a href="#pkg-types" data-gtmc="doc outline link"> Types </a> <ul> <li> <a href="#AutoCompleter" title="type AutoCompleter" data-gtmc="doc outline link"> type AutoCompleter </a> <ul> <li> <a href="#SegmentFunc" title="SegmentFunc(f)" data-gtmc="doc outline link"> SegmentFunc(f) </a> </li> </ul> </li> <li> <a href="#CancelableStdin" title="type CancelableStdin" data-gtmc="doc outline link"> type CancelableStdin </a> <ul> <li> <a href="#NewCancelableStdin" title="NewCancelableStdin(r)" data-gtmc="doc outline link"> NewCancelableStdin(r) </a> </li> <li> <a href="#CancelableStdin.Close" title="(c) Close()" data-gtmc="doc outline link"> (c) Close() </a> </li> <li> <a href="#CancelableStdin.Read" title="(c) Read(b)" data-gtmc="doc outline link"> (c) Read(b) </a> </li> </ul> </li> <li> <a href="#Config" title="type Config" data-gtmc="doc outline link"> type Config </a> <ul> <li> <a href="#Config.Clone" title="(c) Clone()" data-gtmc="doc outline link"> (c) Clone() </a> </li> <li> <a href="#Config.Init" title="(c) Init()" data-gtmc="doc outline link"> (c) Init() </a> </li> <li> <a href="#Config.SetListener" title="(c) SetListener(f)" data-gtmc="doc outline link"> (c) SetListener(f) </a> </li> <li> <a href="#Config.SetPainter" title="(c) SetPainter(p)" data-gtmc="doc outline link"> (c) SetPainter(p) </a> </li> </ul> </li> <li> <a href="#DumpListener" title="type DumpListener" data-gtmc="doc outline link"> type DumpListener </a> <ul> <li> <a href="#DumpListener.OnChange" title="(d) OnChange(line, pos, key)" data-gtmc="doc outline link"> (d) OnChange(line, pos, key) </a> </li> </ul> </li> <li> <a href="#DynamicCompleteFunc" title="type DynamicCompleteFunc" data-gtmc="doc outline link"> type DynamicCompleteFunc </a> </li> <li> <a href="#DynamicPrefixCompleterInterface" title="type DynamicPrefixCompleterInterface" data-gtmc="doc outline link"> type DynamicPrefixCompleterInterface </a> </li> <li> <a href="#FillableStdin" title="type FillableStdin" data-gtmc="doc outline link"> type FillableStdin </a> <ul> <li> <a href="#FillableStdin.Close" title="(s) Close()" data-gtmc="doc outline link"> (s) Close() </a> </li> <li> <a href="#FillableStdin.Read" title="(s) Read(p)" data-gtmc="doc outline link"> (s) Read(p) </a> </li> </ul> </li> <li> <a href="#Instance" title="type Instance" data-gtmc="doc outline link"> type Instance </a> <ul> <li> <a href="#HandleConn" title="HandleConn(cfg, conn)" data-gtmc="doc outline link"> HandleConn(cfg, conn) </a> </li> <li> <a href="#New" title="New(prompt)" data-gtmc="doc outline link"> New(prompt) </a> </li> <li> <a href="#NewEx" title="NewEx(cfg)" data-gtmc="doc outline link"> NewEx(cfg) </a> </li> <li> <a href="#Instance.CaptureExitSignal" title="(i) CaptureExitSignal()" data-gtmc="doc outline link"> (i) CaptureExitSignal() </a> </li> <li> <a href="#Instance.Clean" title="(i) Clean()" data-gtmc="doc outline link"> (i) Clean() </a> </li> <li> <a href="#Instance.Close" title="(i) Close()" data-gtmc="doc outline link"> (i) Close() </a> </li> <li> <a href="#Instance.GenPasswordConfig" title="(i) GenPasswordConfig()" data-gtmc="doc outline link"> (i) GenPasswordConfig() </a> </li> <li> <a href="#Instance.HistoryDisable" title="(i) HistoryDisable()" data-gtmc="doc outline link"> (i) HistoryDisable() </a> </li> <li> <a href="#Instance.HistoryEnable" title="(i) HistoryEnable()" data-gtmc="doc outline link"> (i) HistoryEnable() </a> </li> <li> <a href="#Instance.IsVimMode" title="(i) IsVimMode()" data-gtmc="doc outline link"> (i) IsVimMode() </a> </li> <li> <a href="#Instance.Line" title="(i) Line()" data-gtmc="doc outline link"> (i) Line() </a> </li> <li> <a href="#Instance.ReadPassword" title="(i) ReadPassword(prompt)" data-gtmc="doc outline link"> (i) ReadPassword(prompt) </a> </li> <li> <a href="#Instance.ReadPasswordEx" title="(i) ReadPasswordEx(prompt, l)" data-gtmc="doc outline link"> (i) ReadPasswordEx(prompt, l) </a> </li> <li> <a href="#Instance.ReadPasswordWithConfig" title="(i) ReadPasswordWithConfig(cfg)" data-gtmc="doc outline link"> (i) ReadPasswordWithConfig(cfg) </a> </li> <li> <a href="#Instance.ReadSlice" title="(i) ReadSlice()" data-gtmc="doc outline link"> (i) ReadSlice() </a> </li> <li> <a href="#Instance.Readline" title="(i) Readline()" data-gtmc="doc outline link"> (i) Readline() </a> </li> <li> <a href="#Instance.ReadlineWithDefault" title="(i) ReadlineWithDefault(what)" data-gtmc="doc outline link"> (i) ReadlineWithDefault(what) </a> </li> <li> <a href="#Instance.Refresh" title="(i) Refresh()" data-gtmc="doc outline link"> (i) Refresh() </a> </li> <li> <a href="#Instance.ResetHistory" title="(i) ResetHistory()" data-gtmc="doc outline link"> (i) ResetHistory() </a> </li> <li> <a href="#Instance.SaveHistory" title="(i) SaveHistory(content)" data-gtmc="doc outline link"> (i) SaveHistory(content) </a> </li> <li> <a href="#Instance.SetConfig" title="(i) SetConfig(cfg)" data-gtmc="doc outline link"> (i) SetConfig(cfg) </a> </li> <li> <a href="#Instance.SetHistoryPath" title="(i) SetHistoryPath(p)" data-gtmc="doc outline link"> (i) SetHistoryPath(p) </a> </li> <li> <a href="#Instance.SetMaskRune" title="(i) SetMaskRune(r)" data-gtmc="doc outline link"> (i) SetMaskRune(r) </a> </li> <li> <a href="#Instance.SetPrompt" title="(i) SetPrompt(s)" data-gtmc="doc outline link"> (i) SetPrompt(s) </a> </li> <li> <a href="#Instance.SetVimMode" title="(i) SetVimMode(on)" data-gtmc="doc outline link"> (i) SetVimMode(on) </a> </li> <li> <a href="#Instance.Stderr" title="(i) Stderr()" data-gtmc="doc outline link"> (i) Stderr() </a> </li> <li> <a href="#Instance.Stdout" title="(i) Stdout()" data-gtmc="doc outline link"> (i) Stdout() </a> </li> <li> <a href="#Instance.Write" title="(i) Write(b)" data-gtmc="doc outline link"> (i) Write(b) </a> </li> <li> <a href="#Instance.WriteStdin" title="(i) WriteStdin(val)" data-gtmc="doc outline link"> (i) WriteStdin(val) </a> </li> </ul> </li> <li> <a href="#InterruptError" title="type InterruptError" data-gtmc="doc outline link"> type InterruptError </a> <ul> <li> <a href="#InterruptError.Error" title="Error()" data-gtmc="doc outline link"> Error() </a> </li> </ul> </li> <li> <a href="#Listener" title="type Listener" data-gtmc="doc outline link"> type Listener </a> <ul> <li> <a href="#FuncListener" title="FuncListener(f)" data-gtmc="doc outline link"> FuncListener(f) </a> </li> </ul> </li> <li> <a href="#Message" title="type Message" data-gtmc="doc outline link"> type Message </a> <ul> <li> <a href="#NewMessage" title="NewMessage(t, data)" data-gtmc="doc outline link"> NewMessage(t, data) </a> </li> <li> <a href="#ReadMessage" title="ReadMessage(r)" data-gtmc="doc outline link"> ReadMessage(r) </a> </li> <li> <a href="#Message.WriteTo" title="(m) WriteTo(w)" data-gtmc="doc outline link"> (m) WriteTo(w) </a> </li> </ul> </li> <li> <a href="#MsgType" title="type MsgType" data-gtmc="doc outline link"> type MsgType </a> </li> <li> <a href="#Operation" title="type Operation" data-gtmc="doc outline link"> type Operation </a> <ul> <li> <a href="#NewOperation" title="NewOperation(t, cfg)" data-gtmc="doc outline link"> NewOperation(t, cfg) </a> </li> <li> <a href="#Operation.Clean" title="(o) Clean()" data-gtmc="doc outline link"> (o) Clean() </a> </li> <li> <a href="#Operation.Close" title="(o) Close()" data-gtmc="doc outline link"> (o) Close() </a> </li> <li> <a href="#Operation.CompleteRefresh" title="(o) CompleteRefresh()" data-gtmc="doc outline link"> (o) CompleteRefresh() </a> </li> <li> <a href="#Operation.EnterCompleteMode" title="(o) EnterCompleteMode(offset, candidate)" data-gtmc="doc outline link"> (o) EnterCompleteMode(offset, candidate) </a> </li> <li> <a href="#Operation.EnterCompleteSelectMode" title="(o) EnterCompleteSelectMode()" data-gtmc="doc outline link"> (o) EnterCompleteSelectMode() </a> </li> <li> <a href="#Operation.EnterPasswordMode" title="(o) EnterPasswordMode(cfg)" data-gtmc="doc outline link"> (o) EnterPasswordMode(cfg) </a> </li> <li> <a href="#Operation.EnterVimInsertMode" title="(o) EnterVimInsertMode()" data-gtmc="doc outline link"> (o) EnterVimInsertMode() </a> </li> <li> <a href="#Operation.ExitCompleteMode" title="(o) ExitCompleteMode(revent)" data-gtmc="doc outline link"> (o) ExitCompleteMode(revent) </a> </li> <li> <a href="#Operation.ExitCompleteSelectMode" title="(o) ExitCompleteSelectMode()" data-gtmc="doc outline link"> (o) ExitCompleteSelectMode() </a> </li> <li> <a href="#Operation.ExitPasswordMode" title="(o) ExitPasswordMode()" data-gtmc="doc outline link"> (o) ExitPasswordMode() </a> </li> <li> <a href="#Operation.ExitSearchMode" title="(o) ExitSearchMode(revert)" data-gtmc="doc outline link"> (o) ExitSearchMode(revert) </a> </li> <li> <a href="#Operation.ExitVimInsertMode" title="(o) ExitVimInsertMode()" data-gtmc="doc outline link"> (o) ExitVimInsertMode() </a> </li> <li> <a href="#Operation.ExitVimMode" title="(o) ExitVimMode()" data-gtmc="doc outline link"> (o) ExitVimMode() </a> </li> <li> <a href="#Operation.GenPasswordConfig" title="(o) GenPasswordConfig()" data-gtmc="doc outline link"> (o) GenPasswordConfig() </a> </li> <li> <a href="#Operation.GetConfig" title="(o) GetConfig()" data-gtmc="doc outline link"> (o) GetConfig() </a> </li> <li> <a href="#Operation.HandleCompleteSelect" title="(o) HandleCompleteSelect(r)" data-gtmc="doc outline link"> (o) HandleCompleteSelect(r) </a> </li> <li> <a href="#Operation.HandleVim" title="(o) HandleVim(r, readNext)" data-gtmc="doc outline link"> (o) HandleVim(r, readNext) </a> </li> <li> <a href="#Operation.HandleVimNormal" title="(o) HandleVimNormal(r, readNext)" data-gtmc="doc outline link"> (o) HandleVimNormal(r, readNext) </a> </li> <li> <a href="#Operation.IsEnableVimMode" title="(o) IsEnableVimMode()" data-gtmc="doc outline link"> (o) IsEnableVimMode() </a> </li> <li> <a href="#Operation.IsInCompleteMode" title="(o) IsInCompleteMode()" data-gtmc="doc outline link"> (o) IsInCompleteMode() </a> </li> <li> <a href="#Operation.IsInCompleteSelectMode" title="(o) IsInCompleteSelectMode()" data-gtmc="doc outline link"> (o) IsInCompleteSelectMode() </a> </li> <li> <a href="#Operation.IsNormalMode" title="(o) IsNormalMode()" data-gtmc="doc outline link"> (o) IsNormalMode() </a> </li> <li> <a href="#Operation.IsSearchMode" title="(o) IsSearchMode()" data-gtmc="doc outline link"> (o) IsSearchMode() </a> </li> <li> <a href="#Operation.OnComplete" title="(o) OnComplete()" data-gtmc="doc outline link"> (o) OnComplete() </a> </li> <li> <a href="#Operation.Password" title="(o) Password(prompt)" data-gtmc="doc outline link"> (o) Password(prompt) </a> </li> <li> <a href="#Operation.PasswordConfig" title="(o) PasswordConfig()" data-gtmc="doc outline link"> (o) PasswordConfig() </a> </li> <li> <a href="#Operation.PasswordEx" title="(o) PasswordEx(prompt, l)" data-gtmc="doc outline link"> (o) PasswordEx(prompt, l) </a> </li> <li> <a href="#Operation.PasswordWithConfig" title="(o) PasswordWithConfig(cfg)" data-gtmc="doc outline link"> (o) PasswordWithConfig(cfg) </a> </li> <li> <a href="#Operation.Refresh" title="(o) Refresh()" data-gtmc="doc outline link"> (o) Refresh() </a> </li> <li> <a href="#Operation.ResetHistory" title="(o) ResetHistory()" data-gtmc="doc outline link"> (o) ResetHistory() </a> </li> <li> <a href="#Operation.Runes" title="(o) Runes()" data-gtmc="doc outline link"> (o) Runes() </a> </li> <li> <a href="#Operation.SaveHistory" title="(o) SaveHistory(content)" data-gtmc="doc outline link"> (o) SaveHistory(content) </a> </li> <li> <a href="#Operation.SearchBackspace" title="(o) SearchBackspace()" data-gtmc="doc outline link"> (o) SearchBackspace() </a> </li> <li> <a href="#Operation.SearchChar" title="(o) SearchChar(r)" data-gtmc="doc outline link"> (o) SearchChar(r) </a> </li> <li> <a href="#Operation.SearchMode" title="(o) SearchMode(dir)" data-gtmc="doc outline link"> (o) SearchMode(dir) </a> </li> <li> <a href="#Operation.SearchRefresh" title="(o) SearchRefresh(x)" data-gtmc="doc outline link"> (o) SearchRefresh(x) </a> </li> <li> <a href="#Operation.SetBuffer" title="(o) SetBuffer(what)" data-gtmc="doc outline link"> (o) SetBuffer(what) </a> </li> <li> <a href="#Operation.SetConfig" title="(op) SetConfig(cfg)" data-gtmc="doc outline link"> (op) SetConfig(cfg) </a> </li> <li> <a href="#Operation.SetHistoryPath" title="(o) SetHistoryPath(path)" data-gtmc="doc outline link"> (o) SetHistoryPath(path) </a> </li> <li> <a href="#Operation.SetMaskRune" title="(o) SetMaskRune(r)" data-gtmc="doc outline link"> (o) SetMaskRune(r) </a> </li> <li> <a href="#Operation.SetPrompt" title="(o) SetPrompt(s)" data-gtmc="doc outline link"> (o) SetPrompt(s) </a> </li> <li> <a href="#Operation.SetTitle" title="(o) SetTitle(t)" data-gtmc="doc outline link"> (o) SetTitle(t) </a> </li> <li> <a href="#Operation.SetVimMode" title="(o) SetVimMode(on)" data-gtmc="doc outline link"> (o) SetVimMode(on) </a> </li> <li> <a href="#Operation.Slice" title="(o) Slice()" data-gtmc="doc outline link"> (o) Slice() </a> </li> <li> <a href="#Operation.Stderr" title="(o) Stderr()" data-gtmc="doc outline link"> (o) Stderr() </a> </li> <li> <a href="#Operation.Stdout" title="(o) Stdout()" data-gtmc="doc outline link"> (o) Stdout() </a> </li> <li> <a href="#Operation.String" title="(o) String()" data-gtmc="doc outline link"> (o) String() </a> </li> </ul> </li> <li> <a href="#Painter" title="type Painter" data-gtmc="doc outline link"> type Painter </a> </li> <li> <a href="#PrefixCompleter" title="type PrefixCompleter" data-gtmc="doc outline link"> type PrefixCompleter </a> <ul> <li> <a href="#NewPrefixCompleter" title="NewPrefixCompleter(pc)" data-gtmc="doc outline link"> NewPrefixCompleter(pc) </a> </li> <li> <a href="#PcItem" title="PcItem(name, pc)" data-gtmc="doc outline link"> PcItem(name, pc) </a> </li> <li> <a href="#PcItemDynamic" title="PcItemDynamic(callback, pc)" data-gtmc="doc outline link"> PcItemDynamic(callback, pc) </a> </li> <li> <a href="#PrefixCompleter.Do" title="(p) Do(line, pos)" data-gtmc="doc outline link"> (p) Do(line, pos) </a> </li> <li> <a href="#PrefixCompleter.GetChildren" title="(p) GetChildren()" data-gtmc="doc outline link"> (p) GetChildren() </a> </li> <li> <a href="#PrefixCompleter.GetDynamicNames" title="(p) GetDynamicNames(line)" data-gtmc="doc outline link"> (p) GetDynamicNames(line) </a> </li> <li> <a href="#PrefixCompleter.GetName" title="(p) GetName()" data-gtmc="doc outline link"> (p) GetName() </a> </li> <li> <a href="#PrefixCompleter.IsDynamic" title="(p) IsDynamic()" data-gtmc="doc outline link"> (p) IsDynamic() </a> </li> <li> <a href="#PrefixCompleter.Print" title="(p) Print(prefix, level, buf)" data-gtmc="doc outline link"> (p) Print(prefix, level, buf) </a> </li> <li> <a href="#PrefixCompleter.SetChildren" title="(p) SetChildren(children)" data-gtmc="doc outline link"> (p) SetChildren(children) </a> </li> <li> <a href="#PrefixCompleter.Tree" title="(p) Tree(prefix)" data-gtmc="doc outline link"> (p) Tree(prefix) </a> </li> </ul> </li> <li> <a href="#PrefixCompleterInterface" title="type PrefixCompleterInterface" data-gtmc="doc outline link"> type PrefixCompleterInterface </a> </li> <li> <a href="#RawMode" title="type RawMode" data-gtmc="doc outline link"> type RawMode </a> <ul> <li> <a href="#RawMode.Enter" title="(r) Enter()" data-gtmc="doc outline link"> (r) Enter() </a> </li> <li> <a href="#RawMode.Exit" title="(r) Exit()" data-gtmc="doc outline link"> (r) Exit() </a> </li> </ul> </li> <li> <a href="#RemoteCli" title="type RemoteCli" data-gtmc="doc outline link"> type RemoteCli </a> <ul> <li> <a href="#NewRemoteCli" title="NewRemoteCli(conn)" data-gtmc="doc outline link"> NewRemoteCli(conn) </a> </li> <li> <a href="#RemoteCli.Close" title="(r) Close()" data-gtmc="doc outline link"> (r) Close() </a> </li> <li> <a href="#RemoteCli.MarkIsTerminal" title="(r) MarkIsTerminal(is)" data-gtmc="doc outline link"> (r) MarkIsTerminal(is) </a> </li> <li> <a href="#RemoteCli.Serve" title="(r) Serve()" data-gtmc="doc outline link"> (r) Serve() </a> </li> <li> <a href="#RemoteCli.ServeBy" title="(r) ServeBy(source)" data-gtmc="doc outline link"> (r) ServeBy(source) </a> </li> <li> <a href="#RemoteCli.Write" title="(r) Write(b)" data-gtmc="doc outline link"> (r) Write(b) </a> </li> </ul> </li> <li> <a href="#RemoteSvr" title="type RemoteSvr" data-gtmc="doc outline link"> type RemoteSvr </a> <ul> <li> <a href="#NewRemoteSvr" title="NewRemoteSvr(conn)" data-gtmc="doc outline link"> NewRemoteSvr(conn) </a> </li> <li> <a href="#RemoteSvr.Close" title="(r) Close()" data-gtmc="doc outline link"> (r) Close() </a> </li> <li> <a href="#RemoteSvr.EnterRawMode" title="(r) EnterRawMode()" data-gtmc="doc outline link"> (r) EnterRawMode() </a> </li> <li> <a href="#RemoteSvr.ExitRawMode" title="(r) ExitRawMode()" data-gtmc="doc outline link"> (r) ExitRawMode() </a> </li> <li> <a href="#RemoteSvr.GetWidth" title="(r) GetWidth()" data-gtmc="doc outline link"> (r) GetWidth() </a> </li> <li> <a href="#RemoteSvr.GotIsTerminal" title="(r) GotIsTerminal(data)" data-gtmc="doc outline link"> (r) GotIsTerminal(data) </a> </li> <li> <a href="#RemoteSvr.GotReportWidth" title="(r) GotReportWidth(data)" data-gtmc="doc outline link"> (r) GotReportWidth(data) </a> </li> <li> <a href="#RemoteSvr.HandleConfig" title="(r) HandleConfig(cfg)" data-gtmc="doc outline link"> (r) HandleConfig(cfg) </a> </li> <li> <a href="#RemoteSvr.IsTerminal" title="(r) IsTerminal()" data-gtmc="doc outline link"> (r) IsTerminal() </a> </li> <li> <a href="#RemoteSvr.Read" title="(r) Read(b)" data-gtmc="doc outline link"> (r) Read(b) </a> </li> <li> <a href="#RemoteSvr.Write" title="(r) Write(b)" data-gtmc="doc outline link"> (r) Write(b) </a> </li> </ul> </li> <li> <a href="#Result" title="type Result" data-gtmc="doc outline link"> type Result </a> <ul> <li> <a href="#Result.CanBreak" title="(l) CanBreak()" data-gtmc="doc outline link"> (l) CanBreak() </a> </li> <li> <a href="#Result.CanContinue" title="(l) CanContinue()" data-gtmc="doc outline link"> (l) CanContinue() </a> </li> </ul> </li> <li> <a href="#RuneBuffer" title="type RuneBuffer" data-gtmc="doc outline link"> type RuneBuffer </a> <ul> <li> <a href="#NewRuneBuffer" title="NewRuneBuffer(w, prompt, cfg, width)" data-gtmc="doc outline link"> NewRuneBuffer(w, prompt, cfg, width) </a> </li> <li> <a href="#RuneBuffer.BackEscapeWord" title="(r) BackEscapeWord()" data-gtmc="doc outline link"> (r) BackEscapeWord() </a> </li> <li> <a href="#RuneBuffer.Backspace" title="(r) Backspace()" data-gtmc="doc outline link"> (r) Backspace() </a> </li> <li> <a href="#RuneBuffer.Backup" title="(r) Backup()" data-gtmc="doc outline link"> (r) Backup() </a> </li> <li> <a href="#RuneBuffer.Clean" title="(r) Clean()" data-gtmc="doc outline link"> (r) Clean() </a> </li> <li> <a href="#RuneBuffer.CurrentWidth" title="(r) CurrentWidth(x)" data-gtmc="doc outline link"> (r) CurrentWidth(x) </a> </li> <li> <a href="#RuneBuffer.CursorLineCount" title="(r) CursorLineCount()" data-gtmc="doc outline link"> (r) CursorLineCount() </a> </li> <li> <a href="#RuneBuffer.Delete" title="(r) Delete()" data-gtmc="doc outline link"> (r) Delete() </a> </li> <li> <a href="#RuneBuffer.DeleteWord" title="(r) DeleteWord()" data-gtmc="doc outline link"> (r) DeleteWord() </a> </li> <li> <a href="#RuneBuffer.Erase" title="(r) Erase()" data-gtmc="doc outline link"> (r) Erase() </a> </li> <li> <a href="#RuneBuffer.IdxLine" title="(r) IdxLine(width)" data-gtmc="doc outline link"> (r) IdxLine(width) </a> </li> <li> <a href="#RuneBuffer.IsCursorInEnd" title="(r) IsCursorInEnd()" data-gtmc="doc outline link"> (r) IsCursorInEnd() </a> </li> <li> <a href="#RuneBuffer.Kill" title="(r) Kill()" data-gtmc="doc outline link"> (r) Kill() </a> </li> <li> <a href="#RuneBuffer.KillFront" title="(r) KillFront()" data-gtmc="doc outline link"> (r) KillFront() </a> </li> <li> <a href="#RuneBuffer.Len" title="(r) Len()" data-gtmc="doc outline link"> (r) Len() </a> </li> <li> <a href="#RuneBuffer.LineCount" title="(r) LineCount(width)" data-gtmc="doc outline link"> (r) LineCount(width) </a> </li> <li> <a href="#RuneBuffer.MoveBackward" title="(r) MoveBackward()" data-gtmc="doc outline link"> (r) MoveBackward() </a> </li> <li> <a href="#RuneBuffer.MoveForward" title="(r) MoveForward()" data-gtmc="doc outline link"> (r) MoveForward() </a> </li> <li> <a href="#RuneBuffer.MoveTo" title="(r) MoveTo(ch, prevChar, reverse)" data-gtmc="doc outline link"> (r) MoveTo(ch, prevChar, reverse) </a> </li> <li> <a href="#RuneBuffer.MoveToEndWord" title="(r) MoveToEndWord()" data-gtmc="doc outline link"> (r) MoveToEndWord() </a> </li> <li> <a href="#RuneBuffer.MoveToLineEnd" title="(r) MoveToLineEnd()" data-gtmc="doc outline link"> (r) MoveToLineEnd() </a> </li> <li> <a href="#RuneBuffer.MoveToLineStart" title="(r) MoveToLineStart()" data-gtmc="doc outline link"> (r) MoveToLineStart() </a> </li> <li> <a href="#RuneBuffer.MoveToNextWord" title="(r) MoveToNextWord()" data-gtmc="doc outline link"> (r) MoveToNextWord() </a> </li> <li> <a href="#RuneBuffer.MoveToPrevWord" title="(r) MoveToPrevWord()" data-gtmc="doc outline link"> (r) MoveToPrevWord() </a> </li> <li> <a href="#RuneBuffer.OnWidthChange" title="(r) OnWidthChange(newWidth)" data-gtmc="doc outline link"> (r) OnWidthChange(newWidth) </a> </li> <li> <a href="#RuneBuffer.Pos" title="(r) Pos()" data-gtmc="doc outline link"> (r) Pos() </a> </li> <li> <a href="#RuneBuffer.PromptLen" title="(r) PromptLen()" data-gtmc="doc outline link"> (r) PromptLen() </a> </li> <li> <a href="#RuneBuffer.Refresh" title="(r) Refresh(f)" data-gtmc="doc outline link"> (r) Refresh(f) </a> </li> <li> <a href="#RuneBuffer.Replace" title="(r) Replace(ch)" data-gtmc="doc outline link"> (r) Replace(ch) </a> </li> <li> <a href="#RuneBuffer.Reset" title="(r) Reset()" data-gtmc="doc outline link"> (r) Reset() </a> </li> <li> <a href="#RuneBuffer.Restore" title="(r) Restore()" data-gtmc="doc outline link"> (r) Restore() </a> </li> <li> <a href="#RuneBuffer.RuneSlice" title="(r) RuneSlice(i)" data-gtmc="doc outline link"> (r) RuneSlice(i) </a> </li> <li> <a href="#RuneBuffer.Runes" title="(r) Runes()" data-gtmc="doc outline link"> (r) Runes() </a> </li> <li> <a href="#RuneBuffer.Set" title="(r) Set(buf)" data-gtmc="doc outline link"> (r) Set(buf) </a> </li> <li> <a href="#RuneBuffer.SetConfig" title="(r) SetConfig(cfg)" data-gtmc="doc outline link"> (r) SetConfig(cfg) </a> </li> <li> <a href="#RuneBuffer.SetMask" title="(r) SetMask(m)" data-gtmc="doc outline link"> (r) SetMask(m) </a> </li> <li> <a href="#RuneBuffer.SetOffset" title="(r) SetOffset(offset)" data-gtmc="doc outline link"> (r) SetOffset(offset) </a> </li> <li> <a href="#RuneBuffer.SetPrompt" title="(r) SetPrompt(prompt)" data-gtmc="doc outline link"> (r) SetPrompt(prompt) </a> </li> <li> <a href="#RuneBuffer.SetStyle" title="(r) SetStyle(start, end, style)" data-gtmc="doc outline link"> (r) SetStyle(start, end, style) </a> </li> <li> <a href="#RuneBuffer.SetWithIdx" title="(r) SetWithIdx(idx, buf)" data-gtmc="doc outline link"> (r) SetWithIdx(idx, buf) </a> </li> <li> <a href="#RuneBuffer.Transpose" title="(r) Transpose()" data-gtmc="doc outline link"> (r) Transpose() </a> </li> <li> <a href="#RuneBuffer.WriteRune" title="(r) WriteRune(s)" data-gtmc="doc outline link"> (r) WriteRune(s) </a> </li> <li> <a href="#RuneBuffer.WriteRunes" title="(r) WriteRunes(s)" data-gtmc="doc outline link"> (r) WriteRunes(s) </a> </li> <li> <a href="#RuneBuffer.WriteString" title="(r) WriteString(s)" data-gtmc="doc outline link"> (r) WriteString(s) </a> </li> <li> <a href="#RuneBuffer.Yank" title="(r) Yank()" data-gtmc="doc outline link"> (r) Yank() </a> </li> </ul> </li> <li> <a href="#Runes" title="type Runes" data-gtmc="doc outline link"> type Runes </a> <ul> <li> <a href="#Runes.Aggregate" title="Aggregate(candicate)" data-gtmc="doc outline link"> Aggregate(candicate) </a> </li> <li> <a href="#Runes.Backspace" title="Backspace(r)" data-gtmc="doc outline link"> Backspace(r) </a> </li> <li> <a href="#Runes.ColorFilter" title="ColorFilter(r)" data-gtmc="doc outline link"> ColorFilter(r) </a> </li> <li> <a href="#Runes.Copy" title="Copy(r)" data-gtmc="doc outline link"> Copy(r) </a> </li> <li> <a href="#Runes.Equal" title="Equal(a, b)" data-gtmc="doc outline link"> Equal(a, b) </a> </li> <li> <a href="#Runes.EqualFold" title="(r) EqualFold(a, b)" data-gtmc="doc outline link"> (r) EqualFold(a, b) </a> </li> <li> <a href="#Runes.EqualRune" title="EqualRune(a, b, fold)" data-gtmc="doc outline link"> EqualRune(a, b, fold) </a> </li> <li> <a href="#Runes.EqualRuneFold" title="(r) EqualRuneFold(a, b)" data-gtmc="doc outline link"> (r) EqualRuneFold(a, b) </a> </li> <li> <a href="#Runes.HasPrefix" title="HasPrefix(r, prefix)" data-gtmc="doc outline link"> HasPrefix(r, prefix) </a> </li> <li> <a href="#Runes.HasPrefixFold" title="HasPrefixFold(r, prefix)" data-gtmc="doc outline link"> HasPrefixFold(r, prefix) </a> </li> <li> <a href="#Runes.Index" title="Index(r, rs)" data-gtmc="doc outline link"> Index(r, rs) </a> </li> <li> <a href="#Runes.IndexAll" title="(rs) IndexAll(r, sub)" data-gtmc="doc outline link"> (rs) IndexAll(r, sub) </a> </li> <li> <a href="#Runes.IndexAllBck" title="(rs) IndexAllBck(r, sub)" data-gtmc="doc outline link"> (rs) IndexAllBck(r, sub) </a> </li> <li> <a href="#Runes.IndexAllBckEx" title="(rs) IndexAllBckEx(r, sub, fold)" data-gtmc="doc outline link"> (rs) IndexAllBckEx(r, sub, fold) </a> </li> <li> <a href="#Runes.IndexAllEx" title="(rs) IndexAllEx(r, sub, fold)" data-gtmc="doc outline link"> (rs) IndexAllEx(r, sub, fold) </a> </li> <li> <a href="#Runes.TrimSpaceLeft" title="TrimSpaceLeft(in)" data-gtmc="doc outline link"> TrimSpaceLeft(in) </a> </li> <li> <a href="#Runes.Width" title="Width(r)" data-gtmc="doc outline link"> Width(r) </a> </li> <li> <a href="#Runes.WidthAll" title="WidthAll(r)" data-gtmc="doc outline link"> WidthAll(r) </a> </li> </ul> </li> <li> <a href="#SegmentComplete" title="type SegmentComplete" data-gtmc="doc outline link"> type SegmentComplete </a> <ul> <li> <a href="#SegmentAutoComplete" title="SegmentAutoComplete(completer)" data-gtmc="doc outline link"> SegmentAutoComplete(completer) </a> </li> <li> <a href="#SegmentComplete.Do" title="(c) Do(line, pos)" data-gtmc="doc outline link"> (c) Do(line, pos) </a> </li> </ul> </li> <li> <a href="#SegmentCompleter" title="type SegmentCompleter" data-gtmc="doc outline link"> type SegmentCompleter </a> </li> <li> <a href="#State" title="type State" data-gtmc="doc outline link"> type State </a> <ul> <li> <a href="#GetState" title="GetState(fd)" data-gtmc="doc outline link"> GetState(fd) </a> </li> <li> <a href="#MakeRaw" title="MakeRaw(fd)" data-gtmc="doc outline link"> MakeRaw(fd) </a> </li> </ul> </li> <li> <a href="#TabCompleter" title="type TabCompleter" data-gtmc="doc outline link"> type TabCompleter </a> <ul> <li> <a href="#TabCompleter.Do" title="(t) Do(, )" data-gtmc="doc outline link"> (t) Do(, ) </a> </li> </ul> </li> <li> <a href="#Terminal" title="type Terminal" data-gtmc="doc outline link"> type Terminal </a> <ul> <li> <a href="#NewTerminal" title="NewTerminal(cfg)" data-gtmc="doc outline link"> NewTerminal(cfg) </a> </li> <li> <a href="#Terminal.Bell" title="(t) Bell()" data-gtmc="doc outline link"> (t) Bell() </a> </li> <li> <a href="#Terminal.Close" title="(t) Close()" data-gtmc="doc outline link"> (t) Close() </a> </li> <li> <a href="#Terminal.EnterRawMode" title="(t) EnterRawMode()" data-gtmc="doc outline link"> (t) EnterRawMode() </a> </li> <li> <a href="#Terminal.ExitRawMode" title="(t) ExitRawMode()" data-gtmc="doc outline link"> (t) ExitRawMode() </a> </li> <li> <a href="#Terminal.GetConfig" title="(t) GetConfig()" data-gtmc="doc outline link"> (t) GetConfig() </a> </li> <li> <a href="#Terminal.GetOffset" title="(t) GetOffset(f)" data-gtmc="doc outline link"> (t) GetOffset(f) </a> </li> <li> <a href="#Terminal.IsReading" title="(t) IsReading()" data-gtmc="doc outline link"> (t) IsReading() </a> </li> <li> <a href="#Terminal.KickRead" title="(t) KickRead()" data-gtmc="doc outline link"> (t) KickRead() </a> </li> <li> <a href="#Terminal.Print" title="(t) Print(s)" data-gtmc="doc outline link"> (t) Print(s) </a> </li> <li> <a href="#Terminal.PrintRune" title="(t) PrintRune(r)" data-gtmc="doc outline link"> (t) PrintRune(r) </a> </li> <li> <a href="#Terminal.ReadRune" title="(t) ReadRune()" data-gtmc="doc outline link"> (t) ReadRune() </a> </li> <li> <a href="#Terminal.Readline" title="(t) Readline()" data-gtmc="doc outline link"> (t) Readline() </a> </li> <li> <a href="#Terminal.SetConfig" title="(t) SetConfig(c)" data-gtmc="doc outline link"> (t) SetConfig(c) </a> </li> <li> <a href="#Terminal.SleepToResume" title="(t) SleepToResume()" data-gtmc="doc outline link"> (t) SleepToResume() </a> </li> <li> <a href="#Terminal.Write" title="(t) Write(b)" data-gtmc="doc outline link"> (t) Write(b) </a> </li> <li> <a href="#Terminal.WriteStdin" title="(t) WriteStdin(b)" data-gtmc="doc outline link"> (t) WriteStdin(b) </a> </li> </ul> </li> <li> <a href="#Termios" title="type Termios" data-gtmc="doc outline link"> type Termios </a> </li> </ul> </li> </ul> </li> <li> <a href="#section-sourcefiles" data-gtmc="outline link"> Source Files </a> </li> <li> <a href="#section-directories" data-gtmc="outline link"> Directories </a> </li> </ul> </div> <div class="go-Main-navMobile js-mainNavMobile"> <label class="go-Label"> <select class="go-Select"> <option selected disabled>README</option> </select> </label> </div> </nav> <article class="go-Main-article js-mainContent"> <div class="UnitDetails" data-test-id="UnitDetails" style="display: block;"> <div class="UnitDetails-content js-unitDetailsContent" data-test-id="UnitDetails-content"> <div class="UnitReadme UnitReadme--expanded js-readme"> <h2 class="UnitReadme-title" id="section-readme"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/chrome_reader_mode_gm_grey_24dp.svg" alt=""> README <a class="UnitReadme-idLink" href="#section-readme" aria-label="Go to Readme">¶</a> </h2> <div class="UnitReadme-content" data-test-id="Unit-readmeContent"> <div class="Overview-readmeContent js-readmeContent"><p><a href="https://travis-ci.org/chzyer/readline" rel="nofollow"><img src="https://travis-ci.org/chzyer/readline.svg?branch=master" alt="Build Status"/></a> <a href="https://github.com/chzyer/readline/blob/v1.5.1/LICENSE.md" rel="nofollow"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="Software License"/></a> <a href="https://github.com/chzyer/readline/releases" rel="nofollow"><img src="https://img.shields.io/github/tag/chzyer/readline.svg" alt="Version"/></a> <a href="https://godoc.org/github.com/chzyer/readline" rel="nofollow"><img src="https://godoc.org/github.com/chzyer/readline?status.svg" alt="GoDoc"/></a> <a href="#readme-backers" rel="nofollow"><img src="https://opencollective.com/readline/badge/backers.svg" alt="OpenCollective"/></a> <a href="#readme-sponsors" rel="nofollow"><img src="https://opencollective.com/readline/badge/sponsors.svg" alt="OpenCollective"/></a></p> <p align="center"> <img src="https://raw.githubusercontent.com/chzyer/readline/assets/logo.png"/> <a href="https://asciinema.org/a/32oseof9mkilg7t7d4780qt4m" rel="nofollow"><img src="https://asciinema.org/a/32oseof9mkilg7t7d4780qt4m.png" width="654"/></a> <img src="https://raw.githubusercontent.com/chzyer/readline/assets/logo_f.png"/> </p> <p>A powerful readline library in <code>Linux</code> <code>macOS</code> <code>Windows</code> <code>Solaris</code> <code>AIX</code></p> <h3 class="h2" id="readme-guide">Guide</h3> <ul> <li><a href="https://github.com/chzyer/readline/blob/v1.5.1/example/readline-demo/readline-demo.go" rel="nofollow">Demo</a></li> <li><a href="https://github.com/chzyer/readline/blob/v1.5.1/doc/shortcut.md" rel="nofollow">Shortcut</a></li> </ul> <h3 class="h2" id="readme-repos-using-readline">Repos using readline</h3> <p><a href="https://github.com/cockroachdb/cockroach" rel="nofollow"><img src="https://img.shields.io/github/stars/cockroachdb/cockroach.svg?label=cockroachdb/cockroach" alt="cockroachdb"/></a> <a href="https://github.com/robertkrimen/otto" rel="nofollow"><img src="https://img.shields.io/github/stars/robertkrimen/otto.svg?label=robertkrimen/otto" alt="robertkrimen/otto"/></a> <a href="https://github.com/remind101/empire" rel="nofollow"><img src="https://img.shields.io/github/stars/remind101/empire.svg?label=remind101/empire" alt="empire"/></a> <a href="https://github.com/mehrdadrad/mylg" rel="nofollow"><img src="https://img.shields.io/github/stars/mehrdadrad/mylg.svg?label=mehrdadrad/mylg" alt="mehrdadrad/mylg"/></a> <a href="https://github.com/knq/usql" rel="nofollow"><img src="https://img.shields.io/github/stars/knq/usql.svg?label=knq/usql" alt="knq/usql"/></a> <a href="https://github.com/youtube/doorman" rel="nofollow"><img src="https://img.shields.io/github/stars/youtube/doorman.svg?label=youtube/doorman" alt="youtube/doorman"/></a> <a href="https://github.com/bom-d-van/harp" rel="nofollow"><img src="https://img.shields.io/github/stars/bom-d-van/harp.svg?label=bom-d-van/harp" alt="bom-d-van/harp"/></a> <a href="https://github.com/abiosoft/ishell" rel="nofollow"><img src="https://img.shields.io/github/stars/abiosoft/ishell.svg?label=abiosoft/ishell" alt="abiosoft/ishell"/></a> <a href="https://github.com/Netflix/hal-9001" rel="nofollow"><img src="https://img.shields.io/github/stars/Netflix/hal-9001.svg?label=Netflix/hal-9001" alt="Netflix/hal-9001"/></a> <a href="https://github.com/docker/go-p9p" rel="nofollow"><img src="https://img.shields.io/github/stars/docker/go-p9p.svg?label=docker/go-p9p" alt="docker/go-p9p"/></a></p> <h3 class="h2" id="readme-feedback">Feedback</h3> <p>If you have any questions, please submit a github issue and any pull requests is welcomed :)</p> <ul> <li><a href="https://twitter.com/chzyer" rel="nofollow">https://twitter.com/chzyer</a></li> <li><a href="http://weibo.com/2145262190" rel="nofollow">http://weibo.com/2145262190</a></li> </ul> <h3 class="h2" id="readme-backers">Backers</h3> <p>Love Readline? Help me keep it alive by donating funds to cover project expenses!<br/> [<a href="https://opencollective.com/readline#backer" rel="nofollow">Become a backer</a>]</p> <p><a href="https://opencollective.com/readline/backer/0/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/0/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/1/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/1/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/2/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/2/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/3/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/3/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/4/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/4/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/5/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/5/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/6/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/6/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/7/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/7/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/8/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/8/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/9/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/9/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/10/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/10/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/11/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/11/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/12/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/12/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/13/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/13/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/14/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/14/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/15/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/15/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/16/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/16/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/17/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/17/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/18/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/18/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/19/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/19/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/20/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/20/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/21/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/21/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/22/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/22/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/23/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/23/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/24/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/24/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/25/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/25/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/26/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/26/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/27/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/27/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/28/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/28/avatar.svg"/></a> <a href="https://opencollective.com/readline/backer/29/website" rel="nofollow"><img src="https://opencollective.com/readline/backer/29/avatar.svg"/></a></p> <h3 class="h2" id="readme-sponsors">Sponsors</h3> <p>Become a sponsor and get your logo here on our Github page. [<a href="https://opencollective.com/readline#sponsor" rel="nofollow">Become a sponsor</a>]</p> <p><a href="https://opencollective.com/readline/sponsor/0/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/0/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/1/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/1/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/2/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/2/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/3/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/3/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/4/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/4/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/5/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/5/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/6/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/6/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/7/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/7/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/8/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/8/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/9/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/9/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/10/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/10/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/11/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/11/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/12/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/12/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/13/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/13/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/14/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/14/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/15/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/15/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/16/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/16/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/17/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/17/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/18/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/18/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/19/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/19/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/20/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/20/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/21/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/21/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/22/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/22/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/23/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/23/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/24/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/24/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/25/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/25/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/26/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/26/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/27/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/27/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/28/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/28/avatar.svg"/></a> <a href="https://opencollective.com/readline/sponsor/29/website" rel="nofollow"><img src="https://opencollective.com/readline/sponsor/29/avatar.svg"/></a></p> </div> </div> <button class="UnitReadme-expandLink js-readmeExpand" data-test-id="readme-expand" data-gtmc="readme button" aria-label="Expand Readme">Expand ▾</button> <button class="UnitReadme-collapseLink js-readmeCollapse" data-test-id="readme-collapse" data-gtmc="readme button" aria-label="Expand Readme">Collapse ▴</button> </div> <div class="UnitDoc"> <h2 class="UnitDoc-title" id="section-documentation"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/code_gm_grey_24dp.svg" alt=""> Documentation <a class="UnitDoc-idLink" href="#section-documentation" aria-label="Go to Documentation">¶</a> </h2> <div class="UnitBuildContext-titleContext"> <label> <a href="https://go.dev/about#build-context" class="UnitBuildContext-link">Rendered for</a> <select class="go-Select js-buildContextSelect"> <option value="linux">linux/amd64</option> <option value="windows">windows/amd64</option> <option value="darwin">darwin/amd64</option> <option value="js">js/wasm</option> </select> </label> </div> <div class="Documentation js-documentation"> <div class="Documentation-content js-docContent"> <section class="Documentation-overview"> <h3 tabindex="-1" id="pkg-overview" class="Documentation-overviewHeader">Overview <a href="#pkg-overview" aria-label="Go to Overview">¶</a></h3> <p>Readline is a pure go implementation for GNU-Readline kind library. </p><p>example: </p><pre>rl, err := readline.New("> ") if err != nil { panic(err) } defer rl.Close() for { line, err := rl.Readline() if err != nil { // io.EOF break } println(line) } </pre><p>Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems. </p><p>Putting a terminal into raw mode is the most common requirement: </p><pre>oldState, err := terminal.MakeRaw(0) if err != nil { panic(err) } defer terminal.Restore(0, oldState) </pre> </section><section class="Documentation-index"> <h3 id="pkg-index" class="Documentation-indexHeader">Index <a href="#pkg-index" aria-label="Go to Index">¶</a></h3> <ul class="Documentation-indexList"> <li class="Documentation-indexConstants"><a href="#pkg-constants">Constants</a></li> <li class="Documentation-indexVariables"><a href="#pkg-variables">Variables</a></li> <li class="Documentation-indexFunction"> <a href="#AddHistory">func AddHistory(content string) error</a></li> <li class="Documentation-indexFunction"> <a href="#CaptureExitSignal">func CaptureExitSignal(f func())</a></li> <li class="Documentation-indexFunction"> <a href="#ClearScreen">func ClearScreen(w io.Writer) (int, error)</a></li> <li class="Documentation-indexFunction"> <a href="#Debug">func Debug(o ...interface{})</a></li> <li class="Documentation-indexFunction"> <a href="#DefaultIsTerminal">func DefaultIsTerminal() bool</a></li> <li class="Documentation-indexFunction"> <a href="#DefaultOnWidthChanged">func DefaultOnWidthChanged(f func())</a></li> <li class="Documentation-indexFunction"> <a href="#DialRemote">func DialRemote(n, addr string) error</a></li> <li class="Documentation-indexFunction"> <a href="#Do">func Do(p PrefixCompleterInterface, line []rune, pos int) (newLine [][]rune, offset int)</a></li> <li class="Documentation-indexFunction"> <a href="#GetInt">func GetInt(s []string, def int) int</a></li> <li class="Documentation-indexFunction"> <a href="#GetScreenWidth">func GetScreenWidth() int</a></li> <li class="Documentation-indexFunction"> <a href="#GetSize">func GetSize(fd int) (int, int, error)</a></li> <li class="Documentation-indexFunction"> <a href="#GetStdin">func GetStdin() int</a></li> <li class="Documentation-indexFunction"> <a href="#IsPrintable">func IsPrintable(key rune) bool</a></li> <li class="Documentation-indexFunction"> <a href="#IsTerminal">func IsTerminal(fd int) bool</a></li> <li class="Documentation-indexFunction"> <a href="#IsWordBreak">func IsWordBreak(i rune) bool</a></li> <li class="Documentation-indexFunction"> <a href="#Line">func Line(prompt string) (string, error)</a></li> <li class="Documentation-indexFunction"> <a href="#LineCount">func LineCount(screenWidth, w int) int</a></li> <li class="Documentation-indexFunction"> <a href="#ListenRemote">func ListenRemote(n, addr string, cfg *Config, h func(*Instance), ...) error</a></li> <li class="Documentation-indexFunction"> <a href="#NewFillableStdin">func NewFillableStdin(stdin io.Reader) (io.ReadCloser, io.Writer)</a></li> <li class="Documentation-indexFunction"> <a href="#Password">func Password(prompt string) ([]byte, error)</a></li> <li class="Documentation-indexFunction"> <a href="#Print">func Print(p PrefixCompleterInterface, prefix string, level int, buf *bytes.Buffer)</a></li> <li class="Documentation-indexFunction"> <a href="#ReadPassword">func ReadPassword(fd int) ([]byte, error)</a></li> <li class="Documentation-indexFunction"> <a href="#Restore">func Restore(fd int, state *State) error</a></li> <li class="Documentation-indexFunction"> <a href="#RetSegment">func RetSegment(segments [][]rune, cands [][]rune, idx int) ([][]rune, int)</a></li> <li class="Documentation-indexFunction"> <a href="#SetAutoComplete">func SetAutoComplete(completer AutoCompleter)</a></li> <li class="Documentation-indexFunction"> <a href="#SetHistoryPath">func SetHistoryPath(fp string)</a></li> <li class="Documentation-indexFunction"> <a href="#SplitByLine">func SplitByLine(start, screenWidth int, rs []rune) []string</a></li> <li class="Documentation-indexFunction"> <a href="#SplitSegment">func SplitSegment(line []rune, pos int) ([][]rune, int)</a></li> <li class="Documentation-indexFunction"> <a href="#SuspendMe">func SuspendMe()</a></li> <li class="Documentation-indexFunction"> <a href="#WaitForResume">func WaitForResume() chan struct{}</a></li> <li class="Documentation-indexType"> <a href="#AutoCompleter">type AutoCompleter</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#SegmentFunc">func SegmentFunc(f func([][]rune, int) [][]rune) AutoCompleter</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#CancelableStdin">type CancelableStdin</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewCancelableStdin">func NewCancelableStdin(r io.Reader) *CancelableStdin</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#CancelableStdin.Close">func (c *CancelableStdin) Close() error</a></li> <li> <a href="#CancelableStdin.Read">func (c *CancelableStdin) Read(b []byte) (n int, err error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Config">type Config</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Config.Clone">func (c Config) Clone() *Config</a></li> <li> <a href="#Config.Init">func (c *Config) Init() error</a></li> <li> <a href="#Config.SetListener">func (c *Config) SetListener(f func(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool))</a></li> <li> <a href="#Config.SetPainter">func (c *Config) SetPainter(p Painter)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#DumpListener">type DumpListener</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#DumpListener.OnChange">func (d *DumpListener) OnChange(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#DynamicCompleteFunc">type DynamicCompleteFunc</a></li> <li class="Documentation-indexType"> <a href="#DynamicPrefixCompleterInterface">type DynamicPrefixCompleterInterface</a></li> <li class="Documentation-indexType"> <a href="#FillableStdin">type FillableStdin</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#FillableStdin.Close">func (s *FillableStdin) Close() error</a></li> <li> <a href="#FillableStdin.Read">func (s *FillableStdin) Read(p []byte) (n int, err error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Instance">type Instance</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#HandleConn">func HandleConn(cfg Config, conn net.Conn) (*Instance, error)</a></li> <li> <a href="#New">func New(prompt string) (*Instance, error)</a></li> <li> <a href="#NewEx">func NewEx(cfg *Config) (*Instance, error)</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Instance.CaptureExitSignal">func (i *Instance) CaptureExitSignal()</a></li> <li> <a href="#Instance.Clean">func (i *Instance) Clean()</a></li> <li> <a href="#Instance.Close">func (i *Instance) Close() error</a></li> <li> <a href="#Instance.GenPasswordConfig">func (i *Instance) GenPasswordConfig() *Config</a></li> <li> <a href="#Instance.HistoryDisable">func (i *Instance) HistoryDisable()</a></li> <li> <a href="#Instance.HistoryEnable">func (i *Instance) HistoryEnable()</a></li> <li> <a href="#Instance.IsVimMode">func (i *Instance) IsVimMode() bool</a></li> <li> <a href="#Instance.Line">func (i *Instance) Line() *Result</a></li> <li> <a href="#Instance.ReadPassword">func (i *Instance) ReadPassword(prompt string) ([]byte, error)</a></li> <li> <a href="#Instance.ReadPasswordEx">func (i *Instance) ReadPasswordEx(prompt string, l Listener) ([]byte, error)</a></li> <li> <a href="#Instance.ReadPasswordWithConfig">func (i *Instance) ReadPasswordWithConfig(cfg *Config) ([]byte, error)</a></li> <li> <a href="#Instance.ReadSlice">func (i *Instance) ReadSlice() ([]byte, error)</a></li> <li> <a href="#Instance.Readline">func (i *Instance) Readline() (string, error)</a></li> <li> <a href="#Instance.ReadlineWithDefault">func (i *Instance) ReadlineWithDefault(what string) (string, error)</a></li> <li> <a href="#Instance.Refresh">func (i *Instance) Refresh()</a></li> <li> <a href="#Instance.ResetHistory">func (i *Instance) ResetHistory()</a></li> <li> <a href="#Instance.SaveHistory">func (i *Instance) SaveHistory(content string) error</a></li> <li> <a href="#Instance.SetConfig">func (i *Instance) SetConfig(cfg *Config) *Config</a></li> <li> <a href="#Instance.SetHistoryPath">func (i *Instance) SetHistoryPath(p string)</a></li> <li> <a href="#Instance.SetMaskRune">func (i *Instance) SetMaskRune(r rune)</a></li> <li> <a href="#Instance.SetPrompt">func (i *Instance) SetPrompt(s string)</a></li> <li> <a href="#Instance.SetVimMode">func (i *Instance) SetVimMode(on bool)</a></li> <li> <a href="#Instance.Stderr">func (i *Instance) Stderr() io.Writer</a></li> <li> <a href="#Instance.Stdout">func (i *Instance) Stdout() io.Writer</a></li> <li> <a href="#Instance.Write">func (i *Instance) Write(b []byte) (int, error)</a></li> <li> <a href="#Instance.WriteStdin">func (i *Instance) WriteStdin(val []byte) (int, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#InterruptError">type InterruptError</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#InterruptError.Error">func (*InterruptError) Error() string</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Listener">type Listener</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#FuncListener">func FuncListener(f func(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)) Listener</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Message">type Message</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewMessage">func NewMessage(t MsgType, data []byte) *Message</a></li> <li> <a href="#ReadMessage">func ReadMessage(r io.Reader) (*Message, error)</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Message.WriteTo">func (m *Message) WriteTo(w io.Writer) (int, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#MsgType">type MsgType</a></li> <li class="Documentation-indexType"> <a href="#Operation">type Operation</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewOperation">func NewOperation(t *Terminal, cfg *Config) *Operation</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Operation.Clean">func (o *Operation) Clean()</a></li> <li> <a href="#Operation.Close">func (o *Operation) Close()</a></li> <li> <a href="#Operation.CompleteRefresh">func (o Operation) CompleteRefresh()</a></li> <li> <a href="#Operation.EnterCompleteMode">func (o Operation) EnterCompleteMode(offset int, candidate [][]rune)</a></li> <li> <a href="#Operation.EnterCompleteSelectMode">func (o Operation) EnterCompleteSelectMode()</a></li> <li> <a href="#Operation.EnterPasswordMode">func (o Operation) EnterPasswordMode(cfg *Config) (err error)</a></li> <li> <a href="#Operation.EnterVimInsertMode">func (o Operation) EnterVimInsertMode()</a></li> <li> <a href="#Operation.ExitCompleteMode">func (o Operation) ExitCompleteMode(revent bool)</a></li> <li> <a href="#Operation.ExitCompleteSelectMode">func (o Operation) ExitCompleteSelectMode()</a></li> <li> <a href="#Operation.ExitPasswordMode">func (o Operation) ExitPasswordMode()</a></li> <li> <a href="#Operation.ExitSearchMode">func (o Operation) ExitSearchMode(revert bool)</a></li> <li> <a href="#Operation.ExitVimInsertMode">func (o Operation) ExitVimInsertMode()</a></li> <li> <a href="#Operation.ExitVimMode">func (o Operation) ExitVimMode()</a></li> <li> <a href="#Operation.GenPasswordConfig">func (o *Operation) GenPasswordConfig() *Config</a></li> <li> <a href="#Operation.GetConfig">func (o *Operation) GetConfig() *Config</a></li> <li> <a href="#Operation.HandleCompleteSelect">func (o Operation) HandleCompleteSelect(r rune) bool</a></li> <li> <a href="#Operation.HandleVim">func (o Operation) HandleVim(r rune, readNext func() rune) rune</a></li> <li> <a href="#Operation.HandleVimNormal">func (o Operation) HandleVimNormal(r rune, readNext func() rune) (t rune)</a></li> <li> <a href="#Operation.IsEnableVimMode">func (o Operation) IsEnableVimMode() bool</a></li> <li> <a href="#Operation.IsInCompleteMode">func (o Operation) IsInCompleteMode() bool</a></li> <li> <a href="#Operation.IsInCompleteSelectMode">func (o Operation) IsInCompleteSelectMode() bool</a></li> <li> <a href="#Operation.IsNormalMode">func (o *Operation) IsNormalMode() bool</a></li> <li> <a href="#Operation.IsSearchMode">func (o Operation) IsSearchMode() bool</a></li> <li> <a href="#Operation.OnComplete">func (o Operation) OnComplete() bool</a></li> <li> <a href="#Operation.Password">func (o *Operation) Password(prompt string) ([]byte, error)</a></li> <li> <a href="#Operation.PasswordConfig">func (o Operation) PasswordConfig() *Config</a></li> <li> <a href="#Operation.PasswordEx">func (o *Operation) PasswordEx(prompt string, l Listener) ([]byte, error)</a></li> <li> <a href="#Operation.PasswordWithConfig">func (o *Operation) PasswordWithConfig(cfg *Config) ([]byte, error)</a></li> <li> <a href="#Operation.Refresh">func (o *Operation) Refresh()</a></li> <li> <a href="#Operation.ResetHistory">func (o *Operation) ResetHistory()</a></li> <li> <a href="#Operation.Runes">func (o *Operation) Runes() ([]rune, error)</a></li> <li> <a href="#Operation.SaveHistory">func (o *Operation) SaveHistory(content string) error</a></li> <li> <a href="#Operation.SearchBackspace">func (o Operation) SearchBackspace()</a></li> <li> <a href="#Operation.SearchChar">func (o Operation) SearchChar(r rune)</a></li> <li> <a href="#Operation.SearchMode">func (o Operation) SearchMode(dir int) bool</a></li> <li> <a href="#Operation.SearchRefresh">func (o Operation) SearchRefresh(x int)</a></li> <li> <a href="#Operation.SetBuffer">func (o *Operation) SetBuffer(what string)</a></li> <li> <a href="#Operation.SetConfig">func (op *Operation) SetConfig(cfg *Config) (*Config, error)</a></li> <li> <a href="#Operation.SetHistoryPath">func (o *Operation) SetHistoryPath(path string)</a></li> <li> <a href="#Operation.SetMaskRune">func (o *Operation) SetMaskRune(r rune)</a></li> <li> <a href="#Operation.SetPrompt">func (o *Operation) SetPrompt(s string)</a></li> <li> <a href="#Operation.SetTitle">func (o *Operation) SetTitle(t string)</a></li> <li> <a href="#Operation.SetVimMode">func (o Operation) SetVimMode(on bool)</a></li> <li> <a href="#Operation.Slice">func (o *Operation) Slice() ([]byte, error)</a></li> <li> <a href="#Operation.Stderr">func (o *Operation) Stderr() io.Writer</a></li> <li> <a href="#Operation.Stdout">func (o *Operation) Stdout() io.Writer</a></li> <li> <a href="#Operation.String">func (o *Operation) String() (string, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Painter">type Painter</a></li> <li class="Documentation-indexType"> <a href="#PrefixCompleter">type PrefixCompleter</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewPrefixCompleter">func NewPrefixCompleter(pc ...PrefixCompleterInterface) *PrefixCompleter</a></li> <li> <a href="#PcItem">func PcItem(name string, pc ...PrefixCompleterInterface) *PrefixCompleter</a></li> <li> <a href="#PcItemDynamic">func PcItemDynamic(callback DynamicCompleteFunc, pc ...PrefixCompleterInterface) *PrefixCompleter</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#PrefixCompleter.Do">func (p *PrefixCompleter) Do(line []rune, pos int) (newLine [][]rune, offset int)</a></li> <li> <a href="#PrefixCompleter.GetChildren">func (p *PrefixCompleter) GetChildren() []PrefixCompleterInterface</a></li> <li> <a href="#PrefixCompleter.GetDynamicNames">func (p *PrefixCompleter) GetDynamicNames(line []rune) [][]rune</a></li> <li> <a href="#PrefixCompleter.GetName">func (p *PrefixCompleter) GetName() []rune</a></li> <li> <a href="#PrefixCompleter.IsDynamic">func (p *PrefixCompleter) IsDynamic() bool</a></li> <li> <a href="#PrefixCompleter.Print">func (p *PrefixCompleter) Print(prefix string, level int, buf *bytes.Buffer)</a></li> <li> <a href="#PrefixCompleter.SetChildren">func (p *PrefixCompleter) SetChildren(children []PrefixCompleterInterface)</a></li> <li> <a href="#PrefixCompleter.Tree">func (p *PrefixCompleter) Tree(prefix string) string</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#PrefixCompleterInterface">type PrefixCompleterInterface</a></li> <li class="Documentation-indexType"> <a href="#RawMode">type RawMode</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#RawMode.Enter">func (r *RawMode) Enter() (err error)</a></li> <li> <a href="#RawMode.Exit">func (r *RawMode) Exit() error</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#RemoteCli">type RemoteCli</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewRemoteCli">func NewRemoteCli(conn net.Conn) (*RemoteCli, error)</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#RemoteCli.Close">func (r *RemoteCli) Close()</a></li> <li> <a href="#RemoteCli.MarkIsTerminal">func (r *RemoteCli) MarkIsTerminal(is bool)</a></li> <li> <a href="#RemoteCli.Serve">func (r *RemoteCli) Serve() error</a></li> <li> <a href="#RemoteCli.ServeBy">func (r *RemoteCli) ServeBy(source io.Reader) error</a></li> <li> <a href="#RemoteCli.Write">func (r *RemoteCli) Write(b []byte) (int, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#RemoteSvr">type RemoteSvr</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewRemoteSvr">func NewRemoteSvr(conn net.Conn) (*RemoteSvr, error)</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#RemoteSvr.Close">func (r *RemoteSvr) Close() error</a></li> <li> <a href="#RemoteSvr.EnterRawMode">func (r *RemoteSvr) EnterRawMode() error</a></li> <li> <a href="#RemoteSvr.ExitRawMode">func (r *RemoteSvr) ExitRawMode() error</a></li> <li> <a href="#RemoteSvr.GetWidth">func (r *RemoteSvr) GetWidth() int</a></li> <li> <a href="#RemoteSvr.GotIsTerminal">func (r *RemoteSvr) GotIsTerminal(data []byte)</a></li> <li> <a href="#RemoteSvr.GotReportWidth">func (r *RemoteSvr) GotReportWidth(data []byte)</a></li> <li> <a href="#RemoteSvr.HandleConfig">func (r *RemoteSvr) HandleConfig(cfg *Config)</a></li> <li> <a href="#RemoteSvr.IsTerminal">func (r *RemoteSvr) IsTerminal() bool</a></li> <li> <a href="#RemoteSvr.Read">func (r *RemoteSvr) Read(b []byte) (int, error)</a></li> <li> <a href="#RemoteSvr.Write">func (r *RemoteSvr) Write(b []byte) (int, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Result">type Result</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Result.CanBreak">func (l *Result) CanBreak() bool</a></li> <li> <a href="#Result.CanContinue">func (l *Result) CanContinue() bool</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#RuneBuffer">type RuneBuffer</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewRuneBuffer">func NewRuneBuffer(w io.Writer, prompt string, cfg *Config, width int) *RuneBuffer</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#RuneBuffer.BackEscapeWord">func (r *RuneBuffer) BackEscapeWord()</a></li> <li> <a href="#RuneBuffer.Backspace">func (r *RuneBuffer) Backspace()</a></li> <li> <a href="#RuneBuffer.Backup">func (r *RuneBuffer) Backup()</a></li> <li> <a href="#RuneBuffer.Clean">func (r *RuneBuffer) Clean()</a></li> <li> <a href="#RuneBuffer.CurrentWidth">func (r *RuneBuffer) CurrentWidth(x int) int</a></li> <li> <a href="#RuneBuffer.CursorLineCount">func (r *RuneBuffer) CursorLineCount() int</a></li> <li> <a href="#RuneBuffer.Delete">func (r *RuneBuffer) Delete() (success bool)</a></li> <li> <a href="#RuneBuffer.DeleteWord">func (r *RuneBuffer) DeleteWord()</a></li> <li> <a href="#RuneBuffer.Erase">func (r *RuneBuffer) Erase()</a></li> <li> <a href="#RuneBuffer.IdxLine">func (r *RuneBuffer) IdxLine(width int) int</a></li> <li> <a href="#RuneBuffer.IsCursorInEnd">func (r *RuneBuffer) IsCursorInEnd() bool</a></li> <li> <a href="#RuneBuffer.Kill">func (r *RuneBuffer) Kill()</a></li> <li> <a href="#RuneBuffer.KillFront">func (r *RuneBuffer) KillFront()</a></li> <li> <a href="#RuneBuffer.Len">func (r *RuneBuffer) Len() int</a></li> <li> <a href="#RuneBuffer.LineCount">func (r *RuneBuffer) LineCount(width int) int</a></li> <li> <a href="#RuneBuffer.MoveBackward">func (r *RuneBuffer) MoveBackward()</a></li> <li> <a href="#RuneBuffer.MoveForward">func (r *RuneBuffer) MoveForward()</a></li> <li> <a href="#RuneBuffer.MoveTo">func (r *RuneBuffer) MoveTo(ch rune, prevChar, reverse bool) (success bool)</a></li> <li> <a href="#RuneBuffer.MoveToEndWord">func (r *RuneBuffer) MoveToEndWord()</a></li> <li> <a href="#RuneBuffer.MoveToLineEnd">func (r *RuneBuffer) MoveToLineEnd()</a></li> <li> <a href="#RuneBuffer.MoveToLineStart">func (r *RuneBuffer) MoveToLineStart()</a></li> <li> <a href="#RuneBuffer.MoveToNextWord">func (r *RuneBuffer) MoveToNextWord()</a></li> <li> <a href="#RuneBuffer.MoveToPrevWord">func (r *RuneBuffer) MoveToPrevWord() (success bool)</a></li> <li> <a href="#RuneBuffer.OnWidthChange">func (r *RuneBuffer) OnWidthChange(newWidth int)</a></li> <li> <a href="#RuneBuffer.Pos">func (r *RuneBuffer) Pos() int</a></li> <li> <a href="#RuneBuffer.PromptLen">func (r *RuneBuffer) PromptLen() int</a></li> <li> <a href="#RuneBuffer.Refresh">func (r *RuneBuffer) Refresh(f func())</a></li> <li> <a href="#RuneBuffer.Replace">func (r *RuneBuffer) Replace(ch rune)</a></li> <li> <a href="#RuneBuffer.Reset">func (r *RuneBuffer) Reset() []rune</a></li> <li> <a href="#RuneBuffer.Restore">func (r *RuneBuffer) Restore()</a></li> <li> <a href="#RuneBuffer.RuneSlice">func (r *RuneBuffer) RuneSlice(i int) []rune</a></li> <li> <a href="#RuneBuffer.Runes">func (r *RuneBuffer) Runes() []rune</a></li> <li> <a href="#RuneBuffer.Set">func (r *RuneBuffer) Set(buf []rune)</a></li> <li> <a href="#RuneBuffer.SetConfig">func (r *RuneBuffer) SetConfig(cfg *Config)</a></li> <li> <a href="#RuneBuffer.SetMask">func (r *RuneBuffer) SetMask(m rune)</a></li> <li> <a href="#RuneBuffer.SetOffset">func (r *RuneBuffer) SetOffset(offset string)</a></li> <li> <a href="#RuneBuffer.SetPrompt">func (r *RuneBuffer) SetPrompt(prompt string)</a></li> <li> <a href="#RuneBuffer.SetStyle">func (r *RuneBuffer) SetStyle(start, end int, style string)</a></li> <li> <a href="#RuneBuffer.SetWithIdx">func (r *RuneBuffer) SetWithIdx(idx int, buf []rune)</a></li> <li> <a href="#RuneBuffer.Transpose">func (r *RuneBuffer) Transpose()</a></li> <li> <a href="#RuneBuffer.WriteRune">func (r *RuneBuffer) WriteRune(s rune)</a></li> <li> <a href="#RuneBuffer.WriteRunes">func (r *RuneBuffer) WriteRunes(s []rune)</a></li> <li> <a href="#RuneBuffer.WriteString">func (r *RuneBuffer) WriteString(s string)</a></li> <li> <a href="#RuneBuffer.Yank">func (r *RuneBuffer) Yank()</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Runes">type Runes</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Runes.Aggregate">func (Runes) Aggregate(candicate [][]rune) (same []rune, size int)</a></li> <li> <a href="#Runes.Backspace">func (Runes) Backspace(r []rune) []byte</a></li> <li> <a href="#Runes.ColorFilter">func (Runes) ColorFilter(r []rune) []rune</a></li> <li> <a href="#Runes.Copy">func (Runes) Copy(r []rune) []rune</a></li> <li> <a href="#Runes.Equal">func (Runes) Equal(a, b []rune) bool</a></li> <li> <a href="#Runes.EqualFold">func (r Runes) EqualFold(a, b []rune) bool</a></li> <li> <a href="#Runes.EqualRune">func (Runes) EqualRune(a, b rune, fold bool) bool</a></li> <li> <a href="#Runes.EqualRuneFold">func (r Runes) EqualRuneFold(a, b rune) bool</a></li> <li> <a href="#Runes.HasPrefix">func (Runes) HasPrefix(r, prefix []rune) bool</a></li> <li> <a href="#Runes.HasPrefixFold">func (Runes) HasPrefixFold(r, prefix []rune) bool</a></li> <li> <a href="#Runes.Index">func (Runes) Index(r rune, rs []rune) int</a></li> <li> <a href="#Runes.IndexAll">func (rs Runes) IndexAll(r, sub []rune) int</a></li> <li> <a href="#Runes.IndexAllBck">func (rs Runes) IndexAllBck(r, sub []rune) int</a></li> <li> <a href="#Runes.IndexAllBckEx">func (rs Runes) IndexAllBckEx(r, sub []rune, fold bool) int</a></li> <li> <a href="#Runes.IndexAllEx">func (rs Runes) IndexAllEx(r, sub []rune, fold bool) int</a></li> <li> <a href="#Runes.TrimSpaceLeft">func (Runes) TrimSpaceLeft(in []rune) []rune</a></li> <li> <a href="#Runes.Width">func (Runes) Width(r rune) int</a></li> <li> <a href="#Runes.WidthAll">func (Runes) WidthAll(r []rune) (length int)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#SegmentComplete">type SegmentComplete</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#SegmentAutoComplete">func SegmentAutoComplete(completer SegmentCompleter) *SegmentComplete</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#SegmentComplete.Do">func (c *SegmentComplete) Do(line []rune, pos int) (newLine [][]rune, offset int)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#SegmentCompleter">type SegmentCompleter</a></li> <li class="Documentation-indexType"> <a href="#State">type State</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#GetState">func GetState(fd int) (*State, error)</a></li> <li> <a href="#MakeRaw">func MakeRaw(fd int) (*State, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#TabCompleter">type TabCompleter</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#TabCompleter.Do">func (t *TabCompleter) Do([]rune, int) ([][]rune, int)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Terminal">type Terminal</a></li> <li><ul class="Documentation-indexTypeFunctions"> <li> <a href="#NewTerminal">func NewTerminal(cfg *Config) (*Terminal, error)</a></li> </ul></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#Terminal.Bell">func (t *Terminal) Bell()</a></li> <li> <a href="#Terminal.Close">func (t *Terminal) Close() error</a></li> <li> <a href="#Terminal.EnterRawMode">func (t *Terminal) EnterRawMode() (err error)</a></li> <li> <a href="#Terminal.ExitRawMode">func (t *Terminal) ExitRawMode() (err error)</a></li> <li> <a href="#Terminal.GetConfig">func (t *Terminal) GetConfig() *Config</a></li> <li> <a href="#Terminal.GetOffset">func (t *Terminal) GetOffset(f func(offset string))</a></li> <li> <a href="#Terminal.IsReading">func (t *Terminal) IsReading() bool</a></li> <li> <a href="#Terminal.KickRead">func (t *Terminal) KickRead()</a></li> <li> <a href="#Terminal.Print">func (t *Terminal) Print(s string)</a></li> <li> <a href="#Terminal.PrintRune">func (t *Terminal) PrintRune(r rune)</a></li> <li> <a href="#Terminal.ReadRune">func (t *Terminal) ReadRune() rune</a></li> <li> <a href="#Terminal.Readline">func (t *Terminal) Readline() *Operation</a></li> <li> <a href="#Terminal.SetConfig">func (t *Terminal) SetConfig(c *Config) error</a></li> <li> <a href="#Terminal.SleepToResume">func (t *Terminal) SleepToResume()</a></li> <li> <a href="#Terminal.Write">func (t *Terminal) Write(b []byte) (int, error)</a></li> <li> <a href="#Terminal.WriteStdin">func (t *Terminal) WriteStdin(b []byte) (int, error)</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Termios">type Termios</a></li> </ul> </section><h3 tabindex="-1" id="pkg-constants" class="Documentation-constantsHeader">Constants <a href="#pkg-constants" aria-label="Go to Constants">¶</a></h3> <section class="Documentation-constants"> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L17">View Source</a></span> <pre>const ( <span id="T_DATA" data-kind="constant"> T_DATA = <a href="#MsgType">MsgType</a>(<a href="/builtin#iota">iota</a>) </span><span id="T_WIDTH" data-kind="constant"> T_WIDTH </span><span id="T_WIDTH_REPORT" data-kind="constant"> T_WIDTH_REPORT </span><span id="T_ISTTY_REPORT" data-kind="constant"> T_ISTTY_REPORT </span><span id="T_RAW" data-kind="constant"> T_RAW </span><span id="T_ERAW" data-kind="constant"> T_ERAW <span class="comment">// exit raw</span> </span><span id="T_EOF" data-kind="constant"> T_EOF </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L10">View Source</a></span> <pre>const ( <span id="S_STATE_FOUND" data-kind="constant"> S_STATE_FOUND = <a href="/builtin#iota">iota</a> </span><span id="S_STATE_FAILING" data-kind="constant"> S_STATE_FAILING </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L15">View Source</a></span> <pre>const ( <span id="S_DIR_BCK" data-kind="constant"> S_DIR_BCK = <a href="/builtin#iota">iota</a> </span><span id="S_DIR_FWD" data-kind="constant"> S_DIR_FWD </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L22">View Source</a></span> <pre>const ( <span id="CharLineStart" data-kind="constant"> CharLineStart = 1 </span><span id="CharBackward" data-kind="constant"> CharBackward = 2 </span><span id="CharInterrupt" data-kind="constant"> CharInterrupt = 3 </span><span id="CharDelete" data-kind="constant"> CharDelete = 4 </span><span id="CharLineEnd" data-kind="constant"> CharLineEnd = 5 </span><span id="CharForward" data-kind="constant"> CharForward = 6 </span><span id="CharBell" data-kind="constant"> CharBell = 7 </span><span id="CharCtrlH" data-kind="constant"> CharCtrlH = 8 </span><span id="CharTab" data-kind="constant"> CharTab = 9 </span><span id="CharCtrlJ" data-kind="constant"> CharCtrlJ = 10 </span><span id="CharKill" data-kind="constant"> CharKill = 11 </span><span id="CharCtrlL" data-kind="constant"> CharCtrlL = 12 </span><span id="CharEnter" data-kind="constant"> CharEnter = 13 </span><span id="CharNext" data-kind="constant"> CharNext = 14 </span><span id="CharPrev" data-kind="constant"> CharPrev = 16 </span><span id="CharBckSearch" data-kind="constant"> CharBckSearch = 18 </span><span id="CharFwdSearch" data-kind="constant"> CharFwdSearch = 19 </span><span id="CharTranspose" data-kind="constant"> CharTranspose = 20 </span><span id="CharCtrlU" data-kind="constant"> CharCtrlU = 21 </span><span id="CharCtrlW" data-kind="constant"> CharCtrlW = 23 </span><span id="CharCtrlY" data-kind="constant"> CharCtrlY = 25 </span><span id="CharCtrlZ" data-kind="constant"> CharCtrlZ = 26 </span><span id="CharEsc" data-kind="constant"> CharEsc = 27 </span><span id="CharO" data-kind="constant"> CharO = 79 </span><span id="CharEscapeEx" data-kind="constant"> CharEscapeEx = 91 </span><span id="CharBackspace" data-kind="constant"> CharBackspace = 127 </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L51">View Source</a></span> <pre>const ( <span id="MetaBackward" data-kind="constant"> MetaBackward <a href="/builtin#rune">rune</a> = -<a href="/builtin#iota">iota</a> - 1 </span><span id="MetaForward" data-kind="constant"> MetaForward </span><span id="MetaDelete" data-kind="constant"> MetaDelete </span><span id="MetaBackspace" data-kind="constant"> MetaBackspace </span><span id="MetaTranspose" data-kind="constant"> MetaTranspose </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L3">View Source</a></span> <pre>const ( <span id="VIM_NORMAL" data-kind="constant"> VIM_NORMAL = <a href="/builtin#iota">iota</a> </span><span id="VIM_INSERT" data-kind="constant"> VIM_INSERT </span><span id="VIM_VISUAL" data-kind="constant"> VIM_VISUAL </span>)</pre> </div> </section> <h3 tabindex="-1" id="pkg-variables" class="Documentation-variablesHeader">Variables <a href="#pkg-variables" aria-label="Go to Variables">¶</a></h3> <section class="Documentation-variables"> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L10">View Source</a></span> <pre>var ( <span id="Stdin" data-kind="variable"> Stdin <a href="/io">io</a>.<a href="/io#ReadCloser">ReadCloser</a> = <a href="/os">os</a>.<a href="/os#Stdin">Stdin</a> </span><span id="Stdout" data-kind="variable"> Stdout <a href="/io">io</a>.<a href="/io#WriteCloser">WriteCloser</a> = <a href="/os">os</a>.<a href="/os#Stdout">Stdout</a> </span><span id="Stderr" data-kind="variable"> Stderr <a href="/io">io</a>.<a href="/io#WriteCloser">WriteCloser</a> = <a href="/os">os</a>.<a href="/os#Stderr">Stderr</a> </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L9">View Source</a></span> <pre>var ( <span id="ErrInterrupt" data-kind="variable"> ErrInterrupt = <a href="/errors">errors</a>.<a href="/errors#New">New</a>("Interrupt") </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L10">View Source</a></span> <pre><span id="TabWidth" data-kind="variable">var TabWidth = 4</span></pre> </div> </section> <h3 tabindex="-1" id="pkg-functions" class="Documentation-functionsHeader">Functions <a href="#pkg-functions" aria-label="Go to Functions">¶</a></h3> <section class="Documentation-functions"><div class="Documentation-function"> <h4 tabindex="-1" id="AddHistory" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L52">AddHistory</a> <a class="Documentation-idLink" href="#AddHistory" aria-label="Go to AddHistory">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func AddHistory(content <a href="/builtin#string">string</a>) <a href="/builtin#error">error</a></pre> </div> <p>add history to global instance manually raise error only if `SetHistoryPath` is set with a non-empty path </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="CaptureExitSignal" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L303">CaptureExitSignal</a> <a class="Documentation-idLink" href="#CaptureExitSignal" aria-label="Go to CaptureExitSignal">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v1.5.1</span> </span> </h4> <div class="Documentation-declaration"> <pre>func CaptureExitSignal(f func())</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="ClearScreen" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go#L48">ClearScreen</a> <a class="Documentation-idLink" href="#ClearScreen" aria-label="Go to ClearScreen">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func ClearScreen(w <a href="/io">io</a>.<a href="/io#Writer">Writer</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>ClearScreen clears the console screen </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Debug" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L297">Debug</a> <a class="Documentation-idLink" href="#Debug" aria-label="Go to Debug">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Debug(o ...interface{})</pre> </div> <p>append log info to another file </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="DefaultIsTerminal" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go#L52">DefaultIsTerminal</a> <a class="Documentation-idLink" href="#DefaultIsTerminal" aria-label="Go to DefaultIsTerminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func DefaultIsTerminal() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="DefaultOnWidthChanged" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go#L67">DefaultOnWidthChanged</a> <a class="Documentation-idLink" href="#DefaultOnWidthChanged" aria-label="Go to DefaultOnWidthChanged">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func DefaultOnWidthChanged(f func())</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="DialRemote" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L463">DialRemote</a> <a class="Documentation-idLink" href="#DialRemote" aria-label="Go to DialRemote">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func DialRemote(n, addr <a href="/builtin#string">string</a>) <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Do" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L107">Do</a> <a class="Documentation-idLink" href="#Do" aria-label="Go to Do">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Do(p <a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>, line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) (newLine [][]<a href="/builtin#rune">rune</a>, offset <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="GetInt" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L253">GetInt</a> <a class="Documentation-idLink" href="#GetInt" aria-label="Go to GetInt">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func GetInt(s []<a href="/builtin#string">string</a>, def <a href="/builtin#int">int</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="GetScreenWidth" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go#L39">GetScreenWidth</a> <a class="Documentation-idLink" href="#GetScreenWidth" aria-label="Go to GetScreenWidth">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func GetScreenWidth() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="GetSize" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term_unix.go#L17">GetSize</a> <a class="Documentation-idLink" href="#GetSize" aria-label="Go to GetSize">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func GetSize(fd <a href="/builtin#int">int</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>GetSize returns the dimensions of the given terminal. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="GetStdin" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go#L56">GetStdin</a> <a class="Documentation-idLink" href="#GetStdin" aria-label="Go to GetStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func GetStdin() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="IsPrintable" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L97">IsPrintable</a> <a class="Documentation-idLink" href="#IsPrintable" aria-label="Go to IsPrintable">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func IsPrintable(key <a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="IsTerminal" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term.go#L30">IsTerminal</a> <a class="Documentation-idLink" href="#IsTerminal" aria-label="Go to IsTerminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func IsTerminal(fd <a href="/builtin#int">int</a>) <a href="/builtin#bool">bool</a></pre> </div> <p>IsTerminal returns true if the given file descriptor is a terminal. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="IsWordBreak" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L242">IsWordBreak</a> <a class="Documentation-idLink" href="#IsWordBreak" aria-label="Go to IsWordBreak">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func IsWordBreak(i <a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Line" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L63">Line</a> <a class="Documentation-idLink" href="#Line" aria-label="Go to Line">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Line(prompt <a href="/builtin#string">string</a>) (<a href="/builtin#string">string</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>readline with global configs </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="LineCount" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L234">LineCount</a> <a class="Documentation-idLink" href="#LineCount" aria-label="Go to LineCount">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func LineCount(screenWidth, w <a href="/builtin#int">int</a>) <a href="/builtin#int">int</a></pre> </div> <p>calculate how many lines for N character </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="ListenRemote" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L422">ListenRemote</a> <a class="Documentation-idLink" href="#ListenRemote" aria-label="Go to ListenRemote">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func ListenRemote(n, addr <a href="/builtin#string">string</a>, cfg *<a href="#Config">Config</a>, h func(*<a href="#Instance">Instance</a>), onListen ...func(<a href="/net">net</a>.<a href="/net#Listener">Listener</a>) <a href="/builtin#error">error</a>) <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="NewFillableStdin" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L146">NewFillableStdin</a> <a class="Documentation-idLink" href="#NewFillableStdin" aria-label="Go to NewFillableStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewFillableStdin(stdin <a href="/io">io</a>.<a href="/io#Reader">Reader</a>) (<a href="/io">io</a>.<a href="/io#ReadCloser">ReadCloser</a>, <a href="/io">io</a>.<a href="/io#Writer">Writer</a>)</pre> </div> <p>NewFillableStdin gives you FillableStdin </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Password" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L57">Password</a> <a class="Documentation-idLink" href="#Password" aria-label="Go to Password">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Password(prompt <a href="/builtin#string">string</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Print" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L38">Print</a> <a class="Documentation-idLink" href="#Print" aria-label="Go to Print">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Print(p <a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>, prefix <a href="/builtin#string">string</a>, level <a href="/builtin#int">int</a>, buf *<a href="/bytes">bytes</a>.<a href="/bytes#Buffer">Buffer</a>)</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="ReadPassword" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term.go#L82">ReadPassword</a> <a class="Documentation-idLink" href="#ReadPassword" aria-label="Go to ReadPassword">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func ReadPassword(fd <a href="/builtin#int">int</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>ReadPassword reads a line of input from a terminal without local echo. This is commonly used for inputting passwords and other sensitive data. The slice returned does not include the \n. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Restore" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L84">Restore</a> <a class="Documentation-idLink" href="#Restore" aria-label="Go to Restore">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Restore(fd <a href="/builtin#int">int</a>, state *<a href="#State">State</a>) <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="RetSegment" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L42">RetSegment</a> <a class="Documentation-idLink" href="#RetSegment" aria-label="Go to RetSegment">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func RetSegment(segments [][]<a href="/builtin#rune">rune</a>, cands [][]<a href="/builtin#rune">rune</a>, idx <a href="/builtin#int">int</a>) ([][]<a href="/builtin#rune">rune</a>, <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="SetAutoComplete" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L43">SetAutoComplete</a> <a class="Documentation-idLink" href="#SetAutoComplete" aria-label="Go to SetAutoComplete">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SetAutoComplete(completer <a href="#AutoCompleter">AutoCompleter</a>)</pre> </div> <p>set auto completer to global instance </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="SetHistoryPath" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L35">SetHistoryPath</a> <a class="Documentation-idLink" href="#SetHistoryPath" aria-label="Go to SetHistoryPath">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SetHistoryPath(fp <a href="/builtin#string">string</a>)</pre> </div> <p>let readline load history from filepath and try to persist history into disk set fp to "" to prevent readline persisting history to disk so the `AddHistory` will return nil error forever. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="SplitByLine" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L215">SplitByLine</a> <a class="Documentation-idLink" href="#SplitByLine" aria-label="Go to SplitByLine">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SplitByLine(start, screenWidth <a href="/builtin#int">int</a>, rs []<a href="/builtin#rune">rune</a>) []<a href="/builtin#string">string</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="SplitSegment" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L54">SplitSegment</a> <a class="Documentation-idLink" href="#SplitSegment" aria-label="Go to SplitSegment">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SplitSegment(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) ([][]<a href="/builtin#rune">rune</a>, <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="SuspendMe" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go#L23">SuspendMe</a> <a class="Documentation-idLink" href="#SuspendMe" aria-label="Go to SuspendMe">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SuspendMe()</pre> </div> <p>SuspendMe use to send suspend signal to myself, when we in the raw mode. For OSX it need to send to parent's pid For Linux it need to send to myself </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="WaitForResume" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L62">WaitForResume</a> <a class="Documentation-idLink" href="#WaitForResume" aria-label="Go to WaitForResume">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func WaitForResume() chan struct{}</pre> </div> <p>WaitForResume need to call before current process got suspend. It will run a ticker until a long duration is occurs, which means this process is resumed. </p> </div></section> <h3 tabindex="-1" id="pkg-types" class="Documentation-typesHeader">Types <a href="#pkg-types" aria-label="Go to Types">¶</a></h3> <section class="Documentation-types"><div class="Documentation-type"> <h4 tabindex="-1" id="AutoCompleter" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L10">AutoCompleter</a> <a class="Documentation-idLink" href="#AutoCompleter" aria-label="Go to AutoCompleter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type AutoCompleter interface { <span id="AutoCompleter.Do" data-kind="method"> <span class="comment">// Readline will pass the whole line and current offset to it</span> </span> <span class="comment">// Completer need to pass all the candidates, and how long they shared the same characters in line</span> <span class="comment">// Example:</span> <span class="comment">// [go, git, git-shell, grep]</span> <span class="comment">// Do("g", 1) => ["o", "it", "it-shell", "rep"], 1</span> <span class="comment">// Do("gi", 2) => ["t", "t-shell"], 2</span> <span class="comment">// Do("git", 3) => ["", "-shell"], 3</span> Do(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) (newLine [][]<a href="/builtin#rune">rune</a>, length <a href="/builtin#int">int</a>) }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="SegmentFunc" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L28">SegmentFunc</a> <a class="Documentation-idLink" href="#SegmentFunc" aria-label="Go to SegmentFunc">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SegmentFunc(f func([][]<a href="/builtin#rune">rune</a>, <a href="/builtin#int">int</a>) [][]<a href="/builtin#rune">rune</a>) <a href="#AutoCompleter">AutoCompleter</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="CancelableStdin" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L69">CancelableStdin</a> <a class="Documentation-idLink" href="#CancelableStdin" aria-label="Go to CancelableStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type CancelableStdin struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewCancelableStdin" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L80">NewCancelableStdin</a> <a class="Documentation-idLink" href="#NewCancelableStdin" aria-label="Go to NewCancelableStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewCancelableStdin(r <a href="/io">io</a>.<a href="/io#Reader">Reader</a>) *<a href="#CancelableStdin">CancelableStdin</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="CancelableStdin.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*CancelableStdin) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L128">Close</a> <a class="Documentation-idLink" href="#CancelableStdin.Close" aria-label="Go to CancelableStdin.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c *<a href="#CancelableStdin">CancelableStdin</a>) Close() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="CancelableStdin.Read" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*CancelableStdin) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L107">Read</a> <a class="Documentation-idLink" href="#CancelableStdin.Read" aria-label="Go to CancelableStdin.Read">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c *<a href="#CancelableStdin">CancelableStdin</a>) Read(b []<a href="/builtin#byte">byte</a>) (n <a href="/builtin#int">int</a>, err <a href="/builtin#error">error</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Config" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L30">Config</a> <a class="Documentation-idLink" href="#Config" aria-label="Go to Config">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Config struct { <span id="Config.Prompt" data-kind="field"> <span class="comment">// prompt supports ANSI escape sequence, so we can color some characters even in windows</span> </span> Prompt <a href="/builtin#string">string</a> <span id="Config.HistoryFile" data-kind="field"> <span class="comment">// readline will persist historys to file where HistoryFile specified</span> </span> HistoryFile <a href="/builtin#string">string</a> <span class="comment">// specify the max length of historys, it's 500 by default, set it to -1 to disable history</span> <span id="Config.HistoryLimit" data-kind="field"> HistoryLimit <a href="/builtin#int">int</a> </span><span id="Config.DisableAutoSaveHistory" data-kind="field"> DisableAutoSaveHistory <a href="/builtin#bool">bool</a> </span><span id="Config.HistorySearchFold" data-kind="field"> <span class="comment">// enable case-insensitive history searching</span> </span> HistorySearchFold <a href="/builtin#bool">bool</a> <span id="Config.AutoComplete" data-kind="field"> <span class="comment">// AutoCompleter will called once user press TAB</span> </span> AutoComplete <a href="#AutoCompleter">AutoCompleter</a> <span id="Config.Listener" data-kind="field"> <span class="comment">// Any key press will pass to Listener</span> </span> <span class="comment">// NOTE: Listener will be triggered by (nil, 0, 0) immediately</span> Listener <a href="#Listener">Listener</a> <span id="Config.Painter" data-kind="field"> Painter <a href="#Painter">Painter</a> </span> <span id="Config.VimMode" data-kind="field"> <span class="comment">// If VimMode is true, readline will in vim.insert mode by default</span> </span> VimMode <a href="/builtin#bool">bool</a> <span id="Config.InterruptPrompt" data-kind="field"> InterruptPrompt <a href="/builtin#string">string</a> </span><span id="Config.EOFPrompt" data-kind="field"> EOFPrompt <a href="/builtin#string">string</a> </span> <span id="Config.FuncGetWidth" data-kind="field"> FuncGetWidth func() <a href="/builtin#int">int</a> </span> <span id="Config.Stdin" data-kind="field"> Stdin <a href="/io">io</a>.<a href="/io#ReadCloser">ReadCloser</a> </span><span id="Config.StdinWriter" data-kind="field"> StdinWriter <a href="/io">io</a>.<a href="/io#Writer">Writer</a> </span><span id="Config.Stdout" data-kind="field"> Stdout <a href="/io">io</a>.<a href="/io#Writer">Writer</a> </span><span id="Config.Stderr" data-kind="field"> Stderr <a href="/io">io</a>.<a href="/io#Writer">Writer</a> </span> <span id="Config.EnableMask" data-kind="field"> EnableMask <a href="/builtin#bool">bool</a> </span><span id="Config.MaskRune" data-kind="field"> MaskRune <a href="/builtin#rune">rune</a> </span> <span id="Config.UniqueEditLine" data-kind="field"> <span class="comment">// erase the editing line after user submited it</span> </span> <span class="comment">// it use in IM usually.</span> UniqueEditLine <a href="/builtin#bool">bool</a> <span id="Config.FuncFilterInputRune" data-kind="field"> <span class="comment">// filter input runes (may be used to disable CtrlZ or for translating some keys to different actions)</span> </span> <span class="comment">// -> output = new (translated) rune and true/false if continue with processing this one</span> FuncFilterInputRune func(<a href="/builtin#rune">rune</a>) (<a href="/builtin#rune">rune</a>, <a href="/builtin#bool">bool</a>) <span class="comment">// force use interactive even stdout is not a tty</span> <span id="Config.FuncIsTerminal" data-kind="field"> FuncIsTerminal func() <a href="/builtin#bool">bool</a> </span><span id="Config.FuncMakeRaw" data-kind="field"> FuncMakeRaw func() <a href="/builtin#error">error</a> </span><span id="Config.FuncExitRaw" data-kind="field"> FuncExitRaw func() <a href="/builtin#error">error</a> </span><span id="Config.FuncOnWidthChanged" data-kind="field"> FuncOnWidthChanged func(func()) </span><span id="Config.ForceUseInteractive" data-kind="field"> ForceUseInteractive <a href="/builtin#bool">bool</a> </span> <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Config.Clone" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Config) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L150">Clone</a> <a class="Documentation-idLink" href="#Config.Clone" aria-label="Go to Config.Clone">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c <a href="#Config">Config</a>) Clone() *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Config.Init" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Config) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L95">Init</a> <a class="Documentation-idLink" href="#Config.Init" aria-label="Go to Config.Init">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c *<a href="#Config">Config</a>) Init() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Config.SetListener" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Config) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L156">SetListener</a> <a class="Documentation-idLink" href="#Config.SetListener" aria-label="Go to Config.SetListener">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c *<a href="#Config">Config</a>) SetListener(f func(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>, key <a href="/builtin#rune">rune</a>) (newLine []<a href="/builtin#rune">rune</a>, newPos <a href="/builtin#int">int</a>, ok <a href="/builtin#bool">bool</a>))</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Config.SetPainter" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Config) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L160">SetPainter</a> <a class="Documentation-idLink" href="#Config.SetPainter" aria-label="Go to Config.SetPainter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c *<a href="#Config">Config</a>) SetPainter(p <a href="#Painter">Painter</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="DumpListener" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L517">DumpListener</a> <a class="Documentation-idLink" href="#DumpListener" aria-label="Go to DumpListener">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type DumpListener struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="DumpListener.OnChange" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*DumpListener) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L521">OnChange</a> <a class="Documentation-idLink" href="#DumpListener.OnChange" aria-label="Go to DumpListener.OnChange">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (d *<a href="#DumpListener">DumpListener</a>) OnChange(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>, key <a href="/builtin#rune">rune</a>) (newLine []<a href="/builtin#rune">rune</a>, newPos <a href="/builtin#int">int</a>, ok <a href="/builtin#bool">bool</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="DynamicCompleteFunc" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L9">DynamicCompleteFunc</a> <a class="Documentation-idLink" href="#DynamicCompleteFunc" aria-label="Go to DynamicCompleteFunc">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type DynamicCompleteFunc func(<a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a></pre> </div> <p>Caller type for dynamic completion </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="DynamicPrefixCompleterInterface" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L19">DynamicPrefixCompleterInterface</a> <a class="Documentation-idLink" href="#DynamicPrefixCompleterInterface" aria-label="Go to DynamicPrefixCompleterInterface">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type DynamicPrefixCompleterInterface interface { <a href="#PrefixCompleterInterface">PrefixCompleterInterface</a> <span id="DynamicPrefixCompleterInterface.IsDynamic" data-kind="method"> IsDynamic() <a href="/builtin#bool">bool</a> </span><span id="DynamicPrefixCompleterInterface.GetDynamicNames" data-kind="method"> GetDynamicNames(line []<a href="/builtin#rune">rune</a>) [][]<a href="/builtin#rune">rune</a> </span>}</pre> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="FillableStdin" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L137">FillableStdin</a> <a class="Documentation-idLink" href="#FillableStdin" aria-label="Go to FillableStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type FillableStdin struct { <span id="FillableStdin.Mutex" data-kind="field"> <a href="/sync">sync</a>.<a href="/sync#Mutex">Mutex</a> </span> <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <p>FillableStdin is a stdin reader which can prepend some data before reading into the real stdin </p> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="FillableStdin.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*FillableStdin) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L194">Close</a> <a class="Documentation-idLink" href="#FillableStdin.Close" aria-label="Go to FillableStdin.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (s *<a href="#FillableStdin">FillableStdin</a>) Close() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="FillableStdin.Read" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*FillableStdin) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/std.go#L175">Read</a> <a class="Documentation-idLink" href="#FillableStdin.Read" aria-label="Go to FillableStdin.Read">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (s *<a href="#FillableStdin">FillableStdin</a>) Read(p []<a href="/builtin#byte">byte</a>) (n <a href="/builtin#int">int</a>, err <a href="/builtin#error">error</a>)</pre> </div> <p>Read will read from the local buffer and if no data, read from stdin </p> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Instance" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L24">Instance</a> <a class="Documentation-idLink" href="#Instance" aria-label="Go to Instance">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Instance struct { <span id="Instance.Config" data-kind="field"> Config *<a href="#Config">Config</a> </span><span id="Instance.Terminal" data-kind="field"> Terminal *<a href="#Terminal">Terminal</a> </span><span id="Instance.Operation" data-kind="field"> Operation *<a href="#Operation">Operation</a> </span>}</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="HandleConn" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L449">HandleConn</a> <a class="Documentation-idLink" href="#HandleConn" aria-label="Go to HandleConn">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func HandleConn(cfg <a href="#Config">Config</a>, conn <a href="/net">net</a>.<a href="/net#Conn">Conn</a>) (*<a href="#Instance">Instance</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeFunc"> <h4 tabindex="-1" id="New" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L180">New</a> <a class="Documentation-idLink" href="#New" aria-label="Go to New">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func New(prompt <a href="/builtin#string">string</a>) (*<a href="#Instance">Instance</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewEx" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L164">NewEx</a> <a class="Documentation-idLink" href="#NewEx" aria-label="Go to NewEx">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewEx(cfg *<a href="#Config">Config</a>) (*<a href="#Instance">Instance</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.CaptureExitSignal" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L287">CaptureExitSignal</a> <a class="Documentation-idLink" href="#Instance.CaptureExitSignal" aria-label="Go to Instance.CaptureExitSignal">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v1.5.1</span> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) CaptureExitSignal()</pre> </div> <p>call CaptureExitSignal when you want readline exit gracefully. </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Clean" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L293">Clean</a> <a class="Documentation-idLink" href="#Instance.Clean" aria-label="Go to Instance.Clean">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Clean()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L277">Close</a> <a class="Documentation-idLink" href="#Instance.Close" aria-label="Go to Instance.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Close() <a href="/builtin#error">error</a></pre> </div> <p>we must make sure that call Close() before process exit. if there has a pending reading operation, that reading will be interrupted. so you can capture the signal and call Instance.Close(), it's thread-safe. </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.GenPasswordConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L220">GenPasswordConfig</a> <a class="Documentation-idLink" href="#Instance.GenPasswordConfig" aria-label="Go to Instance.GenPasswordConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) GenPasswordConfig() *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.HistoryDisable" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L331">HistoryDisable</a> <a class="Documentation-idLink" href="#Instance.HistoryDisable" aria-label="Go to Instance.HistoryDisable">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) HistoryDisable()</pre> </div> <p>HistoryDisable the save of the commands into the history </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.HistoryEnable" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L336">HistoryEnable</a> <a class="Documentation-idLink" href="#Instance.HistoryEnable" aria-label="Go to Instance.HistoryEnable">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) HistoryEnable()</pre> </div> <p>HistoryEnable the save of the commands into the history (default on) </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.IsVimMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L216">IsVimMode</a> <a class="Documentation-idLink" href="#Instance.IsVimMode" aria-label="Go to Instance.IsVimMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) IsVimMode() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Line" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L250">Line</a> <a class="Documentation-idLink" href="#Instance.Line" aria-label="Go to Instance.Line">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Line() *<a href="#Result">Result</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.ReadPassword" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L233">ReadPassword</a> <a class="Documentation-idLink" href="#Instance.ReadPassword" aria-label="Go to Instance.ReadPassword">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) ReadPassword(prompt <a href="/builtin#string">string</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.ReadPasswordEx" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L229">ReadPasswordEx</a> <a class="Documentation-idLink" href="#Instance.ReadPasswordEx" aria-label="Go to Instance.ReadPasswordEx">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) ReadPasswordEx(prompt <a href="/builtin#string">string</a>, l <a href="#Listener">Listener</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.ReadPasswordWithConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L225">ReadPasswordWithConfig</a> <a class="Documentation-idLink" href="#Instance.ReadPasswordWithConfig" aria-label="Go to Instance.ReadPasswordWithConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) ReadPasswordWithConfig(cfg *<a href="#Config">Config</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>we can generate a config by `i.GenPasswordConfig()` </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.ReadSlice" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L270">ReadSlice</a> <a class="Documentation-idLink" href="#Instance.ReadSlice" aria-label="Go to Instance.ReadSlice">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) ReadSlice() ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>same as readline </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Readline" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L256">Readline</a> <a class="Documentation-idLink" href="#Instance.Readline" aria-label="Go to Instance.Readline">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Readline() (<a href="/builtin#string">string</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>err is one of (nil, io.EOF, readline.ErrInterrupt) </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.ReadlineWithDefault" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L260">ReadlineWithDefault</a> <a class="Documentation-idLink" href="#Instance.ReadlineWithDefault" aria-label="Go to Instance.ReadlineWithDefault">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) ReadlineWithDefault(what <a href="/builtin#string">string</a>) (<a href="/builtin#string">string</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Refresh" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L326">Refresh</a> <a class="Documentation-idLink" href="#Instance.Refresh" aria-label="Go to Instance.Refresh">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Refresh()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.ResetHistory" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L184">ResetHistory</a> <a class="Documentation-idLink" href="#Instance.ResetHistory" aria-label="Go to Instance.ResetHistory">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) ResetHistory()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.SaveHistory" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L265">SaveHistory</a> <a class="Documentation-idLink" href="#Instance.SaveHistory" aria-label="Go to Instance.SaveHistory">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) SaveHistory(content <a href="/builtin#string">string</a>) <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.SetConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L315">SetConfig</a> <a class="Documentation-idLink" href="#Instance.SetConfig" aria-label="Go to Instance.SetConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) SetConfig(cfg *<a href="#Config">Config</a>) *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.SetHistoryPath" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L197">SetHistoryPath</a> <a class="Documentation-idLink" href="#Instance.SetHistoryPath" aria-label="Go to Instance.SetHistoryPath">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) SetHistoryPath(p <a href="/builtin#string">string</a>)</pre> </div> <p>change history persistence in runtime </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.SetMaskRune" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L192">SetMaskRune</a> <a class="Documentation-idLink" href="#Instance.SetMaskRune" aria-label="Go to Instance.SetMaskRune">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) SetMaskRune(r <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.SetPrompt" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L188">SetPrompt</a> <a class="Documentation-idLink" href="#Instance.SetPrompt" aria-label="Go to Instance.SetPrompt">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) SetPrompt(s <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.SetVimMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L212">SetVimMode</a> <a class="Documentation-idLink" href="#Instance.SetVimMode" aria-label="Go to Instance.SetVimMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) SetVimMode(on <a href="/builtin#bool">bool</a>)</pre> </div> <p>switch VimMode in runtime </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Stderr" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L207">Stderr</a> <a class="Documentation-idLink" href="#Instance.Stderr" aria-label="Go to Instance.Stderr">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Stderr() <a href="/io">io</a>.<a href="/io#Writer">Writer</a></pre> </div> <p>readline will refresh automatic when write through Stdout() </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Stdout" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L202">Stdout</a> <a class="Documentation-idLink" href="#Instance.Stdout" aria-label="Go to Instance.Stdout">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Stdout() <a href="/io">io</a>.<a href="/io#Writer">Writer</a></pre> </div> <p>readline will refresh automatic when write through Stdout() </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.Write" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L297">Write</a> <a class="Documentation-idLink" href="#Instance.Write" aria-label="Go to Instance.Write">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) Write(b []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Instance.WriteStdin" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Instance) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L311">WriteStdin</a> <a class="Documentation-idLink" href="#Instance.WriteStdin" aria-label="Go to Instance.WriteStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (i *<a href="#Instance">Instance</a>) WriteStdin(val []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>WriteStdin prefill the next Stdin fetch Next time you call ReadLine() this value will be writen before the user input ie : </p><pre>i := readline.New() i.WriteStdin([]byte("test")) _, _= i.Readline() </pre><p>gives </p><p>> test[cursor] </p> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="InterruptError" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L13">InterruptError</a> <a class="Documentation-idLink" href="#InterruptError" aria-label="Go to InterruptError">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type InterruptError struct { <span id="InterruptError.Line" data-kind="field"> Line []<a href="/builtin#rune">rune</a> </span>}</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="InterruptError.Error" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*InterruptError) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L17">Error</a> <a class="Documentation-idLink" href="#InterruptError.Error" aria-label="Go to InterruptError.Error">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (*<a href="#InterruptError">InterruptError</a>) Error() <a href="/builtin#string">string</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Listener" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L525">Listener</a> <a class="Documentation-idLink" href="#Listener" aria-label="Go to Listener">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Listener interface { <span id="Listener.OnChange" data-kind="method"> OnChange(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>, key <a href="/builtin#rune">rune</a>) (newLine []<a href="/builtin#rune">rune</a>, newPos <a href="/builtin#int">int</a>, ok <a href="/builtin#bool">bool</a>) </span>}</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="FuncListener" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L513">FuncListener</a> <a class="Documentation-idLink" href="#FuncListener" aria-label="Go to FuncListener">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func FuncListener(f func(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>, key <a href="/builtin#rune">rune</a>) (newLine []<a href="/builtin#rune">rune</a>, newPos <a href="/builtin#int">int</a>, ok <a href="/builtin#bool">bool</a>)) <a href="#Listener">Listener</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Message" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L251">Message</a> <a class="Documentation-idLink" href="#Message" aria-label="Go to Message">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Message struct { <span id="Message.Type" data-kind="field"> Type <a href="#MsgType">MsgType</a> </span><span id="Message.Data" data-kind="field"> Data []<a href="/builtin#byte">byte</a> </span>}</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewMessage" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L272">NewMessage</a> <a class="Documentation-idLink" href="#NewMessage" aria-label="Go to NewMessage">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewMessage(t <a href="#MsgType">MsgType</a>, data []<a href="/builtin#byte">byte</a>) *<a href="#Message">Message</a></pre> </div> </div><div class="Documentation-typeFunc"> <h4 tabindex="-1" id="ReadMessage" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L256">ReadMessage</a> <a class="Documentation-idLink" href="#ReadMessage" aria-label="Go to ReadMessage">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func ReadMessage(r <a href="/io">io</a>.<a href="/io#Reader">Reader</a>) (*<a href="#Message">Message</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Message.WriteTo" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Message) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L276">WriteTo</a> <a class="Documentation-idLink" href="#Message.WriteTo" aria-label="Go to Message.WriteTo">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (m *<a href="#Message">Message</a>) WriteTo(w <a href="/io">io</a>.<a href="/io#Writer">Writer</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="MsgType" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L15">MsgType</a> <a class="Documentation-idLink" href="#MsgType" aria-label="Go to MsgType">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type MsgType <a href="/builtin#int16">int16</a></pre> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Operation" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L21">Operation</a> <a class="Documentation-idLink" href="#Operation" aria-label="Go to Operation">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Operation struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewOperation" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L69">NewOperation</a> <a class="Documentation-idLink" href="#NewOperation" aria-label="Go to NewOperation">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewOperation(t *<a href="#Terminal">Terminal</a>, cfg *<a href="#Config">Config</a>) *<a href="#Operation">Operation</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Clean" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L509">Clean</a> <a class="Documentation-idLink" href="#Operation.Clean" aria-label="Go to Operation.Clean">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Clean()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L438">Close</a> <a class="Documentation-idLink" href="#Operation.Close" aria-label="Go to Operation.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Close()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.CompleteRefresh" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L188">CompleteRefresh</a> <a class="Documentation-idLink" href="#Operation.CompleteRefresh" aria-label="Go to Operation.CompleteRefresh">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) CompleteRefresh()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.EnterCompleteMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L267">EnterCompleteMode</a> <a class="Documentation-idLink" href="#Operation.EnterCompleteMode" aria-label="Go to Operation.EnterCompleteMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) EnterCompleteMode(offset <a href="/builtin#int">int</a>, candidate [][]<a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.EnterCompleteSelectMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L261">EnterCompleteSelectMode</a> <a class="Documentation-idLink" href="#Operation.EnterCompleteSelectMode" aria-label="Go to Operation.EnterCompleteSelectMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) EnterCompleteSelectMode()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.EnterPasswordMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/password.go#L17">EnterPasswordMode</a> <a class="Documentation-idLink" href="#Operation.EnterPasswordMode" aria-label="Go to Operation.EnterPasswordMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) EnterPasswordMode(cfg *<a href="#Config">Config</a>) (err <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.EnterVimInsertMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L153">EnterVimInsertMode</a> <a class="Documentation-idLink" href="#Operation.EnterVimInsertMode" aria-label="Go to Operation.EnterVimInsertMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) EnterVimInsertMode()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ExitCompleteMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L282">ExitCompleteMode</a> <a class="Documentation-idLink" href="#Operation.ExitCompleteMode" aria-label="Go to Operation.ExitCompleteMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) ExitCompleteMode(revent <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ExitCompleteSelectMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L274">ExitCompleteSelectMode</a> <a class="Documentation-idLink" href="#Operation.ExitCompleteSelectMode" aria-label="Go to Operation.ExitCompleteSelectMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) ExitCompleteSelectMode()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ExitPasswordMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/password.go#L12">ExitPasswordMode</a> <a class="Documentation-idLink" href="#Operation.ExitPasswordMode" aria-label="Go to Operation.ExitPasswordMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) ExitPasswordMode()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ExitSearchMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L115">ExitSearchMode</a> <a class="Documentation-idLink" href="#Operation.ExitSearchMode" aria-label="Go to Operation.ExitSearchMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) ExitSearchMode(revert <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ExitVimInsertMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L157">ExitVimInsertMode</a> <a class="Documentation-idLink" href="#Operation.ExitVimInsertMode" aria-label="Go to Operation.ExitVimInsertMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) ExitVimInsertMode()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ExitVimMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L32">ExitVimMode</a> <a class="Documentation-idLink" href="#Operation.ExitVimMode" aria-label="Go to Operation.ExitVimMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) ExitVimMode()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.GenPasswordConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L410">GenPasswordConfig</a> <a class="Documentation-idLink" href="#Operation.GenPasswordConfig" aria-label="Go to Operation.GenPasswordConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) GenPasswordConfig() *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.GetConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L100">GetConfig</a> <a class="Documentation-idLink" href="#Operation.GetConfig" aria-label="Go to Operation.GetConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) GetConfig() *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.HandleCompleteSelect" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L121">HandleCompleteSelect</a> <a class="Documentation-idLink" href="#Operation.HandleCompleteSelect" aria-label="Go to Operation.HandleCompleteSelect">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) HandleCompleteSelect(r <a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.HandleVim" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L161">HandleVim</a> <a class="Documentation-idLink" href="#Operation.HandleVim" aria-label="Go to Operation.HandleVim">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) HandleVim(r <a href="/builtin#rune">rune</a>, readNext func() <a href="/builtin#rune">rune</a>) <a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.HandleVimNormal" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L133">HandleVimNormal</a> <a class="Documentation-idLink" href="#Operation.HandleVimNormal" aria-label="Go to Operation.HandleVimNormal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) HandleVimNormal(r <a href="/builtin#rune">rune</a>, readNext func() <a href="/builtin#rune">rune</a>) (t <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.IsEnableVimMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L36">IsEnableVimMode</a> <a class="Documentation-idLink" href="#Operation.IsEnableVimMode" aria-label="Go to Operation.IsEnableVimMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) IsEnableVimMode() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.IsInCompleteMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L117">IsInCompleteMode</a> <a class="Documentation-idLink" href="#Operation.IsInCompleteMode" aria-label="Go to Operation.IsInCompleteMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) IsInCompleteMode() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.IsInCompleteSelectMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L113">IsInCompleteSelectMode</a> <a class="Documentation-idLink" href="#Operation.IsInCompleteSelectMode" aria-label="Go to Operation.IsInCompleteSelectMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) IsInCompleteSelectMode() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.IsNormalMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L454">IsNormalMode</a> <a class="Documentation-idLink" href="#Operation.IsNormalMode" aria-label="Go to Operation.IsNormalMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) IsNormalMode() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.IsSearchMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L49">IsSearchMode</a> <a class="Documentation-idLink" href="#Operation.IsSearchMode" aria-label="Go to Operation.IsSearchMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) IsSearchMode() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.OnComplete" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L67">OnComplete</a> <a class="Documentation-idLink" href="#Operation.OnComplete" aria-label="Go to Operation.OnComplete">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) OnComplete() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Password" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L422">Password</a> <a class="Documentation-idLink" href="#Operation.Password" aria-label="Go to Operation.Password">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Password(prompt <a href="/builtin#string">string</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.PasswordConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/password.go#L22">PasswordConfig</a> <a class="Documentation-idLink" href="#Operation.PasswordConfig" aria-label="Go to Operation.PasswordConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) PasswordConfig() *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.PasswordEx" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L403">PasswordEx</a> <a class="Documentation-idLink" href="#Operation.PasswordEx" aria-label="Go to Operation.PasswordEx">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) PasswordEx(prompt <a href="/builtin#string">string</a>, l <a href="#Listener">Listener</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.PasswordWithConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L414">PasswordWithConfig</a> <a class="Documentation-idLink" href="#Operation.PasswordWithConfig" aria-label="Go to Operation.PasswordWithConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) PasswordWithConfig(cfg *<a href="#Config">Config</a>) ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Refresh" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L503">Refresh</a> <a class="Documentation-idLink" href="#Operation.Refresh" aria-label="Go to Operation.Refresh">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Refresh()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.ResetHistory" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L493">ResetHistory</a> <a class="Documentation-idLink" href="#Operation.ResetHistory" aria-label="Go to Operation.ResetHistory">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) ResetHistory()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Runes" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L381">Runes</a> <a class="Documentation-idLink" href="#Operation.Runes" aria-label="Go to Operation.Runes">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Runes() ([]<a href="/builtin#rune">rune</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SaveHistory" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L499">SaveHistory</a> <a class="Documentation-idLink" href="#Operation.SaveHistory" aria-label="Go to Operation.SaveHistory">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) SaveHistory(content <a href="/builtin#string">string</a>) <a href="/builtin#error">error</a></pre> </div> <p>if err is not nil, it just mean it fail to write to file other things goes fine. </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SearchBackspace" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L53">SearchBackspace</a> <a class="Documentation-idLink" href="#Operation.SearchBackspace" aria-label="Go to Operation.SearchBackspace">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) SearchBackspace()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SearchChar" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L94">SearchChar</a> <a class="Documentation-idLink" href="#Operation.SearchChar" aria-label="Go to Operation.SearchChar">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) SearchChar(r <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SearchMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L99">SearchMode</a> <a class="Documentation-idLink" href="#Operation.SearchMode" aria-label="Go to Operation.SearchMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) SearchMode(dir <a href="/builtin#int">int</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SearchRefresh" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/search.go#L127">SearchRefresh</a> <a class="Documentation-idLink" href="#Operation.SearchRefresh" aria-label="Go to Operation.SearchRefresh">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) SearchRefresh(x <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetBuffer" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L37">SetBuffer</a> <a class="Documentation-idLink" href="#Operation.SetBuffer" aria-label="Go to Operation.SetBuffer">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) SetBuffer(what <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L458">SetConfig</a> <a class="Documentation-idLink" href="#Operation.SetConfig" aria-label="Go to Operation.SetConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (op *<a href="#Operation">Operation</a>) SetConfig(cfg *<a href="#Config">Config</a>) (*<a href="#Config">Config</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetHistoryPath" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L446">SetHistoryPath</a> <a class="Documentation-idLink" href="#Operation.SetHistoryPath" aria-label="Go to Operation.SetHistoryPath">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) SetHistoryPath(path <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetMaskRune" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L96">SetMaskRune</a> <a class="Documentation-idLink" href="#Operation.SetMaskRune" aria-label="Go to Operation.SetMaskRune">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) SetMaskRune(r <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetPrompt" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L92">SetPrompt</a> <a class="Documentation-idLink" href="#Operation.SetPrompt" aria-label="Go to Operation.SetPrompt">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) SetPrompt(s <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetTitle" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L426">SetTitle</a> <a class="Documentation-idLink" href="#Operation.SetTitle" aria-label="Go to Operation.SetTitle">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) SetTitle(t <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.SetVimMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go#L24">SetVimMode</a> <a class="Documentation-idLink" href="#Operation.SetVimMode" aria-label="Go to Operation.SetVimMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o Operation) SetVimMode(on <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Slice" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L430">Slice</a> <a class="Documentation-idLink" href="#Operation.Slice" aria-label="Go to Operation.Slice">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Slice() ([]<a href="/builtin#byte">byte</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Stderr" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L368">Stderr</a> <a class="Documentation-idLink" href="#Operation.Stderr" aria-label="Go to Operation.Stderr">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Stderr() <a href="/io">io</a>.<a href="/io#Writer">Writer</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.Stdout" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L372">Stdout</a> <a class="Documentation-idLink" href="#Operation.Stdout" aria-label="Go to Operation.Stdout">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) Stdout() <a href="/io">io</a>.<a href="/io#Writer">Writer</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Operation.String" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Operation) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L376">String</a> <a class="Documentation-idLink" href="#Operation.String" aria-label="Go to Operation.String">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (o *<a href="#Operation">Operation</a>) String() (<a href="/builtin#string">string</a>, <a href="/builtin#error">error</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Painter" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go#L529">Painter</a> <a class="Documentation-idLink" href="#Painter" aria-label="Go to Painter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Painter interface { <span id="Painter.Paint" data-kind="method"> Paint(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) []<a href="/builtin#rune">rune</a> </span>}</pre> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="PrefixCompleter" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L25">PrefixCompleter</a> <a class="Documentation-idLink" href="#PrefixCompleter" aria-label="Go to PrefixCompleter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type PrefixCompleter struct { <span id="PrefixCompleter.Name" data-kind="field"> Name []<a href="/builtin#rune">rune</a> </span><span id="PrefixCompleter.Dynamic" data-kind="field"> Dynamic <a href="/builtin#bool">bool</a> </span><span id="PrefixCompleter.Callback" data-kind="field"> Callback <a href="#DynamicCompleteFunc">DynamicCompleteFunc</a> </span><span id="PrefixCompleter.Children" data-kind="field"> Children []<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a> </span>}</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewPrefixCompleter" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L82">NewPrefixCompleter</a> <a class="Documentation-idLink" href="#NewPrefixCompleter" aria-label="Go to NewPrefixCompleter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewPrefixCompleter(pc ...<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>) *<a href="#PrefixCompleter">PrefixCompleter</a></pre> </div> </div><div class="Documentation-typeFunc"> <h4 tabindex="-1" id="PcItem" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L86">PcItem</a> <a class="Documentation-idLink" href="#PcItem" aria-label="Go to PcItem">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func PcItem(name <a href="/builtin#string">string</a>, pc ...<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>) *<a href="#PrefixCompleter">PrefixCompleter</a></pre> </div> </div><div class="Documentation-typeFunc"> <h4 tabindex="-1" id="PcItemDynamic" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L95">PcItemDynamic</a> <a class="Documentation-idLink" href="#PcItemDynamic" aria-label="Go to PcItemDynamic">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func PcItemDynamic(callback <a href="#DynamicCompleteFunc">DynamicCompleteFunc</a>, pc ...<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>) *<a href="#PrefixCompleter">PrefixCompleter</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.Do" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L103">Do</a> <a class="Documentation-idLink" href="#PrefixCompleter.Do" aria-label="Go to PrefixCompleter.Do">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) Do(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) (newLine [][]<a href="/builtin#rune">rune</a>, offset <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.GetChildren" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L74">GetChildren</a> <a class="Documentation-idLink" href="#PrefixCompleter.GetChildren" aria-label="Go to PrefixCompleter.GetChildren">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) GetChildren() []<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.GetDynamicNames" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L66">GetDynamicNames</a> <a class="Documentation-idLink" href="#PrefixCompleter.GetDynamicNames" aria-label="Go to PrefixCompleter.GetDynamicNames">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) GetDynamicNames(line []<a href="/builtin#rune">rune</a>) [][]<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.GetName" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L62">GetName</a> <a class="Documentation-idLink" href="#PrefixCompleter.GetName" aria-label="Go to PrefixCompleter.GetName">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) GetName() []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.IsDynamic" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L58">IsDynamic</a> <a class="Documentation-idLink" href="#PrefixCompleter.IsDynamic" aria-label="Go to PrefixCompleter.IsDynamic">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) IsDynamic() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.Print" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L54">Print</a> <a class="Documentation-idLink" href="#PrefixCompleter.Print" aria-label="Go to PrefixCompleter.Print">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) Print(prefix <a href="/builtin#string">string</a>, level <a href="/builtin#int">int</a>, buf *<a href="/bytes">bytes</a>.<a href="/bytes#Buffer">Buffer</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.SetChildren" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L78">SetChildren</a> <a class="Documentation-idLink" href="#PrefixCompleter.SetChildren" aria-label="Go to PrefixCompleter.SetChildren">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) SetChildren(children []<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="PrefixCompleter.Tree" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*PrefixCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L32">Tree</a> <a class="Documentation-idLink" href="#PrefixCompleter.Tree" aria-label="Go to PrefixCompleter.Tree">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (p *<a href="#PrefixCompleter">PrefixCompleter</a>) Tree(prefix <a href="/builtin#string">string</a>) <a href="/builtin#string">string</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="PrefixCompleterInterface" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go#L11">PrefixCompleterInterface</a> <a class="Documentation-idLink" href="#PrefixCompleterInterface" aria-label="Go to PrefixCompleterInterface">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type PrefixCompleterInterface interface { <span id="PrefixCompleterInterface.Print" data-kind="method"> Print(prefix <a href="/builtin#string">string</a>, level <a href="/builtin#int">int</a>, buf *<a href="/bytes">bytes</a>.<a href="/bytes#Buffer">Buffer</a>) </span><span id="PrefixCompleterInterface.Do" data-kind="method"> Do(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) (newLine [][]<a href="/builtin#rune">rune</a>, length <a href="/builtin#int">int</a>) </span><span id="PrefixCompleterInterface.GetName" data-kind="method"> GetName() []<a href="/builtin#rune">rune</a> </span><span id="PrefixCompleterInterface.GetChildren" data-kind="method"> GetChildren() []<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a> </span><span id="PrefixCompleterInterface.SetChildren" data-kind="method"> SetChildren(children []<a href="#PrefixCompleterInterface">PrefixCompleterInterface</a>) </span>}</pre> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="RawMode" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L264">RawMode</a> <a class="Documentation-idLink" href="#RawMode" aria-label="Go to RawMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type RawMode struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RawMode.Enter" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RawMode) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L268">Enter</a> <a class="Documentation-idLink" href="#RawMode.Enter" aria-label="Go to RawMode.Enter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RawMode">RawMode</a>) Enter() (err <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RawMode.Exit" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RawMode) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go#L273">Exit</a> <a class="Documentation-idLink" href="#RawMode.Exit" aria-label="Go to RawMode.Exit">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RawMode">RawMode</a>) Exit() <a href="/builtin#error">error</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="RemoteCli" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L287">RemoteCli</a> <a class="Documentation-idLink" href="#RemoteCli" aria-label="Go to RemoteCli">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type RemoteCli struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewRemoteCli" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L298">NewRemoteCli</a> <a class="Documentation-idLink" href="#NewRemoteCli" aria-label="Go to NewRemoteCli">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewRemoteCli(conn <a href="/net">net</a>.<a href="/net#Conn">Conn</a>) (*<a href="#RemoteCli">RemoteCli</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteCli.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteCli) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L414">Close</a> <a class="Documentation-idLink" href="#RemoteCli.Close" aria-label="Go to RemoteCli.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteCli">RemoteCli</a>) Close()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteCli.MarkIsTerminal" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteCli) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L306">MarkIsTerminal</a> <a class="Documentation-idLink" href="#RemoteCli.MarkIsTerminal" aria-label="Go to RemoteCli.MarkIsTerminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteCli">RemoteCli</a>) MarkIsTerminal(is <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteCli.Serve" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteCli) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L418">Serve</a> <a class="Documentation-idLink" href="#RemoteCli.Serve" aria-label="Go to RemoteCli.Serve">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteCli">RemoteCli</a>) Serve() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteCli.ServeBy" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteCli) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L395">ServeBy</a> <a class="Documentation-idLink" href="#RemoteCli.ServeBy" aria-label="Go to RemoteCli.ServeBy">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteCli">RemoteCli</a>) ServeBy(source <a href="/io">io</a>.<a href="/io#Reader">Reader</a>) <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteCli.Write" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteCli) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L337">Write</a> <a class="Documentation-idLink" href="#RemoteCli.Write" aria-label="Go to RemoteCli.Write">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteCli">RemoteCli</a>) Write(b []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="RemoteSvr" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L27">RemoteSvr</a> <a class="Documentation-idLink" href="#RemoteSvr" aria-label="Go to RemoteSvr">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type RemoteSvr struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewRemoteSvr" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L59">NewRemoteSvr</a> <a class="Documentation-idLink" href="#NewRemoteSvr" aria-label="Go to NewRemoteSvr">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewRemoteSvr(conn <a href="/net">net</a>.<a href="/net#Conn">Conn</a>) (*<a href="#RemoteSvr">RemoteSvr</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L192">Close</a> <a class="Documentation-idLink" href="#RemoteSvr.Close" aria-label="Go to RemoteSvr.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) Close() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.EnterRawMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L166">EnterRawMode</a> <a class="Documentation-idLink" href="#RemoteSvr.EnterRawMode" aria-label="Go to RemoteSvr.EnterRawMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) EnterRawMode() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.ExitRawMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L170">ExitRawMode</a> <a class="Documentation-idLink" href="#RemoteSvr.ExitRawMode" aria-label="Go to RemoteSvr.ExitRawMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) ExitRawMode() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.GetWidth" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L245">GetWidth</a> <a class="Documentation-idLink" href="#RemoteSvr.GetWidth" aria-label="Go to RemoteSvr.GetWidth">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) GetWidth() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.GotIsTerminal" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L230">GotIsTerminal</a> <a class="Documentation-idLink" href="#RemoteSvr.GotIsTerminal" aria-label="Go to RemoteSvr.GotIsTerminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) GotIsTerminal(data []<a href="/builtin#byte">byte</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.GotReportWidth" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L238">GotReportWidth</a> <a class="Documentation-idLink" href="#RemoteSvr.GotReportWidth" aria-label="Go to RemoteSvr.GotReportWidth">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) GotReportWidth(data []<a href="/builtin#byte">byte</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.HandleConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L102">HandleConfig</a> <a class="Documentation-idLink" href="#RemoteSvr.HandleConfig" aria-label="Go to RemoteSvr.HandleConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) HandleConfig(cfg *<a href="#Config">Config</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.IsTerminal" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L116">IsTerminal</a> <a class="Documentation-idLink" href="#RemoteSvr.IsTerminal" aria-label="Go to RemoteSvr.IsTerminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) IsTerminal() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.Read" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L127">Read</a> <a class="Documentation-idLink" href="#RemoteSvr.Read" aria-label="Go to RemoteSvr.Read">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) Read(b []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RemoteSvr.Write" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RemoteSvr) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go#L159">Write</a> <a class="Documentation-idLink" href="#RemoteSvr.Write" aria-label="Go to RemoteSvr.Write">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RemoteSvr">RemoteSvr</a>) Write(b []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Result" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L237">Result</a> <a class="Documentation-idLink" href="#Result" aria-label="Go to Result">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Result struct { <span id="Result.Line" data-kind="field"> Line <a href="/builtin#string">string</a> </span><span id="Result.Error" data-kind="field"> Error <a href="/builtin#error">error</a> </span>}</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Result.CanBreak" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Result) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L246">CanBreak</a> <a class="Documentation-idLink" href="#Result.CanBreak" aria-label="Go to Result.CanBreak">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (l *<a href="#Result">Result</a>) CanBreak() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Result.CanContinue" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Result) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go#L242">CanContinue</a> <a class="Documentation-idLink" href="#Result.CanContinue" aria-label="Go to Result.CanContinue">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (l *<a href="#Result">Result</a>) CanContinue() <a href="/builtin#bool">bool</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="RuneBuffer" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L17">RuneBuffer</a> <a class="Documentation-idLink" href="#RuneBuffer" aria-label="Go to RuneBuffer">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type RuneBuffer struct { <span id="RuneBuffer.Mutex" data-kind="field"> <a href="/sync">sync</a>.<a href="/sync#Mutex">Mutex</a> </span> <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewRuneBuffer" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L64">NewRuneBuffer</a> <a class="Documentation-idLink" href="#NewRuneBuffer" aria-label="Go to NewRuneBuffer">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewRuneBuffer(w <a href="/io">io</a>.<a href="/io#Writer">Writer</a>, prompt <a href="/builtin#string">string</a>, cfg *<a href="#Config">Config</a>, width <a href="/builtin#int">int</a>) *<a href="#RuneBuffer">RuneBuffer</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.BackEscapeWord" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L329">BackEscapeWord</a> <a class="Documentation-idLink" href="#RuneBuffer.BackEscapeWord" aria-label="Go to RuneBuffer.BackEscapeWord">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) BackEscapeWord()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Backspace" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L362">Backspace</a> <a class="Documentation-idLink" href="#RuneBuffer.Backspace" aria-label="Go to RuneBuffer.Backspace">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Backspace()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Backup" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L48">Backup</a> <a class="Documentation-idLink" href="#RuneBuffer.Backup" aria-label="Go to RuneBuffer.Backup">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Backup()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Clean" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L613">Clean</a> <a class="Documentation-idLink" href="#RuneBuffer.Clean" aria-label="Go to RuneBuffer.Clean">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Clean()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.CurrentWidth" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L88">CurrentWidth</a> <a class="Documentation-idLink" href="#RuneBuffer.CurrentWidth" aria-label="Go to RuneBuffer.CurrentWidth">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) CurrentWidth(x <a href="/builtin#int">int</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.CursorLineCount" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L446">CursorLineCount</a> <a class="Documentation-idLink" href="#RuneBuffer.CursorLineCount" aria-label="Go to RuneBuffer.CursorLineCount">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) CursorLineCount() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Delete" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L202">Delete</a> <a class="Documentation-idLink" href="#RuneBuffer.Delete" aria-label="Go to RuneBuffer.Delete">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Delete() (success <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.DeleteWord" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L214">DeleteWord</a> <a class="Documentation-idLink" href="#RuneBuffer.DeleteWord" aria-label="Go to RuneBuffer.DeleteWord">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) DeleteWord()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Erase" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L194">Erase</a> <a class="Documentation-idLink" href="#RuneBuffer.Erase" aria-label="Go to RuneBuffer.Erase">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Erase()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.IdxLine" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L432">IdxLine</a> <a class="Documentation-idLink" href="#RuneBuffer.IdxLine" aria-label="Go to RuneBuffer.IdxLine">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) IdxLine(width <a href="/builtin#int">int</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.IsCursorInEnd" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L182">IsCursorInEnd</a> <a class="Documentation-idLink" href="#RuneBuffer.IsCursorInEnd" aria-label="Go to RuneBuffer.IsCursorInEnd">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) IsCursorInEnd() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Kill" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L267">Kill</a> <a class="Documentation-idLink" href="#RuneBuffer.Kill" aria-label="Go to RuneBuffer.Kill">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Kill()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.KillFront" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L253">KillFront</a> <a class="Documentation-idLink" href="#RuneBuffer.KillFront" aria-label="Go to RuneBuffer.KillFront">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) KillFront()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Len" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L133">Len</a> <a class="Documentation-idLink" href="#RuneBuffer.Len" aria-label="Go to RuneBuffer.Len">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Len() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.LineCount" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L383">LineCount</a> <a class="Documentation-idLink" href="#RuneBuffer.LineCount" aria-label="Go to RuneBuffer.LineCount">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) LineCount(width <a href="/builtin#int">int</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveBackward" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L148">MoveBackward</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveBackward" aria-label="Go to RuneBuffer.MoveBackward">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveBackward()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveForward" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L173">MoveForward</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveForward" aria-label="Go to RuneBuffer.MoveForward">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveForward()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveTo" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L391">MoveTo</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveTo" aria-label="Go to RuneBuffer.MoveTo">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveTo(ch <a href="/builtin#rune">rune</a>, prevChar, reverse <a href="/builtin#bool">bool</a>) (success <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveToEndWord" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L307">MoveToEndWord</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveToEndWord" aria-label="Go to RuneBuffer.MoveToEndWord">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveToEndWord()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveToLineEnd" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L373">MoveToLineEnd</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveToLineEnd" aria-label="Go to RuneBuffer.MoveToLineEnd">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveToLineEnd()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveToLineStart" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L139">MoveToLineStart</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveToLineStart" aria-label="Go to RuneBuffer.MoveToLineStart">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveToLineStart()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveToNextWord" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L294">MoveToNextWord</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveToNextWord" aria-label="Go to RuneBuffer.MoveToNextWord">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveToNextWord()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.MoveToPrevWord" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L234">MoveToPrevWord</a> <a class="Documentation-idLink" href="#RuneBuffer.MoveToPrevWord" aria-label="Go to RuneBuffer.MoveToPrevWord">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) MoveToPrevWord() (success <a href="/builtin#bool">bool</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.OnWidthChange" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L42">OnWidthChange</a> <a class="Documentation-idLink" href="#RuneBuffer.OnWidthChange" aria-label="Go to RuneBuffer.OnWidthChange">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) OnWidthChange(newWidth <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Pos" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L127">Pos</a> <a class="Documentation-idLink" href="#RuneBuffer.Pos" aria-label="Go to RuneBuffer.Pos">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Pos() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.PromptLen" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L94">PromptLen</a> <a class="Documentation-idLink" href="#RuneBuffer.PromptLen" aria-label="Go to RuneBuffer.PromptLen">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) PromptLen() <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Refresh" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L450">Refresh</a> <a class="Documentation-idLink" href="#RuneBuffer.Refresh" aria-label="Go to RuneBuffer.Refresh">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Refresh(f func())</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Replace" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L188">Replace</a> <a class="Documentation-idLink" href="#RuneBuffer.Replace" aria-label="Go to RuneBuffer.Replace">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Replace(ch <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Reset" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L542">Reset</a> <a class="Documentation-idLink" href="#RuneBuffer.Reset" aria-label="Go to RuneBuffer.Reset">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Reset() []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Restore" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L54">Restore</a> <a class="Documentation-idLink" href="#RuneBuffer.Restore" aria-label="Go to RuneBuffer.Restore">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Restore()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.RuneSlice" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L105">RuneSlice</a> <a class="Documentation-idLink" href="#RuneBuffer.RuneSlice" aria-label="Go to RuneBuffer.RuneSlice">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) RuneSlice(i <a href="/builtin#int">int</a>) []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Runes" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L119">Runes</a> <a class="Documentation-idLink" href="#RuneBuffer.Runes" aria-label="Go to RuneBuffer.Runes">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Runes() []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Set" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L581">Set</a> <a class="Documentation-idLink" href="#RuneBuffer.Set" aria-label="Go to RuneBuffer.Set">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Set(buf []<a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.SetConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L75">SetConfig</a> <a class="Documentation-idLink" href="#RuneBuffer.SetConfig" aria-label="Go to RuneBuffer.SetConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) SetConfig(cfg *<a href="#Config">Config</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.SetMask" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L82">SetMask</a> <a class="Documentation-idLink" href="#RuneBuffer.SetMask" aria-label="Go to RuneBuffer.SetMask">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) SetMask(m <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.SetOffset" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L468">SetOffset</a> <a class="Documentation-idLink" href="#RuneBuffer.SetOffset" aria-label="Go to RuneBuffer.SetOffset">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) SetOffset(offset <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.SetPrompt" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L585">SetPrompt</a> <a class="Documentation-idLink" href="#RuneBuffer.SetPrompt" aria-label="Go to RuneBuffer.SetPrompt">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) SetPrompt(prompt <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.SetStyle" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L556">SetStyle</a> <a class="Documentation-idLink" href="#RuneBuffer.SetStyle" aria-label="Go to RuneBuffer.SetStyle">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) SetStyle(start, end <a href="/builtin#int">int</a>, style <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.SetWithIdx" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L574">SetWithIdx</a> <a class="Documentation-idLink" href="#RuneBuffer.SetWithIdx" aria-label="Go to RuneBuffer.SetWithIdx">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) SetWithIdx(idx <a href="/builtin#int">int</a>, buf []<a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Transpose" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L274">Transpose</a> <a class="Documentation-idLink" href="#RuneBuffer.Transpose" aria-label="Go to RuneBuffer.Transpose">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Transpose()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.WriteRune" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L161">WriteRune</a> <a class="Documentation-idLink" href="#RuneBuffer.WriteRune" aria-label="Go to RuneBuffer.WriteRune">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) WriteRune(s <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.WriteRunes" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L165">WriteRunes</a> <a class="Documentation-idLink" href="#RuneBuffer.WriteRunes" aria-label="Go to RuneBuffer.WriteRunes">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) WriteRunes(s []<a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.WriteString" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L157">WriteString</a> <a class="Documentation-idLink" href="#RuneBuffer.WriteString" aria-label="Go to RuneBuffer.WriteString">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) WriteString(s <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="RuneBuffer.Yank" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*RuneBuffer) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go#L348">Yank</a> <a class="Documentation-idLink" href="#RuneBuffer.Yank" aria-label="Go to RuneBuffer.Yank">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r *<a href="#RuneBuffer">RuneBuffer</a>) Yank()</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Runes" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L12">Runes</a> <a class="Documentation-idLink" href="#Runes" aria-label="Go to Runes">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Runes struct{}</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.Aggregate" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L190">Aggregate</a> <a class="Documentation-idLink" href="#Runes.Aggregate" aria-label="Go to Runes.Aggregate">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) Aggregate(candicate [][]<a href="/builtin#rune">rune</a>) (same []<a href="/builtin#rune">rune</a>, size <a href="/builtin#int">int</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.Backspace" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L166">Backspace</a> <a class="Documentation-idLink" href="#Runes.Backspace" aria-label="Go to Runes.Backspace">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) Backspace(r []<a href="/builtin#rune">rune</a>) []<a href="/builtin#byte">byte</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.ColorFilter" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L116">ColorFilter</a> <a class="Documentation-idLink" href="#Runes.ColorFilter" aria-label="Go to Runes.ColorFilter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) ColorFilter(r []<a href="/builtin#rune">rune</a>) []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.Copy" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L170">Copy</a> <a class="Documentation-idLink" href="#Runes.Copy" aria-label="Go to Runes.Copy">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) Copy(r []<a href="/builtin#rune">rune</a>) []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.Equal" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L50">Equal</a> <a class="Documentation-idLink" href="#Runes.Equal" aria-label="Go to Runes.Equal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) Equal(a, b []<a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.EqualFold" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L36">EqualFold</a> <a class="Documentation-idLink" href="#Runes.EqualFold" aria-label="Go to Runes.EqualFold">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r <a href="#Runes">Runes</a>) EqualFold(a, b []<a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.EqualRune" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L14">EqualRune</a> <a class="Documentation-idLink" href="#Runes.EqualRune" aria-label="Go to Runes.EqualRune">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) EqualRune(a, b <a href="/builtin#rune">rune</a>, fold <a href="/builtin#bool">bool</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.EqualRuneFold" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L32">EqualRuneFold</a> <a class="Documentation-idLink" href="#Runes.EqualRuneFold" aria-label="Go to Runes.EqualRuneFold">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (r <a href="#Runes">Runes</a>) EqualRuneFold(a, b <a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.HasPrefix" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L183">HasPrefix</a> <a class="Documentation-idLink" href="#Runes.HasPrefix" aria-label="Go to Runes.HasPrefix">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) HasPrefix(r, prefix []<a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.HasPrefixFold" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L176">HasPrefixFold</a> <a class="Documentation-idLink" href="#Runes.HasPrefixFold" aria-label="Go to Runes.HasPrefixFold">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) HasPrefixFold(r, prefix []<a href="/builtin#rune">rune</a>) <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.Index" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L107">Index</a> <a class="Documentation-idLink" href="#Runes.Index" aria-label="Go to Runes.Index">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) Index(r <a href="/builtin#rune">rune</a>, rs []<a href="/builtin#rune">rune</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.IndexAll" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L84">IndexAll</a> <a class="Documentation-idLink" href="#Runes.IndexAll" aria-label="Go to Runes.IndexAll">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (rs <a href="#Runes">Runes</a>) IndexAll(r, sub []<a href="/builtin#rune">rune</a>) <a href="/builtin#int">int</a></pre> </div> <p>Search in runes from front to end </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.IndexAllBck" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L79">IndexAllBck</a> <a class="Documentation-idLink" href="#Runes.IndexAllBck" aria-label="Go to Runes.IndexAllBck">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (rs <a href="#Runes">Runes</a>) IndexAllBck(r, sub []<a href="/builtin#rune">rune</a>) <a href="/builtin#int">int</a></pre> </div> <p>Search in runes from end to front </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.IndexAllBckEx" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L62">IndexAllBckEx</a> <a class="Documentation-idLink" href="#Runes.IndexAllBckEx" aria-label="Go to Runes.IndexAllBckEx">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (rs <a href="#Runes">Runes</a>) IndexAllBckEx(r, sub []<a href="/builtin#rune">rune</a>, fold <a href="/builtin#bool">bool</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.IndexAllEx" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L88">IndexAllEx</a> <a class="Documentation-idLink" href="#Runes.IndexAllEx" aria-label="Go to Runes.IndexAllEx">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (rs <a href="#Runes">Runes</a>) IndexAllEx(r, sub []<a href="/builtin#rune">rune</a>, fold <a href="/builtin#bool">bool</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.TrimSpaceLeft" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L214">TrimSpaceLeft</a> <a class="Documentation-idLink" href="#Runes.TrimSpaceLeft" aria-label="Go to Runes.TrimSpaceLeft">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) TrimSpaceLeft(in []<a href="/builtin#rune">rune</a>) []<a href="/builtin#rune">rune</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.Width" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L146">Width</a> <a class="Documentation-idLink" href="#Runes.Width" aria-label="Go to Runes.Width">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) Width(r <a href="/builtin#rune">rune</a>) <a href="/builtin#int">int</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Runes.WidthAll" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (Runes) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go#L159">WidthAll</a> <a class="Documentation-idLink" href="#Runes.WidthAll" aria-label="Go to Runes.WidthAll">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (<a href="#Runes">Runes</a>) WidthAll(r []<a href="/builtin#rune">rune</a>) (length <a href="/builtin#int">int</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="SegmentComplete" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L38">SegmentComplete</a> <a class="Documentation-idLink" href="#SegmentComplete" aria-label="Go to SegmentComplete">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type SegmentComplete struct { <span id="SegmentComplete.SegmentCompleter" data-kind="field"> <a href="#SegmentCompleter">SegmentCompleter</a> </span>}</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="SegmentAutoComplete" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L32">SegmentAutoComplete</a> <a class="Documentation-idLink" href="#SegmentAutoComplete" aria-label="Go to SegmentAutoComplete">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func SegmentAutoComplete(completer <a href="#SegmentCompleter">SegmentCompleter</a>) *<a href="#SegmentComplete">SegmentComplete</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="SegmentComplete.Do" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*SegmentComplete) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L72">Do</a> <a class="Documentation-idLink" href="#SegmentComplete.Do" aria-label="Go to SegmentComplete.Do">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (c *<a href="#SegmentComplete">SegmentComplete</a>) Do(line []<a href="/builtin#rune">rune</a>, pos <a href="/builtin#int">int</a>) (newLine [][]<a href="/builtin#rune">rune</a>, offset <a href="/builtin#int">int</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="SegmentCompleter" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go#L3">SegmentCompleter</a> <a class="Documentation-idLink" href="#SegmentCompleter" aria-label="Go to SegmentCompleter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type SegmentCompleter interface { <span id="SegmentCompleter.DoSegment" data-kind="method"> <span class="comment">// a</span> </span> <span class="comment">// |- a1</span> <span class="comment">// |--- a11</span> <span class="comment">// |- a2</span> <span class="comment">// b</span> <span class="comment">// input:</span> <span class="comment">// DoTree([], 0) [a, b]</span> <span class="comment">// DoTree([a], 1) [a]</span> <span class="comment">// DoTree([a, ], 0) [a1, a2]</span> <span class="comment">// DoTree([a, a], 1) [a1, a2]</span> <span class="comment">// DoTree([a, a1], 2) [a1]</span> <span class="comment">// DoTree([a, a1, ], 0) [a11]</span> <span class="comment">// DoTree([a, a1, a], 1) [a11]</span> DoSegment([][]<a href="/builtin#rune">rune</a>, <a href="/builtin#int">int</a>) [][]<a href="/builtin#rune">rune</a> }</pre> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="State" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term.go#L25">State</a> <a class="Documentation-idLink" href="#State" aria-label="Go to State">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type State struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <p>State contains the state of a terminal. </p> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="GetState" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term.go#L64">GetState</a> <a class="Documentation-idLink" href="#GetState" aria-label="Go to GetState">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func GetState(fd <a href="/builtin#int">int</a>) (*<a href="#State">State</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>GetState returns the current state of a terminal which may be useful to restore the terminal after a signal. </p> </div><div class="Documentation-typeFunc"> <h4 tabindex="-1" id="MakeRaw" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term.go#L38">MakeRaw</a> <a class="Documentation-idLink" href="#MakeRaw" aria-label="Go to MakeRaw">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func MakeRaw(fd <a href="/builtin#int">int</a>) (*<a href="#State">State</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>MakeRaw put the terminal connected to the given file descriptor into raw mode and returns the previous state of the terminal so that it can be restored. </p> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="TabCompleter" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L21">TabCompleter</a> <a class="Documentation-idLink" href="#TabCompleter" aria-label="Go to TabCompleter">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type TabCompleter struct{}</pre> </div> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="TabCompleter.Do" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*TabCompleter) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go#L23">Do</a> <a class="Documentation-idLink" href="#TabCompleter.Do" aria-label="Go to TabCompleter.Do">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#TabCompleter">TabCompleter</a>) Do([]<a href="/builtin#rune">rune</a>, <a href="/builtin#int">int</a>) ([][]<a href="/builtin#rune">rune</a>, <a href="/builtin#int">int</a>)</pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Terminal" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L12">Terminal</a> <a class="Documentation-idLink" href="#Terminal" aria-label="Go to Terminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Terminal struct { <span class="comment">// contains filtered or unexported fields</span> }</pre> </div> <div class="Documentation-typeFunc"> <h4 tabindex="-1" id="NewTerminal" data-kind="function" class="Documentation-typeFuncHeader"> <span>func <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L26">NewTerminal</a> <a class="Documentation-idLink" href="#NewTerminal" aria-label="Go to NewTerminal">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func NewTerminal(cfg *<a href="#Config">Config</a>) (*<a href="#Terminal">Terminal</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.Bell" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L216">Bell</a> <a class="Documentation-idLink" href="#Terminal.Bell" aria-label="Go to Terminal.Bell">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) Bell()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.Close" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L220">Close</a> <a class="Documentation-idLink" href="#Terminal.Close" aria-label="Go to Terminal.Close">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) Close() <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.EnterRawMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L56">EnterRawMode</a> <a class="Documentation-idLink" href="#Terminal.EnterRawMode" aria-label="Go to Terminal.EnterRawMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) EnterRawMode() (err <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.ExitRawMode" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L60">ExitRawMode</a> <a class="Documentation-idLink" href="#Terminal.ExitRawMode" aria-label="Go to Terminal.ExitRawMode">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) ExitRawMode() (err <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.GetConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L232">GetConfig</a> <a class="Documentation-idLink" href="#Terminal.GetConfig" aria-label="Go to Terminal.GetConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) GetConfig() *<a href="#Config">Config</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.GetOffset" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L79">GetOffset</a> <a class="Documentation-idLink" href="#Terminal.GetOffset" aria-label="Go to Terminal.GetOffset">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) GetOffset(f func(offset <a href="/builtin#string">string</a>))</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.IsReading" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L107">IsReading</a> <a class="Documentation-idLink" href="#Terminal.IsReading" aria-label="Go to Terminal.IsReading">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) IsReading() <a href="/builtin#bool">bool</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.KickRead" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L111">KickRead</a> <a class="Documentation-idLink" href="#Terminal.KickRead" aria-label="Go to Terminal.KickRead">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) KickRead()</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.Print" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L86">Print</a> <a class="Documentation-idLink" href="#Terminal.Print" aria-label="Go to Terminal.Print">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) Print(s <a href="/builtin#string">string</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.PrintRune" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L90">PrintRune</a> <a class="Documentation-idLink" href="#Terminal.PrintRune" aria-label="Go to Terminal.PrintRune">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) PrintRune(r <a href="/builtin#rune">rune</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.ReadRune" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L99">ReadRune</a> <a class="Documentation-idLink" href="#Terminal.ReadRune" aria-label="Go to Terminal.ReadRune">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) ReadRune() <a href="/builtin#rune">rune</a></pre> </div> <p>return rune(0) if meet EOF </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.Readline" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L94">Readline</a> <a class="Documentation-idLink" href="#Terminal.Readline" aria-label="Go to Terminal.Readline">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) Readline() *<a href="#Operation">Operation</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.SetConfig" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L246">SetConfig</a> <a class="Documentation-idLink" href="#Terminal.SetConfig" aria-label="Go to Terminal.SetConfig">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) SetConfig(c *<a href="#Config">Config</a>) <a href="/builtin#error">error</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.SleepToResume" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L43">SleepToResume</a> <a class="Documentation-idLink" href="#Terminal.SleepToResume" aria-label="Go to Terminal.SleepToResume">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) SleepToResume()</pre> </div> <p>SleepToResume will sleep myself, and return only if I'm resumed. </p> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.Write" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L64">Write</a> <a class="Documentation-idLink" href="#Terminal.Write" aria-label="Go to Terminal.Write">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) Write(b []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="Terminal.WriteStdin" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*Terminal) <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go#L70">WriteStdin</a> <a class="Documentation-idLink" href="#Terminal.WriteStdin" aria-label="Go to Terminal.WriteStdin">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (t *<a href="#Terminal">Terminal</a>) WriteStdin(b []<a href="/builtin#byte">byte</a>) (<a href="/builtin#int">int</a>, <a href="/builtin#error">error</a>)</pre> </div> <p>WriteStdin prefill the next Stdin fetch Next time you call ReadLine() this value will be writen before the user input </p> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Termios" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/chzyer/readline/blob/v1.5.1/term_unix.go#L14">Termios</a> <a class="Documentation-idLink" href="#Termios" aria-label="Go to Termios">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type Termios <a href="/syscall">syscall</a>.<a href="/syscall#Termios">Termios</a></pre> </div> </div></section></div> </div> </div> <div class="UnitFiles js-unitFiles"> <h2 class="UnitFiles-title" id="section-sourcefiles"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/insert_drive_file_gm_grey_24dp.svg" alt=""> Source Files <a class="UnitFiles-idLink" href="#section-sourcefiles" aria-label="Go to Source Files">¶</a> </h2> <div class="UnitFiles-titleLink"> <a href="https://github.com/chzyer/readline/tree/v1.5.1" target="_blank" rel="noopener">View all Source files</a> </div> <div> <ul class="UnitFiles-fileList"><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/complete.go" target="_blank" rel="noopener" title="complete.go">complete.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/complete_helper.go" target="_blank" rel="noopener" title="complete_helper.go">complete_helper.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/complete_segment.go" target="_blank" rel="noopener" title="complete_segment.go">complete_segment.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/history.go" target="_blank" rel="noopener" title="history.go">history.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/operation.go" target="_blank" rel="noopener" title="operation.go">operation.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/password.go" target="_blank" rel="noopener" title="password.go">password.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/readline.go" target="_blank" rel="noopener" title="readline.go">readline.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/remote.go" target="_blank" rel="noopener" title="remote.go">remote.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/runebuf.go" target="_blank" rel="noopener" title="runebuf.go">runebuf.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/runes.go" target="_blank" rel="noopener" title="runes.go">runes.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/search.go" target="_blank" rel="noopener" title="search.go">search.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/std.go" target="_blank" rel="noopener" title="std.go">std.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/term.go" target="_blank" rel="noopener" title="term.go">term.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/term_linux.go" target="_blank" rel="noopener" title="term_linux.go">term_linux.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/term_unix.go" target="_blank" rel="noopener" title="term_unix.go">term_unix.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/terminal.go" target="_blank" rel="noopener" title="terminal.go">terminal.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/utils.go" target="_blank" rel="noopener" title="utils.go">utils.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/utils_unix.go" target="_blank" rel="noopener" title="utils_unix.go">utils_unix.go</a> </li><li> <a href="https://github.com/chzyer/readline/blob/v1.5.1/vim.go" target="_blank" rel="noopener" title="vim.go">vim.go</a> </li></ul> </div> </div> <div class="UnitDirectories js-unitDirectories"> <h2 class="UnitDirectories-title" id="section-directories"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/folder_gm_grey_24dp.svg" alt=""> Directories <a class="UnitDirectories-idLink" href="#section-directories" aria-label="Go to Directories">¶</a> </h2> <div class="UnitDirectories-toggles"> <div class="UnitDirectories-toggleButtons"> <button class="js-showInternalDirectories" data-test-id="internal-directories-toggle" data-gtmc="directories button" aria-label="Show Internal Directories"> Show internal </button> <button class="js-expandAllDirectories" data-test-id="directories-toggle" data-gtmc="directories button" aria-label="Expand All Directories"> Expand all </button> </div> </div> <table class="UnitDirectories-table UnitDirectories-table--tree js-expandableTable" data-test-id="UnitDirectories-table"> <tr class="UnitDirectories-tableHeader UnitDirectories-tableHeader--tree"> <th>Path</th> <th class="UnitDirectories-desktopSynopsis">Synopsis</th> </tr> <tr data-aria-controls="example-readline-demo example-readline-im example-readline-multiline example-readline-pass-strength example-readline-remote/readline-remote-client example-readline-remote/readline-remote-server " class=""> <td data-id="example" data-aria-owns="example-readline-demo example-readline-im example-readline-multiline example-readline-pass-strength example-readline-remote/readline-remote-client example-readline-remote/readline-remote-server "> <div class="UnitDirectories-pathCell"> <div><button type="button" class="go-Button go-Button--inline UnitDirectories-toggleButton" aria-expanded="false" aria-label="6 more from" data-aria-controls="example-readline-demo example-readline-im example-readline-multiline example-readline-pass-strength example-readline-remote/readline-remote-client example-readline-remote/readline-remote-server " data-aria-labelledby="example-button example" data-id="example-button"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_right_gm_grey_24dp.svg" alt=""> </button><span>example</span> </td> <td class="UnitDirectories-desktopSynopsis"></td></tr><tr data-id="example-readline-demo" class=""> <td> <div class="UnitDirectories-subdirectory"> <span> <a href="/github.com/chzyer/readline@v1.5.1/example/readline-demo">readline-demo</a> </span> <div class="UnitDirectories-mobileSynopsis"></div> </div> </td> <td class="UnitDirectories-desktopSynopsis"></td><tr data-id="example-readline-im" class=""> <td> <div class="UnitDirectories-subdirectory"> <span> <a href="/github.com/chzyer/readline@v1.5.1/example/readline-im">readline-im</a> </span> <div class="UnitDirectories-mobileSynopsis"></div> </div> </td> <td class="UnitDirectories-desktopSynopsis"></td><tr data-id="example-readline-multiline" class=""> <td> <div class="UnitDirectories-subdirectory"> <span> <a href="/github.com/chzyer/readline@v1.5.1/example/readline-multiline">readline-multiline</a> </span> <div class="UnitDirectories-mobileSynopsis"></div> </div> </td> <td class="UnitDirectories-desktopSynopsis"></td><tr data-id="example-readline-pass-strength" class=""> <td> <div class="UnitDirectories-subdirectory"> <span> <a href="/github.com/chzyer/readline@v1.5.1/example/readline-pass-strength">readline-pass-strength</a> </span> <div class="UnitDirectories-mobileSynopsis">This is a small example using readline to read a password and check it's strength while typing using the zxcvbn library.</div> </div> </td> <td class="UnitDirectories-desktopSynopsis">This is a small example using readline to read a password and check it's strength while typing using the zxcvbn library.</td><tr data-id="example-readline-remote/readline-remote-client" class=""> <td> <div class="UnitDirectories-subdirectory"> <span> <a href="/github.com/chzyer/readline@v1.5.1/example/readline-remote/readline-remote-client">readline-remote/readline-remote-client</a> </span> <div class="UnitDirectories-mobileSynopsis"></div> </div> </td> <td class="UnitDirectories-desktopSynopsis"></td><tr data-id="example-readline-remote/readline-remote-server" class=""> <td> <div class="UnitDirectories-subdirectory"> <span> <a href="/github.com/chzyer/readline@v1.5.1/example/readline-remote/readline-remote-server">readline-remote/readline-remote-server</a> </span> <div class="UnitDirectories-mobileSynopsis"></div> </div> </td> <td class="UnitDirectories-desktopSynopsis"></td></tr> <tr class=""> <td data-id="runes" data-aria-owns=""> <div class="UnitDirectories-pathCell"> <div><a href="/github.com/chzyer/readline@v1.5.1/runes">runes</a> </div> <div class="UnitDirectories-mobileSynopsis">deprecated.</div> </div> </td> <td class="UnitDirectories-desktopSynopsis">deprecated.</td></tr></tr> </table> </div> </div> </div> <div id="showInternal-description" hidden> Click to show internal directories. </div> <div id="hideInternal-description" hidden> Click to hide internal directories. </div> </article> <footer class="go-Main-footer"></footer> </main> <footer class="go-Footer"> <div class="go-Footer-links"> <div class="go-Footer-linkColumn"> <a href="https://go.dev/solutions" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Why Go </a> <a href="https://go.dev/solutions#use-cases" class="go-Footer-link" data-gtmc="footer link"> Use Cases </a> <a href="https://go.dev/solutions#case-studies" class="go-Footer-link" data-gtmc="footer link"> Case Studies </a> </div> <div class="go-Footer-linkColumn"> <a href="https://learn.go.dev/" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Get Started </a> <a href="https://play.golang.org" class="go-Footer-link" data-gtmc="footer link"> Playground </a> <a href="https://tour.golang.org" class="go-Footer-link" data-gtmc="footer link"> Tour </a> <a href="https://stackoverflow.com/questions/tagged/go?tab=Newest" class="go-Footer-link" data-gtmc="footer link"> Stack Overflow </a> <a href="https://go.dev/help" class="go-Footer-link" data-gtmc="footer link"> Help </a> </div> <div class="go-Footer-linkColumn"> <a href="https://pkg.go.dev" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Packages </a> <a href="/std" class="go-Footer-link" data-gtmc="footer link"> Standard Library </a> <a href="/golang.org/x" class="go-Footer-link" data-gtmc="footer link"> Sub-repositories </a> <a href="https://pkg.go.dev/about" class="go-Footer-link" data-gtmc="footer link"> About Go Packages </a> </div> <div class="go-Footer-linkColumn"> <a href="https://go.dev/project" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> About </a> <a href="https://go.dev/dl/" class="go-Footer-link" data-gtmc="footer link">Download</a> <a href="https://go.dev/blog" class="go-Footer-link" data-gtmc="footer link">Blog</a> <a href="https://github.com/golang/go/issues" class="go-Footer-link" data-gtmc="footer link"> Issue Tracker </a> <a href="https://go.dev/doc/devel/release.html" class="go-Footer-link" data-gtmc="footer link"> Release Notes </a> <a href="https://blog.golang.org/go-brand" class="go-Footer-link" data-gtmc="footer link"> Brand Guidelines </a> <a href="https://go.dev/conduct" class="go-Footer-link" data-gtmc="footer link"> Code of Conduct </a> </div> <div class="go-Footer-linkColumn"> <a href="https://www.twitter.com/golang" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Connect </a> <a href="https://www.twitter.com/golang" class="go-Footer-link" data-gtmc="footer link"> Twitter </a> <a href="https://github.com/golang" class="go-Footer-link" data-gtmc="footer link">GitHub</a> <a href="https://invite.slack.golangbridge.org/" class="go-Footer-link" data-gtmc="footer link"> Slack </a> <a href="https://reddit.com/r/golang" class="go-Footer-link" data-gtmc="footer link"> r/golang </a> <a href="https://www.meetup.com/pro/go" class="go-Footer-link" data-gtmc="footer link"> Meetup </a> <a href="https://golangweekly.com/" class="go-Footer-link" data-gtmc="footer link"> Golang Weekly </a> </div> </div> <div class="go-Footer-bottom"> <img class="go-Footer-gopher" width="1431" height="901" src="/static/shared/gopher/pilot-bust-1431x901.svg" alt="Gopher in flight goggles"> <ul class="go-Footer-listRow"> <li class="go-Footer-listItem"> <a href="https://go.dev/copyright" data-gtmc="footer link">Copyright</a> </li> <li class="go-Footer-listItem"> <a href="https://go.dev/tos" data-gtmc="footer link">Terms of Service</a> </li> <li class="go-Footer-listItem"> <a href="http://www.google.com/intl/en/policies/privacy/" data-gtmc="footer link" target="_blank" rel="noopener"> Privacy Policy </a> </li> <li class="go-Footer-listItem"> <a href="https://go.dev/s/pkgsite-feedback" target="_blank" rel="noopener" data-gtmc="footer link"> Report an Issue </a> </li> <li class="go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-toggleTheme js-toggleTheme" aria-label="Theme Toggle"> <img data-value="auto" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/brightness_6_gm_grey_24dp.svg" alt="System theme"> <img data-value="dark" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/brightness_2_gm_grey_24dp.svg" alt="Dark theme"> <img data-value="light" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/light_mode_gm_grey_24dp.svg" alt="Light theme"> <p> Theme Toggle </p> </button> </li> <li class="go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-keyboard js-openShortcuts" aria-label="Shorcuts Modal"> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/keyboard_grey_24dp.svg" alt=""> <p> Shortcuts Modal </p> </button> </li> </ul> <a class="go-Footer-googleLogo" href="https://google.com" target="_blank"rel="noopener" data-gtmc="footer link"> <img class="go-Footer-googleLogoImg" height="24" width="72" src="/static/shared/logo/google-white.svg" alt="Google logo"> </a> </div> </footer> <dialog id="jump-to-modal" class="JumpDialog go-Modal go-Modal--md js-modal"> <form method="dialog" data-gmtc="jump to form" aria-label="Jump to Identifier"> <div class="Dialog-title go-Modal-header"> <h2>Jump to</h2> <button class="go-Button go-Button--inline" type="button" data-modal-close data-gtmc="modal button" aria-label="Close" > <img class="go-Icon" height="24" width="24" src="/static/shared/icon/close_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="JumpDialog-filter"> <input class="JumpDialog-input go-Input" autocomplete="off" type="text"> </div> <div class="JumpDialog-body go-Modal-body"> <div class="JumpDialog-list"></div> </div> <div class="go-Modal-actions"> <button class="go-Button" data-test-id="close-dialog">Close</button> </div> </form> </dialog> <dialog class="ShortcutsDialog go-Modal go-Modal--sm js-modal"> <form method="dialog"> <div class="go-Modal-header"> <h2>Keyboard shortcuts</h2> <button class="go-Button go-Button--inline" type="button" data-modal-close data-gtmc="modal button" aria-label="Close" > <img class="go-Icon" height="24" width="24" src="/static/shared/icon/close_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="go-Modal-body"> <table> <tbody> <tr><td class="ShortcutsDialog-key"> <strong>?</strong></td><td> : This menu</td> </tr> <tr><td class="ShortcutsDialog-key"> <strong>/</strong></td><td> : Search site</td> </tr> <tr><td class="ShortcutsDialog-key"> <strong>f</strong> or <strong>F</strong></td><td> : Jump to</td> </tr> <tr> <td class="ShortcutsDialog-key"><strong>y</strong> or <strong>Y</strong></td> <td> : Canonical URL</td> </tr> </tbody> </table> </div> <div class="go-Modal-actions"> <button class="go-Button" data-test-id="close-dialog">Close</button> </div> </form> </dialog> <section class="Cookie-notice js-cookieNotice"> <div>go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. <a target=_blank href="https://policies.google.com/technologies/cookies">Learn more.</a></div> <div><button class="go-Button">Okay</button></div> </section> <script> // this will throw if the querySelector can’t find the element const gtmId = document.querySelector('.js-gtmID').dataset.gtmid; if (!gtmId) { throw new Error('Google Tag Manager ID not found'); } loadScript(`https://www.googletagmanager.com/gtm.js?id=${gtmId}`); </script> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8MVQXG" height="0" width="0" style="display:none;visibility:hidden"> </iframe> </noscript> <div class="js-canonicalURLPath" data-canonical-url-path="/github.com/chzyer/readline@v1.5.1" hidden></div> <div class="js-playgroundVars" data-modulepath="github.com/chzyer/readline" data-version="v1.5.1" hidden></div> <script> loadScript('/static/frontend/unit/main/main.js') </script> <script> loadScript('/static/frontend/unit/unit.js') </script> </body> </html>