{"id":17157138,"url":"https://github.com/diegovsky/zsh-module-rs","last_synced_at":"2025-04-13T13:31:29.473Z","repository":{"id":65307721,"uuid":"589442179","full_name":"Diegovsky/zsh-module-rs","owner":"Diegovsky","description":"A high level Rust crate for creating zsh modules","archived":false,"fork":false,"pushed_at":"2025-01-24T17:07:59.000Z","size":221,"stargazers_count":32,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T04:51:24.559Z","etag":null,"topics":["rust","zsh"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Diegovsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-01-16T05:48:33.000Z","updated_at":"2025-02-20T01:54:41.000Z","dependencies_parsed_at":"2024-02-08T14:30:29.996Z","dependency_job_id":"288439c9-933e-4df5-876c-794d3921bbec","html_url":"https://github.com/Diegovsky/zsh-module-rs","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/Diegovsky%2Fzsh-module-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diegovsky%2Fzsh-module-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diegovsky%2Fzsh-module-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diegovsky%2Fzsh-module-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Diegovsky","download_url":"https://codeload.github.com/Diegovsky/zsh-module-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248721063,"owners_count":21151039,"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":["rust","zsh"],"created_at":"2024-10-14T22:08:21.739Z","updated_at":"2025-04-13T13:31:24.458Z","avatar_url":"https://github.com/Diegovsky.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zsh Module \u0026emsp; [![Latest Version]][crates.io]\n\n[Latest Version]: https://img.shields.io/crates/v/zsh-module\n[crates.io]: https://crates.io/crates/zsh-module\n\nThis is a high level crate that allows you to define your own zsh module. It is in a very early state but it can be used to define commands.\n\nIn the future, most zsh module functionality will be added. Feel free to send a PR if you would like to add more functionality :)\n\nFeatures: \n  - [x] Define custom builtin commands\n    - [x] Define and query used flags\n  - [x] Call into `zsh`\n  - [ ] Query environment variables\n    - As a workaround: can be done using the `std::os` APIs.\n  - [ ] Use zsh's current `stdin` fd.\n    - You can use `std::io::stdin`, but it can break in specific ocasions.\n  - [ ] Define custom builtin math functions\n  - [ ] Define custom global variables\n  - [ ] More to come!\n\n## Getting started\nTake a look at our online [documentation](https://docs.rs/zsh-module/latest/zsh-module) for a quick guide.\n\n## Example module\nMaking a module is very easy, here's an excerpt from our example module [`greeter`]\n\n```rust\nuse zsh_module::{Builtin, MaybeError, Module, ModuleBuilder, Opts};\n\n// Notice how this module gets installed as `rgreeter`\nzsh_module::export_module!(rgreeter, setup);\n\nstruct Greeter;\n\nimpl Greeter {\n    fn greet_cmd(\u0026mut self, _name: \u0026str, _args: \u0026[\u0026str], _opts: Opts) -\u003e MaybeError {\n        println!(\"Hello, world!\");\n        Ok(())\n    }\n}\n\nfn setup() -\u003e Result\u003cModule, Box\u003cdyn std::error::Error\u003e\u003e {\n    let module = ModuleBuilder::new(Greeter)\n        .builtin(Greeter::greet_cmd, Builtin::new(\"greet\"))\n        .build();\n    Ok(module)\n}\n```\n\n[`greeter`]: https://github.com/Diegovsky/zsh-module-rs/tree/master/greeter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovsky%2Fzsh-module-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegovsky%2Fzsh-module-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovsky%2Fzsh-module-rs/lists"}