{"id":23191928,"url":"https://github.com/moold/hh","last_synced_at":"2025-10-17T23:28:25.549Z","repository":{"id":103035697,"uuid":"484942232","full_name":"moold/hh","owner":"moold","description":"Quickly save useful bash commands","archived":false,"fork":false,"pushed_at":"2023-03-16T13:26:44.000Z","size":37,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T11:21:19.472Z","etag":null,"topics":["bioinformatics","command","history"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moold.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-04-24T06:15:46.000Z","updated_at":"2023-03-06T11:07:11.000Z","dependencies_parsed_at":"2025-02-10T14:38:03.252Z","dependency_job_id":"ffda23bf-8b53-4e17-8a39-15566def19da","html_url":"https://github.com/moold/hh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moold/hh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moold%2Fhh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moold%2Fhh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moold%2Fhh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moold%2Fhh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moold","download_url":"https://codeload.github.com/moold/hh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moold%2Fhh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260852155,"owners_count":23072604,"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":["bioinformatics","command","history"],"created_at":"2024-12-18T12:19:27.217Z","updated_at":"2025-10-17T23:28:25.542Z","avatar_url":"https://github.com/moold.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hh\nQuickly save useful bash commands. `hh` is designed to save useful commands you just ran, not aim to save all command records.\n\n## Motivation\nAs a bioinformatics researcher, I use `Linux Bash` most of my work time. Many projects usually span months or even years, some analytical workflow or details often need to be backtracked when the project is to be completed. So in this case, I have to save some important bash commands. I usually use `vim` to open a file and paste the commands that have just been ran into this file, and this is a very troublesome :anguished: thing, becasue I need to do it again and again. Also, if the saved command has errors or is dupulicated, I have to handled it by manually. `hh` was designed to solve this problem. When you type `hh`, `hh` will automatically save the commands you just ran, and ignore some simple commands (from user settings).\n\n## Features\n* Easily and quickly, hit the keyboard twice and finished within \u003c= 10ms.\n* Ignore some simple commands, such `ls`, `less` et., al. Any commands with pipe (`|`) or redirect (`\u003e`, `\u003e\u003e`, `1\u003e`, `2\u003e`) will not be ignored.\n* Ignore duplicate commands\n* Save multiple commands at once\n* Undo the last insert operation easily\n* Save commands with time and user\n\n## Installation\n\n#### Dependencies\n\n`hh` is written in rust, try below commands (no root required) or see [here](https://www.rust-lang.org/tools/install) to install `Rust` first.\n```\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\n#### Download and install\n\n```\ngit clone https://github.com/moold/hh.git\ncd hh \u0026\u0026 cargo build --release\n```\n\n#### Configure \n```\necho \"source `pwd`/env/hh.profile\" \u003e\u003e $HOME/.bash_profile\n```\n***Note*** :\n* You can refresh your environment variables by `source $HOME/.bash_profile` if you don't want to relogin but want to use `hh` immediately.\n* You can change the `HISTIGNORE` and `HHIGNORE` variable in the file `./env/hh.profile` to change the default commands that ignored by `hh`.\n\n## Usage\n* Save one command you just run: \n```\nhh\n```\nThis will generate a file named `hh.sh` in the current directory.\n\n* Save N (the number you want to save) commands you just run:\n```\nhh N\n```\n*  Reset the last insert operation or delete the last inserted content: \n```\nhh -r\n```\n* Only record the fourth record from last: \n```\nhh -i 4\n```\n\n## Parameters\nUse `hh -h` to see options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoold%2Fhh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoold%2Fhh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoold%2Fhh/lists"}