{"id":27896369,"url":"https://github.com/onlyuser/sh","last_synced_at":"2025-10-14T00:03:54.969Z","repository":{"id":3470983,"uuid":"4525796","full_name":"onlyuser/sh","owner":"onlyuser","description":"sh is a collection of handy shell scripts","archived":false,"fork":false,"pushed_at":"2018-12-27T16:21:33.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T00:03:39.054Z","etag":null,"topics":["bash-script"],"latest_commit_sha":null,"homepage":"http://onlyuser.github.io/","language":"Shell","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/onlyuser.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}},"created_at":"2012-06-02T00:55:23.000Z","updated_at":"2019-05-26T23:31:06.000Z","dependencies_parsed_at":"2022-09-04T03:22:40.675Z","dependency_job_id":null,"html_url":"https://github.com/onlyuser/sh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onlyuser/sh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyuser%2Fsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyuser%2Fsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyuser%2Fsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyuser%2Fsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onlyuser","download_url":"https://codeload.github.com/onlyuser/sh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyuser%2Fsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017373,"owners_count":26086051,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bash-script"],"created_at":"2025-05-05T16:59:51.076Z","updated_at":"2025-10-14T00:03:54.964Z","avatar_url":"https://github.com/onlyuser.png","language":"Shell","readme":"sh\n==\n\nCopyright (C) 2011-2017 \u003cmailto:onlyuser@gmail.com\u003e\n\nAbout:\n------\n\nsh is a collection of handy shell scripts.\n\n**Currently, it includes the following:**\n\n* xgrep   -- a grep wrapper that screens filenames before grepping\n* xrefact -- a script for refactoring code\n* xform   -- a script for applying my coding conventions\n* diff.py -- a meld wrapper for better git diff experience\n\nxgrep:\n------\n\n\u003cdl\u003e\n    \u003cdt\u003eSynopsis:\u003c/dt\u003e\n    \u003cdd\u003exgrep \u0026lt;FILENAME\u0026gt; [SEARCH_STR]\u003c/dd\u003e\n\n    \u003cdt\u003eDescription:\u003c/dt\u003e\n    \u003cdd\u003eSearches for SEARCH_STR in files matched by FILENAME.\u003c/dd\u003e\n    \u003cdd\u003eIf SEARCH_STR not given, simply lists files matched by FILENAME.\u003c/dd\u003e\n\u003c/dl\u003e\n\n**Parameters:**\n\n* FILENAME   -- regex describing which files to apply action\n* SEARCH_STR -- grepped regex to apply to files matched\n\nxrefact:\n--------\n\n\u003cdl\u003e\n    \u003cdt\u003eSynopsis:\u003c/dt\u003e\n    \u003cdd\u003exrefact \u0026lt;FILENAME\u0026gt; \u0026lt;SEARCH_STR\u0026gt; \u0026lt;REPLACE_STR\u0026gt; [IGNORE_COLLISION={1/0}]\u003c/dd\u003e\n\n    \u003cdt\u003eDescription:\u003c/dt\u003e\n    \u003cdd\u003eReplaces SEARCH_STR with REPLACE_STR for files matched by FILENAME.\u003c/dd\u003e\n    \u003cdd\u003eIf IGNORE_COLLISION is 0, skips replaces that produce new occurrences of SEARCH_STR.\u003c/dd\u003e\n    \u003cdd\u003eReplaces files named SEARCH_STR to REPLACE_STR as well.\u003c/dd\u003e\n    \u003cdd\u003eIGNORE_COLLISION also applies to file renaming, with analogous functionality.\u003c/dd\u003e\n\u003c/dl\u003e\n\n**Parameters:**\n\n* FILENAME         -- regex describing which files to apply action\n* SEARCH_STR       -- grepped regex to apply to files matched\n* REPLACE_STR      -- string to replace SEARCH_STR\n* IGNORE_COLLISION -- 1 for force replace, 0 for skipping collision case\n\nxform:\n------\n\n\u003cdl\u003e\n    \u003cdt\u003eSynopsis:\u003c/dt\u003e\n    \u003cdd\u003exform \u0026lt;FILENAME\u0026gt;\u003c/dd\u003e\n\n    \u003cdt\u003eDescription:\u003c/dt\u003e\n    \u003cdd\u003eApplies formatting rules to files matched by FILENAME.\u003c/dd\u003e\n\u003c/dl\u003e\n\n**Parameters:**\n\n* FILENAME -- regex describing which files to apply action\n\n**Format rules:**\n\n* unify indent\n* trim trailing space\n* unify empty brace spacing\n* unify control-statement spacing\n* unify spacing after \"#include\" and \"namespace\"\n* STL headers (remove file extension + replace quotes with angle braces)\n* C++ headers (remove file extension + replace quotes with angle braces)\n* C headers (replace quotes with angle braces)\n\nRequirements:\n-------------\n\nAdd these lines to your .bashrc to gain PATH access (to my scripts):\n\n    export PATH=sh:$PATH\n    export PATH=sh/xargs:$PATH\n\nAdd these lines to your .bashrc to use diff.py:\n\n    #git config --global diff.external meld\n    git config --global diff.external sh/diff.py\n\nKeywords:\n---------\n\n    shell scripting, bash, git, meld\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonlyuser%2Fsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonlyuser%2Fsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonlyuser%2Fsh/lists"}