{"id":13438582,"url":"https://github.com/MovingtoMars/liner","last_synced_at":"2025-03-20T06:30:47.411Z","repository":{"id":62442273,"uuid":"62427772","full_name":"MovingtoMars/liner","owner":"MovingtoMars","description":"A readline-like library in Rust.","archived":false,"fork":false,"pushed_at":"2023-01-04T03:58:30.000Z","size":156,"stargazers_count":75,"open_issues_count":26,"forks_count":24,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T07:41:08.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/MovingtoMars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-02T01:11:38.000Z","updated_at":"2025-02-07T10:36:36.000Z","dependencies_parsed_at":"2023-02-01T19:47:16.595Z","dependency_job_id":null,"html_url":"https://github.com/MovingtoMars/liner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MovingtoMars%2Fliner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MovingtoMars%2Fliner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MovingtoMars%2Fliner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MovingtoMars%2Fliner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MovingtoMars","download_url":"https://codeload.github.com/MovingtoMars/liner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244564970,"owners_count":20473167,"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-07-31T03:01:06.638Z","updated_at":"2025-03-20T06:30:42.402Z","avatar_url":"https://github.com/MovingtoMars.png","language":"Rust","readme":"# liner\nA Rust library offering readline-like functionality.\n\n[CONTRIBUTING.md](/CONTRIBUTING.md)\n\n[![crates.io](https://meritbadge.herokuapp.com/liner)](https://crates.io/crates/liner)\n[![Build Status](https://travis-ci.org/MovingtoMars/liner.svg)](https://travis-ci.org/MovingtoMars/liner)\n[![Docs](https://docs.rs/liner/badge.svg)](https://docs.rs/liner/)\n\n## Featues\n- [x] Autosuggestions\n- [x] Emacs and Vi keybindings\n- [x] Multi-line editing\n- [x] History\n- [x] (Incomplete) basic and filename completions\n- [ ] Reverse search\n- [ ] Remappable keybindings\n\n## Basic Usage\nIn `Cargo.toml`:\n```toml\n[dependencies]\nliner = \"0.4.3\"\n...\n```\n\nIn `src/main.rs`:\n\n```rust\nextern crate liner;\n\nuse liner::Context;\n\nfn main() {\n    let mut con = Context::new();\n\n    loop {\n        let res = con.read_line(\"[prompt]$ \", \u0026mut |_| {}).unwrap();\n\n        if res.is_empty() {\n            break;\n        }\n\n        con.history.push(res.into());\n    }\n}\n```\n\n**See src/main.rs for a more sophisticated example.**\n\n## License\nMIT licensed. See the `LICENSE` file.\n","funding_links":[],"categories":["Libraries","库 Libraries","库"],"sub_categories":["Command-line","命令行 Command-line","命令行"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMovingtoMars%2Fliner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMovingtoMars%2Fliner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMovingtoMars%2Fliner/lists"}