{"id":15692073,"url":"https://github.com/kyrylo/linenoise-rb","last_synced_at":"2025-05-08T02:23:17.353Z","repository":{"id":66243587,"uuid":"158965360","full_name":"kyrylo/linenoise-rb","owner":"kyrylo","description":"A Ruby wrapper around the small self-contained alternative to Readline and Libedit called Linenoise (https://github.com/antirez/linenoise).","archived":false,"fork":false,"pushed_at":"2020-03-18T07:29:35.000Z","size":44,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T00:51:12.782Z","etag":null,"topics":["console","libedit","linenoise","readline","readline-interface","terminal"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyrylo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-24T19:02:10.000Z","updated_at":"2021-05-28T19:46:31.000Z","dependencies_parsed_at":"2023-04-06T05:06:10.215Z","dependency_job_id":null,"html_url":"https://github.com/kyrylo/linenoise-rb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Flinenoise-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Flinenoise-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Flinenoise-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Flinenoise-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyrylo","download_url":"https://codeload.github.com/kyrylo/linenoise-rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252985021,"owners_count":21835902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","libedit","linenoise","readline","readline-interface","terminal"],"created_at":"2024-10-03T18:28:42.747Z","updated_at":"2025-05-08T02:23:17.318Z","avatar_url":"https://github.com/kyrylo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Linenoise Ruby\n==============\n\n[![CircleCI](https://circleci.com/gh/kyrylo/linenoise-rb.svg?style=svg)](https://circleci.com/gh/kyrylo/linenoise-rb)\n[![Gem Version](https://badge.fury.io/rb/linenoise.svg)](http://badge.fury.io/rb/linenoise)\n[![Documentation Status](http://inch-ci.org/github/kyrylo/linenoise.svg?branch=master)](http://inch-ci.org/github/kyrylo/linenoise)\n[![Downloads](https://img.shields.io/gem/dt/linenoise.svg?style=flat)](https://rubygems.org/gems/linenoise)\n\n* [Documentation][documentation]\n\nIntroduction\n------------\n\nThe Linenoise gem is a wrapper around the small self-contained alternative to\nReadline and Libedit called [Linenoise](https://github.com/antirez/linenoise).\n\nFeatures\n--------\n\n* History support\n* Completion\n* Hints (suggestions at the right of the prompt as you type)\n* Single and multiline editing mode with the usual key bindings\n\nInstallation\n------------\n\n### Bundler\n\nAdd the Linenoise gem to your Gemfile:\n\n```ruby\ngem 'linenoise', '~\u003e 1.1'\n```\n\n### Manual\n\nInvoke the following command from your terminal:\n\n```sh\ngem install linenoise\n```\n\nExamples\n--------\n\n### Basic example\n\n```ruby\nrequire 'linenoise'\n\nwhile buf = Linenoise.linenoise('\u003e ')\n  p buf\nend\n```\n\n### Completion\n\n```ruby\nrequire 'linenoise'\n\nLIST = %w[\n  search download open help history quit url next clear prev past\n].freeze\n\nLinenoise.completion_proc = proc do |input|\n  LIST.grep(/\\A#{Regexp.escape(input)}/)\nend\n\nwhile line = Linenoise.linenoise('\u003e ')\n  p line\nend\n```\n\n### Hints\n\n```ruby\nrequire 'linenoise'\n\nLinenoise.hint_proc = proc do |input|\n  case input\n  when /git show/\n    ' [\u003coptions\u003e] [\u003cobject\u003e...]'\n  when /git log/\n    ' [\u003coptions\u003e] [\u003crevision range\u003e]'\n  else\n    ' --help'\n  end\nend\n\nwhile line = Linenoise.linenoise('\u003e ')\n  p line\nend\n```\n\nMore examples and full API explanation is available on the\n[documentation][documentation] page.\n\nDevelopment\n-----------\n\n### Running tests\n\n```sh\nbundle exec rake compile spec\n```\n\n### Launching development console\n\n```\nbundle exec rake compile console\n```\n\nContact\n-------\n\nIn case you have a problem, question or a bug report, feel free to:\n\n* [file an issue](https://github.com/kyrylo/linenoise-rb/issues)\n* send me an email (see https://github.com/kyrylo)\n* [tweet at me](https://twitter.com/kyrylosilin)\n\nLicense\n-------\n\nThe project uses the MIT License. See LICENSE.md for details.\n\n[documentation]: https://www.rubydoc.info/github/kyrylo/linenoise-rb/Linenoise\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyrylo%2Flinenoise-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyrylo%2Flinenoise-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyrylo%2Flinenoise-rb/lists"}