{"id":20744606,"url":"https://github.com/npezza93/tty-fzy","last_synced_at":"2026-04-16T15:03:08.280Z","repository":{"id":73219727,"uuid":"221074704","full_name":"npezza93/tty-fzy","owner":"npezza93","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-19T00:16:05.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T02:28:19.959Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/npezza93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-11-11T21:37:33.000Z","updated_at":"2019-11-19T00:16:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"57d9a460-95c1-47bb-a26e-befd7dccc017","html_url":"https://github.com/npezza93/tty-fzy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Ftty-fzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Ftty-fzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Ftty-fzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Ftty-fzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npezza93","download_url":"https://codeload.github.com/npezza93/tty-fzy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243039585,"owners_count":20226131,"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":[],"created_at":"2024-11-17T07:16:20.343Z","updated_at":"2026-04-16T15:03:08.212Z","avatar_url":"https://github.com/npezza93.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TTY::Fzy\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tty-fzy'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tty-fzy\n\n## Usage\n\n`TTY::Fzy` can have its `tty`, `prompt`, and `lines` configured by doing the following. The current values listed are the defaults.\n\n```ruby\nTTY::Fzy.configure do |config|\n  config.tty = \"/dev/tty\"\n  config.promt = '❯ '\n  config.lines = 10\nend\n```\n\nTo create a prompt:\n```ruby\nTTY::Fzy.new(choices: ['choice1', 'choice2'])\n```\n![Imgur](https://i.imgur.com/KNZB8Xd.gif)\n\nAlternatively, you can pass an array of hashes to modify the choice list.\n```ruby\n# Same as above\nTTY::Fzy.new(choices: [{ text: 'choice1' }, { text: 'choice2' }])\n\n# The alt text will show up dimmer next to the text and wont be filterable.\nTTY::Fzy.new(choices: [\n  { text: 'choice1', alt: 'path' },\n  { text: 'choice2', alt: 'path2' }\n])\n\n# The return text is what is returned once an option is selected. It won't be shown in the filter and cannot be searched.\nTTY::Fzy.new(choices: [\n  { text: 'choice1', returns: 'choice:1:1' },\n  { text: 'choice2', returns: 'path2:1:1' }\n])\n```\n\n![Imgur](https://i.imgur.com/w40Ac4r.gif)\n\nThen call `call` on a `TTY::Fzy` instance to trigger the prompt and output it to the configured `output`.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/npezza93/tty-fzy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the tty-fzy project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/npezza93/tty-fzy/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpezza93%2Ftty-fzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpezza93%2Ftty-fzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpezza93%2Ftty-fzy/lists"}