{"id":20592390,"url":"https://github.com/valodim/zsh-livestreamer-completion","last_synced_at":"2026-04-19T12:37:38.721Z","repository":{"id":11263250,"uuid":"13666340","full_name":"Valodim/zsh-livestreamer-completion","owner":"Valodim","description":"zsh completion for livestreamer (with twitch teams and followed channels)","archived":false,"fork":false,"pushed_at":"2013-11-06T23:55:41.000Z","size":128,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-17T00:12:31.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Valodim.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":"2013-10-18T01:39:55.000Z","updated_at":"2015-12-01T14:48:33.000Z","dependencies_parsed_at":"2022-09-11T03:00:23.325Z","dependency_job_id":null,"html_url":"https://github.com/Valodim/zsh-livestreamer-completion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-livestreamer-completion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-livestreamer-completion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-livestreamer-completion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-livestreamer-completion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valodim","download_url":"https://codeload.github.com/Valodim/zsh-livestreamer-completion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242223024,"owners_count":20092173,"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":[],"created_at":"2024-11-16T07:43:45.850Z","updated_at":"2026-04-19T12:37:38.663Z","avatar_url":"https://github.com/Valodim.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"zsh livestreamer / twitch.tv / justin.tv completion\n===\n\nThis is a zsh completion for\n[livestreamer](https://github.com/chrippa/livestreamer). At this point, it only\ncompletes options as usual, and channels from twitch.tv as well as justin.tv.\n\n![screenshot](http://valodim.stratum0.net/livestreamer_completion.png \"Pinkie Pie Style!\")\n\ninstallation and configuration\n---\n\nInstallation works by copying or symlinking the _livestreamer completion file\nsomewhere into your fpath, or putting the repo directory in your fpath variable\nlike this:\n\n    fpath+=( /path/to/zsh-livestreamer-completion )\n\nWithout configuration, options and stuff will be completed, but no channels.\nThere are two types of completions supported for channels, followed and teams.\n\n\ntwitch.tv followed channel config\n---\n\nTo get completion of channels followed by an account, a twitch\n[implicit grant flow](https://github.com/justintv/Twitch-API/blob/master/authentication.md#implicit-grant-flow)\noauth token with scope user_read for that account is required. To get one,\nsimply run the 'oauth.zsh' script, which should guide you through the process.\nIn the end, you should end up with a zstyle like this:\n\n    zstyle \":completion:*:twitch:follows\" oauth-token abcdefghijklmnopqrstuvwxyz12345\n\nThat's it! Completion should otherwise just work™\n\n\ntwitch.tv team channel config\n---\n\nThis is the easier one, it completes twitch teams. All you need to do is set a\nstyle to all teams you want completed:\n\n    zstyle \":completion:*:twitch\" teams srl\n\nThis completes the [SpeedRunsLive](http://twitch.tv/team/srl) team. More than\none is possible by just adding more names to the line.\n\njustin.tv favorite channel config\n---\n\nUnlike the twitch.tv followed channels, favorites for justin.tv do NOT need\nauthentication. Yay! Simply set your username like this:\n\n    zstyle \":completion:*:justin:favorites\" username MyTwitchUsername\n\n\nfine tuning\n---\n\nThere are a couple more zstyles for fine tuning:\n\n    # minimum number of viewers a stream needs to have to show up\n    zstyle \":completion:*:twitch:x\" viewmin 0\n\n    # max streams to show for one category\n    zstyle \":completion:*:twitch:x\" maxstreams 20\n\n    # completion description format. placeholders %n, %d, %c, %g, %t are\n    # available for name, displayname, viewercount, game and title.\n    zstyle \":completion:*:twitch:x\" format \"%-5c %15d %t\"\n\nThe x in the style can be either \"follows\" for followed streams, \"teams:*\"\nto set styles for all teams, or \"teams:teamname\" to set for a specific team.\nFor example, to show srl streams with more than 100 viewers only:\n\n    zstyle \":completion:*:twitch:teams:srl\" viewmin 100\n\nBy default, there is no minimum viewer count, and at most 20 streams per\ncategory are shown.\n\n\ncaveats\n---\n\nOne thing I am not quite happy about is that the completion is not pure zsh, it\ncalls to python for json parsing.\n[I tried](https://gist.github.com/Valodim/7017924) doing the parsing in zsh,\nbut it's just not feasible in an efficent manner. But since livestreamer itself\nis python, I figured it'd be okay to outsource this with some lines of python.\nThen again, it uses curl for fetching the data so~\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalodim%2Fzsh-livestreamer-completion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalodim%2Fzsh-livestreamer-completion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalodim%2Fzsh-livestreamer-completion/lists"}