{"id":21843354,"url":"https://github.com/farghul/redundancy","last_synced_at":"2026-02-03T21:04:58.754Z","repository":{"id":250238547,"uuid":"822916781","full_name":"farghul/redundancy","owner":"farghul","description":"A RubyGem that deletes duplicate entries from Terminal's zsh, bash, and irb history files.","archived":false,"fork":false,"pushed_at":"2024-11-25T18:49:34.000Z","size":375,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T05:23:49.150Z","etag":null,"topics":["gem","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farghul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2024-07-02T04:56:12.000Z","updated_at":"2024-11-25T18:49:37.000Z","dependencies_parsed_at":"2025-04-14T12:06:49.389Z","dependency_job_id":"faa85932-8463-4ecb-bffc-11fed9874af9","html_url":"https://github.com/farghul/redundancy","commit_stats":null,"previous_names":["farghul/redundancy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/farghul/redundancy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farghul%2Fredundancy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farghul%2Fredundancy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farghul%2Fredundancy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farghul%2Fredundancy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farghul","download_url":"https://codeload.github.com/farghul/redundancy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farghul%2Fredundancy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29057119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gem","ruby"],"created_at":"2024-11-27T22:14:54.594Z","updated_at":"2026-02-03T21:04:58.732Z","avatar_url":"https://github.com/farghul.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redundancy\n\n[![Gem Version](https://badge.fury.io/rb/redundancy.svg)](https://badge.fury.io/rb/redundancy)\n\nRedundancy is a RubyGem that loads the .zsh_history, .bash_history, .irb_history files, and applies the built-in Ruby ***uniq!*** function to trim any duplicate commands present. It then writes the filtered output back to the appropriate file.\n\n## Install\n\nInstall the gem with:\n\n```bash\ngem install redundancy\n```\n\nOr add to your Gemfile:\n\n```bash\ngem \"redundancy\"\n```\n\n## Usage\n\nYou simply need to call the gem by name. The effects of the command execution will not be seen until you restart terminal:\n\n```bash\nredundancy\n```\n\n## Source Code\n\n```ruby\n#!/usr/bin/env ruby\n$stdin.flush\n$stdout.flush\n$stdout.sync = true\n\narr = [\"/.bash_history\", \"/.irb_history\", \"/.zsh_history\"]\n\nfor i in arr do\n    l = Dir.home + i\n    e = File.readlines(l)\n    e.uniq!\n    f = File.open(l, \"w\")\n\n    e.each do |line|\n        f.puts(line)\n    end\n    f.close\nend\n```\n\n## Apple Shortcuts\n\nThe source code works better as an Apple Shortcut, as there is a significant delay running **redundancy** when Terminal is open (several closings and reopenings).\n\n![Apple](apple.webp)\n\n## License\n\nCode is distributed under [The Unlicense](https://github.com/farghul/redundancy/blob/main/LICENSE.md) and is part of the Public Domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarghul%2Fredundancy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarghul%2Fredundancy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarghul%2Fredundancy/lists"}