Add television cable channels for Ansible-managed configs#104
Conversation
…gh-prs, git-log, path, recent-files, text
📝 WalkthroughWalkthroughAdds nine new Television cable channel TOML templates (channels, dirs, env, files, gh-prs, git-log, path, recent-files, text) under templates/television/cable/, each defining source, preview, keybindings, and actions, and registers them as config_files entries in group_vars/all.yml. ChangesTelevision cable channels
Estimated code review effort: 3 (Moderate) | ~25 minutes Related PRs: None specified. Suggested labels: enhancement, documentation, config Suggested reviewers: None specified. 🐰 Nine new channels hop into view, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
templates/television/cable/path.toml (1)
1-11: 📐 Maintainability & Code Quality | 🔵 TrivialFragile reliance on TOML basic-string
\nescaping.Since these are TOML basic (double-quoted) strings,
\nis decoded by the TOML parser itself into a literal newline character before the shell ever sees it — it isn't passed through as the two characters\n. The commands happen to still work here because both usages sit inside single-quoted shell segments ('%s\n',':'/'\n') where an embedded raw newline behaves the same as the intended escape, but this is coincidental and easy to break with future edits.♻️ Suggested fix — use a literal string so backslashes are passed through unmodified
[source] -command = "printf '%s\n' \"$PATH\" | tr ':' '\n'" +command = '''printf '%s\n' "$PATH" | tr ':' '\n' ''' [preview] -command = "fd -tx -d1 . \"{}\" -X printf \"%s\n\" \"{/}\" | sort -f | bat -n --color=always" +command = '''fd -tx -d1 . "{}" -X printf "%s\n" "{/}" | sort -f | bat -n --color=always'''🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@templates/television/cable/path.toml` around lines 1 - 11, The command strings in the path TOML rely on basic-string \n escaping, which TOML decodes before the shell sees it and makes the intent fragile. Update the source and preview command values in the path template to use a TOML literal string style so the shell receives backslashes unchanged, and keep the behavior tied to the existing command entries under the [source] and [preview] sections.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@templates/television/cable/path.toml`:
- Around line 1-11: The command strings in the path TOML rely on basic-string \n
escaping, which TOML decodes before the shell sees it and makes the intent
fragile. Update the source and preview command values in the path template to
use a TOML literal string style so the shell receives backslashes unchanged, and
keep the behavior tied to the existing command entries under the [source] and
[preview] sections.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ba9b735-8c54-40d0-83a2-25274a2588ee
📒 Files selected for processing (10)
group_vars/all.ymltemplates/television/cable/channels.tomltemplates/television/cable/dirs.tomltemplates/television/cable/env.tomltemplates/television/cable/files.tomltemplates/television/cable/gh-prs.tomltemplates/television/cable/git-log.tomltemplates/television/cable/path.tomltemplates/television/cable/recent-files.tomltemplates/television/cable/text.toml
Why
The
televisionfuzzy-finder cable channels (channels, dirs, env, files,gh-prs, git-log, path, recent-files, text) were only configured manually
and not tracked by the Ansible playbook, so they weren't reproducible
across machines.
Approach
Followed the existing
config_filesrole pattern used for all otherdotfiles instead of creating a new role — keeps deployment consistent
with how every other templated config (Zed, Kitty, Starship, etc.) is
managed.
How it works
Copied the 9 cable channel
.tomlfiles intotemplates/television/cable/and registered each as an entry inconfig_files(group_vars/all.yml), so theconfig_filesroletemplates them to
~/.config/television/cable/*.tomlon playbook run.Links
Summary by CodeRabbit