{"id":25856415,"url":"https://github.com/m42e/zsh-histdb-skim","last_synced_at":"2025-03-01T18:18:00.765Z","repository":{"id":40562037,"uuid":"474992334","full_name":"m42e/zsh-histdb-skim","owner":"m42e","description":"A zsh histdb browser using skim. Implemented in rust.","archived":false,"fork":false,"pushed_at":"2025-01-25T07:02:13.000Z","size":118,"stargazers_count":30,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T19:16:27.124Z","etag":null,"topics":["fuzzy","history","history-management","skim","zsh"],"latest_commit_sha":null,"homepage":"","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/m42e.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-03-28T12:28:59.000Z","updated_at":"2025-01-24T21:14:11.000Z","dependencies_parsed_at":"2024-06-01T14:15:44.950Z","dependency_job_id":"b891cb90-3a8e-4ff7-8572-9f8a778f6bb9","html_url":"https://github.com/m42e/zsh-histdb-skim","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m42e%2Fzsh-histdb-skim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m42e%2Fzsh-histdb-skim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m42e%2Fzsh-histdb-skim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m42e%2Fzsh-histdb-skim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m42e","download_url":"https://codeload.github.com/m42e/zsh-histdb-skim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241404450,"owners_count":19957658,"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":["fuzzy","history","history-management","skim","zsh"],"created_at":"2025-03-01T18:18:00.071Z","updated_at":"2025-03-01T18:18:00.752Z","avatar_url":"https://github.com/m42e.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zsh-histdb-skim\n\nThis is a reimplementation of https://github.com/m42e/zsh-histdb-fzf in rust and using skim as a library.\n\n## Why\n\n[zsh-histdb-fzf](https://github.com/m42e/zsh-histdb-fzf) works, but it is a bit quirky. It has for sure some flaws, regarding responsiveness and communication with processes.\n[skim](https://github.com/lotabout/skim) offers a fzf like behavior and is available as library in rust. It lacks some highlighting in the header, and has a bit different order/matching algorithm.\n\nThis should result in better performance, responsiveness and a more stable behavior.\n\n## Why rust?\n\n[skim](https://github.com/lotabout/skim) is available in rust. I have never tried rust with a purpose before. I wanted to give it a try and learn something new.\n\n## How it works\n\nWell, it accesses the [zsh histdb](https://github.com/larkery/zsh-histdb). It lets you search on different levels.\n\n## What do you have to do?\n\nInstall the plugin, e.g. using [zplug](https://github.com/zplug/zplug).\n\n```\n  zplug 'm42e/zsh-histdb-skim', from:github, at:main\n```\n\nIt downloads the binary (if available) automatically. You can do manually by calling `histdb-skim-download`. It will be saved in `${XDG_DATA_HOME}/zsh-histdb-skim`, alternatively `${HOME}/.local/share/zsh-histdb-skim`. You can specify the directory manually by setting `HISTDB_SKIM_PATH`.\n\nThe download will happen if the executable is not there or the version is outdated (starting from v0.7.0). These checks happen when sourcing the script.\n\n\nThe plugin calls `bindkey` but some other plugins may overwrite. In this case you would have to do it yourself:\n\n```\nbindkey '^R' histdb-skim-widget\n```\n\n\n## Additional information\n\nBy default the binary is downloaded\n\n\n## Building\n\n```\ncargo build --release\nmkdir -p bin\nmv target/release/zsh-histdb-skim bin\n```\n\n## Environment Variables\n\n- **HISTDB_FZF_FORCE_DATE_FORMAT**: You can force us or non-us time format.\n- **HISTDB_FILE**: SQLite file, having all the commands. (is set by zsh-histdb)\n- **HISTDB_SESSION**: The current session id (is set by zsh-histdb)\n- **HISTDB_HOST**: The current hostname (is set by zsh-histdb)\n- **HISTDB_NOSORT**: Do not sort within skim. If set, the order of the commands is kept\n- **HISTDB_PREVIEW**: This defines the format/position of the preview window. `[POSITION][:SIZE[%]][:wrap][:hidden][:+SCROLL[-OFFSET]]`\n- **HISTDB_DEFAULT_TAB**: Set the default tab. Directory|Machine or Host|Everything or *|Session (any non matching value will be treated as Session)\n\n# TODO\n- improve rust code\n\n# Apologies 😉\n\nWhile I stole the idea from myself, this is my first rust project ever. So I would be glad for tips and improvement PRs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm42e%2Fzsh-histdb-skim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm42e%2Fzsh-histdb-skim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm42e%2Fzsh-histdb-skim/lists"}