{"id":22261432,"url":"https://github.com/mhio/mash","last_synced_at":"2026-05-01T10:32:08.241Z","repository":{"id":89271852,"uuid":"128688045","full_name":"mhio/mash","owner":"mhio","description":"mash - simple shell task runner","archived":false,"fork":false,"pushed_at":"2024-12-30T23:08:54.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-25T13:46:35.670Z","etag":null,"topics":["bash","build-scripts","make","shell","task-runner"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/mhio.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":"2018-04-08T22:46:07.000Z","updated_at":"2024-12-30T23:08:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9138a5b-32fc-4f4c-83bc-a930224bb2bf","html_url":"https://github.com/mhio/mash","commit_stats":null,"previous_names":["mhio/mash"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mhio/mash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fmash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fmash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fmash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fmash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhio","download_url":"https://codeload.github.com/mhio/mash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhio%2Fmash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32494270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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","build-scripts","make","shell","task-runner"],"created_at":"2024-12-03T09:12:47.254Z","updated_at":"2026-05-01T10:32:08.219Z","avatar_url":"https://github.com/mhio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### mash\n\nA simple make-ish task runner in bash to avoid makefiles. Nothing fancy.\n\n_______\n\nDefine functions in bash with the name `run:x` and then execute with `./mash x`\n\n```\nrun:task:name () {\n  echo \"I am task:name\"\n}\nrun:other(){\n  printf \"I'm %s\\n\" \"$*\"\n}\n```\n\n    $ ./mash task:name  #runs `run:task:name`\n    I am task:name\n\n    $ ./mash other a bunch of things  #runs `run:other`\n    I'm a bunch of things\n\n### Setup\n\nThe `mash` scripts header and footer can be printed with the `dump` task to initialize a new file\n\n    $ ~/repos/make.sh/mash dump \u003e ~/myrepo/mash\n    $ chmod 755 my/mash\n\nOr all in one\n    \n    ./mash dump:to ~/myrepo/mash\n\n### Tasks\n\nList tasks\n\n    $ ./mash\n\n or\n\n    $ ./mash help\n    Commands:\n      task:name\n      other\n\nThe default `dump` task includes a shell completion helper\n\n    $ ./mash completion:words\n    task:name\n    other\n\nFor zsh completions add a `_mash` file in `$fpath`\n\n```\n#compdef mash\n\nlocal context state state_descr line\ntasks=( $(_call_program completion:words $words[1] completion:words) )\n_arguments \"1:task:($tasks)\" \\\n           \"*:arg:-\u003eargs\"\n```\n\nbash completion `/etc/bash_completion.d/mash`\n```\n_mash()\n{\n  #pwd\n  #echo \"0:$0 1:$1\"\n  _script_commands=$($1 completion:words)\n\n  local cur\n  COMPREPLY=()\n  cur=\"${COMP_WORDS[COMP_CWORD]}\"\n  COMPREPLY=( $(compgen -W \"${_script_commands}\" -- ${cur}) )\n\n  return 0\n}\n# no space after\n#complete -o nospace -F _mash ./mash.sh\ncomplete -F _mash mash\n```\n\n\n### `sh` or `bash`\n\nPOSIX `sh` doesn't guarentee a function named with a `:` works, even though it does work for most\n implementations. `bash` also allows for much simpler `${var:1:2}` substring indexing.\n\nMIT license\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhio%2Fmash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhio%2Fmash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhio%2Fmash/lists"}