{"id":18485061,"url":"https://github.com/petr-korobeinikov/tern","last_synced_at":"2026-04-30T14:32:58.156Z","repository":{"id":89041097,"uuid":"396431175","full_name":"petr-korobeinikov/tern","owner":"petr-korobeinikov","description":"The missing ternary shell operator for humans","archived":false,"fork":false,"pushed_at":"2021-08-15T17:45:17.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T21:46:38.493Z","etag":null,"topics":["shell"],"latest_commit_sha":null,"homepage":"","language":"Go","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/petr-korobeinikov.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":"2021-08-15T17:21:57.000Z","updated_at":"2021-08-19T20:34:17.000Z","dependencies_parsed_at":"2023-03-04T18:00:22.706Z","dependency_job_id":null,"html_url":"https://github.com/petr-korobeinikov/tern","commit_stats":null,"previous_names":["petr-korobeinikov/tern"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petr-korobeinikov%2Ftern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petr-korobeinikov%2Ftern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petr-korobeinikov%2Ftern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petr-korobeinikov%2Ftern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petr-korobeinikov","download_url":"https://codeload.github.com/petr-korobeinikov/tern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254030873,"owners_count":22002665,"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":["shell"],"created_at":"2024-11-06T12:44:10.921Z","updated_at":"2026-04-30T14:32:58.106Z","avatar_url":"https://github.com/petr-korobeinikov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tern\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/pkorobeinikov/tern)](https://goreportcard.com/report/github.com/pkorobeinikov/tern)\n\n\u003e The missing ternary shell operator for humans\n\nJust need some ternary support in shell automation.\n\n```shell\n# shell mode\ntern thruthy_expr yes no\nyes\n\n# boolean mode (-b)\ntern -b 0 yes no\nno\n\ntern -b false yes no\nno\n\ntern \"\" yes no\nno\n```\n\n## Tests\n\n### Unit\n\n```shell\ngo test -v -cover ./...\n```\n\n### Functional\n\n```shell\nbats --tap tests\n```\n\n## Build\n\n```shell\ngo build -o ~/Bin/tern cmd/tern/main.go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetr-korobeinikov%2Ftern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetr-korobeinikov%2Ftern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetr-korobeinikov%2Ftern/lists"}